L-tile和H-tile Avalon® 存储器映射 Intel® FPGA IP PCI Express* 用户指南

ID 683667
日期 11/11/2021
Public
文档目录

2.7. 运行设计实例应用程序

  1. 浏览设计实例目录下的./software/user/example
  2. 编译设计实例应用程序:
    $ make
  3. 运行测试:

    $ sudo ./intel_fpga_pcie_link_test

    可在手动或者自动模式下运行 Intel® FPGA IP PCIe* 链路测试。

    • 在自动模式下,应用程序自动选择器件。测试通过匹配Vendor ID选择具有最低BDF的 Intel® Stratix® 10 PCIe* 器件。测试还会选择最低的可用BAR。
    • 手动模式下,该测试会询问您关于总线,器件和功能数以及BAR的信息。
    对于 Intel® Stratix® 10 GX Development Kit,可通过输入以下命令决定BDF:

    $ lspci -d 1172

  4. 以下是自动和手动模式的脚本样本:
    Intel FPGA PCIe Link Test - Automatic Mode
    Version 2.0
    0: Automatically select a device
    1: Manually select a device
    ***************************************************
    >0
    Opened a handle to BAR 0 of a device with BDF 0x100
    ***************************************************
    0: Link test - 100 writes and reads
    1: Write memory space
    2: Read memory space
    3: Write configuration space
    4: Read configuration space
    5: Change BAR
    6: Change device
    7: Enable SR-IOV
    8: Do a link test for every enabled virtual function
       belonging to the current device
    9: Perform DMA
    10: Quit program
    ***************************************************
    > 0
    Doing 100 writes and 100 reads . . 
    Number of write errors:     0
    Number of read errors:      0
    Number of DWORD mismatches: 0
    Intel FPGA PCIe Link Test - Manual Mode
    Version 1.0
    0: Automatically select a device
    1: Manually select a device
    ***************************************************
    > 1
    Enter bus number:
    > 1
    Enter device number:
    > 0
    Enter function number:
    > 0
    BDF is 0x100
    Enter BAR number (-1 for none):
    > 4
    Opened a handle to BAR 4 of a device with BDF 0x100