03-05-2021 02:09 AM
Could anyone please tell me how to set up to perform simple AXI DMA?
I'd like to transfer a data stored in a buffer in a top module to DDR, and transfer back that from DDR to another buffer.
The buffers are [31:0] buff_o and buff_i in a top module.
If there is an exact same sample as this, please show me where it is.
please give me more detail explanation about "Direct Register Mode" MM2S described on p.70 in PG021 June 14, 2019.
A destination address seems not to be set while a source address is set to MM2S_SA. How one set destination address? And when the source is a buffer in a module as show above, how to set the one?
03-07-2021 04:29 AM
This isn't exactly what you asked for but it does demonstrate the AXI DMA. The data path is PSDDR-to-PL (PSDDR > AXI Data Stream FIFO) and from the PL-to-PSDDR (AXI Data Stream FIFO > PSDDR). I hope this helps.
03-07-2021 07:00 AM
Thank you for you helpful comment.
Then, could you please answer the questions listed below?
Q1. When configure AXI DMA via AXI-Lite, which is easier run linux or baremetal on PS?
Q2. There seems to be no explanation about C_BASEADDR in pg021. Is C_BASEADDR the one that I should set somewhere, or I get from somewhere?
Q3. In case of configuring AXI DMA using a module, to set 1 to S2MM_DMACR.RS, is the sequence shown below correct?
reg [31:0] var_dmacr;
load a data from S2MM_DMACR into var_dmacr, using AXI-Lite interface.
var_dmacr <= (var_dmacr & 0xFFFFFFFE) + 1;
store a data in var_dmacr into S2MM_DMACR, using AXI-Lite interface.
03-07-2021 09:08 AM
I tried making a design shown below, and the design has been validated. But Master Base Addresses are all 0x0000.
Could anyone please tell me the correct ones?
03-07-2021 02:21 PM
I used baremetal. I created the example HelloWorld design and then used the xsct to read/write from the Cortex-A9 APU. By running the HelloWorld design, you initialize the PS FCLK clocks which the PL expects.
I have attached a Vivado 2020.2 Project Archive that I utilized. You can see that in my case, the AXI DMA C_BASEADDR is mapped to 0x4040_0000.
If you follow the commands I had in the referenced Forums Post, those will provide all the steps necessary which includes the Run/Stop control.
03-09-2021 02:16 AM - edited 03-09-2021 02:17 AM
03-09-2021 10:17 AM
No, the addresses should not be zero. You are missing the connection between the ps axi master and the axilite interface on the dma. Add another axi interconnect to the block diagram and connect its input to the ps axi master out and then the output to the dma axilite input.