Xilinx Answer 65444 Windows
Xilinx Answer 65444 Windows
Important Note: This downloadable PDF of an Answer Record is provided to enhance its usability and readability.
It is important to note that Answer Records are Web-based content that are frequently updated as new information becomes
available. You are reminded to visit the Xilinx Technical Support Website for the latest version of this Answer.
Introduction
The Xilinx PCI Express DMA IP provides high-performance direct memory access (DMA) via PCI Express. The PCIe DMA
can be implemented in Xilinx 7 Series XT and UltraScale devices. This answer record provide drivers and software that can
be run on a PCI Express root port host PC to interact with the DMA endpoint IP via PCI Express. The drivers and software
provided with this answer record are designed for Windows 7 operating systems and can be used for lab testing or as a
reference for driver and software development. Through the use of the PCIe DMA IP and the associated drivers and software
you will be able to generate high-throughput PCIe memory transactions between a host PC and a Xilinx FPGA.
Driver Installation
Follow the steps below to install the PCIe Xilinx DMA driver on Windows. Note that you will need administrator privileges to
complete installation:
1. Download and unzip the ‘Xilinx_Answer_65444_Windows_Files.zip’ zip file supplied in this Answer Record.
2. The Unzipped directory should have the following content:
3. Open the Device Manager (Control Panel -> System-> Device Manager)
4. Initially, the device will be displayed as a PCI Memory Controller device.
5. Right-Click on the device and select Update Driver Software and select the folder of the built XDMA driver
(located in sys/XDMA/).
6. If prompted about unverified driver publisher, select ‘Install this driver software anyway’ (see note below).
Xilinx Answer 65444 – Xilinx PCI Express DMA Drivers and Software Guide 1
Note: The driver does not provide a certified signature and uses a test signature instead. Please be aware that you may
need to enable test-signed drivers in your windows boot configuration in order to enable installation of this driver. See MSDN
for further information.
7. Xilinx Drivers -> Xilinx DMA should now be visible in the Device Manager
Sample Applications
Some basic applications that use the PCIe DMA kernel module driver have been included for reference. They can be found
in the bin/ directory of the supplied Answer Record zip file. They are further detailed in the sections below.
Xdma_test
This application is designed to run with the PCIe example design which implements a 4KByte BRAM buffer in the user
portion of the design. As such DMA transfers should be limited to 4 KByte transfers. For a 4 channel design this script
transfers 4096 bytes on each channel. The following functions are performed:
- Determines how many h2c and c2h channels are enabled in the PCIe DMA IP
- Determines if the PCIe DMA core is configured for memory mapped (AXI-MM) or streaming (AXI-ST) modes
- Performs data transfers on all available h2c and c2h channels
- Verifies that the data written to the device matches the data that was read from the device
- Reports pass or fail completion status to the user
Usage
xdma_test.exe
Xdma_info
This application opens the XDMA control device node via CreateFile() and executes ReadFile() to read status and control
registers of the XDMA IP core. These register values are then interpreted according to the register map in the IP
Documentation (PG195). The IP core configuration and status is then printed to console in human readable format.
Usage
xdma_info.exe
Xdma_rw
This application can be used to open any of the device nodes and perform read/write operations. Typically this is useful for
reading memory space of the control or user PCIe BARs. However it can also be used to perform aligned DMA transfers
via the h2c_* and c2h_* nodes, where the asterisk denotes the channel index (0-3). By default the host-side data buffer that
this application allocates is memory aligned to the PAGE_SIZE boundary (typically 4kB).
Usage
Xilinx Answer 65444 – Xilinx PCI Express DMA Drivers and Software Guide 2
-b open file as binary
-f use data file as input/output (for write/read respectively).
-v more verbose output
-a set host-side buffer alignment in bytes (default: PAGE_SIZE)
- DATA : Space separated byte data in decimal or hex,
e.g.: 17 34 51 68
or: 0x11 0x22 0x33 0x44
Examples
Write 2 Bytes (0x1234) to a control register at offset 0x2004 (Note that -l option is not required. When specifying data in
byte sequence)
xdma_rw.exe control write 0x2004 0x34 0x12
User_event
This application opens a user event device file and waits on the event to be triggered.
Usage
user_event.exe
During IP customization in Vivado the PCIe DMA IP can be customized to enable a DMA AXI-Lite Master interface. This
selection is available on the PCIe:BARs tab of the PCIe customization GUI.
This interface exposes an AXI – Lite Memory Mapped interface to the user which can be used for control or other functions
and also can be connected to AXI Interconnect IP. From example design this interface is connected to a 4Kbytes Bram.
This memory region can be accessed through the following command using the provided software application.
© Copyright 2018 Xilinx
Xilinx Answer 65444 – Xilinx PCI Express DMA Drivers and Software Guide 3
Here is an example of how to read 4 bytes from AXI-Lite interface from offset (0x0000).
Here is an example of how to write to the Bram at a specified offset (0x0000) with specific data (0x1234567).
Example to get data from a binary file (my_data.bin) and write it into user memory at offset 0x0
Enabling the PCIe to DMA Bypass interface in the PCIe DMA Driver
During IP customization in Vivado the PCIe DMA IP can be customized to enable a DMA bypass interface. This selection
is available on the PCIe:BARs tab of the PCIe customization GUI.
This interface exposes an AXI Memory Mapped interface that bypasses the DMA and can be connected to an AXI system
through the AXI Interconnect IP.
This memory region can be accessed through the following command using the provided software application.
Here is an example of how to read 4 bytes from the bypass channel at a specified offset (0x0000).
Here is an example of how to write to the bypass channel at a specified offset (0x0000) with specific data (0x1234567).
Device ID Support
Below is a list of Xilinx Device IDs that are covered in the current windows driver.
Xilinx Answer 65444 – Xilinx PCI Express DMA Drivers and Software Guide 4
PCI\VEN_10ee&DEV_9024 PCI\VEN_10ee&DEV_8024 PCI\VEN_10ee&DEV_7024
PCI\VEN_10ee&DEV_9028 PCI\VEN_10ee&DEV_8028 PCI\VEN_10ee&DEV_7028
PCI\VEN_10ee&DEV_9031 PCI\VEN_10ee&DEV_8031 PCI\VEN_10ee&DEV_7031
PCI\VEN_10ee&DEV_9032 PCI\VEN_10ee&DEV_8032 PCI\VEN_10ee&DEV_7032
PCI\VEN_10ee&DEV_9034 PCI\VEN_10ee&DEV_8034 PCI\VEN_10ee&DEV_7034
PCI\VEN_10ee&DEV_9038 PCI\VEN_10ee&DEV_8038 PCI\VEN_10ee&DEV_7038
PCI\VEN_10ee&DEV_903f
The driver provides debug messages via WPP tracing mechanism. A simple way to get access to these trace messages is
via the TraceView program which is part of the Windows Driver Development Kit (WDK). The TraceView program can
usually be found in ‘tools/tracing/ARCH’ folder of the WDK. Please follow the steps below for
Xilinx Answer 65444 – Xilinx PCI Express DMA Drivers and Software Guide 5
Uninstalling the PCIe DMA Driver
1. In the Device Manager, locate the ‘Xilinx Drivers -> Xilinx DMA’ entry.
2. Right-Click on the driver and select Uninstall.
3. Follow the on-screen instructions to complete the uninstallation.
Driver Source
The source files are available for the driver binary files provided with this answer record. Please request the source code
access in the link below:
https://www.xilinx.com/member/xdma_windows_driver.html
Known Issues
Revision History
04/20/2017
Initial Release
09/22/2017
Driver file update
01/22/2018
Windows 10 Support
Xilinx Answer 65444 – Xilinx PCI Express DMA Drivers and Software Guide 6
Support for non-incremental addressing mode
Utilization of “adjacent descriptor” field of descriptors in the driver
Architectural split of the driver into library component and driver component
Bug fixes
Xilinx Answer 65444 – Xilinx PCI Express DMA Drivers and Software Guide 7