
Using the Provided Software and Drivers
The open-source, Xilinx provided drivers and user space applications for the MCAP VSEC,
QDMA, and XDMA IPs can be found at
https://github.com/Xilinx/dma_ip_drivers
to be cloned or
downloaded. There is also extensive documentation on each of the drivers contained in the
repository and linked to external pages. The following sections are provided to show an example
of the required commands; assuming a compatible bitstream has been loaded to the device
already, the PCIe link is up, and the stage 2 or partial bitstream(s) are ready to be delivered to the
device. For the examples in the following sections, assuming the Bus:Device.Function of the PCIe
device is 01:00.0.
QDMA
1. Navigate to driver root directory
a.
$> cd <parent-path>/dma_ip_drivers/QDMA/linux-kernel
2. Compile driver and applications
a.
$> make TANDEM_BOOT_SUPPORTED=1
3. Copy driver and application executables to standard destinations
a.
$> make install
4. Generate the
qdma.conf
file manually or using the
qdma_generate_conf_file.sh
script and place it in
/etc/modprobe.d
if this is the first time using the driver on the host
system. It is also recommended to blacklist the driver modules for boot; refer to the README
for instructions
5. Insert the driver into the kernel
a.
$> modprobe qdma-pf
6. Set the maximum number of possible queues using sysfs
a.
$> echo 1 > /sys/bus/pcie/devices/0000:01:00.0/qdma/qmax
7. Add the queue; must use memory mapped DMA and direction is host to card
a.
$> dma-ctl qdma01000 q add idx 0 mode mm dir h2c
8. Start the queue; must set aperture size so DMA transfer acts on a keyhole
a.
$> dma-ctl qdma01000 q start idx 0 dir h2c aperture_sz 4096
9. Perform the DMA transfer to SBI
a.
$> dma-to-device -d /dev/qdma01000-MM-0 -f <.pdi file> -s <size>
-a 0x102100000
Chapter 2: Tandem Configuration
PG346 (v3.3) November 16, 2022
CPM Mode for PCI Express
33