I write an IP with AXI Lite peripheral and send data from ps by the python code as following.
However, I found out that the time of transferring the data from PS to PL is a little bit too long, so I tried to repackage the IP with AXI FULL peripheral, so that I can burst transfer the data. (There are 24 number of 32 bit data I need to transfer every time.)
But now I encounter a problem is that I don’t know how to write the python code so that it can transfer 24 amount of data continuously. (I only know how to transfer one 32 bit data at a time.) Are there any sample code? Thank you!
Or are there any other way to transfer data?(I am thinking about using DMA, but it seems that DMA mostly is used for huge amount of data.)
Have a look at the
.mmio.array property of the IP driver. This will give you a NumPy array which is backed on to the AXI interface. You can then create an array of data and assign it all in one go
import numpy as np data = np.array([0x...., 0x...], dtype='u4') add_ip.mmio.array[:] = data
This might not use the AXI full interface to it’s full potential depending on what Linux and the C runtime library do but it will be a lot faster than your current approach.