Hi, I’m newbie for using PYNQ-Z2.
I heard that moving data from dram in ps area to bram in PL area, using cdma module can transfer more fast.
I’m not familiar with this so I found the below documents and follow the tutorial. but I can’t write any code with jupyter notebook.
# Direct Memory Access using CDMA
## Objectives
After completing this lab, you will be able to:
* Enable a High Performance (HP) port of the processing system
* Add and connect the CDMA controller in the programmable logic
* Perform DMA operation between various memories
## Steps
## Open the Project
### Open the Vivado program. Open the _lab3_ project you created earlier or use the _lab3_ project from the labsolutions directory, and save the project as _lab4_.
1. Start Vivado if necessary and open either the lab3 project (lab3.xpr) you created earlier or the lab3 project in the labsolution directory using the **Open Project** link in the Getting Started page.
1. Select **File > Project > Save As …** to open the _Save Project As_ dialog box. Enter **lab4** as the project name. Make sure that the _Create Project Subdirectory_ option is checked, the project directory path is **{labs}** and click **OK**.
1. This will create the lab4 directory and save the project and associated directory with lab4 name.
## Configure the Processor to Enable S\_AXI\_HP0
### Open the Block Design and enable the S\_AXI\_HP0 interface
1. Click **Open Block Design** in the _Flow Navigator_ pane
1. Double-click on the _Zynq processing system_ instance to open its configuration form.
This file has been truncated. show original
Could someone please give me advice? thanks.
1 Like
Hi @louishin ,
The allocate()
API in pynq allocates memory physically contiguous in memory and then you can use the DMA to move the data.
https://pynq.readthedocs.io/en/latest/pynq_package/pynq.buffer.html#pynq.buffer.allocate
There’s a great tutorial about DMA here: Tutorial: PYNQ DMA (Part 1: Hardware design)
Mario
3 Likes
Thanks for your kind reply, mario.
I’ve already done that tutorial about using DMA. But I think DMA module do not support the data transfer from DDR to block memory in PL. So that I want to operate the AXI CDMA. It supports memory map to memory map transfers.
Do I misunderstand the usage of DMA?
What do you want to do with the data once it is in BRAM (block memory in PL)? How will your IP consume the data?
Cathal
Umm… there’s no plan about consuming data on bram. I heard that by using cmda, more fast data transfer could be possible (PS DDR <-> PL BRAM) compared to the mimo write.
I just want to check but it’s really important to me. Thanks, Cathal.