UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
3,025 Views
Registered: ‎07-09-2017

hls simulation error

Jump to solution

Hi,

 

can someone help me with this error?  Ps: windows version HLS.

 

@E Simulation failed: SIGSEGV.
ERROR: [SIM 211-100] CSim failed with errors.
INFO: [SIM 211-3] *************** CSIM finish ***************
4
while executing
"source C:/Vivado_HLS_Tutorial/MAAR/time_lagged_autocorrelation_prj/solution1/csim.tcl"
invoked from within
"hls::main C:/Vivado_HLS_Tutorial/MAAR/time_lagged_autocorrelation_prj/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.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Teacher muzaffer
Teacher
3,840 Views
Registered: ‎03-31-2012

Re: hls simulation error

Jump to solution

@jianmingli1 this means your c simulation has an issue. Technically it hass nothing to do with HLS. You should be able to run your csim project without any HLS involvement and it should compile and run properly by itself. The solution is to debug your testbench under a debugger and see why it's crashing. SIGSEGV means segment violation signal which almost always means that you have accessed memory which doesn't exist or accessed address 0 (both of which are possible outcomes of uninitialized pointer dereferencing)

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
5 Replies
Highlighted
Teacher muzaffer
Teacher
3,841 Views
Registered: ‎03-31-2012

Re: hls simulation error

Jump to solution

@jianmingli1 this means your c simulation has an issue. Technically it hass nothing to do with HLS. You should be able to run your csim project without any HLS involvement and it should compile and run properly by itself. The solution is to debug your testbench under a debugger and see why it's crashing. SIGSEGV means segment violation signal which almost always means that you have accessed memory which doesn't exist or accessed address 0 (both of which are possible outcomes of uninitialized pointer dereferencing)

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Scholar u4223374
Scholar
2,945 Views
Registered: ‎04-26-2015

Re: hls simulation error

Jump to solution

@jianmingli1 By far the most common cause of this error in HLS is that you've allocated a huge array on the stack. In normal C you'd just use malloc to work around this problem, but HLS doesn't support malloc. The solution for HLS is to declare any reasonably large (eg. over 1000 element) arrays as static, which moves them to a different section of the program's memory space.

Visitor monaz_yas
Visitor
1,049 Views
Registered: ‎01-21-2019

Re: hls simulation error

Jump to solution

ERROR: [SIM 211-100] CSim failed with errors.

 

I got an error like this when I was trying to define a float array by size 64800. Now what can I do to be able to define an array with the type of float?

0 Kudos
Scholar u4223374
Scholar
1,032 Views
Registered: ‎04-26-2015

Re: hls simulation error

Jump to solution

Nothing wrong with a float array; the problem is large arrays of any sort. Try declaring it as "static".

0 Kudos
Visitor monaz_yas
Visitor
1,025 Views
Registered: ‎01-21-2019

Re: hls simulation error

Jump to solution

thanks a lot for the answer. yow are right. so according to ug902 (page 370)

I used this:

 

#include "ap_cint.h"
int main() {
int i, acc;
#ifdef __SYNTHESIS__
// Use an arbitrary precision type & array for synthesis
int32 la0[10000000], la1[10000000];
#else
// Use an arbitrary precision type & dynamic memory for simulation
int32 la0 = malloc(10000000 * sizeof(int32));
int32 la1 = malloc(10000000 * sizeof(int32));
#endif
for (i=0 ; i < 10000000; i++) {
acc = acc + la0[i] + la1[i];
}
return 0;
}

 

However because I have a lot of array and 2D matrix of big size

the simulation result is :

INFO: [SIM 2] *************** CSIM start ***************
INFO: [SIM 4] CSIM will launch GCC as the compiler.
Compiling ../../../../Decoder.cpp in debug mode
csim.mk:83: recipe for target 'obj/Decoder.o' failed
../../../../Decoder.cpp: In function 'void Decoder(din_sigma, din_t*, dout_t*)':
../../../../Decoder.cpp:194715:1: internal compiler error: Segmentation fault
}
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.
make: *** [obj/LDPC_Decoder.o] Error 1
ERR: [SIM 100] 'csim_design' failed: compilation error(s).
INFO: [SIM 3] *************** CSIM finish ***************

 

is there any solution for this?

Besieds, would you provide an example of "try declaring static".

Regards.

0 Kudos