Xilinx / xfopencv

Other
329 stars 142 forks source link

get "Simulation failed: SIGSEGV" when I use tcl script to build AXI_Sample #34

Closed yinedeng closed 5 years ago

yinedeng commented 5 years ago

hi, when i use tcl script to build AXI_Samle, i get a /opt/sdsoc_2018.3/Vivado/2018.3/bin/vivado_hls script.tcl

the building flow: 

1、clone xfopencv repo and enter AXI_Samle directory
2、do "/opt/sdsoc_2018.3/Vivado/2018.3/bin/vivado_hls script.tcl"

finally, i get this error message:

/opt/sdsoc2018.3/Vivado/2018.3/include/opencv2/flann/flann.hpp:232:2: note: declared here Index { ^~ /opt/sdsoc2018.3/Vivado/2018.3/include/opencv2/flann/flann.hpp:365:5: warning: ‘template class cv::flann::Index’ is deprecated [-Wdeprecated-declarations] int Index_::radiusSearch(const Mat& query, Mat& indices, Mat& dists, DistanceType radius, const ::cvflann::SearchParams& searchParams) ^~ /opt/sdsoc2018.3/Vivado/2018.3/include/opencv2/flann/flann.hpp:232:2: note: declared here Index { ^~ @E Simulation failed: SIGSEGV. ERROR: [SIM 211-100] CSim failed with errors. INFO: [SIM 211-3] CSIM finish 4 while executing "source script.tcl" invoked from within "hls::main script.tcl" ("uplevel" body line 1) invoked from within "uplevel 1 hls::main {*}$args" (procedure "hls_proc" line 5) invoked from within "hls_proc $argv" INFO: [Common 17-206] Exiting vivado_hls at Wed Jan 30 13:48:33 2019...

bgouthamb commented 5 years ago

Hello @yinedeng ,

You need to follow the HLS use model guide for building any xfOpenCV functions/applications for Vivado HLS.

yinedeng commented 5 years ago

Hello @bgouthamb, Thank you for your reply! I had already read the guide. The guide say "using tlc script" is also one practicable way to build example in the chapter "Operating HLS Standalone mode".

And the script.tcl I used is from AXI_Samle and I had never changed it。

So, I can't execute the script on command line with "vivado_hls script.tcl" to build AXI_Samle ?

As far, i use script.tcl as a template, and change it to build the meanshifttracking example。it runs weill.

AXI_Samle is very important to me to demonstrate that I can use good axi stream interface to start my work。

chc0922 commented 5 years ago

It could be a stack size problem refer this : https://github.com/Xilinx/xfopencv/issues/27

but does not work c synthesis. It probably has any other issues...

yinedeng commented 5 years ago

@chc0922

Thank you very much! I have solved my problem. Yes, It should be the stack size problem. I used ubuntu 16.04 with 8k default stack size

It's succeeded to csim, csyn and co-sim when i set “ulimit -c unlimited ” before execute build script.

But I also found a problem makes me so confused。

I can't set "-Wl,--stack=SIZE" under vivado 2017.4 and "-z stacksize=SIZE" under vivado 2018.3 in GUI mode。

And,script mode also failed csim_design -ldflags {-Wl,--stack,10485760} cosim_design -ldflags {-Wl,--stack,10485760}