关于video in to axi4-stream

PG043 Video In to AXI4-Stream对于video转成AXIS的处理。

关键信号

READY/VALID Handshake

A valid transfer occurs whenever READY, VALID, ACLKEN, and ARESETn are high at the rising edge of ACLK. During valid transfers, DATA only carries active video data. Blank periods and ancillary data packets are not transferred via the AXI4-Stream Video protocol.

Driving m_axis_video_tready
The m_axis_video_tready signal can be asserted before, during, or after the cycle in which the Video in to AXI4-Stream core asserted m_axis_video_tvalid. The assertion of m_axis_video_tready may be dependent on the value of m_axis_video_tvalid. A slave that can immediately accept data qualified by m_axis_video_tvalid should preassert its m_axis_video_tready signal until data is received. Alternatively, m_axis_video_tready can be registered and driven the cycle following VALID assertion. It is recommended that the AXI4-Stream slave should drive READY independently, or pre-assert READY to minimize latency.

SOF ‐ m_axis_video_tuser
The SOF signal, physically transmitted over the AXI4-Stream tuser signal, marks the first pixel of a video frame. The SOF pulse is 1 valid transaction wide, and must coincide with the first pixel of the frame. SOF serves as a frame synchronization signal, which allows downstream cores to re-initialize, and detect the first pixel of a frame. The SOF signal may be asserted an arbitrary number of aclk cycles before the first pixel value is presented on tdata, as long as a tvalid is not asserted.

EOL Signal ‐ m_axis_video_tlast

The EOL signal, physically transmitted over the AXI4-Stream tlast signal, marks the last pixel of a line. The EOL pulse is 1 valid transaction wide, and must coincide with the last pixel of a scanline, as seen in Figure 2-6.

关键看黑体部分:

tuser在xilinx的设计中,变成了帧开始(SOF)信号。这点很关键,会在VDMA中用到。

tlast在xilinx的设计中,变成了行结束(EOL)信号。VDMA需要设置帧的分辨率,EOL用于写入像素的统计。

关于像素打包

在IP设置中,是允许对像素进行打包的。

入下图:

输入是RGB,每个分量是8bit,选择输出每个分量也是8bit,每个时钟1个像素。可以看到m_axis_video_tdata的位宽为24。

如果每个时钟选择2个像素,那m_axis_video_tdata的位宽就变成48了。

如果输入RGB每个分量是8bit,除了8bit,输出还可以设置成10,12,16。比如输出位宽为10,IP会自动将8bit映射到高8位,低2位填0。。。

如果输入RGB每个分量是10bit,除了10bit,输出还可以设置成8,12,16。比如输出位宽为8,IP会自动将高8位映射到输入,抛弃低2位。输出位宽位12,IP会自动将10bit映射到高10位,低2位填0。。。
--------------------- 
作者:skyplain1984 
来源:CSDN 
原文:https://blog.csdn.net/skyplain1984/article/details/80008806 
版权声明:本文为博主原创文章,转载请附上博文链接!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值