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.post88

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.post88
File Size Uploaded Provenance Actions
fasm-0.0.2.post88.tar.gz 84.6 kB Without provenance Details for fasm-0.0.2.post88.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fasm 0.0.2.post88
File Actions
fasm-0.0.2.post88-pp37-pypy37_pp73-win_amd64.whl PyPy 3.7 PyPy 3.7 7.3 Windows x86-64 Details for fasm-0.0.2.post88-pp37-pypy37_pp73-win_amd64.whl
fasm-0.0.2.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl PyPy 3.7 PyPy 3.7 7.3 macOS 10.7+ x86-64 Details for fasm-0.0.2.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
fasm-0.0.2.post88-pp36-pypy36_pp73-win32.whl PyPy 3.6 PyPy 3.6 7.3 Windows x86-32 Details for fasm-0.0.2.post88-pp36-pypy36_pp73-win32.whl
fasm-0.0.2.post88-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.post88-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
fasm-0.0.2.post88-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for fasm-0.0.2.post88-cp39-cp39-win_amd64.whl
fasm-0.0.2.post88-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.post88-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post88-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.post88-cp39-cp39-macosx_10_15_x86_64.whl
fasm-0.0.2.post88-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for fasm-0.0.2.post88-cp38-cp38-win_amd64.whl
fasm-0.0.2.post88-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.post88-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post88-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details for fasm-0.0.2.post88-cp38-cp38-macosx_10_14_x86_64.whl
fasm-0.0.2.post88-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for fasm-0.0.2.post88-cp37-cp37m-win_amd64.whl
fasm-0.0.2.post88-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.post88-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post88-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.post88-cp37-cp37m-macosx_10_15_x86_64.whl
fasm-0.0.2.post88-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for fasm-0.0.2.post88-cp36-cp36m-win_amd64.whl
fasm-0.0.2.post88-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.post88-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
fasm-0.0.2.post88-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.post88-cp36-cp36m-macosx_10_15_x86_64.whl

Total release size: 5.5 MB

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

Download URL fasm-0.0.2.post88.tar.gz
Size 84.6 kB
Tags Source
SHA-256 checksum
How to use checksums
049d79dd26f584083b222fad3866a2a3430f8c5bae0d42ae568e8227d8390c3c
BLAKE2b-256 checksum
How to use checksums
784c94fb3bdb87bea21406c0e5da375f0b10d7b1e4b5103cea453a2de23b5d61
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.post88-pp37-pypy37_pp73-win_amd64.whl

Download URL fasm-0.0.2.post88-pp37-pypy37_pp73-win_amd64.whl
Size 73.3 kB
Tags PyPy 3.7 PyPy 3.7 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
66194d9989a6e2bf0ba06fe4564777ac2dd4edb7b6428b01131e2cdf20fb5150
BLAKE2b-256 checksum
How to use checksums
211bb063fbd3f19f089bad0391a164b2f5539db427e212182479d53e19c2ea00
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.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl

Download URL fasm-0.0.2.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
Size 57.6 kB
Tags PyPy 3.7 PyPy 3.7 7.3 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
678c802cc18c4c16091c8d4ef39f55eaf8fe5b874ebd1da80ca75351e313e227
BLAKE2b-256 checksum
How to use checksums
7cf96df986186a8b585bc0824d308887c18057b2b2fa3ae6e17b437bb7156562
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.post88-pp36-pypy36_pp73-win32.whl

Download URL fasm-0.0.2.post88-pp36-pypy36_pp73-win32.whl
Size 73.3 kB
Tags PyPy 3.6 PyPy 3.6 7.3 Windows x86-32
SHA-256 checksum
How to use checksums
fab38f177f1dd9e449c47547c9b74de3532b632ba4a56387de205d43550d0c8f
BLAKE2b-256 checksum
How to use checksums
983076367bd41a6d393235c0fb522efa66a4dcdefe797af2337814dc094793d3
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.post88-pp36-pypy36_pp73-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post88-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
Size 399.8 kB
Tags PyPy 3.6 PyPy 3.6 7.3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
2116d467710ee9518a8082073ba46236ca64d864a17b4b0426b255dacccbf6e1
BLAKE2b-256 checksum
How to use checksums
d42ad9d22c3642e80f9237cd595245a6f55ef24a5c117a9c3bdb4d148cf3b4ed
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.post88-cp39-cp39-win_amd64.whl

