Skip to main content

FPGA Assembly (FASM) Parser and Generation library

This repository documents the FASM file format and provides parsing libraries and simple tooling for working with FASM files.

It provides both a pure Python parser based on textx and a significantly faster C parser based on ANTLR. The library will try and use the ANTLR parser first and fall back to the textx parser if the compiled module is not found.

Which parsers are supported by your currently install can be found via python3 -c "import fasm.parser as p; print(p.available). The currently in use parser can be found via fasm.parser.implementation.

It is highly recommended to use the ANTLR parser as it is about 15 times faster.

functions for parsing and generating FASM files.

Build Instructions

CMake is required, and ANTLR has a few dependencies:

sudo apt install cmake default-jre-headless uuid-dev libantlr4-runtime-dev

Pull dependencies in third_party:

git submodule update --init

Build:

make build

Test with:

python setup.py test

The ANTLR runtime can either be linked statically or as a shared library. Use the --antlr-runtime=[static|shared] flag to select between the two modes e.g.:

python setup.py install --antlr-runtime=shared

Or, using pip:

pip install . --install-option="--antlr-runtime=shared" --no-use-pep517

The runtime will be built and statically linked by default. This flag is available in the build_ext, build, develop, and install commands.

The --no-use-pep517 flag is needed because there is currently no way to pass flags with PEP517.
Relevant issue: https://github.com/pypa/pip/issues/5771

FPGA Assembly (FASM)

FPGA Assembly is a file format designed by the SymbiFlow Project developers to provide a plain text file format for configuring the internals of an FPGA.

It is designed to allow FPGA place and route to not care about the actual bitstream format used on an FPGA.

FASM Ecosystem Diagram

Properties

  • Removing a line from a FASM file leaves you with a valid FASM file.
  • Allow annotation with human readable comments.
  • Allow annotation with "computer readable" comments.
  • Has syntactic sugar for expressing memory / lut init bits / other large arrays of data.
  • Has a canonical form.
  • Does not require any specific bitstream format.

Supported By

FASM is currently supported by the SymbiFlow Verilog to Routing fork, but we hope to get it merged upstream sometime soon.

It is also used by Project X-Ray.

Metadata

Release files for fasm 0.0.2.post84

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fasm 0.0.2.post84
File Size Uploaded Provenance Actions
fasm-0.0.2.post84.tar.gz 80.4 kB Without provenance Details for fasm-0.0.2.post84.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fasm 0.0.2.post84
File Actions
fasm-0.0.2.post84-pp37-pypy37_pp73-win_amd64.whl PyPy 3.7 PyPy 3.7 7.3 Windows x86-64 Details for fasm-0.0.2.post84-pp37-pypy37_pp73-win_amd64.whl
fasm-0.0.2.post84-pp37-pypy37_pp73-macosx_10_15_x86_64.whl PyPy 3.7 PyPy 3.7 7.3 macOS 10.15+ x86-64 Details for fasm-0.0.2.post84-pp37-pypy37_pp73-macosx_10_15_x86_64.whl
fasm-0.0.2.post84-pp36-pypy36_pp73-win32.whl PyPy 3.6 PyPy 3.6 7.3 Windows x86-32 Details for fasm-0.0.2.post84-pp36-pypy36_pp73-win32.whl
fasm-0.0.2.post84-pp36-pypy36_pp73-macosx_10_15_x86_64.whl PyPy 3.6 PyPy 3.6 7.3 macOS 10.15+ x86-64 Details for fasm-0.0.2.post84-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
fasm-0.0.2.post84-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for fasm-0.0.2.post84-cp39-cp39-win_amd64.whl
fasm-0.0.2.post84-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details for fasm-0.0.2.post84-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post84-cp39-cp39-macosx_10_15_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.15+ x86-64 Details for fasm-0.0.2.post84-cp39-cp39-macosx_10_15_x86_64.whl
fasm-0.0.2.post84-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for fasm-0.0.2.post84-cp38-cp38-win_amd64.whl
fasm-0.0.2.post84-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details for fasm-0.0.2.post84-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post84-cp38-cp38-macosx_10_15_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.15+ x86-64 Details for fasm-0.0.2.post84-cp38-cp38-macosx_10_15_x86_64.whl
fasm-0.0.2.post84-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for fasm-0.0.2.post84-cp37-cp37m-win_amd64.whl
fasm-0.0.2.post84-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details for fasm-0.0.2.post84-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post84-cp37-cp37m-macosx_10_15_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64 Details for fasm-0.0.2.post84-cp37-cp37m-macosx_10_15_x86_64.whl
fasm-0.0.2.post84-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for fasm-0.0.2.post84-cp36-cp36m-win_amd64.whl
fasm-0.0.2.post84-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details for fasm-0.0.2.post84-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post84-cp36-cp36m-macosx_10_15_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.15+ x86-64 Details for fasm-0.0.2.post84-cp36-cp36m-macosx_10_15_x86_64.whl

