A user space DMA example on Zynq platform (ZC706) under Petalinux.
Vivado 2014.4 with corresponding Petalinux SDK.
ZC706 Evaluation Board.
This project implements a self-looped DMA connecting with both PL and PS DDRs. The PL DDR is invisible to Linux running on PS. Data can be moved between (1) PS and PL DDRs, (2) PS and PS DDRs, and (3) PL and PL DDRs from programs in user space. The hardware can be built from the hw/system.tcl
.
petalinux-create -t modules --name xdma --enable
Replace files in ./component/modules/xdma
with those from sw/modules/xdma
.
petalinux-create -t apps --name xdma-demo --enable
Replace files in ./component/apps/xdma-demo
with those from sw/apps/xdma-demo
.
petalinux-built
After booting kernel, we can load drivers and run demos.
insmod /lib/modules/`uname -r`/extra/xdma.ko
Run the demo:
/bin/xdma-demo
Thanks for bmartini and John. This is a improved version of bmartini's, and an implementation of John's idea.
Currently, I'm adding multi-process support and dynamically allocation of kernel space.