09-16-2017 10:53 AM
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.
09-16-2017 04:38 PM
@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)
09-16-2017 04:38 PM
@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)
09-17-2017 04:52 PM
@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.
04-18-2019 11:35 AM
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?
04-18-2019 06:06 PM
Nothing wrong with a float array; the problem is large arrays of any sort. Try declaring it as "static".
04-18-2019 06:24 PM
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.