Package: wnpp
Severity: wishlist
* Package name : python-fasm
Version : 0.0.2.post100
Upstream Contact: SymbiFlow Authors <[email protected]>
* URL : https://github.com/chipsalliance/fasm
* License : Apache-2.0
Programming Lang: Python
Description : FPGA Assembly (FASM) parser and generator library
FASM (FPGA Assembly) is a textual format for describing which features
of an FPGA are enabled in a design. It is the interchange format
between the place-and-route step and the bitstream assembly step in
the open FPGA toolchains. This package provides a Python library to
parse and write FASM files, and the "fasm" command line tool.
This library is the one dependency missing from Debian for packaging
fasm2frames from prjxray (#1154255). fasm2frames converts the FASM
output of nextpnr-himbaechel-xilinx into frames for xc7frames2bit, and
is the last step of the fully open Xilinx 7-series flow that is not yet
in Debian:
yosys -> nextpnr-himbaechel-xilinx -> fasm2frames -> xc7frames2bit
-> openFPGALoader
fasm has two parsers. The fast one is written in C++ with ANTLR4 and
built as a Cython extension. The slow one is pure Python and uses textX,
which is not packaged in Debian. fasm only imports textX when the ANTLR
parser is unavailable, so a package that builds the ANTLR parser does
not need textX at runtime. textX could be left as a Suggests, even
though upstream's setup.py lists it as a requirement.
Building the ANTLR parser may need the CMake install fixes from an open
upstream PR by Xiretza (https://github.com/chipsalliance/fasm/pull/87),
which openXC7 has already merged into its fork. They install the
parse_fasm shared library and the generated tags.py, make the ANTLR jar
path overridable, and fix linking the tests against a distribution
gtest. They change only the build, not the library's behaviour.