# XDMA Windows Driver
This project is Xilinx's sample Windows driver for 'DMA/Bridge Subsystem for PCI Express v4.0' (XDMA) IP.
*Please note that this driver and associated software are supplied to give a basic generic reference
implementation only. Customers may have specific use-cases and/or requirements for which this driver
is not suitable.*
### Dependencies
* Target machine running Windows 7 or Windows 10
* Development machine running Windows 7 (or later)
* Visual Studio 2015 (or later) installed on development machine
* Windows Driver Kit (WDK) version 1703 (or later) installed on development machine
## Directory Structure
```
<project_root>/
|__ build/ - Generated directory containing build output binaries.
|__ exe/ - Contains sample client application source code.
| |__ simple_dma/ - Sample code for AXI-MM configured XDMA IP.
| |__ streaming_dma/ - Sample code for AXI-ST configured XDMA IP.
| |__ user_events/ - Sample code for access to user event interrupts.
| |__ xdma_info/ - Utility application which prints out the XDMA core ip
| | configuration.
| |__ xdma_rw/ - Utility for reading/writing to/from xdma device nodes such
| | as control, user, bypass, h2c_0, c2h_0 etc.
| |__ xdma_test/ - Basic test application which performs H2C/C2H transfers on
| all present channels.
|__ inc/ - Contains public API header file for XDMA driver.
|__ libxdma/ - Static kernel library for XDMA IP.
|__ sys/ - Reference driver source code which uses libxdma
|__ README.md - This file.
|__ XDMA.sln - Visual Studio Solution.
```
## Development Environment Setup
1. Install Visual Studio 2015 and WDK 10 ([see here][ref3]) on the development machine.
2. Setup shared network folders between the dev machine and target machines.
3. OPTIONAL - Locate the *TraceView* program in the WDK (usually in _tools/tracing/`ARCH`_ and copy to target machine or place in shared folder.
4. Place the project directory (this file's folder) into the shared network drive.
### Building from Source
#### From Visual Studio
The Windows driver and sample applications can be built using Visual Studio (2015 or later). Simply open the *XDMA.sln* solution, open the *Build* menu and click *Build Solution*.
This driver project configurations support 32bit/64bit, Windows7/Windows10 OS. In order to target a different Windows OS, go to the driver project *Properties->Driver Settings->General* and change *Target OS Version* to the desired OS.
Also *Release* and *Debug* build configurations exist and are configurable via the *Configuration Manager*.
The compiled build products can then be found in the *build/`ARCH`/* folder. This folder contains the following folders:
- *bin/* contains sample and test applications
- *libxdma/* contains static xdma kernel library
- *XDMA_Driver/* contains the driver package
#### From Command Line
1. Open *Developer Command Prompt for VS2015*
2. Change directory to the project root directory
3. Run the following command:
msbuild /t:clean /t:build XDMA.sln
4. The build should run and display the following
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:01:05.55
For more information on building Windows drivers visit the [MSDN website][ref4].
### Driver Installation
The easiest way to install the driver is via Windows' *Device Manager*
(_Control Panel->System->Device Manager_).
_**Note**: The driver does not provide a certified signature and uses a test signature instead. Please be aware that, depending on your target operating system, you may need to enable test-signed drivers in your windows boot configuration in order to enable installation of this driver. See [MSDN website][ref5] for further information._
1. Open the *Device Manager*
2. Initially the device may be displayed as a *PCI Serial Port* device.
3. Right-Click on the device and select *Update Driver Software* and select the folder of the built XDMA driver (typically *build/`ARCH`/XDMA_Driver/`CONFIG`/*
4. If prompted about unverified driver publisher, select *Install this driver software anyway*.
5. *Xilinx Drivers -> Xilinx DMA* should now be visible in the *Device Manager*
## Sample Applications
#### 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 1024 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 or streaming 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 (return 0) or fail (return 1) 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][ref2]. The IP core configuration and status is then printed to console.
This application is written in C++11 and it is recommended to compile with at least MSVC v14.0 (Visual Studio 2015) or equivalent compiler.
###### 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 single DMA operations via the h2c_* and c2h_* nodes, where the asterix ('*') denotes the channel index (0-3).
###### Usage
```
xdma_rw.exe <DEVNODE> <read|write> <ADDR> [OPTIONS] [DATA]
- DEVNODE : One of: control | user | event_* | h2c_* | c2h_*,
where the * is a numeric wildcard (0-15 for events, 0-3 for h2c and c2h).
- ADDR : The target offset address of the read/write operation.
Can be in hex or decimal.
- OPTIONS :
-l (length of data to read/write)
-b open file as binary. only use with -f option below.
-f PATH use contents of file at PATH as input or write output into file
-v more verbose output
- DATA : Space seperated byte data in decimal or hex (big endian).
e.g. for the 4 byte value 0x44332211 (decimal 1144201745),
DATA can be either: 0x11 0x22 0x33 0x44
or: 17 34 51 68
```
###### Examples
Read a 4 Byte control register at offset 0x1000:
```
xdma_rw.exe control read 0x1000 -l 4
```
Write 2 Bytes (0x1234) to a control register at offset 0x2004:
```
xdma_rw.exe control write 0x2004 0x34 0x12
```
Read 256 Bytes of user memory at offset 0x0:
```
xdma_rw.exe user read 0 -l 0x100
```
Get data from a binary file (my_data.bin) and write it into user memory at offset 0x0
```
xdma_rw.exe user write 0 -b -f my_data.bin
```
Read 4kB from a C2H_0 at offset 0 into a binary file (my_data.bin).
```
xdma_rw.exe c2h_0 read 0 �l 0x1000 -b -f my_data.bin
```
Read 4kB of data from C2H channel 0 at offset 0x100
```
xdma_rw.exe c2h_0 read 0x100 -l 0x1000
```
Write 4 Bytes (0x12345678) to H2C channel 3 at offset 0x10:
```
xdma_rw.exe h2c_3 write 0x10 0x78 0x56 0x34 0x12
```
#### simple_dma
This application demonstrates how to perform simple DMA transactions.
- Firstl
没有合适的资源?快使用搜索试试~ 我知道了~
收起资源包目录
windows 平台下 xdma pcie 驱动 ,已经编译通过 (241个子文件)
09331569-634d-42da-8c01-c150cfc2837d 377KB
12b67647-dc45-4497-ae22-2ec87786c114 7KB
15278c962830baf726acf25047d470b326bcfb 197B
16c05dea9ae39ef5d4f7b7b29bd6b6ee398924 236B
1821828eba414c5e4bdd91f337aeb1e8611e3a 93B
202fa7c236e87455e08f8e79779ed4147b00f6 1KB
2a2cef8e533a0aca23a90a944633c6b0b2f17c 5KB
2a6cccf069bcd3b73438c613c2f6a389a5ae33 263B
2dd2c261afb67d210a291ec6aa036a3cdab3f1 282B
320ab9b9f207c54ad5286a6d928c4b3f7d088e 1KB
3e2107774afb7bc9e03c5358dda49124b2e481 3KB
400564dee3381fa07f1ac70dc2a3d0441750f2 216B
4c5db2a3d524e8fe893cb0c2975e9b9018cd1b 236B
2020.5 702B
2020.5 310B
2020.5 41B
2020.5 41B
53ffcc07d6f7e202b7a7a9b179c2d9ebfe605c 200B
56fe0d3e5c50276a3e856aa71a74c24cadfd43 2KB
5f6c5b3f003f56bd97510031a24e29f1143597 109B
6f8346b87427b426de9b684efafddf037ddc29 44KB
7a12f1f85cbf89abdf8f33690cc53c68d9c3eb 51B
8287905e7d6d418f0299b4adec85a0e059c095 707KB
88cf0123193461e877ed3edda011bcdc2c8609 235B
9826e43abbd68fadf8bb645ade3473ee4ce140 1KB
9ca9e4192d87e992ef20567853849c74feca1b 89B
9f54f697741a6f44d90bb009bb1da914dfa48e 89B
a4b75ff772edef53696427e9de174657edcd07 5KB
datafile4K.bin 4KB
dma_engine.c 54KB
file_io.c 37KB
interrupt.c 27KB
driver.c 15KB
xdma_rw.c 13KB
device.c 12KB
performance.c 9KB
simple_dma.c 6KB
descriptor_bypass.c 6KB
c271cb4ef8b1c5d5ba977a4a945ae40bca47ae 358B
c89b17ab-b68a-48e0-95ff-84e545284526 497KB
ca24148838b9c7e071456b69c67cbd1fc8dc6a 88B
xdma.cat 5KB
ceac1718fe1df66a665c856e4d9342f74447c7 1KB
XDMA.cer 776B
COMMIT_EDITMSG 33B
config 303B
xdma_info.cpp 15KB
streaming_dma.cpp 9KB
xdma_test.cpp 8KB
user_event.cpp 6KB
d44436f049b96319508cbb20f3fa80aee347e3 1KB
d73d71c36f0573ef9c2753f8f0d6c674f6be42 1KB
Browse.VC.db 65.84MB
SemanticSymbols.db 9.67MB
CodeChunks.db 6.81MB
Solution.VC.db 1.07MB
ddf55a0ac8f3d9d6918f10962b8aeb75e262f5 2KB
description 73B
e42836edaf6cb2b350796d7ece6df3c7607f46 124B
exclude 240B
wdksetup (6).exe 1.1MB
simple_dma.exe 648KB
fe0aa4215c1a8e0818551cfa671ae61a3233d3 90B
FETCH_HEAD 0B
.gitignore 48B
dma_engine.h 10KB
reg.h 9KB
pcie_common.h 8KB
xdma.h 7KB
device.h 5KB
file_io.h 4KB
interrupt.h 4KB
trace.h 4KB
trace.h 3KB
xdma_public.h 3KB
driver.h 3KB
HEAD 702B
HEAD 189B
HEAD 32B
HEAD 23B
vc143.idb 235KB
pack-609dd084b6ab65d391e00e8b08a583962da1dadd.idx 4KB
simple_dma.ilk 3.84MB
index 4KB
XDMA.inf 8KB
XDMA.inf 8KB
XDMA.inf 8KB
XDMA.inx 8KB
STREAMING_DMA.ipch 102.81MB
XDMA_TEST.ipch 102.81MB
USER_EVENT.ipch 94.56MB
XDMA_INFO.ipch 66.75MB
SIMPLE_DMA.ipch 52MB
INTERRUPT.ipch 23.5MB
DEVICE.ipch 23.5MB
DMA_ENGINE.ipch 23.25MB
DRIVER.ipch 23.25MB
DRIVER.ipch 22.5MB
DocumentLayout.backup.json 13KB
DocumentLayout.json 4KB
共 241 条
- 1
- 2
- 3
资源推荐
资源预览
资源评论
2022-11-30 上传
5星 · 资源好评率100%
5星 · 资源好评率100%
200 浏览量
5星 · 资源好评率100%
113 浏览量
2014-04-30 上传
137 浏览量
5星 · 资源好评率100%
2021-06-02 上传
5星 · 资源好评率100%
2021-09-30 上传
169 浏览量
5星 · 资源好评率100%
117 浏览量
2020-07-31 上传
5星 · 资源好评率100%
121 浏览量
5星 · 资源好评率100%
5星 · 资源好评率100%
126 浏览量
2023-04-08 上传
5星 · 资源好评率100%
116 浏览量
5星 · 资源好评率100%
184 浏览量
132 浏览量
5星 · 资源好评率100%
107 浏览量
资源评论
移居月亮
- 粉丝: 2
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功