Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chrisjohgorman opened this issue Dec 4, 2024 · 1 comment
Open

Comments

@chrisjohgorman
Copy link

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.

@chrisjohgorman
Copy link
Author

Please disregard the previous SOC.fasm.txt file as it is not built with the verilog step17.v.txt. The correct file generated by step17.v.txt is
SOC.fasm.2.txt. This is the one that fails during the call to fasm2frames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant