cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yaya04
Visitor
Visitor
555 Views
Registered: ‎07-30-2019

HLS Co-Sim error though Csim works

Jump to solution

Hi all,

First of all, thanks for reading this post.

Though I've designed few programs with Vivado HLS 2018.2, I got this error message and I hope to ask your any idea how to overcome this.

So my problem is this. I wrote a '.tcl' file to make a project to work in a batch mode. The script run C Simulation, C synthesis, Export RTL, and C/RTL Cosimulation in order.

The project when I ran the '.tcl' script file worked well for both C Simulation and C synthesis (including 'Export RTL'), however it failed at C/RTL Co-Simulation.

 

INFO: [SIM 211-1] CSim done with 0 errors.
INFO: [SIM 211-3] *************** CSIM finish ***************

...

INFO: [HLS 200-111] Finished generating all RTL models Time (s): cpu = 00:00:38 ; elapsed = 00:00:40 . Memory (MB): peak = 561.871 ; gain = 192.000 ; free physical = 778 ; free virtual = 7211
INFO: [SYSC 207-301] Generating SystemC RTL for yolov2tiny.
INFO: [VHDL 208-304] Generating VHDL RTL for yolov2tiny.
INFO: [VLOG 209-307] Generating Verilog RTL for yolov2tiny.
INFO: [IMPL 213-8] Exporting RTL as a Vivado IP.

...

INFO: [IP_Flow 19-234] Refreshing IP repositories
INFO: [IP_Flow 19-1704] No user IP repositories specified
INFO: [IP_Flow 19-2313] Loaded Vivado IP repository '/opt/Xilinx/Vivado/2018.2/data/ip'.
INFO: [Common 17-206] Exiting Vivado at Tue Nov 3 16:14:55 2020.

...

INFO: [IP_Flow 19-234] Refreshing IP repositories
INFO: [IP_Flow 19-1704] No user IP repositories specified
INFO: [IP_Flow 19-2313] Loaded Vivado IP repository '/opt/Xilinx/Vivado/2018.2/data/ip'.
INFO: [Common 17-206] Exiting Vivado at Tue Nov 3 16:14:55 2020...
INFO: [COSIM 212-47] Using XSIM for RTL simulation.
INFO: [COSIM 212-14] Instrumenting C test bench ...
ERROR: [COSIM 212-24] TB preprocess failed : gcc: fatal error: no input files
compilation terminated.
ERROR: [HLS 200-70] Cannot find file /home/chaeeon/chaeeon/face-mask-detection/dev/v1.1-dev/projects/YoloV2Tiny/YoloV2Tiny.dpu.fpga/hw/hls/tcl.float/proj_tiny_yolo/nexys_video/./sim/autowrap/testbench/main.cpp_pre.cpp.
24
while executing
"source [lindex $::argv 1] "
("uplevel" body line 1)
invoked from within
"uplevel \#0 { source [lindex $::argv 1] } "

INFO: [HLS 200-112] Total elapsed time: 63.45 seconds; peak allocated memory: 158.747 MB.
INFO: [Common 17-206] Exiting vivado_hls at Tue Nov 3 16:14:56 2020...

 

I tried to change the path of the source code (main.cpp) or move all source codes in a directory and make a project at there but both works were not solved the problem.

 

I'm stuck because of this error message. It will be nice if I can get any kind of your advice.

 

The project is built in below environment

Ubuntu 18.04.1

Vivado/Vivado HLS 2018.2

I also uploaded the full log file just in case.

 

 

Thanks.

0 Kudos
1 Solution

Accepted Solutions
yaya04
Visitor
Visitor
458 Views
Registered: ‎07-30-2019

Thank you for your kind reply Scott.

I already wrote the reply but It disappeared when I edit the post, so I write this again.

 

To answer your question, I give the same arguments and ldflags to both 'csim_design' and 'cosim_design' commands.

The log file was not generated because the program was terminated even before it generates the log file.

 

Fortunately, I fixed the problem last night.

As you mentioned, the problem was in the project script.

The reason was strings for the compiler.


