11-16-2015 08:29 AM
This is a fairly broad question, but has anyone created a system with a host PC transferring data to a Zynq running linux using PCIe?
On the host side, it seems fairly straightforward to blast data into a predefined memory space on the Zynq. However, what is the best method to let the embedded linux side know about the transfer and allocate the memory properly so it can be used on the zynq side?
11-18-2015 03:42 AM
If I understand correctly, you want the PC to place data into the DDR memory on the Zynq.
The proper Linux way to do that would be to create a small driver that allocates a chunk of memory using dma_alloc_coherent() and passes the resulting physical address to the logic. The PC on the other side is just another periferal in Logic, as far as the PS side of the Zynq is concerned.
11-18-2015 03:48 AM
That "small driver" would run on the Zynq side.
In logic, you'll want a DMA controller to transfer the data from PC memory to Zynq memory.
On the PC, you'll need a driver that either creates a scatter-gather list of the memory data to be transferred to the DMA controller, or, if you have a simple linear DMA controller, copy the data into a physically contiguous buffer (you can use dma_alloc_coherent on the PC side too) and then instruct the DMA controller in logic to transfer the data from PC memory to Zynq.
It is possible to create a direct AXI link from PC to a memory block (tried that with blockram), but that results in horrible performance (memory read at about 2 MB/s).
03-29-2018 02:25 PM
How about the other way with a Zynq Linux as master and Ubuntu Linux as slave? Zynq initiates transfer to host running Ubuntu. How could that be done and what kind of throughput could I expect?