cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
naz_rb
Adventurer
Adventurer
801 Views
Registered: ‎11-10-2019

Const type array in Vivado HLS

Jump to solution

Could someone explain how HLS treats arrays that are declared constants? I declare an array as:

const uint8 myArray [100][100] = {....};

and then access the array by element in the loop. According to the UG902  on p.328, such array is implemented as a ROM and consequently I need to partition it to get more reads in the clock cycle. Why would HLS implement this array as a ROM and use resources instead of converting it to ties of VCCs and GNDs? Do I need to explicitly tell HLS to implement it as ties to VCC and GND?

0 Kudos
1 Solution

Accepted Solutions
u4223374
Advisor
Advisor
753 Views
Registered: ‎04-26-2015

If you're reading constant indices then it will be implemented like that (although HLS will use a ROM and then Vivado's synthesis tool will convert it to a direct tie to 1 or 0). However, if it's accessed in a loop then you need some sort of addressing system so you can select which tie to 0/1 you want to look at. That is a ROM.

View solution in original post

1 Reply
u4223374
Advisor
Advisor
754 Views
Registered: ‎04-26-2015

If you're reading constant indices then it will be implemented like that (although HLS will use a ROM and then Vivado's synthesis tool will convert it to a direct tie to 1 or 0). However, if it's accessed in a loop then you need some sort of addressing system so you can select which tie to 0/1 you want to look at. That is a ROM.

View solution in original post