Hi,
This is a little complicated. PYNQ doesn’t support scatter-gather functionality - i.e. where you have multiple (fragmented?) memory buffers.
The DMA has a limit of 8MB per transfer. There was an enhancement to allow transfers larger than 8MB. This is what you see in the SGDMAChannel class, and you need to enable the Scatter Gather engine in the DMA, and you still need to use contiguous memory buffers.
2. Yes, for reasons in 1.
3. Contiguous means in contiguous in physical memory. The Linux OS in the PYNQ image uses virtual memory. When the OS allocates memory, it will be virtually contiguous but the physical memory may be fragmented. This isn’t a problem for a software application, the OS will manage the memory.
A fragmented memory buffer is bad for a Zynq PL design (e.g the DMA) which accesses the physical memory directly. The logic (PL resources) to do this and the software to set this up is much more complicated than contiguous memory.
4. You can use the pynq allocate()
class to allocate contiguous memory for use by IP in the PL.
https://pynq.readthedocs.io/en/v2.6.1/pynq_libraries/allocate.html
Cathal