Zynq7020 AXI Video Direct Memory Access 裸板编程

以写为例子,A4为所一行需要的大小,由于输入进来的是yuv422,为两个字节。A8为到了这个大小的时候就会产生一个tlast信号。A0为收到这么多个tlast时就会在第二个缓冲区的起始地址。故这里只要写满一行就会有个tlast信号,写满720的时候就会到第二个缓冲区的起始地址去。

int AxiVDMASelfTestExample(u16 DeviceId)
{
	XAxiVdma_Config *Config;
	int Status = XST_SUCCESS;

	Config = XAxiVdma_LookupConfig(DeviceId);
	if (!Config) {
			return XST_FAILURE;
	}

	/* Initialize DMA engine */
	Status = XAxiVdma_CfgInitialize(&AxiVdma, Config, Config->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}


//write
    Xil_Out32(Config->BaseAddress + 0x30, 0x4); 

    Xil_Out32(Config->BaseAddress + 0x30, 0x8b);

    Xil_Out32(Config->BaseAddress + 0xAC,   0x08000000);

    Xil_Out32(Config->BaseAddress + 0xAC+4, 0x09000000);

    Xil_Out32(Config->BaseAddress + 0xAC+8, 0x0A000000);

    Xil_Out32(Config->BaseAddress + 0xAC+12, 0x0B000000);

    Xil_Out32(Confi

你可能感兴趣的:(Xilinx,Zynq7020)