openXC7 / openXC7-snap

snap package for nextpnr PnR FPGA toolchain for Xilinx 7 series FPGAs, with Spartan7, Artix7, Zynq7 and Kintex7 support
BSD 3-Clause "New" or "Revised" License
26 stars 1 forks source link

fasm falling back to slow python based parser #5

Open Rain92 opened 1 week ago

Rain92 commented 1 week ago

Currently building anything with the snap package will result in the following warning.

/snap/openxc7/current/usr/lib/python3/dist-packages/fasm/parser/__init__.py:30: RuntimeWarning: Unable to import fast Antlr4 parser implementation.
  ImportError: cannot import name 'antlr_to_tuple' from partially initialized module 'fasm.parser' (most likely due to a circular import) (/snap/openxc7/current/usr/lib/python3/dist-packages/fasm/parser/__init__.py)

  Falling back to the much slower pure Python textX based parser
  implementation.

As shown by mithro in https://github.com/chipsalliance/f4pga-examples/issues/201 this can have a huge impact on build times and should be addressed.

hansfbaier commented 1 week ago

That is a known issue in both snap and nix variants. Contributions welcome!