Direct connection between accelerated function

Available to be read by all.
Boitumelo_Ruf
Posts: 61
Joined: Thu Jun 09, 2016 4:28 pm

Direct connection between accelerated function

Postby Boitumelo_Ruf » Tue Jul 18, 2017 9:37 am

Hi everyone,

how do I tell SDSoC to directly connect two accelerated functions with a temporary buffer as data exchange instead of writing the intermediate data to DDR?

\Boitumelo

Mustapha_Bouhali
Posts: 12
Joined: Wed May 03, 2017 1:20 pm

Re: Direct connection between accelerated function

Postby Mustapha_Bouhali » Tue Jul 18, 2017 10:44 am

Sharing some thoughts,

I asked about this before. Without SDSoC, the method is to use an RTL generated by HLS of your function in with your platform. If you have the functions already in HDL that's even much easier.

I'm not sure about SDSoC but it would be helpful if you buffer the data also with the AXI ACP port that goes to the cache of the PS i.e. major change in the platform.

User avatar
Timoteo
Posts: 130
Joined: Thu Jun 09, 2016 11:47 am

Re: Direct connection between accelerated function

Postby Timoteo » Tue Jul 18, 2017 10:55 am

Hi,

That's a good question.

I'm not a C developer (for now!), but I understand by concept that you should optimize your code in order to get the maximum performance in your application with SDSoC.

About your question, remember that SDSoC is based on HLS, and the way your functions in C are translated to the PL, in order to take as much performance as possible from it, is optimizing your code pipelining the processes executed in your code. Intercommunication between accelerated functions is at the end reduced to AXI communication between blocks instantiated by SDSoC, (whether AXI memory map, DMA transfers, etc). The understanding of how to tell SDSoC how to do that especifically, my bet is that is reduced to pragmas in your code, commands that, through the HLS libraries will make a difference when your functions are instantiated in the hardware platform.

To understand much better how HLS works, (i've never used HLS), and how to optimize your code understanding HLS as part of this game, have a look to the SDSoC Environment document. Chapter 6: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_2/ug1027-intro-to-sdsoc.pdf From page 40, it talks about Hardware Function Interface Details.

Further than this, I'm afraid I can't say much more, it's out of my knowledge. I suggest you ask Xilinx directly if its documentation doesn't give you the proper answer. (either Xilinx, or other Tulipp developers that worked with HLS already!)

Timoteo

Lester_Kalms
Posts: 1
Joined: Thu Jun 09, 2016 4:35 pm

Re: Direct connection between accelerated function

Postby Lester_Kalms » Tue Jul 25, 2017 12:28 pm

There is an example of how to stream efficiently between functions in the:
https://github.com/tulipp-eu/tulipp-too ... ng-Library

I can give a small example of how to stream between 2 functions in 1 accelerator, since it is more efficient than building 2 accelerators and stream between them.

#pragma SDS data copy(input[O:PIXELS], output[0:PIXELS])
#pragma SDS data data_mover(input:AXIDMA_SIMPLE, output:AXIDMA_SIMPLE)
#pragma SDS data access_pattern(input:SEQUENTIAL, output:SEQUENTIAL)

void func0(int *input, int *output) {

static int buffer[PIXELS];
#pragma HLS STREAM variable = buffer depth = 512

#pragma HLS DATAFLOW
func1 (input, buffer);
func2(buffer, output);
}

Boitumelo_Ruf
Posts: 61
Joined: Thu Jun 09, 2016 4:28 pm

Re: Direct connection between accelerated function

Postby Boitumelo_Ruf » Fri Jul 28, 2017 12:05 pm

Thanks :D

Lester_Kalms wrote:There is an example of how to stream efficiently between functions in the:
https://github.com/tulipp-eu/tulipp-too ... ng-Library

... stream between 2 functions in 1 accelerator, since it is more efficient than building 2 accelerators and stream between them.

}

Note to myself: Accelerate func0! ;)


Return to “FAQ about Tulipp Development Platform”

Who is online

Users browsing this forum: No registered users and 4 guests