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

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

Built distributions (wheels)

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

Total release size: 6.1 MB

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

Download URL fasm-0.0.2.post78.tar.gz
Size 80.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e0447ef6981e259110b4c077e37a1339e151bf0098bce4039b96243ed4528ac1
BLAKE2b-256 checksum
How to use checksums
f1eda18d97b65d799706e270d3b1f5dcd52b56faff4b25c44a86897ecdaba08e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL fasm-0.0.2.post78-pp37-pypy37_pp73-win_amd64.whl
Size 67.1 kB
Tags PyPy 3.7 PyPy 3.7 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
65573c527be071699c39e4e009110fb613f3e94741fa6d9729c32aa5fdd4a198
BLAKE2b-256 checksum
How to use checksums
f1c88ce44a75f68b9d7c68539bf9a73e15fd13cebb94db220754dd82374812b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.5

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

Download URL fasm-0.0.2.post78-pp37-pypy37_pp73-macosx_10_15_x86_64.whl
Size 395.6 kB
Tags PyPy 3.7 PyPy 3.7 7.3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
b02941eb357b98b2ea2f75bb76eea6eebe471af19b1c26436590f27477225479
BLAKE2b-256 checksum
How to use checksums
22849386c0f6ca95ed318b220947a13a169660a981da4f3dd39997e03c0e14a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.5

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

Download URL fasm-0.0.2.post78-pp36-pypy36_pp73-win32.whl
Size 67.1 kB
Tags PyPy 3.6 PyPy 3.6 7.3 Windows x86-32
SHA-256 checksum
How to use checksums
8dd4b333ad346cde975e6ceffe89bc0eed35a4410e83067c7cfca7ef00a45edc
BLAKE2b-256 checksum
How to use checksums
aacb1896c2c08c44ced21e3164ef4be1e40787bc5c296c3535fc83427c6d7d58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.3

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

Download URL fasm-0.0.2.post78-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
Size 395.6 kB
Tags PyPy 3.6 PyPy 3.6 7.3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
c7c951cdf9947b3bcae5221105d4b300ef75f7c8d94da2c6ca2f1d13a2db9e6d
BLAKE2b-256 checksum
How to use checksums
e513b4c6fab12a1c94d71ea6edebecc77eeafff3eb3ef90611f32f65d7e54a64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 PyPy/7.3.3

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

Download URL fasm-0.0.2.post78-cp39-cp39-win_amd64.whl
Size 67.1 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
2087cf914511cd955419ec492a66fd65bd317996375c89d444b395381aed4af0
BLAKE2b-256 checksum
How to use checksums
110648f5d90d709e11b1604adbaa8bb000f1e2112d591a151d790c4b51a39fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL fasm-0.0.2.post78-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 788.8 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
8f6285a3e6977bea414f367fd5ba1a1c4d81dd7388f12703b316a81a59e66d64
BLAKE2b-256 checksum
How to use checksums
baa9e2e0ba705a677a9fd52d19d48cdc2868355b575c67a41174953c4fba55e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL fasm-0.0.2.post78-cp39-cp39-macosx_10_15_x86_64.whl
Size 416.6 kB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
eace3b1bc03b9d7c5892b4ed01dfb12a211cf247c2187bfbb4e5a5798d3bcd9e
BLAKE2b-256 checksum
How to use checksums
347176782e38899c402003aa6008b23b2439aa5e37f93e28956bd3921f1203c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL fasm-0.0.2.post78-cp38-cp38-win_amd64.whl
Size 67.1 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
44071a4424d15a4dadc636e42a53102105f82313a8fb135ba03a18e1679a3f62
BLAKE2b-256 checksum
How to use checksums
25288574acb87466d1e8db5b42584f54d7c9f46693a5f9eb9c0dd247f221a65a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

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

Download URL fasm-0.0.2.post78-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 810.9 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
f3342fc4461bd184180afd91c62410c83be56a7de6195f1a0e502c3edb83ac8f
BLAKE2b-256 checksum
How to use checksums
e6baa50501797117dacef33c8ef6d3bf3f260447463710fd728c5fed1898b364
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL fasm-0.0.2.post78-cp38-cp38-macosx_10_15_x86_64.whl
Size 415.0 kB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
51b32bdb7c1fe7d2d538c84a52310d8032bff6c4cb046179bfc6d2a9d0c5d07c
BLAKE2b-256 checksum
How to use checksums
c461afab0c05bb03b2bf31785f7a3f0460f6eee9f0767f69105a4ec0fb68d838
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

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

Download URL fasm-0.0.2.post78-cp37-cp37m-win_amd64.whl
Size 67.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
e14d407f9b12c81e2bbf0676b18b852dec16e5a3c32f98ca478418889e90d17d
BLAKE2b-256 checksum
How to use checksums
643fc6a263900d186c80458db776a3ab5639a5d9f3c1de2fce3251d687e12800
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

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

Download URL fasm-0.0.2.post78-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 759.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
a15e702655ec4c1f2193dc221274612b8909450486fa8780c0f18c25a7d4494b
BLAKE2b-256 checksum
How to use checksums
7f7d15d0291167e8eec882baffe376aa7613f59d74a25b757e1fa35509936ef0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL fasm-0.0.2.post78-cp37-cp37m-macosx_10_15_x86_64.whl
Size 414.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
af368c78c546c0dafea421f655da66907f40663add113ff2c39da11da103b75c
BLAKE2b-256 checksum
How to use checksums
96568185071748cda828d012d9e1909070bcae4b28ad9baa4da1f8295c6169ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

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

Download URL fasm-0.0.2.post78-cp36-cp36m-win_amd64.whl
Size 67.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c80a04f377932bc2b3e9e043080dc9e07b1e68d896c1c19b93703624019e1d70
BLAKE2b-256 checksum
How to use checksums
0e406de59f1d1a16757a7c8df2ab41230f328833f9a3199c6c892330fd881d9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8

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

Download URL fasm-0.0.2.post78-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 761.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
faa2004292bc0bd0e3d733e0c4854f8f1a36332b770aaf9fc27a22487bb56488
BLAKE2b-256 checksum
How to use checksums
5bb6fdb0e5aefe59cad435bf7396a9ce68d931be3324ed00984f882f3915f3bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL fasm-0.0.2.post78-cp36-cp36m-macosx_10_15_x86_64.whl
Size 413.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
81655fe0f7af8c7d2d9db0c215efbbd247c1be6311105b258066a276a1cb7328
BLAKE2b-256 checksum
How to use checksums
bd05185837bd3ac54806788028cd54ca6d95f8e1979a4fad3f157f76b19dc1be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.2.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

Security for fasm 0.0.2.post78

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