Xilinx_Answer_65444_Linux_Files_rel20180420

所属分类:其他
开发工具:LINUX
文件大小:485KB
下载次数:9
上传日期:2020-03-14 10:03:31
上 传 者zhanwen
说明:  xlinx xdma driver for linux

文件列表:
Xilinx_Answer_65444_Linux_Files_rel20180420 (0, 2018-06-14)
Xilinx_Answer_65444_Linux_Files_rel20180420\COPYING (18011, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\include (0, 2018-06-14)
Xilinx_Answer_65444_Linux_Files_rel20180420\include\libxdma_api.h (4305, 2018-04-11)
Xilinx_Answer_65444_Linux_Files_rel20180420\libxdma (0, 2018-06-14)
Xilinx_Answer_65444_Linux_Files_rel20180420\libxdma\libxdma.c (116898, 2018-04-11)
Xilinx_Answer_65444_Linux_Files_rel20180420\libxdma\libxdma.h (17690, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\libxdma\Makefile (511, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\libxdma\version.h (858, 2018-04-11)
Xilinx_Answer_65444_Linux_Files_rel20180420\LICENSE (1530, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests (0, 2018-06-14)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\.perform_hwcount.sh.swp (12288, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data (0, 2018-06-14)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data\datafile0_4K.bin (4096, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data\datafile1_4K.bin (4096, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data\datafile2_4K.bin (4096, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data\datafile3_4K.bin (4096, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data\datafile_256K.bin (263183, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data\datafile_32M.bin (33554432, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\data\datafile_8K.bin (8192, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\dma_memory_mapped_test.sh (3132, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\dma_streaming_test.sh (2195, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\load_driver.sh (1243, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\perform_hwcount.sh (861, 2018-04-11)
Xilinx_Answer_65444_Linux_Files_rel20180420\tests\run_test.sh (2925, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tools (0, 2018-06-14)
Xilinx_Answer_65444_Linux_Files_rel20180420\tools\dma_from_device.c (6228, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tools\dma_to_device.c (6705, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tools\dma_utils.c (3717, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tools\Makefile (599, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tools\performance.c (5593, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\tools\reg_rw.c (5469, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\xdma (0, 2018-06-14)
Xilinx_Answer_65444_Linux_Files_rel20180420\xdma\cdev_bypass.c (3982, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\xdma\cdev_ctrl.c (6835, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\xdma\cdev_ctrl.h (2321, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\xdma\cdev_events.c (2821, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\xdma\cdev_sgdma.c (13950, 2018-04-07)
Xilinx_Answer_65444_Linux_Files_rel20180420\xdma\cdev_sgdma.h (2000, 2018-04-07)
... ...

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: =============================== - xdma/: 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. - etc/: This directory contains rules for the Xilinx PCIe DMA kernel module and software. The files in this directory should be copied to the /etc/ directory on your linux system. - 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. - perform_hwcount.sh: This script runs hardware performance for XDMA for both Host to Card (H2C) and Card to Host (C2H). The result are copied to 'hw_log_h2c.txt' and hw_log_c2h.txt' text files. For each direction the performance script loops from *** bytes to 4MBytes and generate performance numbers (byte size doubles for each loop count). You can grep for 'data rate' on those two files to see data rate values. Data rate values are in percentage of maximum throughput. Maximum data rate for x8 Gen3 is 8Gbytes/s, so for a x8Gen3 design value of 0.81 data rate is 0.81*8 = ***8Gbytes/s. Maximum data rate for x16 Gen3 is 16Gbytes/s, so for a x16Gen3 design value of 0.78 data rate is 0.78*16 = 12.48Gbytes/s. This program can be run on AXI-MM example design. AXI-ST example design is a loopback design, both H2C and C2H are connected. Running on AXI-ST example design will not generate proper numbers. If a AXI-ST design is independent of H2C and C2H, performance number can be generated. - 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 - Copy the provided driver rules from the etc directory to the /etc/ directory on your system. cp ../etc/udev/rules.d/* /etc/udev/rules.d/ - 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 - Delete the dma rules that were added. rm -f /etc/udev/rules.d/60-xdma.rules rm -f /etc/udev/rules.d/xdma-udev-command.sh 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.

近期下载者

相关文件


收藏者