2

I am novice in Xilinx HLS. I am following tutorial ug871-vivado-high-level-synthesis-tutorial.pdf(page 77).

The code is

#define N 32

void array_io (dout_t d_o[N], din_t d_i[N])     
{   
   //..do something
}

After synthesis, I got report like

enter image description here

I am confused that how the width of the address port has been automatically sized match to the number of addresses that must be accessed (5-bit for 32 addresses)?

Please help.

Leos313
  • 5,152
  • 6
  • 40
  • 69
Main
  • 1,804
  • 3
  • 20
  • 28

2 Answers2

0

From the UG871, it seems that the size of the array is from 0 to 16 samples, hence you need 32 addresses to access all values (see Figure 69). I guess that the number N is somewhere limited to be less than 32 (or be exactly 16). This means that Vivado knows this limitation, and generates only as many address bits as are needed. Most synthesis tools check the constraints on size and optimize unnecessary code away.

dieli
  • 179
  • 6
0

When you synthetise a function you create, also, some registers to store the variables. It means that the address that you put as input is the one of the data that you are concurrently writing in d_o or d_in.

In your case, where N=32, you have 32 different variables (in both input and output). To adress 32 different variables you need 32 different combination of bit (to point to a specific one, without ambiguity). With 5 bit you have 2^5=32 different combination of addresses: the minimum number of bit to address all your data. For instance if you have 32enter image description here

The address number of bit is INDIPENDENT from the size of data (i.e. they can be int, float, char, short, double, arbitrary precision and so on)

Leos313
  • 5,152
  • 6
  • 40
  • 69