-
Notifications
You must be signed in to change notification settings - Fork 16
Home
guruofquality edited this page Dec 16, 2014
·
12 revisions
The Pothos Zynq toolkit provides zero-copy DMA support blocks for Xilinx Zynq FPGAs. The toolkit provides:
- DMA source and sink blocks for zero-copy buffer integration with a Pothos data flow,
- a userspace driver for interfacing with an AXI DMA engine in the programmable logic,
- loopback examples in Vivado, Zynq boot files, and documentation to recreate the demo.
Checkout the loopback demo for the MicroZed Zynq evaluation board.
The AXI DMA userspace driver is a combined kernel module and C userspace API for DMA buffer access. Also, the C API is in general, useful for individuals that want to interface with DMA on a Zynq FPGA.
- The kernel module is responsible for parsing the device tree for available AXI DMA engines, allocating DMA buffers for the userspace driver, and implementing waiting and interrupt interfacing.
- The userspace driver implements the buffer interface, handles the scatter/gather tables, and reads and writes to the DMA control registers in the FPGA.
- Because Pothos is a userspace library, the userspace driver is implemented to only call into the kernel for initialization, cleanup, and waiting for completion. We otherwise stay out of the kernel during runtime operations.
References:
- Checkout the C userspace API for the Pothos AXI DMA userspace driver.
- Checkout the kernel source for the Pothos AXI DMA userspace driver.
The Zynq DMA source and sink blocks integrate the userspace driver above with the Pothos framework hooks for buffer integration. This includes a custom buffer manager to handle releasing buffers into the DMA engine, and DMA block work functions that wait on completion and acquire buffers from the DMA engine.
References:
- Zynq DMA source block - DMA stream to arbitrary consumer
- Zynq DMA sink block - arbitrary producer to DMA stream
- Zynq DMA buffer manager - hooks for buffer integration