cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
2,150 Views
Registered: ‎09-17-2018

Cannot run any co-sim, even from examples!

Jump to solution

Hi all,

 

I'm a starter with Vivado HLS. I run into a issue that I cannot run any Co-simulation, even using the internal examples! I can correctly run the C simulation and C synthesis. I did not change any settings about the co-sim. Totally no idea with what is wrong here.

 

BTW, I have checked the Co-sim debugging guide: https://www.xilinx.com/Attachment/AR61063_VHLS_cosim_debug.pdf

I highly suspect it would be the environment issue, but there is no further details except suggestion of using internal simulator, which apparently could not solve my problem.

 

Would appreciate if anyone could help.

 

Here's the errors. Same errors happen on every single example.

 

Starting C/RTL cosimulation ...
C:/Xilinx/Vivado/2018.2/bin/vivado_hls.bat C:/Users/NAME/AppData/Roaming/Xilinx/Vivado/dds_mode_fixed/proj_dds_mode_fixed/solution1/cosim.tcl
INFO: [HLS 200-10] Running 'C:/Xilinx/Vivado/2018.2/bin/unwrapped/win64.o/vivado_hls.exe'
INFO: [HLS 200-10] For user 'NAME' on host 'taurusfpga' (Windows NT_amd64 version 6.2) on Thu Oct 18 15:43:42 -0500 2018
INFO: [HLS 200-10] In directory 'C:/Users/NAME/AppData/Roaming/Xilinx/Vivado/dds_mode_fixed'
INFO: [HLS 200-10] Opening project 'C:/Users/NAME/AppData/Roaming/Xilinx/Vivado/dds_mode_fixed/proj_dds_mode_fixed'.
INFO: [HLS 200-10] Opening solution 'C:/Users/NAME/AppData/Roaming/Xilinx/Vivado/dds_mode_fixed/proj_dds_mode_fixed/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7k160tfbg484-1'
INFO: [XFORM 203-701] Set the default channel type in dataflow to FIFO.
INFO: [COSIM 212-47] Using XSIM for RTL simulation.
INFO: [COSIM 212-14] Instrumenting C test bench ...
INFO: [COSIM 212-302] Starting C TB testing ...
ERROR: [COSIM 212-360] Aborting co-simulation: C TB simulation failed.
ERROR: [COSIM 212-320] C TB testing failed, stop generating test vectors. Please check C TB or re-run cosim.
ERROR: [COSIM 212-5] *** C/RTL co-simulation file generate finished: FAIL ***
command 'ap_source' returned error code
while executing
"source C:/Users/NAME/AppData/Roaming/Xilinx/Vivado/dds_mode_fixed/proj_dds_mode_fixed/solution1/cosim.tcl"
invoked from within
"hls::main C:/Users/NAME/AppData/Roaming/Xilinx/Vivado/dds_mode_fixed/proj_dds_mode_fixed/solution1/cosim.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"
Finished C/RTL cosimulation.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
1,986 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi @scampbell,

 

I tried to install the software on another fresh new machine and everything is perfect! So it seems like the previous errors are environmental / system mis-settings, (even a simple re-install cannot fix it). I'll try transplanting my work to the new machine. However if you have any magic-env-repair.bat, it would be great and save much time.

 

Thank you for all your time and effort!

Tao

View solution in original post

0 Kudos
11 Replies
Highlighted
Observer
Observer
2,143 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Sorry, forget to mention that I'm using Vivado HLS 2018.2.

0 Kudos
Highlighted
Moderator
Moderator
2,093 Views
Registered: ‎05-31-2017

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi @taoluwork,

 

Can you please confirm if you are using the compatible OS as documented at page 11 of UG973 ?

0 Kudos
Highlighted
Observer
Observer
2,074 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi @shameera,

 

Thanks for the reply. I did use the latest Windows 10, (should be 1803), 64-bit, English. Do you know any possilble reasons for this? Same error happened to all the build-in examples and my project.

 

Maybe I should try a re-install.

 

Thanks.

0 Kudos
Highlighted
Moderator
Moderator
2,057 Views
Registered: ‎10-04-2011

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hello @shameera,

 

My first thought is that this might be an issue with XSim not being able to launch as that is our internal simulation tool. One of the two common reasons this might happen is that the Vivado tools are not installed correctly, or that there is an anti-virus program blocking XSim operation.  Before you re-install, let's make sure this isn't a anti-virus issue. The XSim executable does require communication via ports, and so some anti-virus software can prevent that, and some requires permission to execute. 

 

The first thing to check is at what point is this failing for you. You mentioned that C Simulation, and Synthesis complete without error which helps narrow this down. It looks like you are using the Example Design "DDS Mode Fixed" so will use that here.

 

The main log for the CoSimulation process is found in the following directory:

C:\Users\NAME\AppData\Roaming\Xilinx\Vivado\dds_mode_fixed\proj_dds_mode_fixed\solution1\sim\report\verilog\dds_top.log

 