Total release size: 5.7 MB

Release files / fasm-0.0.2.post84.tar.gz

Download URL fasm-0.0.2.post84.tar.gz
Size 80.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b123c7beebda73b76463e93c0e3285dbffd3167a3425d8d12adb3f3c5ffedbf5
BLAKE2b-256 checksum
How to use checksums
173bc9902dbd8e298b56871a503af1d486977ef4a330ddeeaea2a2187b49c1f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release files / fasm-0.0.2.post84-pp37-pypy37_pp73-win_amd64.whl

Download URL fasm-0.0.2.post84-pp37-pypy37_pp73-win_amd64.whl
Size 67.9 kB
Tags PyPy 3.7 PyPy 3.7 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
7f28b8a2a1b1a014c79647ae14ff61b10c9d0050d71d9abd6884087eb39727bf
BLAKE2b-256 checksum
How to use checksums
b88fd4db2a3200cb144dac7e32fd220664715a0b1109cd4e7966fa85c21f157c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.7

Release files / fasm-0.0.2.post84-pp37-pypy37_pp73-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post84-pp37-pypy37_pp73-macosx_10_15_x86_64.whl
Size 394.4 kB
Tags PyPy 3.7 PyPy 3.7 7.3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
6de9f7ee23fd4b505d53f5608cdd27db5aa3cbe56e9952eaaa738b09d324f2e6
BLAKE2b-256 checksum
How to use checksums
83b9257c691aec424894b702f8cc45db1304670759ea8de7bef1f9170330f3ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.7

Release files / fasm-0.0.2.post84-pp36-pypy36_pp73-win32.whl

Download URL fasm-0.0.2.post84-pp36-pypy36_pp73-win32.whl
Size 67.9 kB
Tags PyPy 3.6 PyPy 3.6 7.3 Windows x86-32
SHA-256 checksum
How to use checksums
3bad47ce1d6741f17bd1189a182011c53844876d8939f4b43806ac8400992199
BLAKE2b-256 checksum
How to use checksums
8715e77e0d465167172ca8da086808435d8d90ebd5b967ba106c9feddf6add1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.3

Release files / fasm-0.0.2.post84-pp36-pypy36_pp73-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post84-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
Size 394.4 kB
Tags PyPy 3.6 PyPy 3.6 7.3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
2fda6bd42c1a6a09be5290f132e09a3cb7c920b65fa0bd959921cf31b83a6402
BLAKE2b-256 checksum
How to use checksums
b7c8b84dfb430b33f44c1fcfc5887f167a4b71093e0ae2d671b3681b4eeb51fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.3

Release files / fasm-0.0.2.post84-cp39-cp39-win_amd64.whl

Download URL fasm-0.0.2.post84-cp39-cp39-win_amd64.whl
Size 68.0 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
97f43cd31eff29bad0e18a30d110e1343d797f7ebec083b3af418f4dac7bbd6b
BLAKE2b-256 checksum
How to use checksums
be49224bcaf25e3082f38ce2520f4b0477cb97a644cac7f9cd0cd078874e59e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / fasm-0.0.2.post84-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post84-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 790.8 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
fb18125baa311c8831667abd3befc27947ff9a2a049c3843e101d0be9e4bdf74
BLAKE2b-256 checksum
How to use checksums
3a8e0d241b7f22b0252141063dc15ba69b3f6be836c2f24ae009408a862da9ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release files / fasm-0.0.2.post84-cp39-cp39-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post84-cp39-cp39-macosx_10_15_x86_64.whl
Size 73.4 kB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
0c070549df404d217acceb9db0495f53ab1179f18d6ff50232d81333ec0a9a63
BLAKE2b-256 checksum
How to use checksums
5fea3a4eb52109056440f10dafc9450daf6b9080c5fb7dfff289b88675716daf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release files / fasm-0.0.2.post84-cp38-cp38-win_amd64.whl

