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
Adventurer
Adventurer
747 Views
Registered: ‎10-19-2015

Adding Compiler flags to HLS?

Hi All,

 

Windows 7 64-bit

HLS Vivado 2016.4

 

I have a large constant array that must be declared inside the top level function.

 

Something like below. When I have this array in my top level function, I am getting an error "cc1plus.exe: out of memory allocating 65536 bytes" 

 

ap_uint<1> my_arr[512][2012 = {,.....};

 

I know this is mentioned by me and some other people here, but in my case I have to use static values and static array, and this array can not be initalized from an external port. 

 

I know this problem is caused by GCC (not HLS), but GCC also provides a solution. If we add a compiler flag "-ftrack-macro-expansion=0" to HLS GCC compiler, it should solve it. I tried to add this flag to Vivado HLS GUI in various ways, but I could not figure out where and how to add this flag in HLS compiler?  If I add this flag using CFLAGS, I am getting following error. Any ideas how to add this flag to HLS compiler? 

 

 

INFO: [SIM 2] *************** CSIM start ***************
WARNING: [SIM 51] HLS only supports CLANG compiler in Linux.
INFO: [SIM 4] CSIM will launch GCC as the compiler.
   Compiling ../../../../hdr_core_test.cpp in debug mode
cc1plus.exe: error: unrecognized command line option '-ftrack-macro-expansion=0'
make: *** [obj/hdr_core_test.o] Error 1
CRITICAL WARNING: [SIM 100] 'csim_design' failed: compilation error(s).
INFO: [SIM 3] *************** CSIM finish ***************

 

 

 

 

0 Kudos