07-21-2018 05:21 AM
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 !
07-23-2018 02:11 AM
Can you try increasing the heap and stack size and see if it helps?
07-23-2018 08:37 AM
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.