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.post78.tar.gz (80.4 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.post78-pp37-pypy37_pp73-win_amd64.whl (67.1 kB view details)

Uploaded PyPyWindows x86-64

fasm-0.0.2.post78-pp37-pypy37_pp73-macosx_10_15_x86_64.whl (395.6 kB view details)

Uploaded PyPymacOS 10.15+ x86-64

fasm-0.0.2.post78-pp36-pypy36_pp73-win32.whl (67.1 kB view details)

Uploaded PyPyWindows x86

fasm-0.0.2.post78-pp36-pypy36_pp73-macosx_10_15_x86_64.whl (395.6 kB view details)

Uploaded PyPymacOS 10.15+ x86-64

fasm-0.0.2.post78-cp39-cp39-win_amd64.whl (67.1 kB view details)

Uploaded CPython 3.9Windows x86-64

fasm-0.0.2.post78-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (788.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

fasm-0.0.2.post78-cp39-cp39-macosx_10_15_x86_64.whl (416.6 kB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

fasm-0.0.2.post78-cp38-cp38-win_amd64.whl (67.1 kB view details)

Uploaded CPython 3.8Windows x86-64

fasm-0.0.2.post78-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (810.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

fasm-0.0.2.post78-cp38-cp38-macosx_10_15_x86_64.whl (415.0 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

fasm-0.0.2.post78-cp37-cp37m-win_amd64.whl (67.1 kB view details)

Uploaded CPython 3.7mWindows x86-64

fasm-0.0.2.post78-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (759.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

fasm-0.0.2.post78-cp37-cp37m-macosx_10_15_x86_64.whl (414.0 kB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

fasm-0.0.2.post78-cp36-cp36m-win_amd64.whl (67.1 kB view details)

Uploaded CPython 3.6mWindows x86-64

fasm-0.0.2.post78-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (761.9 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

fasm-0.0.2.post78-cp36-cp36m-macosx_10_15_x86_64.whl (413.6 kB view details)

Uploaded CPython 3.6mmacOS 10.15+ x86-64

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78.tar.gz
Algorithm Hash digest
SHA256 e0447ef6981e259110b4c077e37a1339e151bf0098bce4039b96243ed4528ac1
MD5 8e864fed55cf8832abf32d7e7094dd9b
BLAKE2b-256 f1eda18d97b65d799706e270d3b1f5dcd52b56faff4b25c44a86897ecdaba08e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-pp37-pypy37_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 65573c527be071699c39e4e009110fb613f3e94741fa6d9729c32aa5fdd4a198
MD5 2865abcefa1c4df489397e01fcadfae4
BLAKE2b-256 f1c88ce44a75f68b9d7c68539bf9a73e15fd13cebb94db220754dd82374812b3

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post78-pp37-pypy37_pp73-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post78-pp37-pypy37_pp73-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 395.6 kB
  • Tags: PyPy, macOS 10.15+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post78-pp37-pypy37_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b02941eb357b98b2ea2f75bb76eea6eebe471af19b1c26436590f27477225479
MD5 3ef92702e5edcd0805d4f16058f2cf71
BLAKE2b-256 22849386c0f6ca95ed318b220947a13a169660a981da4f3dd39997e03c0e14a4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-pp36-pypy36_pp73-win32.whl
Algorithm Hash digest
SHA256 8dd4b333ad346cde975e6ceffe89bc0eed35a4410e83067c7cfca7ef00a45edc
MD5 589ea71e8ffedf08677e7c3eebafce1e
BLAKE2b-256 aacb1896c2c08c44ced21e3164ef4be1e40787bc5c296c3535fc83427c6d7d58

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-pp36-pypy36_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c7c951cdf9947b3bcae5221105d4b300ef75f7c8d94da2c6ca2f1d13a2db9e6d
MD5 f9625b562816b7ae6dcddf42d0616b58
BLAKE2b-256 e513b4c6fab12a1c94d71ea6edebecc77eeafff3eb3ef90611f32f65d7e54a64

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2087cf914511cd955419ec492a66fd65bd317996375c89d444b395381aed4af0
MD5 089dc057f5860b038d3bc377a3346779
BLAKE2b-256 110648f5d90d709e11b1604adbaa8bb000f1e2112d591a151d790c4b51a39fd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fasm-0.0.2.post78-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8f6285a3e6977bea414f367fd5ba1a1c4d81dd7388f12703b316a81a59e66d64
MD5 e018b5d3edd90182824c6437fdc7bf12
BLAKE2b-256 baa9e2e0ba705a677a9fd52d19d48cdc2868355b575c67a41174953c4fba55e7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 eace3b1bc03b9d7c5892b4ed01dfb12a211cf247c2187bfbb4e5a5798d3bcd9e
MD5 ed9a1c14d0fb1e63fa9fc529088550b3
BLAKE2b-256 347176782e38899c402003aa6008b23b2439aa5e37f93e28956bd3921f1203c0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 44071a4424d15a4dadc636e42a53102105f82313a8fb135ba03a18e1679a3f62
MD5 2aa168fba839d47ecd662cf28aac0fc0
BLAKE2b-256 25288574acb87466d1e8db5b42584f54d7c9f46693a5f9eb9c0dd247f221a65a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fasm-0.0.2.post78-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f3342fc4461bd184180afd91c62410c83be56a7de6195f1a0e502c3edb83ac8f
MD5 8cad5ca009c61a85a90567f83092b923
BLAKE2b-256 e6baa50501797117dacef33c8ef6d3bf3f260447463710fd728c5fed1898b364

See more details on using hashes here.

File details

Details for the file fasm-0.0.2.post78-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: fasm-0.0.2.post78-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 415.0 kB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using 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

File hashes

Hashes for fasm-0.0.2.post78-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 51b32bdb7c1fe7d2d538c84a52310d8032bff6c4cb046179bfc6d2a9d0c5d07c
MD5 33104574793f48518996d7609bae3ec3
BLAKE2b-256 c461afab0c05bb03b2bf31785f7a3f0460f6eee9f0767f69105a4ec0fb68d838

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e14d407f9b12c81e2bbf0676b18b852dec16e5a3c32f98ca478418889e90d17d
MD5 a3309b58151209408fd3ba2dda460043
BLAKE2b-256 643fc6a263900d186c80458db776a3ab5639a5d9f3c1de2fce3251d687e12800

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fasm-0.0.2.post78-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a15e702655ec4c1f2193dc221274612b8909450486fa8780c0f18c25a7d4494b
MD5 410fc43ea032e6a6343223059cf930b4
BLAKE2b-256 7f7d15d0291167e8eec882baffe376aa7613f59d74a25b757e1fa35509936ef0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 af368c78c546c0dafea421f655da66907f40663add113ff2c39da11da103b75c
MD5 5d2bcff2a31d443e6be76cc92f575dcc
BLAKE2b-256 96568185071748cda828d012d9e1909070bcae4b28ad9baa4da1f8295c6169ca

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 c80a04f377932bc2b3e9e043080dc9e07b1e68d896c1c19b93703624019e1d70
MD5 3918315b5db7d9d7e7a41363b1640f40
BLAKE2b-256 0e406de59f1d1a16757a7c8df2ab41230f328833f9a3199c6c892330fd881d9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fasm-0.0.2.post78-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 faa2004292bc0bd0e3d733e0c4854f8f1a36332b770aaf9fc27a22487bb56488
MD5 95197191808724547f90a34bfa652108
BLAKE2b-256 5bb6fdb0e5aefe59cad435bf7396a9ce68d931be3324ed00984f882f3915f3bc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fasm-0.0.2.post78-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 81655fe0f7af8c7d2d9db0c215efbbd247c1be6311105b258066a276a1cb7328
MD5 95108f7e2942f12e69a63562aade0fac
BLAKE2b-256 bd05185837bd3ac54806788028cd54ca6d95f8e1979a4fad3f157f76b19dc1be

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