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: 
Explorer
Explorer
733 Views
Registered: ‎05-21-2017

Is DATAFLOW possible in this case?

Jump to solution

Hello,

 

The case is the following:

 

void top( data_t input_data[], data_t output_data[] )
{

	data_t buffer[];

	for ( index_t n = 0; n != N; n++ )
	{
		
		fill_buffer ( input_data, buffer );
		consume_buffer ( buffer, output_data );

	}

}

I would like to use the DATAFLOW directive for the body of the loop - first wrapping the loop body in a function and applying the DATAFLOW directive in this new function.

 

Is this possible?

 

If it is not possible, is there another way of achieving the same result?

 

 

Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
929 Views
Registered: ‎03-24-2010

Re: Is DATAFLOW possible in this case?

Jump to solution

Add "dataflow" to the body of the loop. HLS supports dataflow on loops. Like:

for ( index_t n = 0; n != N; n++ )
	{
#pragma HLS dataflow

}
Regards,
brucey
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
2 Replies
Scholar u4223374
Scholar
691 Views
Registered: ‎04-26-2015

Re: Is DATAFLOW possible in this case?

Jump to solution

I think it'll work better if "buffer" is declared inside the loop (and therefore inside the function). HLS can be picky about that sort of thing.

 

Apart from that, it should work as long as fill_buffer and "consume_buffer" use appropriate access patterns - every element gets read/written exactly once, sequentially.

0 Kudos
Xilinx Employee
Xilinx Employee
930 Views
Registered: ‎03-24-2010

Re: Is DATAFLOW possible in this case?

Jump to solution

Add "dataflow" to the body of the loop. HLS supports dataflow on loops. Like:

for ( index_t n = 0; n != N; n++ )
	{
#pragma HLS dataflow

}
Regards,
brucey
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos