cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nanson
Explorer
Explorer
2,418 Views
Registered: ‎08-31-2017

Use case of Non-Blocking Reads and Writes supported in HSL Stream

Jump to solution

Hi, dear elites,

 

 I'm studying the hls stream part in UG902. In page 228, it describes Non-blocking write and read methods are also provided by HLS::Stream. However, I'm curious what real scenarios are applicable for the non-blocking write and read methods which has risk to corrupt the data in the FIFO. What I can came up with is some applications is not aware of data corruption but I don't know if there has such application in fact.  Appreciate to hear about any comments if you have. Thanks

 

All the best,

NS

0 Kudos
1 Solution

Accepted Solutions
nanson
Explorer
Explorer
2,586 Views
Registered: ‎08-31-2017

@hbucher  Thanks for your example. However, 

 

 I'm a little bit confused with your example "You might want to send out a packet while still being responsive to incoming data" and the non-blocking read/write. The example you illustrated can also be implemented by blocking read/write which are also two independent channels. In your example, is it allowable to send out a packet and wait for incoming data without flow control ? Maybe some applications are tolerable of packet loss in the position of no flow control. If it's the case, it should be sensible to use non-blocking read/write AXI4-stream. 

View solution in original post

0 Kudos
5 Replies
hbucher
Scholar
Scholar
2,388 Views
Registered: ‎03-22-2016

@nanson You might want to increment a counter, set a flag or send data through an out stream when there is no activity in the input stream, for example.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
nanson
Explorer
Explorer
2,382 Views
Registered: ‎08-31-2017

@hbucher Thanks for the comment. It seems HLS stream can also being exploited as control signalling. However, to  increment a counter, set a flag is fine for non-blocking behavior.

 

For sending data through an out stream when there is no activity in the input stream, I don't understand how it relates to Non-Blocking Reads and Writes. Thanks :)

0 Kudos
hbucher
Scholar
Scholar
2,373 Views
Registered: ‎03-22-2016

@nanson You might want to send out a packet while still being responsive to incoming data.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
nanson
Explorer
Explorer
2,587 Views
Registered: ‎08-31-2017

@hbucher  Thanks for your example. However, 

 

 I'm a little bit confused with your example "You might want to send out a packet while still being responsive to incoming data" and the non-blocking read/write. The example you illustrated can also be implemented by blocking read/write which are also two independent channels. In your example, is it allowable to send out a packet and wait for incoming data without flow control ? Maybe some applications are tolerable of packet loss in the position of no flow control. If it's the case, it should be sensible to use non-blocking read/write AXI4-stream. 

View solution in original post

0 Kudos
vegajua1
Visitor
Visitor
956 Views
Registered: ‎04-03-2017

Some applications don't support back pressure (such as a network input with a non-lossless protocol). As a result, whether or not you actually read the data it will be lost because the original sender does not have a tReady port. In this case a non blocking write would be appropriate so you can decide what to do if there is no room for the outgoing data, the non blocking write returns a bool telling us if it succeeded and you can use this to maybe put it in a buffer or raise some warning flag saying system overloaded or drop it if necessary but keep a count of dropped packets etc.

0 Kudos