cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
maps-mpls
Mentor
Mentor
394 Views
Registered: ‎06-20-2017

HLS with different data rates and arguments that are statically modified

Jump to solution

So,

myFunc(u32 ctrl[32], u32 buff1[256], u32 inData, u32 outData);

buff1 gets passed in once, then held statically.  Could be AXIS or AXIL or AXIF.

ctrl[32] gets passed in once, but otherwise held statically.

inData and outData are AXIS.

outData and the now statically held buff1 are both dependent on and modified by inData based on settings in ctrl[32]

Is this scenario supported?  Is there a similar example?

 

*** Destination: Rapid design and development cycles *** Unappreciated answers get deleted, unappreciative OPs get put on ignored list ***
0 Kudos
1 Solution

Accepted Solutions
aoifem
Moderator
Moderator
319 Views
Registered: ‎11-21-2018

Hi @maps-mpls 

Looking at this quickly, I don't see why this wouldn't work, but it would help if you could send us some sample code if you have it. 

I don't think we have an exact example for that scenario but please take a look at the github tiny tutorials: 

https://github.com/Xilinx/HLS-Tiny-Tutorials

 

For example, the memory_uram example uses static buffers, although it is not passed into the function as you want it to: 

aoifem_0-1623312639485.png

There are also a few examples that use AXIS which can show you how to manage dataIn and dataOut.

Aoife
Product Application Engineer - Xilinx Technical Support EMEA


**~ Got a minute? Answer our Vitis HLS survey here! ~**

**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

4 Replies
muzaffer
Teacher
Teacher
336 Views
Registered: ‎03-31-2012

what exactly is the difference between ctrl & buff? In any case, ctrl looks like a very good candidate for control registers which are automatically converted to an AXI-L interface. I haven't used VHLS for a while but there is a way to mark ports as axi-l, even assign offsets etc. For buff, if there is a reason you can't do the same, you can try a separate port called buff_we and try the following:
(with a loop to copy all the buf to local copy of course)


myFunc(... buff1, .., buff_we)

static lcl_buf;

if (buf_we) lcl_buf = buf;

- 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.
aoifem
Moderator
Moderator
320 Views
Registered: ‎11-21-2018

Hi @maps-mpls 

Looking at this quickly, I don't see why this wouldn't work, but it would help if you could send us some sample code if you have it. 

I don't think we have an exact example for that scenario but please take a look at the github tiny tutorials: 

https://github.com/Xilinx/HLS-Tiny-Tutorials

 

For example, the memory_uram example uses static buffers, although it is not passed into the function as you want it to: 

aoifem_0-1623312639485.png

There are also a few examples that use AXIS which can show you how to manage dataIn and dataOut.

Aoife
Product Application Engineer - Xilinx Technical Support EMEA


**~ Got a minute? Answer our Vitis HLS survey here! ~**

**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

maps-mpls
Mentor
Mentor
278 Views
Registered: ‎06-20-2017

Unfortunately, I cannot post the code I have, and don't have time to simplify it.

But this is what I am thinking:

1.  Create a single AXIS in and AXIS out, using tuser and/or tid to specify that packet time.  Depending on the packet type, load the static variables,buffers, or do the computations.  I think I will need to use AXI DMA with SG and multi-channel support, and work through some issues on the software side of things, but at the hardware level, and support of static (which I did just verify works), I think this architecture may work.

If you could give a vote of confidence, or a "not so fast", that may save me some time.

But I think the HLS will help solve a new type of problem I haven't used HLS to solve before, in a new area that I initially thought could only be done in VHDL.  That is, it is not just a single in single out stream type problem (though part of it is).  I may have to make it that way, but for the static data that comes in, I can just send zeros out the output AXIS. 

Having a single DMA will be less burden on the PL, but at the (slight?) increase in complexity of using PL DMA in multi-channel mode with scatter gather.

It would be even nicer if in HLS I could create a single AXIS in and single AXIS out where the relationship could sometimes be N in, 1 out, and other times N in and N out.

*** Destination: Rapid design and development cycles *** Unappreciated answers get deleted, unappreciative OPs get put on ignored list ***
0 Kudos
maps-mpls
Mentor
Mentor
256 Views
Registered: ‎06-20-2017

Looks like it is working.

*** Destination: Rapid design and development cycles *** Unappreciated answers get deleted, unappreciative OPs get put on ignored list ***
0 Kudos