Download URL fasm-0.0.2.post88-cp39-cp39-win_amd64.whl
Size 73.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
64ba864f7c8f3b543be9d3791f307f01dff39ca186b00478439b6011d15b6daa
BLAKE2b-256 checksum
How to use checksums
460c0464366d48a09b0ea6450b753d068b0421bf2c5029c03c550c3b4c0a8817
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.post88-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post88-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 796.1 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
748c242f00edc876d8a5bf7cf36d84e136208401112528a17defedebbc9b85d8
BLAKE2b-256 checksum
How to use checksums
dc13e950845e63bef8be2d56f6ba9a28491333032d72ad5086f6f5626ad8f490
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.post88-cp39-cp39-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post88-cp39-cp39-macosx_10_15_x86_64.whl
Size 420.9 kB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
1e51b97833a2d4d8eb298451560d2ca1ab918d7e6c62baf52761c1d88274bcee
BLAKE2b-256 checksum
How to use checksums
92047943ec47fbce54fc8e1d62ace19a80edfe01212aa5bbb0ad1a055d4debd1
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.post88-cp38-cp38-win_amd64.whl

Download URL fasm-0.0.2.post88-cp38-cp38-win_amd64.whl
Size 73.3 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
b7e0083776e297b4d191ee79fbf2833991849842ca9ddba68487659a278ff97a
BLAKE2b-256 checksum
How to use checksums
bad45d772d477523a8dc9731d98794e001a7c050bca6dcefac61509cdb6a78ea
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.post88-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post88-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 818.0 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
9c87de57d3ed61b66f347c2f2e555bdc28cd1898e6c23a8918bd43e77221d1c2
BLAKE2b-256 checksum
How to use checksums
4013cf6cb7d477b716363001d5a625b96173a8d60e6cc8b21e6722f5384c32a5
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.post88-cp38-cp38-macosx_10_14_x86_64.whl

Download URL fasm-0.0.2.post88-cp38-cp38-macosx_10_14_x86_64.whl
Size 77.0 kB
Tags CPython 3.8 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
fd97f099feb7d97d9327dfed44b8b9d0ed4cccd856c955dfd31989dd26d959ec
BLAKE2b-256 checksum
How to use checksums
311ff73483db1b7853f74423638d26e4d1105058140187e3f16594814dfaaf74
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.post88-cp37-cp37m-win_amd64.whl

Download URL fasm-0.0.2.post88-cp37-cp37m-win_amd64.whl
Size 73.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
6eafd6b5448df575558bf3ff5ebcb28d9d523111c1475899f5eb276557bd7af0
BLAKE2b-256 checksum
How to use checksums
f086ddd02de2d2a8b0af9c89489205f78108ef0d05e1f861a023337d7f43aed1
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.post88-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post88-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 767.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
34f08ab5c966661ec1ec542a59aa46224e42a2e3d9774c477f9a8db0ddc1250b
BLAKE2b-256 checksum
How to use checksums
480e42a8810d9fb5a66f07e5af4463e47c69d39a14137a948e8a3e5594dc78b1
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.post88-cp37-cp37m-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post88-cp37-cp37m-macosx_10_15_x86_64.whl
Size 418.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
723dfe842ce2ec716079b6d0ee00f9d4f4970adf873c45b8faa3de6102f2e1ff
BLAKE2b-256 checksum
How to use checksums
d66a3da4d123c0e47e0e3cd071ee670ade27a5be590972f9b161b62043bfa767
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.post88-cp36-cp36m-win_amd64.whl

Download URL fasm-0.0.2.post88-cp36-cp36m-win_amd64.whl
Size 73.3 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
81341e769e055b831887511fef92945defce8a20551b06a5521ee91f4776542d
BLAKE2b-256 checksum
How to use checksums
50dbfc0813814e9d7e51c1c019c79b529099a97a1f62a4208718309d225ca69c
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.post88-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post88-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 769.8 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
f33d5178b42a73632d1b84be404cf73c3e1274adb1bfef0d8fcb153817343223
BLAKE2b-256 checksum
How to use checksums
7625f4f194444d701c7a11dd379bc8e34ada3c53e163ba04e44946bcc707f63e
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.post88-cp36-cp36m-macosx_10_15_x86_64.whl

Download URL fasm-0.0.2.post88-cp36-cp36m-macosx_10_15_x86_64.whl
Size 417.8 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
3253a9279c1dbb7fae345233f8f324f0d4bca286829311209ba762b9a7804b06
BLAKE2b-256 checksum
How to use checksums
c6a91c4c74fb067f018bfd2c86165d1099bcaab539f49619327eee2d93958a98
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.post88

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