Open medbzkst opened 6 months ago
Same problem. Is there any insight provided about how it works about linking the testbench?
Apologies for the delayed response. Hovering over the error
text in the message error in X.XXs
should give the full error message.
You can also try running this Python script from the same conda environment where you installed LightningSim; it should hopefully provide more output when it crashes. (Run it as ./cli.py path/to/solution1
.)
For reference, the actual code that handles this step can be found here: https://github.com/sharc-lab/LightningSim/blob/d3fb26b0388f9cebc5685eb942df2bfe0d8445f4/backend/lightningsim/runner.py#L479-L536
Thanks for your response. I tried the cli python script and the key traceback of the link error went as below.
> .../x86_64-conda-linux-gnu/bin/ld: /opt/xilinx/2022.1/Vitis_HLS/2022.1/lnx64/tools/systemc/lib/libsystemc.a(sc_main_main.o): in function `sc_elab_and_sim':
> sc_main_main.cpp:(.text+0xd8): undefined reference to `sc_main'
> collect2: error: ld returned 1 exit status
> make: *** [/opt/xilinx/2022.1/Vitis_HLS/2022.1/include/Makefile.sysc.rules:393: /tmp/lightningsim.dc3um42t/testbench_top] Error 1
I guess this issue may come form the mismatch of xilinx vitis version?
Yes, this looks like it's due to a change in 2022.1. I had updated this step to use the Xilinx-provided Makefile in the hopes that the linking process would now be version-agnostic, but apparently no such luck.
I'll have to look at what changed in the linking process between 2021.1 and 2022.1.
The tool consistently fails when it arrives at the "Linking testbench" step. It always takes the same time, whatever is happening in the background (~ 4.59s), which suggests that it is not waiting for something to happen when Vitis HLS is compiling.
I am running on Vitis HLS 2022.1.