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: 
296 Views
Registered: ‎10-06-2017

array of streams pragma

Jump to solution

Hi All,

   I would like to declare an array of streams. For this i have following code:

////////////////////////////////////////////////////////////////////////////////

#define NUMBER_OF_STOCK_INDICES 4 

func()

{

stream <input_to_indx_compute > outstream[NUMBER_OF_STOCK_INDICES] ;

#pragma HLS stream depth=8 variable=outstream[0]

#pragma HLS stream depth=8 variable=outstream[1]

#pragma HLS stream depth=8 variable=outstream[2]

#pragma HLS stream depth=8 variable=outstream[3]

// some code here including function calls with above streams

}

/////////////////////////////////////////////////////////////////////////////////

For this I get synthesis error. How do i get rid of it ? 

Also, how can I give one common pragma for the array of streams

i.e I want to do something like this:

#pragma HLS stream depth=8 variable=outstream

How do I do this? I get synthesis error if I use the above code.

Can someone please help me in this?

Best regards,

-Mahesh

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
254 Views
Registered: ‎01-12-2017

Re: array of streams pragma

Jump to solution

Hi mahesh.barve@tcs.com 

 

You can declare array of streams with same depth following way, for example

----------------------------------------------------------------------------------------

hls::stream<uint16_t> outStream[4];

#pragma HLS STREAM variable=outStream depth=8    // Depth variable set to same value for all the streams

----------------------------------------------------------------------------------------

 

Thanks

Kali

0 Kudos
1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
255 Views
Registered: ‎01-12-2017

Re: array of streams pragma

Jump to solution

Hi mahesh.barve@tcs.com 

 

You can declare array of streams with same depth following way, for example

----------------------------------------------------------------------------------------

hls::stream<uint16_t> outStream[4];

#pragma HLS STREAM variable=outStream depth=8    // Depth variable set to same value for all the streams

----------------------------------------------------------------------------------------

 

Thanks

Kali

0 Kudos