add_files -cflags "-O3 -m64 -mcmodel=large -c \
                            -I${DPU_HOME}/include \
                            -I${SRC_DIR}" \
                             "${SYN_SRC}"

add_files -cflags "-O3 -m64 -mcmodel=large -c \
                            -I${DPU_HOME}/include \
                            -I${DPU_HOME}/lib \
                            -I${SRC_DIR} \
                            -I${TB_DIR}/lib \
                            -I${TB_DIR}/unit.layer.test.pc/src" \
               -tb         "${TB_DIR}/unit.layer.test.pc/src/unit_layer_test.cpp"

This is the original one which makes a trouble

 


add_files -cflags "-O3 -m64 -mcmodel=large -c\
                            -I${DPU_HOME}/include\
                            -I${SRC_DIR}"\
                            "${SYN_SRC}"

add_files -cflags "-O3 -m64 -mcmodel=large -c\
                            -I${DPU_HOME}/include\
                            -I${DPU_HOME}/lib\
                            -I${SRC_DIR}\
                            -I${TB_DIR}/lib\
                            -I${TB_DIR}/unit.layer.test.pc/src"\
                       -tb "${TB_DIR}/unit.layer.test.pc/src/unit_layer_test.cpp"

This is the newer one that fixes the problem.

 

The only difference between original and newer one is 'white space' at the end of each lines.

I guess that the white space may block the source code to be compiled before getting into CoSimulation.

However, it is strange that the compiler at C simulation stage get the string while the (other?) compiler at CoSimulation stage does not.

 

Thanks again for your care, and hope this would help someone else who are suffered like me.

Chaeeon.

View solution in original post

0 Kudos
2 Replies
scampbell
Moderator
Moderator
493 Views
Registered: ‎10-04-2011

Hello @yaya04 

I think we would need to see the project script to better understand the error. C Simulation and CoSimulation both have separate fields for arguments to be passed to the main function in the testbench. Is it possible that these are different for you, or that the CoSim file does not exist?

Thank you,
Scott

yaya04
Visitor
Visitor
459 Views
Registered: ‎07-30-2019

Thank you for your kind reply Scott.

I already wrote the reply but It disappeared when I edit the post, so I write this again.

 

To answer your question, I give the same arguments and ldflags to both 'csim_design' and 'cosim_design' commands.

The log file was not generated because the program was terminated even before it generates the log file.

 

Fortunately, I fixed the problem last night.

As you mentioned, the problem was in the project script.

The reason was strings for the compiler.


add_files -cflags "-O3 -m64 -mcmodel=large -c \
                            -I${DPU_HOME}/include \
                            -I${SRC_DIR}" \
                             "${SYN_SRC}"

add_files -cflags "-O3 -m64 -mcmodel=large -c \
                            -I${DPU_HOME}/include \
                            -I${DPU_HOME}/lib \
                            -I${SRC_DIR} \
                            -I${TB_DIR}/lib \
                            -I${TB_DIR}/unit.layer.test.pc/src" \
               -tb         "${TB_DIR}/unit.layer.test.pc/src/unit_layer_test.cpp"

This is the original one which makes a trouble

 


add_files -cflags "-O3 -m64 -mcmodel=large -c\
                            -I${DPU_HOME}/include\
                            -I${SRC_DIR}"\
                            "${SYN_SRC}"

add_files -cflags "-O3 -m64 -mcmodel=large -c\
                            -I${DPU_HOME}/include\
                            -I${DPU_HOME}/lib\
                            -I${SRC_DIR}\
                            -I${TB_DIR}/lib\
                            -I${TB_DIR}/unit.layer.test.pc/src"\
                       -tb "${TB_DIR}/unit.layer.test.pc/src/unit_layer_test.cpp"

This is the newer one that fixes the problem.

 

The only difference between original and newer one is 'white space' at the end of each lines.

I guess that the white space may block the source code to be compiled before getting into CoSimulation.

However, it is strange that the compiler at C simulation stage get the string while the (other?) compiler at CoSimulation stage does not.

 

Thanks again for your care, and hope this would help someone else who are suffered like me.

Chaeeon.

View solution in original post

0 Kudos