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: 
Highlighted
380 Views
Registered: ‎05-30-2018

Segmentation Fault when dealing with big array in Vivado HLS - reposting

Hi everyone !

 

I am implementing a CNN (convolutional Neural Network) on UltraScale FPGA using Vivado HLS.

 

The fully connected layer has 1152 inputs and 1024 neurons, which means that the weight array for this layer is of size 1152x1024.

 

The array is defined as 2D extern const array in a header file, and the header is included in the top level module.

 

The problem is that I am getting Segmentation Fault error every time I try to run C Simulation.

 

I was working on my laptop (6GB RM) at first, then I moved to some server, but still getting the same error.

 

my laptop is running Vivado HLS 2018 on Windows 10, while the server is running Vivado HLS 2015 on RedHat.

 

By the way, I get the same error when I run the .tcl script from command line.

Trying to define the array as extern static also didn't solve the problem.

Also, the code is working well when I try it on a compiler (e.g. Code::Blocks) so looks like it's not that some pointer is not well used or something is not correctly defined ... I don't think so.

 

Do you have any suggestions / workarounds to overcome this problem please?

 

Thanks in advance.

 

P.S. this is not spam, and if the answer is to define it as malloc then please tell me how to initialize it !

 

0 Kudos
2 Replies
Moderator
Moderator
300 Views
Registered: ‎06-24-2015

Re: Segmentation Fault when dealing with big array in Vivado HLS - reposting

@rashedkoutayni

 

Can you try increasing the heap and stack size and see if it helps?

Thanks,
Nupur
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (click on the 'thumbs-up' button).
0 Kudos
Xilinx Employee
Xilinx Employee
290 Views
Registered: ‎05-06-2008

Re: Segmentation Fault when dealing with big array in Vivado HLS - reposting

Hello @rashedkoutayni,

 

I also recommend reducing the array sizes to a smaller version.  Verify that this works, then go back to the larger array sizes.  This will make the runtime faster and easier to debug.

 

Good Luck,
Chris

0 Kudos