cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sarah77wicker
Contributor
Contributor
193 Views
Registered: ‎11-05-2018

Access to only some signals of the Axi stream

Hi,

I am still finding my way around HLS and could benefit from your experiences!

Is it possible to read a part of an axi stream without going through all the data? I would like to make like a switch case on the tuser or tdest part of my input signal.

The idea is, we use the output from the mipi rx subsystem (which is given without the video framebuffer, so on 32bits) and transpose it to a 16bits pro pixel.

for now i am testing with, raw10 camera but in the futur i would like to be able to use it also with raw12 and raw14 cameras.

From what i read tuser (bits [69:64]) or tdest[9:4] contain the data type. in HLS i would like to use these to do a switch case and in according to the the datatype do the re-arrangement of the pixel pro bits.

However i am not sure how to access it.

typedef ap_uint<32> std_logic_v32b;
struct video_stream_in {
	std_logic_v32b data;
	ap_uint<7> user;
	ap_uint<1> last;
};

typedef hls::stream<video_stream_in> axi_stream_in;

 here is how i defined my input, and how i though i could access to the value:

line_convert(axi_stream_in &stream_in,axi_stream_out &stream_out, int rows,int cols){
video_stream_in vIn;
vIn = stream_in.read();
	if ("00" && vIn.user.range(5,0) == 0x2b){
		bytes = 5;
		pixels = 4;
		FillBuffer(stream_in,tmp,bytes,pixels,cols, rows);
		convertOUTPUT_raw10(stream_out,tmp,cols, rows);
	}
}

Howerver i fear that via: vIn = stream_in.read();

I might already lose the first data coming, and i dont really know how to avoid this.

What do you think? Do you have any idea, pro/counter?

Thank you a lot in advance for your help

Best regards,

Sarah

0 Kudos
Reply
0 Replies