In there we can see the various stages of CoSim reported. For me, on line 416 I see the RTL simulation begin and the XSim elaboration step executed.

 

Vivado Simulator 2018.2
Copyright 1986-1999, 2001-2018 Xilinx, Inc. All Rights Reserved.
Running: C:/Xilinx/Vivado/2018.2/bin/unwrapped/win64.o/xelab.exe ...

 

Then on line 529 I have the following indicating the elaboration step is complete:

Built simulation snapshot dds_top

 

Then on line 539 we see the XSim script launch. 

source xsim.dir/dds_top/xsim_script.tcl

 

And what follows is the CoSimulation output with hopefully a "INFO: [COSIM-1000] *** C/RTL co-simulation finished: PASS ***" message.

 

At what point in this log does your simulation fail or does our messaging start to differ? I would suspect elaboration passes, but the XSIM simulation executable is where the failure happens. 

 

There are also more detailed simulation logs for XSim available in the /<solution>/sim/verilog directory that may help find what is going on. 

 

Can you let me know if this helps?

Thank you,
Scott

 

 

 

 

 

 

 

0 Kudos
Highlighted
Observer
Observer
2,043 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi @scampbell,

 

Thank you for your reply. I checked the report you mentioned, but astonishingly, my report is super simple. The following few lines are all I have and seems like it stopped at very early stage, because the ERROR: [COSIM-360] Aborting co-simulation: C TB simulation failed appeared quickly after INFO: [COSIM-302] Starting C TB testing ... 

 

In addition, my .../sim/report/verilog directory only contains that single file, dds_top.log, which is also weird.

 

BTW, I did not run any 3rd-party anti-virus other than the Windows defender. And turning that off did not solve the issue.

 

 

INFO: [COSIM-47] Using XSIM for RTL simulation.
INFO: [COSIM-14] Instrumenting C test bench ...
Build using "C:/Xilinx/Vivado/2018.2/msys64/mingw64/bin/g++"
Compiling apatb_dds_top.cpp
Compiling dds_chain.cpp_pre.cpp.tb.cpp
Compiling dds_chain_test.cpp_pre.cpp.tb.cpp
Generating cosim.tv.exe
INFO: [COSIM-302] Starting C TB testing ...
ERROR: [COSIM-360] Aborting co-simulation: C TB simulation failed.
ERROR: [COSIM-320] C TB testing failed, stop generating test vectors. Please check C TB or re-run cosim.
ERROR: [COSIM-5] *** C/RTL co-simulation file generate finished: FAIL ***

0 Kudos
Highlighted
Moderator
Moderator
2,038 Views
Registered: ‎10-04-2011

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hello @taoluwork,

 

Thank you for the updated information. Since your log is so small, I do wonder if the Vivado tools are installed correctly. I hate to ask people to re-install software because of the time involved, and that it also might appear like an easy answer that doesn't require much thought. So, before I agree with you that you should re-install, can you attempt to run a Vivado simulation from the Vivado tools itself? Can you launch Vivado, open any of the example designs, then attempt to run a behavioral simulation? If that works, then we need to investigate why HLS is not able to call them. But my guess is that this step will fail as well, and if so, then I think you should probably re-install the tools as something went wrong. Usually when this happens, as @shameera mentioned, the problem is an incorrect OS, but you verified that was correct eliminating that possibility. 

 

OK, can you let me know if the standalone Vivado simulation works then?

Thank you,
Scott

0 Kudos
Highlighted
Observer
Observer
2,027 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi @scampbell,

 

Thanks for your reply. Here are some updates may help locate the issue.

 

1. The vivado 2018.2 tool works fine. I CAN successfully run the behavior simulation on one of the example. Part of my console:

INFO: [USF-XSim-96] XSim completed. Design snapshot 'tb_behav' loaded.
INFO: [USF-XSim-97] XSim simulation ran for 1000ns
launch_simulation: Time (s): cpu = 00:00:08 ; elapsed = 00:00:44 . Memory (MB): peak = 1517.758 ; gain = 42.730

and wave diagram showed.

 

2. Previously I installed 2018.2 together with 2015.4 expecting no conflict. Since suspecting issues here, I un-stall them both and re-install the 2018.2 itself. Same error remains.

 

3. I tried to install Vivado HLS 2015.4 sololy, the same error exists there but info is slightly different showing one more line:

 

@I [SIM-47] Using XSIM for RTL simulation.
@I [SIM-14] Instrumenting C test bench ...
Build using "C:/Xilinx/Vivado_HLS/2015.4/msys/bin/g++.exe"
Compiling apatb_cholesky_top.cpp
Compiling cholesky.cpp_pre.cpp.tb.cpp
Compiling cholesky_tb.cpp_pre.cpp.tb.cpp
Generating cosim.tv.exe
@E [SIM-317] C++ compile error.
@E [SIM-321] EXE file generate failed.
@E [SIM-321] EXE file generate failed.
@E [SIM-331] Aborting co-simulation: C simulation failed, compilation errors.
@E [SIM-5] *** C/RTL co-simulation file generate finished: FAIL ***

 

