11-05-2017 01:11 AM
I am having a problem in working with large 3D matrices (mat), in HLS. I am not able to carry out the C-simulation. The possible reason I found HLS manual for this is that HLS was running out of memory. I tried the method of using malloc() as suggested in the user manual. But the problem still persists. How to overcome this problem?. PLease help.
11-05-2017 03:03 AM
Can you post the code? 128x100x360 is large but not ridiculous - much smaller than a 4K image, for example.
11-06-2017 03:16 AM
What is the exact error that HLS gives? Is it this one?
cc1plus.exe: out of memory ...
If so, that's a very simple fix: upgrade to HLS 2017.3 or downgrade to HLS 2016.4. HLS 2017.1 and HLS 2017.2 are broken (under Windows, anyway) and can't compile the hls_math.h header.
11-07-2017 03:48 AM
It is definitely the problem of static allocation of all matrices on stack. I had similiar problem. You should use something like this:
float * bigmatrix = (float*)malloc(1000*sizeof(float));
Or you can just move all matrices outside top function and make them static global variables.