zendarinc / zdma Goto Github PK
View Code? Open in Web Editor NEWThis project forked from jascondley/dma_ip_drivers
License: GNU General Public License v2.0
This project forked from jascondley/dma_ip_drivers
License: GNU General Public License v2.0
The files in this directory provide Xilinx PCIe DMA drivers, example software, and example test scripts that can be used to exercise the Xilinx PCIe DMA IP. This software can be used directly or referenced to create drivers and software for your Xilinx FPGA hardware design. Directory and file description: =============================== - src/: This directory contains the Xilinx PCIe DMA kernel module driver files. - libxdma/: This directory contains support files for the kernel driver module, which interfaces directly with the XDMA IP. - include/: This directory contains all include files that are needed for compiling driver. - tests/: This directory contains example application software to exercise the provided kernel module driver and Xilinx PCIe DMA IP. This directory also contains the following scripts and directories. - load_driver.sh: This script loads the kernel module and creates the necissary kernel nodes used by the provided software. The The kernel device nodes will be created under /dev/xdma*. Additional device nodes are created under /dev/xdma/card* to more easily differentiate between multiple PCIe DMA enabled cards. Root permissions will be required to run this script. - run_test.sh: This script runs sample tests on a Xilinx PCIe DMA target and returns a pass (0) or fail (1) result. This script is intended for use with the PCIe DMA example design. - data/: This directory contains binary data files that are used for DMA data transfers to the Xilinx FPGA PCIe endpoint device. Usage: - Change directory to the driver directory. cd xdma - Compile and install the kernel module driver. make install - Change directory to the tools directory. cd tools - Compile the provided example test tools. make - Load the kernel module driver: a. modprobe xdma b. using the provided script. cd tests ./load_driver.sh - Run the provided test script to generate basic DMA traffic. ./run_test.sh - Check driver Version number modinfo xdma (or) modinfo ../xdma/xdma.ko Updates and Backward Compaitiblity: - The following features were added to the PCIe DMA IP and driver in Vivado 2016.1. These features cannot be used with PCIe DMA IP if the IP was generated using a Vivado build earlier than 2016.1. - Poll Mode: Earlier versions of Vivado only support interrupt mode which is the default behavior of the driver. - Source/Destination Address: Earlier versions of Vivado PCIe DMA IP required the low-order bits of the Source and Destination address to be the same. As of 2016.1 this restriction has been removed and the Source and Destination addresses can be any arbitrary address that is valid for your system. Frequently asked questions: Q: How do I uninstall the kernel module driver? A: Use the following commands to uninstall the driver. - Uninstall the kernel module. rmmod -s xdma Q: How do I modify the PCIe Device IDs recognized by the kernel module driver? A: The xdma/xdma_mod.c file constains the pci_device_id struct that identifies the PCIe Device IDs that are recognized by the driver in the following format: { PCI_DEVICE(0x10ee, 0x8038), }, Add, remove, or modify the PCIe Device IDs in this struct as desired. Then uninstall the existing xdma kernel module, compile the driver again, and re-install the driver using the load_driver.sh script. Q: By default the driver uses interupts to signal when DMA transfers are completed. How do I modify the driver to use polling rather than interrupts to determine when DMA transactions are completed? A: The driver can be changed from being interrupt driven (default) to being polling driven (poll mode) when the kernel module is inserted. To do this modify the load_driver.sh file as follows: Change: insmod xdma/xdma.ko To: insmod xdma/xdma.ko poll_mode=1 Note: Interrupt vs Poll mode will apply to all DMA channels. If desired the driver can be modified such that some channels are interrupt driven while others are polling driven. Refer to the poll mode section of PG195 for additional information on using the PCIe DMA IP in poll mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.