cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
7,004 Views
Registered: ‎10-24-2007

Vivado_HLS - Window data buffers

It seems that Window data buffers (in Video Library) are not pass by reference. That means whatever I write to it in a function is not accessible by outside the function.

 

Has anyone come across this before?

 

Thanks.

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
6,999 Views
Registered: ‎08-17-2011

I don't think that's correct but I'm not sure of your description.
Do you have an example testcase that can be used to show this in context?
- Hervé

SIGNATURE:
* New Dedicated Vivado HLS forums* http://forums.xilinx.com/t5/High-Level-Synthesis-HLS/bd-p/hls
* Readme/Guidance* http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

* 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
Highlighted
Adventurer
Adventurer
6,981 Views
Registered: ‎10-24-2007

In the attached file,

example 1 correctly returns the value of 1 in array B. while in example 0 returns 0 in array B. This is strange since the Window class is basically an array being passed.

 

Thanks.

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,962 Views
Registered: ‎08-17-2011

Hello,

 

Thanks for the extract.

so in your code:

//Example0

subfunction0(Window<3,128,unsigned int> filterK, Window<1,128,unsigned int> outputL) {

you pass it by copy... Okay, so why don't you pass them by reference :

subfunction0(Window<3,128,unsigned int> &filterK, Window<1,128,unsigned int> &outputL) {

 

This should solve your issue.

- Hervé

SIGNATURE:
* New Dedicated Vivado HLS forums* http://forums.xilinx.com/t5/High-Level-Synthesis-HLS/bd-p/hls
* Readme/Guidance* http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

* 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