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: 
Highlighted
Observer jirhus
Observer
5,883 Views
Registered: ‎06-19-2013

Multiple AXI Stream input, one output (Non blocking read)

Hello,

I want to make top function with 2 AXI-Stream Interfaces and with 1 output AXI- Stream Interface. In the first input interface is video axi stream. In the second input interface are control data - it becomes 1 per frame.

 

void DrawBorder(AxiStream *Image_IN, AxiStream *Image_OUT, AxiStreamControl *control ){

#pragma HLS PIPELINE II=1
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=Image_IN
#pragma HLS INTERFACE axis port=Image_OUT
#pragma HLS INTERFACE axis port=control

//read from Image_IN
... = Image_IN->data;

// blocking read from control
// the function wait...
... = control->data;

// write video
Image_OUT = ...

 I want to use non-blocking read from Axi-Stream control. But unfortunately the code does't work correctly. I have used hls::stream:

void DrawBorder(AxiStream *Image_IN, AxiStream *Image_OUT, hls::stream<AxiStreamControl> *control ){

#pragma HLS PIPELINE II=1
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=Image_IN
#pragma HLS INTERFACE axis port=Image_OUT
#pragma HLS INTERFACE axis port=control

//read from Image_IN
... = Image_IN->data;

// non-blocking read from control
// the function has never read valid data
bool succ = control->read_nb(...);

// write video
Image_OUT = ...

The problem is, that the function had never reads valid data from hls stream. I think, I must use FIFO, but I don't know how. Thanks for reply.

0 Kudos