We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!


Zynq DMA address

Posts: 14
Registered: ‎03-03-2017

Zynq DMA address

Hi, I have a basic question with respect to the DMA that I would like to clarify. I use the DMA (with Memory Map Data Width = 32) in interrupt mode to write to or read from the DDR. Each time an interrupt appears (for writing, for instance), I clear the interrupt and execute the following code:



StartDMATransfer (DDR_BASE_ADDR + X * global_frame_counter, 256);


being DDR_BASE_ADDR = PAR_PS7_DDR_0_S_AXI_BASEADDR = 0x00100000. The first parameter in the call function "StartDMATransfer" is the destination address and the second one the length. I'm not sure which value should have X in the address in order to write the data in the DDR sequentially and without loss of information.

Posts: 31
Registered: ‎11-18-2016

Re: Zynq DMA address

after one complete dma transfer, the address of your pointer should point to the next free address in the ddr.

so X is the length of the packet.


But be aware of adding +packet_size to your pointer: if you have a u32-pointer, the address will increase by 4 byte, when adding +1 to the pointer.


in this case, X is (packet_size) / (sizeof(u32)) //or u8, if your ptr is u8...