Are there any DMA Linux kernel driver example with PCIe for FPGA?

manolo tunez picture manolo tunez · Sep 15, 2015 · Viewed 8.7k times · Source

I would like to write a driver in kernel space that:

  • Communicate a FPGA connected by PCIe in a embedded system( with powerPC).
  • It uses DMA to transfer information from the FPGA to RAM.
  • User programs have to access to this information.

I need some example that make something similar to guide me. Does anyone any idea where I can found some source?

Answer

Jamey Hicks picture Jamey Hicks · Dec 23, 2015

Connectal (http://www.connectal.org) is an open source framework that enables user-space software to communicate to Xilinx or Altera FPGAs. Very little of that communication involves the device-driver, actually.

Connectal supports message-passing between the software and hardware over memory mapped hardware FIFOs, and it supports shared memory via DMA from the FPGA.

The device-driver is designed to be architecture independent but PCIe communication has only been tested from x86.

Connectal also supports Zynq, so some of the problems you will run into (non-snooped I/O) have been debugged.

Connectal's hardware is currently implemented in Bluespec Systems Verilog and uses Xilinx or Altera PCIe cores.