功能
1. 双axi-stream 接口输入,大分辨率axis为底图,axis为顶图。
目前输入为rbg分量输入,各分量为10bit
编辑
2. 使用xilinx hls 编写。资源利用率不高。mixer ip 基本类似。
编辑
20221026 进行优化。
编辑
3. 配置寄存器有
#pragma HLS INTERFACE s_axilite port=height //大图高度
#pragma HLS INTERFACE s_axilite port=width //大图宽度
#pragma HLS INTERFACE s_axilite port=start_x //小图起始x坐标
#pragma HLS INTERFACE s_axilite port=start_y //小图起始y坐标
#pragma HLS INTERFACE s_axilite port=sm_height //小图高度
#pragma HLS INTERFACE s_axilite port=sm_width //小图宽度
![点击并拖拽以移动](/i/l/?n=22&i=blog/3028029/202211/3028029-20221106124931996-1393353909.gif)
效果
编辑
仿真
图像输入 , 两个输入同时检测user
![](/i/ll/?i=cb8d0101daaa4124bfcd629817baf8b6.png)
编辑
当img2 有效时候
编辑
中间数据 有4个节拍的延时
![](/i/ll/?i=a1e31ddc3e3842b081aad77e9a2007ab.png)
编辑
![](/i/ll/?i=2bc9b4c4b3ee46ad9de4708a29e81487.png)
编辑
// control
// 0x00 : Control signals
// bit 0 - ap_start (Read/Write/COH)
// bit 1 - ap_done (Read/COR)
// bit 2 - ap_idle (Read)
// bit 3 - ap_ready (Read)
// bit 7 - auto_restart (Read/Write)
// others - reserved
// 0x04 : Global Interrupt Enable Register
// bit 0 - Global Interrupt Enable (Read/Write)
// others - reserved
// 0x08 : IP Interrupt Enable Register (Read/Write)
// bit 0 - enable ap_done interrupt (Read/Write)
// bit 1 - enable ap_ready interrupt (Read/Write)
// others - reserved
// 0x0c : IP Interrupt Status Register (Read/TOW)
// bit 0 - ap_done (COR/TOW)
// bit 1 - ap_ready (COR/TOW)
// others - reserved
// 0x10 : Data signal of width
// bit 31~0 - width[31:0] (Read/Write)
// 0x14 : reserved
// 0x18 : Data signal of height
// bit 31~0 - height[31:0] (Read/Write)
// 0x1c : reserved
// 0x20 : Data signal of sm_height
// bit 31~0 - sm_height[31:0] (Read/Write)
// 0x24 : reserved
// 0x28 : Data signal of sm_width
// bit 31~0 - sm_width[31:0] (Read/Write)
// 0x2c : reserved
// 0x30 : Data signal of startx
// bit 31~0 - startx[31:0] (Read/Write)
// 0x34 : reserved
// 0x38 : Data signal of starty
// bit 31~0 - starty[31:0] (Read/Write)
// 0x3c : reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake)
#define XVIDEO_MIXER_CONTROL_ADDR_AP_CTRL 0x00
#define XVIDEO_MIXER_CONTROL_ADDR_GIE 0x04
#define XVIDEO_MIXER_CONTROL_ADDR_IER 0x08
#define XVIDEO_MIXER_CONTROL_ADDR_ISR 0x0c
#define XVIDEO_MIXER_CONTROL_ADDR_WIDTH_DATA 0x10
#define XVIDEO_MIXER_CONTROL_BITS_WIDTH_DATA 32
#define XVIDEO_MIXER_CONTROL_ADDR_HEIGHT_DATA 0x18
#define XVIDEO_MIXER_CONTROL_BITS_HEIGHT_DATA 32
#define XVIDEO_MIXER_CONTROL_ADDR_SM_HEIGHT_DATA 0x20
#define XVIDEO_MIXER_CONTROL_BITS_SM_HEIGHT_DATA 32
#define XVIDEO_MIXER_CONTROL_ADDR_SM_WIDTH_DATA 0x28
#define XVIDEO_MIXER_CONTROL_BITS_SM_WIDTH_DATA 32
#define XVIDEO_MIXER_CONTROL_ADDR_STARTX_DATA 0x30
#define XVIDEO_MIXER_CONTROL_BITS_STARTX_DATA 32
![点击并拖拽以移动](/i/l/?n=22&i=blog/3028029/202211/3028029-20221106124931996-1393353909.gif)
扩展
1. 两输入axis的算法处理。如:视频叠加,fpn算法,图像融合。
2. 不同宽度,不同位宽的处理。
3. 多路画中画功能。可以增加透明功能。
标签:CONTROL,Read,ip,MIXER,video,xilinx,bit,define,XVIDEO From: https://www.cnblogs.com/alaode/p/16862416.html