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
Direct connection between accelerated function
-
- Posts: 61
- Joined: Thu Jun 09, 2016 4:28 pm
-
- Posts: 12
- Joined: Wed May 03, 2017 1:20 pm
Re: Direct connection between accelerated function
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.
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.
Re: Direct connection between accelerated function
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
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
-
- Posts: 1
- Joined: Thu Jun 09, 2016 4:35 pm
Re: Direct connection between accelerated function
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);
}
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);
}
-
- Posts: 61
- Joined: Thu Jun 09, 2016 4:28 pm
Re: Direct connection between accelerated function
Thanks
Note to myself: Accelerate func0!
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 3 guests