Skip to main content

FPGA Assembly (FASM) Parser and Generation library

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fasm-0.0.2.post88.tar.gz (84.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fasm-0.0.2.post88-pp37-pypy37_pp73-win_amd64.whl (73.3 kB view details)

Uploaded PyPyWindows x86-64

fasm-0.0.2.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl (57.6 kB view details)

Uploaded PyPymacOS 10.7+ x86-64

fasm-0.0.2.post88-pp36-pypy36_pp73-win32.whl (73.3 kB view details)

Uploaded PyPyWindows x86

fasm-0.0.2.post88-pp36-pypy36_pp73-macosx_10_15_x86_64.whl (399.8 kB view details)

Uploaded PyPymacOS 10.15+ x86-64

fasm-0.0.2.post88-cp39-cp39-win_amd64.whl (73.3 kB view details)

Uploaded CPython 3.9Windows x86-64

fasm-0.0.2.post88-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (796.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

fasm-0.0.2.post88-cp39-cp39-macosx_10_15_x86_64.whl (420.9 kB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

fasm-0.0.2.post88-cp38-cp38-win_amd64.whl (73.3 kB view details)

Uploaded CPython 3.8Windows x86-64

fasm-0.0.2.post88-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (818.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

fasm-0.0.2.post88-cp38-cp38-macosx_10_14_x86_64.whl (77.0 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

fasm-0.0.2.post88-cp37-cp37m-win_amd64.whl (73.3 kB view details)

Uploaded CPython 3.7mWindows x86-64

fasm-0.0.2.post88-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (767.3 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

fasm-0.0.2.post88-cp37-cp37m-macosx_10_15_x86_64.whl (418.3 kB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

fasm-0.0.2.post88-cp36-cp36m-win_amd64.whl (73.3 kB view details)

Uploaded CPython 3.6mWindows x86-64

fasm-0.0.2.post88-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (769.8 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

fasm-0.0.2.post88-cp36-cp36m-macosx_10_15_x86_64.whl (417.8 kB view details)

Uploaded CPython 3.6mmacOS 10.15+ x86-64

File details

Details for the file fasm-0.0.2.post88.tar.gz.

File metadata

  • Download URL: fasm-0.0.2.post88.tar.gz
  • Upload date:
  • Size: 84.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88.tar.gz
Algorithm Hash digest
SHA256 049d79dd26f584083b222fad3866a2a3430f8c5bae0d42ae568e8227d8390c3c
MD5 27b2270ef80ff596ea65031082ae8fe7
BLAKE2b-256 784c94fb3bdb87bea21406c0e5da375f0b10d7b1e4b5103cea453a2de23b5d61

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-pp37-pypy37_pp73-win_amd64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-pp37-pypy37_pp73-win_amd64.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: PyPy, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-pp37-pypy37_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 66194d9989a6e2bf0ba06fe4564777ac2dd4edb7b6428b01131e2cdf20fb5150
MD5 95d8fcad381b84040900e42f65c5c81f
BLAKE2b-256 211bb063fbd3f19f089bad0391a164b2f5539db427e212182479d53e19c2ea00

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 57.6 kB
  • Tags: PyPy, macOS 10.7+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 678c802cc18c4c16091c8d4ef39f55eaf8fe5b874ebd1da80ca75351e313e227
MD5 2ee5b5cce59c1acc09221f58d51c010b
BLAKE2b-256 7cf96df986186a8b585bc0824d308887c18057b2b2fa3ae6e17b437bb7156562

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-pp36-pypy36_pp73-win32.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-pp36-pypy36_pp73-win32.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: PyPy, Windows x86
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-pp36-pypy36_pp73-win32.whl
Algorithm Hash digest
SHA256 fab38f177f1dd9e449c47547c9b74de3532b632ba4a56387de205d43550d0c8f
MD5 30dc34f747ea79e960a0d64cbef4022d
BLAKE2b-256 983076367bd41a6d393235c0fb522efa66a4dcdefe797af2337814dc094793d3

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-pp36-pypy36_pp73-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 399.8 kB
  • Tags: PyPy, macOS 10.15+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2116d467710ee9518a8082073ba46236ca64d864a17b4b0426b255dacccbf6e1
MD5 2dcbf61a0e21bcafa624bb07bdbd32b0
BLAKE2b-256 d42ad9d22c3642e80f9237cd595245a6f55ef24a5c117a9c3bdb4d148cf3b4ed

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 64ba864f7c8f3b543be9d3791f307f01dff39ca186b00478439b6011d15b6daa
MD5 294ca830833ba0d574ef0548069cb6f5
BLAKE2b-256 460c0464366d48a09b0ea6450b753d068b0421bf2c5029c03c550c3b4c0a8817

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for fasm-0.0.2.post88-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 748c242f00edc876d8a5bf7cf36d84e136208401112528a17defedebbc9b85d8
MD5 6d10b5dcd168113ab331876c20fa7d71
BLAKE2b-256 dc13e950845e63bef8be2d56f6ba9a28491333032d72ad5086f6f5626ad8f490

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp39-cp39-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 420.9 kB
  • Tags: CPython 3.9, macOS 10.15+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 1e51b97833a2d4d8eb298451560d2ca1ab918d7e6c62baf52761c1d88274bcee
MD5 a32af952abaacc08f46ca56d349a6751
BLAKE2b-256 92047943ec47fbce54fc8e1d62ace19a80edfe01212aa5bbb0ad1a055d4debd1

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b7e0083776e297b4d191ee79fbf2833991849842ca9ddba68487659a278ff97a
MD5 f818b0fcfc9ec770907e13aea664cab4
BLAKE2b-256 bad45d772d477523a8dc9731d98794e001a7c050bca6dcefac61509cdb6a78ea

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for fasm-0.0.2.post88-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9c87de57d3ed61b66f347c2f2e555bdc28cd1898e6c23a8918bd43e77221d1c2
MD5 8fee17033823f802a8e7f875118e49b6
BLAKE2b-256 4013cf6cb7d477b716363001d5a625b96173a8d60e6cc8b21e6722f5384c32a5

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 77.0 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fd97f099feb7d97d9327dfed44b8b9d0ed4cccd856c955dfd31989dd26d959ec
MD5 f460b9db4bc53c3d6b37089073e277e8
BLAKE2b-256 311ff73483db1b7853f74423638d26e4d1105058140187e3f16594814dfaaf74

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6eafd6b5448df575558bf3ff5ebcb28d9d523111c1475899f5eb276557bd7af0
MD5 4fed2f2eb628ed253bc9c74a71ba6a70
BLAKE2b-256 f086ddd02de2d2a8b0af9c89489205f78108ef0d05e1f861a023337d7f43aed1

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for fasm-0.0.2.post88-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 34f08ab5c966661ec1ec542a59aa46224e42a2e3d9774c477f9a8db0ddc1250b
MD5 5f9a50c57a9cf878331b549486493d1e
BLAKE2b-256 480e42a8810d9fb5a66f07e5af4463e47c69d39a14137a948e8a3e5594dc78b1

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp37-cp37m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 418.3 kB
  • Tags: CPython 3.7m, macOS 10.15+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 723dfe842ce2ec716079b6d0ee00f9d4f4970adf873c45b8faa3de6102f2e1ff
MD5 b499efb6011392fcbb543bd9cafc7cb5
BLAKE2b-256 d66a3da4d123c0e47e0e3cd071ee670ade27a5be590972f9b161b62043bfa767

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 81341e769e055b831887511fef92945defce8a20551b06a5521ee91f4776542d
MD5 1730e05c79b73fd4f5c51b85eeb4bdc6
BLAKE2b-256 50dbfc0813814e9d7e51c1c019c79b529099a97a1f62a4208718309d225ca69c

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for fasm-0.0.2.post88-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f33d5178b42a73632d1b84be404cf73c3e1274adb1bfef0d8fcb153817343223
MD5 147e9fbd930e52b60f04014caa3f7266
BLAKE2b-256 7625f4f194444d701c7a11dd379bc8e34ada3c53e163ba04e44946bcc707f63e

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post88-cp36-cp36m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post88-cp36-cp36m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 417.8 kB
  • Tags: CPython 3.6m, macOS 10.15+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post88-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3253a9279c1dbb7fae345233f8f324f0d4bca286829311209ba762b9a7804b06
MD5 40f454a28d5179fd780f1adbf6f4036e
BLAKE2b-256 c6a91c4c74fb067f018bfd2c86165d1099bcaab539f49619327eee2d93958a98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page