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

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

Built distributions (wheels)

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

Total release size: 6.1 MB

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

Download URL fasm-0.0.2.post67.tar.gz
Size 80.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5e8258d45818122b403b27327c79047f9cfa2e092db56265a1351e3738df10d4
BLAKE2b-256 checksum
How to use checksums
8f5f9492baf44a769e99252da8615cb0ae72fa6159186a56ebc28629cd1b37b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / fasm-0.0.2.post67-pp37-pypy37_pp73-win32.whl

Download URL fasm-0.0.2.post67-pp37-pypy37_pp73-win32.whl
Size 66.9 kB
Tags PyPy 3.7 PyPy 3.7 7.3 Windows x86-32
SHA-256 checksum
How to use checksums
baf8d16961885980ddbf724e884273ca6c05d1032610988ce43f622a8dcf6421
BLAKE2b-256 checksum
How to use checksums
4226e0c4cb040869078e5dbf630ba59cadbea5447e86b1181f304e67239478ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 PyPy/7.3.3beta

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

Download URL fasm-0.0.2.post67-pp37-pypy37_pp73-macosx_10_15_x86_64.whl
Size 403.3 kB
Tags PyPy 3.7 PyPy 3.7 7.3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
38e1814d5ac2785d0e200eafeb93dd43d45e44e61d9cf4401b21f246a68975f4
BLAKE2b-256 checksum
How to use checksums
6cbf48cce0eda81a96c89599c05e8766da7f1fc836f07b1fae8f57049b54d789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 PyPy/7.3.3beta

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

Download URL fasm-0.0.2.post67-pp36-pypy36_pp73-win32.whl
Size 66.9 kB
Tags PyPy 3.6 PyPy 3.6 7.3 Windows x86-32
SHA-256 checksum
How to use checksums
efb0ccf9b38fd138eebac32f516ef328375db3cf80b4a5b16de6387266d4d30a
BLAKE2b-256 checksum
How to use checksums
ace0e1bc5801a734737d0abb53772001a498b7005aa4131042d4e5faf3d0bbb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 PyPy/7.3.3

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

Download URL fasm-0.0.2.post67-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
Size 403.3 kB
Tags PyPy 3.6 PyPy 3.6 7.3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
4c38437e91e72b4456dec3ed58a3ae4e14c7d189f9400b5ccaac56de0c08e968
BLAKE2b-256 checksum
How to use checksums
2256a000b1a9bdc3e2a303fdb4205db79c2b05008faca2b4988a30ee9a021639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 PyPy/7.3.3

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

Download URL fasm-0.0.2.post67-cp39-cp39-win_amd64.whl
Size 66.9 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
a9c28ea821c2f81d11ec79f16027a80b827795b7ca033898afcba10e3045862a
BLAKE2b-256 checksum
How to use checksums
18ca4b02c479107d14a5482f0c04dcf5f9d3249db1ec88c3cc9faafd0b551144
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / fasm-0.0.2.post67-cp39-cp39-manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post67-cp39-cp39-manylinux2010_x86_64.whl
Size 792.6 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
2b8d1f395fda87f9e2e3e67d5e8cf4ac6c182df3c2b2b45c64a19ac6b55c8856
BLAKE2b-256 checksum
How to use checksums
5af0db057e2b9d0edd52eae3915b3c8771d08401c44df61949d4b13fd6ab9534
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

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

Download URL fasm-0.0.2.post67-cp39-cp39-macosx_10_15_x86_64.whl
Size 424.3 kB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
00458a921acddd46d89542f521c146667d00cdad896e4dfc65dfbe36a8bf4f62
BLAKE2b-256 checksum
How to use checksums
fd3487232f14436011069e6a7250c8794b3529944e4fc08002c11e8dd5c8f2f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

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

Download URL fasm-0.0.2.post67-cp38-cp38-win_amd64.whl
Size 66.9 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
6d3d7f819e4e1cd960a61502b30917623a187f56c5666d15f0e11a921936e726
BLAKE2b-256 checksum
How to use checksums
ae92ae6a9292206af0aa8f8626edc1306ab7c5b9c19c49436243e5b66e9ec492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / fasm-0.0.2.post67-cp38-cp38-manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post67-cp38-cp38-manylinux2010_x86_64.whl
Size 815.1 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
222ba6a0200b86f6b782fafecfc22641d8e49b455ad77af9fba3fa82791cfca7
BLAKE2b-256 checksum
How to use checksums
faae79af8fea02c5c156c031882c0bec09edc724ef522ca5e98d90d672cd0658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

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

Download URL fasm-0.0.2.post67-cp38-cp38-macosx_10_15_x86_64.whl
Size 422.8 kB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
49b48e572fbfdb101f42627da5eb3f585161154287baa803af9885758dd06f69
BLAKE2b-256 checksum
How to use checksums
1d6a9ce2fa66f7eb157089568d8788c705bbfe80571b3777c9c1c31c719e7b6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

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

Download URL fasm-0.0.2.post67-cp37-cp37m-win_amd64.whl
Size 66.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
a2254c9860f6d4d30217276e33818d8dffcd55676488b872c62e2474b1edbb35
BLAKE2b-256 checksum
How to use checksums
1da7e82b32408290070e90370f5ac8cb80f721568fbf346a23687e30167c7970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.9

Release files / fasm-0.0.2.post67-cp37-cp37m-manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post67-cp37-cp37m-manylinux2010_x86_64.whl
Size 763.7 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
c85213f68c433493f30e643028e7f1fd1ad3b6d3ec8cff43ca360eb917b800f1
BLAKE2b-256 checksum
How to use checksums
71ae65943f9818f1238824ae0d01ead30464092490340c3bd2951d94eb6edf62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

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

Download URL fasm-0.0.2.post67-cp37-cp37m-macosx_10_15_x86_64.whl
Size 421.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
7c0b0485d0ede0a5eede7856fc071c3032eb90ef9d49ac8b2f19e4198446768e
BLAKE2b-256 checksum
How to use checksums
e59066aeb557739c42eaaf9b7c0894fac378c4486f27a97871cb9666966def46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.9

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

Download URL fasm-0.0.2.post67-cp36-cp36m-win_amd64.whl
Size 66.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
88245a937fe311208300f094f94c7fd3e230f8db54c58f770bb55266533cbbc7
BLAKE2b-256 checksum
How to use checksums
80be713c5b63e9029eddfd943579c2153baef24968c89bca6391675a90b153af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.6.8

Release files / fasm-0.0.2.post67-cp36-cp36m-manylinux2010_x86_64.whl

Download URL fasm-0.0.2.post67-cp36-cp36m-manylinux2010_x86_64.whl
Size 766.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
8ddb8a32e52bca67abf2b89809eaf19a564cc639b3eabe676ee77cb127be9686
BLAKE2b-256 checksum
How to use checksums
67c2b63a9aac59ee30b2a7bd8821adf3cf4aed81ce7f81f0bd4a7d8763506812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

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

Download URL fasm-0.0.2.post67-cp36-cp36m-macosx_10_15_x86_64.whl
Size 421.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
83b6e03463b76b898458fb2c697e3928610e271cb5436e7dc6d86f163e9fa635
BLAKE2b-256 checksum
How to use checksums
5c22d23f9fdac418ac2491459dbb85fddfab88e344302765fa8fdf38a9b530a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.6.12

Security for fasm 0.0.2.post67

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