4. Not sure whether this is related but when I run the c-simulation in 2018 version, the following error happened. However, I can bypass these errors by choosing "build only" and the debugger can run the result successfully. And the following synthesis showed no error at all.

 

Error without "build only":

INFO: [SIM 211-2] *************** CSIM start ***************
INFO: [SIM 211-4] CSIM will launch GCC as the compiler.
@E Simulation failed.
ERROR: [SIM 211-100] CSim failed with errors.
INFO: [SIM 211-3] *************** CSIM finish ***************
4
while executing
"source C:/Users/TaoLu/AppData/Roaming/Xilinx/Vivado/fft_single/proj/solution1/csim.tcl"
invoked from within
"hls::main C:/Users/TaoLu/AppData/Roaming/Xilinx/Vivado/fft_single/proj/solution1/csim.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"
Finished C simulation.

 

5. My system info:

OS Name Microsoft Windows 10 Enterprise
Version 10.0.17134 Build 17134

which is equivalent to 1803 version according to MS web: https://www.microsoft.com/en-us/itpro/windows-10/release-information

 

6. When I install 2015 and 2018 at the same time, conflicts existed on my system. (now sure if this is normal since software resident in different folder). Conflict is that 2015 version cannot even run C-simulation. gcc error showed no such file or directory, but the file existed and include path and tool chain is correct (to my best knowledge). This error did not show in the 2018 version.

 

 

Part of error:

//multiple "No such file or directory" lines...
gcc.exe: error: C:/Xilinx/Vivado_HLS/2015.4/win64/tools/auto_cc/include -D__SIM_FPO__: No such file or directory
gcc.exe: error: C:/Xilinx/Vivado_HLS/2015.4/include -I: No such file or directory
gcc.exe: error: C:/Xilinx/Vivado_HLS/2015.4/common/technology/generic/SystemC/AESL_comp -D__xilinx_ip_top=: No such file or directory
C:\WINDOWS\SYSTEM32\make.exe: *** [obj/fft_tb.o] Error 1
@E [SIM-1] CSim file generation failed: compilation error(s).

 

 

At last many thanks to your effort and patience, Scott.

Tao

0 Kudos
Highlighted
Observer
Observer
2,025 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi Scott, do you think it could be a license issue? I know little about Xilinx license and multiply versions. All i need is HLS and test on my zc706 evaluation board. I got license from purchase of that board. Is it safe to reveal my license info here?

0 Kudos
Highlighted
Moderator
Moderator
2,011 Views
Registered: ‎10-04-2011

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hello @taoluwork,

 

The licensing for Vivado HLS and Vivado is the same license, so I do not think that this is the issue. Here are more details on our HLS licensing and how it has changed a bit over time:

https://www.xilinx.com/support/answers/51081.html. If you can run the Vivado simulator, then the license has been verified and is working properly. 

 

I have several different versions installed on my windows 10 machine, and don't have conflicts, but I also don't have the 2015 tools either, so can not be certain that is ok. It *should* be ok however, and what I do is to run the  setupEnv.bat file in the installation directory prior to running a different version of the tools. This script should set up the environment variables correctly for that version. 

 

That C simulation fails too is concerning for me. In most cases, that is due to a testbench issue - say over-running stack size with large arrays which are not dynamically allocated. However, I think you said that you tried multiple example designs, and none would work. If so, that would eliminate the design from the potential problem areas. While probably not design related, I still would like to look at the design that is failing for you. Can you zip up the entire project directory in which you attemped this design, and not just the archive function, so I can see all the logs and intermediate files? I can send an ezmove package to facilitate the transfer of that. 

 

Thank you,
Scott

 

 

0 Kudos
Highlighted
Observer
Observer
1,951 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi Scott,

 

Thank you so much for your reply. That setupEnv.bat is useful, which fixed the version issue (not a conflict). Now the two version have the same output.

 

Here is my update and summary about my errors:

 

0. Env: freshly re-installed vivado 2018.2, (but did not re-install the system), default settings for all.

1. Error in C-sim without "build-only", but can be bypassed.

2. Main error in co-sim right after "starting C TB..."

3. I'm kinda sure it is not porject related. I've tried at least 6 internal examples and same error. I'll send 2 of them to you.

 

Really appreciate your time and effort!

Tao

 

0 Kudos
Highlighted
Observer
Observer
1,987 Views
Registered: ‎09-17-2018

Re: Cannot run any co-sim, even from examples!

Jump to solution

Hi @scampbell,

 

I tried to install the software on another fresh new machine and everything is perfect! So it seems like the previous errors are environmental / system mis-settings, (even a simple re-install cannot fix it). I'll try transplanting my work to the new machine. However if you have any magic-env-repair.bat, it would be great and save much time.

 

Thank you for all your time and effort!

Tao

View solution in original post

0 Kudos