Xilinx FPGA PCIE接口调试

本文探讨了在Linux环境下Xilinx FPGA PCIE接口调试过程中遇到的问题,包括时钟接口的选择与配置方法,以及上位机如何识别XDMA。文中详细介绍了VC707和KCU105开发板的时钟约束配置,并提供了识别XDMA所需的reg_map配置。
摘要由CSDN通过智能技术生成

        关于在linxu环境下Xilinx FPGA PCIE的接口调试从中遇到了几个问题,第一个就是时钟接口的选择,还有一个就是上位机如何识别XDMA;

        操作系统环境:Linux

        板卡:两款开发板VC707、KCU105

        上位机环境准备:从Xilinx官网下载linux环境的XDMA驱动,并编译安装好;

一、PCIE时钟接口

       1. 从VC707的pcie例程中可以看到,开发板自带的金手指的时钟通过

       在约束文件中set_property LOC IBUFDS_GTE2_X1Y5 [get_cells refclk_ibuf_0]规定好了通道,在TOP文件中用

 IBUFDS_GTE2       refclk_ibuf_0         (.O(sys_clk_0), .ODIV2(), .I(sys_clk_p_0), .CEB(1'b0), .IB(sys_clk_n_0));

        源语一次即可,这里的X1Y5是固定到了AB7、AB8管脚,如下图所示,AB7、AB8下方就是refclk,用鼠标放置在该buf上,就会显示其编号为X1Y5;

         2.现在VC707的FMC接口引出PCIE管脚,对应的时钟约束管脚找了官方的各种手册都没有找到,后来在open systhesized design的版图中,能找到管脚对应的refclk_ibuf的编号;当管脚选择为E9,E10时,对应的refclk为X1Y10;

  3.KCU105的时钟管脚与VC707的约束办法以及源语方式又不一样,在约束文件中可以用

     set_property LOC H6 [get_ports sys_clk_p]

     create_clock -name sys_clk -period 10 [get_ports sys_clk_p]

     在top文件中,用下述源语描述即可;

     IBUFDS_GTE3 # (.REFCLK_HROW_CK_SEL(2'b00)) refclk_ibuf (.O(sys_clk_gt), .ODIV2( sys_clk ), .I(sys_clk_p), .CEB(1'b0), .IB(sys_clk_n));

       若是要换成FMC的pcie管脚,在约束文件中将对应的时钟管脚更换即可;

二、如何识别XDMA

        除了要使用XDMA这个IP,上位机要识别XDMA,还需要reg_map;

 

 

 

 

xilliix pcie dma 驱动 (基于 xilnx xdma ip核 4.0 的WDF驱动) --- # 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 ``` / |__ 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. ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值