如题现在本人已经在ZYNQ上建立好了视频通路:通路的大概情况如下:
- /************config hls ip********/
- voidConfigureHlsIP(XImgprocess_top *ImgProcess)
- {
- ImgProcess->Control_bus_BaseAddress = XPAR_IMGPROCESS_TOP_0_S_AXI_CONTROL_BUS_BASEADDR;
- ImgProcess->IsReady = XIL_COMPONENT_IS_READY;
- XImgprocess_top_EnableAutoRestart(ImgProcess);
- XImgprocess_top_SetRows(ImgProcess, 480);
- XImgprocess_top_SetCols(ImgProcess,640);
- XImgprocess_top_InterruptDisable(ImgProcess, 0xFFFFFFFF);
- XImgprocess_top_InterruptGlobalDisable(ImgProcess);
- XImgprocess_top_Start(ImgProcess);
- }
- int main()
- {
- init_platform();
- usleep(100000);
- print("Hello World
");
- ConfigureHlsIP(&ImgProcess);
- // MM2S
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x00, 0x008B); // enable run, circular_park, GenlockEn, GenlockSrc
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x5C, 0x01000000); // Start address of the 1st frame(3 frames in all)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x60, 0x02000000); // Start address of the 2nd frame(3 frames in all)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x64, 0x03000000); // Start address of the 3rd frame(3 frames in all)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x58, 0x0780); // Stride number
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x54, 0x0780); // number of bytes per line(640 x 3)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x50, 0x01E0); // number of lines per frame(480)
- //S2MM
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0x30, 0x108B); // enable run, circular_park
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0xAC, 0x01000000); // Start address of the 1st frame(3 frames in all)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0xB0, 0x02000000); // Start address of the 2nd frame(3 frames in all)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0xB4, 0x03000000); // Start address of the 3rd frame(3 frames in all)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0xA8, 0x0780); // Stride number
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0xA4, 0x0780); // number of bytes per line(640 x 3)
- Xil_Out32(XPAR_AXI_VDMA_0_BASEADDR + 0xA0, 0x01E0); // number of lines per frame(480)
- return0;
- }
复制代码但是现在有一个问题,这个通路是采集摄像头数据,然后hls_IP处理,之后dma存储图像和读出图像显示,现在我想在SDK中添加自己的一些简单的对图像数据的操作我该怎么做?这个通路是自动的吧,从采集图像到显示图像,我要是在sdk中直接操作内存地址中的图像数据会发生数据冲突,该怎么办,求给个思路
一周热门 更多>