Skip to content

fasm2frames fails when called on fasm generated by nextpnr-xilinx #2460

@chrisjohgorman

Description

@chrisjohgorman

I'm not 100% sure where this bug belongs, but I think it is caused by prjxray. I'm also investigating whether or not it occurs because of bad code generated by nextpnr-xilinx.

The commands I'm using are

nextpnr-xilinx --chipdb /usr/share/nextpnr/xilinx-chipdb/xc7a35tcpg236-1.bin --xdc BOARDS/cmod_a7.xdc --json SOC.json --write SOC_routed.json --fasm SOC.fasm

and

fasm2frames --part xc7a35tcpg236-1 --db-root /usr/share/nextpnr/prjxray-db/artix7 SOC.fasm > SOC.frames

I get no errors from the nextpnr-xilinx command, but get the following from fasm2frames.

+ fasm2frames --part xc7a35tcpg236-1 --db-root /usr/share/nextpnr/prjxray-db/artix7 SOC.fasm
Traceback (most recent call last):
  File "/usr/bin/fasm2frames", line 33, in <module>
    sys.exit(load_entry_point('prjxray==0.0.1', 'console_scripts', 'fasm2frames')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/prjxray/fasm2frames.py", line 304, in main
    run(
  File "/usr/lib/python3.12/site-packages/prjxray/fasm2frames.py", line 189, in run
    assembler.parse_fasm_filename(filename_in, extra_features=extra_features)
  File "/usr/lib/python3.12/site-packages/prjxray/fasm_assembler.py", line 203, in parse_fasm_filename
    raise FasmLookupError('\n'.join(missing_features))
prjxray.fasm_assembler.FasmLookupError: Segment DB CMT_TOP_R_LOWER_B, key CMT_TOP_R_LOWER_B.MMCM_CLK_FREQ_BB_REBUF2_NS.MMCM_CLK_FREQ_BB_NS2 not found from line 'CMT_TOP_R_LOWER_B_X8Y61.MMCM_CLK_FREQ_BB_REBUF2_NS.MMCM_CLK_FREQ_BB_NS2'
Segment DB CMT_TOP_R_UPPER_T, key CMT_TOP_R_UPPER_T.PLL_CLK_FREQ_BB2_NS.PLL_CLK_FREQ_BB_BUFOUT_NS2 not found from line 'CMT_TOP_R_UPPER_T_X8Y44.PLL_CLK_FREQ_BB2_NS.PLL_CLK_FREQ_BB_BUFOUT_NS2'

I'm attaching SOC.fasm as SOC.fasm.txt in case it has bad data that is being passed to fasm2frames. SOC.fasm.txt I'm also attaching the verilog that causes the error, step17.v.txt step17.v.txt

If I've missed some important information, please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions