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: 
Visitor gtamp
Visitor
4,966 Views
Registered: ‎06-28-2016

AXI4-Stream to ap_none

Jump to solution

Hello.

 

I have created a "dummy" module to receive AXI4-S input, and output the data part of the stream as an ap_none protocol port.
I don't want to keep the stream interface to the rest of my design, so I'm just trying to single out the data port of the AXI4-S input of the first module and move on. But what happens for example if VALID is '0'? Data would still come to the output, which I don't want since they're invalid.

Can this be done at all? Is what I'm trying to do wrong? Do I have to keep using AXI4-S interfaces for the ins/outs of all my downstream modules?

 

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
Teacher muzaffer
Teacher
9,334 Views
Registered: ‎03-31-2012

Re: AXI4-Stream to ap_none

Jump to solution
>> But now that my output port is of an ap_none interface, I don't want invalid data to be forwarded to the rest of my design and considered valid. Since I can't read the input_tvalid signal inside my HLS code, how do I stop or stall any data output, in case my input_tvalid is 0?

if your output doesn't have any flow control, what is your definition of "stop or stall data output". If input tvalid is zero, hls will not produce output tvalid either (automatically) but on your data output bus, there will still be "something" on the bus. If there is no handshake, even if output tvalid is zero, how do you stop your consumer from reading previous output or zero "data" ?

First you need to figure out what you want to happen if output tvalid is zero.
- 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
4 Replies
Scholar u4223374
Scholar
4,943 Views
Registered: ‎04-26-2015

Re: AXI4-Stream to ap_none

Jump to solution

What sort of behaviour would you like in that scenario? If you're going from an interface with flow control (ie AXI4-S) to one without flow control, you have to deal with the situation where there's either insufficient data (ie the transmitter isn't ready to send) or too much data (ie the transmitter is sending data but the receiver isn't ready).

 

In some situations (eg. a fast ADC that's constantly sampling, where you only care about the most recent sample) it doesn't matter much. In others you can guarantee that the transmitter has data available on every single cycle and the receiver can accept data on every single cycle, so it's not a problem - although persuading HLS to give that sort of guarantee can be tricky.

 

In most situations - where you do actually care about getting all the data and no duplicates - you need to use an interface with flow control. AXI4-S is about the easiest option around. Normally you'd just keep using AXI4-S all the way down the chain.

 

Incidentally, you can "remove" the flow control on an AXI4-S port in the block diagram, just by expanding the port, tying a constant "1" to the TREADY port, and leaving TVALID disconnected. TDATA is your regular data output. No need for a dedicated block.

0 Kudos
Visitor gtamp
Visitor
4,935 Views
Registered: ‎06-28-2016

Re: AXI4-Stream to ap_none

Jump to solution

 thanks for the reply.

Regarding what behaviour I expect:

My AXI4S input comes from the RX port of an Aurora64b/66b. My understanding was that HLS handles AXI control signals on its own, so for example if my output was also an AXI4S interface, it would "propagate" the input_tvalid signal to the output_tvalid signal (considering that simply output=input). So in that case I wouldn't have to worry about invalid data (again, I might be wrong).
But now that my output port is of an ap_none interface, I don't want invalid data to be forwarded to the rest of my design and considered valid. Since I can't read the input_tvalid signal inside my HLS code, how do I stop or stall any data output, in case my input_tvalid is 0?

 

0 Kudos
Teacher muzaffer
Teacher
9,335 Views
Registered: ‎03-31-2012

Re: AXI4-Stream to ap_none

Jump to solution
>> But now that my output port is of an ap_none interface, I don't want invalid data to be forwarded to the rest of my design and considered valid. Since I can't read the input_tvalid signal inside my HLS code, how do I stop or stall any data output, in case my input_tvalid is 0?

if your output doesn't have any flow control, what is your definition of "stop or stall data output". If input tvalid is zero, hls will not produce output tvalid either (automatically) but on your data output bus, there will still be "something" on the bus. If there is no handshake, even if output tvalid is zero, how do you stop your consumer from reading previous output or zero "data" ?

First you need to figure out what you want to happen if output tvalid is zero.
- 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
Visitor gtamp
Visitor
4,921 Views
Registered: ‎06-28-2016

Re: AXI4-Stream to ap_none

Jump to solution

Understood.

So basically I have to find a way (probably with some kind of flow control) to update the consumer whether he should or shouldn't consider whatever data is currently on the bus.

I'll look into that.

Thanks again.

0 Kudos