Download URL fasm-0.0.2.post84-cp38-cp38-win_amd64.whl
Size 67.9 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
a41faffe95f578da7154016518685f7893c639a031e23f4fe5764c3fb3b38dbc
BLAKE2b-256 checksum
How to use checksums
ff5203120c87c60c8703a17685e3c0c917e30cc0013fb73a9b8e9090556ded9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / fasm-0.0.2.post84-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post84-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 812.6 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
35c2512ea3d71957203a2eaf12ef2ec9f4f855692f24de961d597cdf3e75072f
BLAKE2b-256 checksum
How to use checksums
4729f4ce9454e6b1a0f88d4f97c37d2d7fc471d4004000c02802187053ce425d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release files / fasm-0.0.2.post84-cp38-cp38-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post84-cp38-cp38-macosx_10_15_x86_64.whl
Size 413.9 kB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
3c40ee3d373d24b6dd1ae7e0e831a5cba55ee70e8d0c5d16daff7e3f73cc8596
BLAKE2b-256 checksum
How to use checksums
83f9410fc270eaea98af32d02ed2abccbf8b09cac6d88c9ad00878b5144ca81b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release files / fasm-0.0.2.post84-cp37-cp37m-win_amd64.whl

Download URL fasm-0.0.2.post84-cp37-cp37m-win_amd64.whl
Size 67.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
10e5c6db8a1d8ff9e39c6d1253e8c2df650a9797d068cf3704c053eb4e66bc17
BLAKE2b-256 checksum
How to use checksums
713f41aa04e352e96d8584e2a621c9cf61e82ece92ba6b1d699263b96bf4c51b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

Release files / fasm-0.0.2.post84-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post84-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 761.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
85581ac13755c253e0aa3eb2b3073d1f9e9c06941edbe3c108153e25b1cccd7e
BLAKE2b-256 checksum
How to use checksums
ed3afce4fb05c8914000629c2e346a5521390524aaf6007fa50657e794536928
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release files / fasm-0.0.2.post84-cp37-cp37m-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post84-cp37-cp37m-macosx_10_15_x86_64.whl
Size 412.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
4546ac817af3cbcdc9612a2ddad5eeaae31e0165025aae9c37923acced4112d8
BLAKE2b-256 checksum
How to use checksums
913929a0a46d2997317bab500a03edfd662fc1cc5c75cc07e5d8e0e0ba40d92d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

Release files / fasm-0.0.2.post84-cp36-cp36m-win_amd64.whl

Download URL fasm-0.0.2.post84-cp36-cp36m-win_amd64.whl
Size 67.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
8d10abad8ec493e1cbc6b158d13aec27b1747f9f05177a107aff14dd64df671d
BLAKE2b-256 checksum
How to use checksums
fba624ff4522b1196524cd06caf6bf09c6a6a2308a1cb7f2fa2959756c092582
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8

Release files / fasm-0.0.2.post84-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post84-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 764.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
9c4a4cbb04081aa1a6e0e9fc95dded50ca38f0cbd66355ecb90d45db4538befe
BLAKE2b-256 checksum
How to use checksums
19abc9cdecfb91e76a9585a19a57938663b92914ed51d3c6d23298a99a0fcf66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release files / fasm-0.0.2.post84-cp36-cp36m-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post84-cp36-cp36m-macosx_10_15_x86_64.whl
Size 412.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
7e08f4783250f91cf27a94bcce04532b9e2b671408cd7a35244dcd7f9c0fd8fa
BLAKE2b-256 checksum
How to use checksums
5f853a2badcbc6114f108ff7eb969dfbc6cf5a42665911122acf1f96eaa1a55d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

Security for fasm 0.0.2.post84

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page