Intel Acceleration Stack快速入门指南: Intel FPGA Programmable Acceleration Card D5005

ID 683394
日期 9/09/2020
Public
文档目录

5. 运行FPGA诊断

本节介绍了如何使用fpgadiagfpgabist实用程序运行FPGA诊断。通过运行Acceleration Stack Runtime/Development软件包中提供的诊断测试可以确保板级接口组件(PCIe + SDRAM)正常运行。fpgabist工具接受dma_afu AFUfpgadiag工具接受nlb_mode_3 AFU
注: 如果一个闪存是用根条目哈希(root entry hash)编程的,那么在运行FPGA诊断之前必须确保AFU是使用相应的根秘钥和代码签署秘钥进行签署的。关于签署(signing)的详细信息,请参考Security User Guide: Intel FPGA Programmable Acceleration Card D5005
  1. 配置FPGA fpgadiag实用程序所需的系统大页面(hugepage)的数量:
    sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/hugepages-\ 
    2048kB/nr_hugepages"
    注: 上面的配置用于单卡系统。对于多卡系统,请将2 MB大页面的数量设置为20*<number_of_cards>
  2. 使用nlb_mode_3 AFU映像进行配置和运行诊断。
    sudo fpgasupdate $OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_3/bin/\
    nlb_mode_3_unsigned.gbs

    如果您需要在多卡系统中针对一个特定的 Intel® FPGA PAC,那么fpgasupdate工具接受PCIe B:D:F。

    在下面命令中将PCIe B:D:F值替换成相应值:

    $ fpgadiag -B 0x82 -D 0x00 -F 0x00 --mode=read --read-vc=vh0 \
    --write-vc=vh0 --multi-cl=4 --begin=1024 --end=1024 --timeout-sec=5 --cont
    Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss 
          1024  888206752           0            0            0             0 
    
    Cache_Wr_Miss   Eviction 'Clocks(@250 MHz)'   Rd_Bandwidth   Wr_Bandwidth
                0          0       1250013605      11.369 GB/s     0.000 GB/s
    
    VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count 
       888206756            1            0            0            0  
    
    VL0_Wr_Count
              0
    $ fpgadiag -B 0x82 -D 0x00 -F 0x00 --mode=write --read-vc=vh0 \
    --write-vc=vh0 --multi-cl=4 --begin=1024 --end=1024 --timeout-sec=5 --cont
    Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss 
          1024          0  1000011208            0            0             0 
    
    Cache_Wr_Miss   Eviction 'Clocks(@250 MHz)'   Rd_Bandwidth   Wr_Bandwidth
                0          0       1250014578       0.000 GB/s    12.800 GB/s
    
    VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count 
               0   1000011209            0            0            0 
    
    VL0_Wr_Count
              0
    $ fpgadiag -B 0x82 -D 0x00 -F 0x00 --mode=trput --read-vc=vh0 \
    --write-vc=vh0 --multi-cl=4 --begin=1024 --end=1024 --timeout-sec=5 --cont
    Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss 
          1024  812096892   836718216            0            0             0 
    
    Cache_Wr_Miss   Eviction 'Clocks(@250 MHz)'   Rd_Bandwidth   Wr_Bandwidth
                0          0       1250012621      10.395 GB/s    10.710 GB/s
    
    VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count
       812096892    836718217            0            0            0 
    
    VL0_Wr_Count
              0
    关于详细信息,请参考fpgadiag工具。
  3. 配置两个1 GB大页面,用于DMA AFU诊断。
    sudo sh -c "echo 2 > /sys/kernel/mm/hugepages/hugepages-\
    1048576kB/nr_hugepages"
    注: 上面的配置用于单卡系统。对于多卡系统,请将1 GB大页面的数量设置为2*<number_of_cards>
  4. 使用DMA AFU映像进行配置和运行诊断。
    sudo fpgabist $OPAE_PLATFORM_ROOT/hw/samples/dma_afu/bin/\
    dma_afu_unsigned.gbs

    样例输出:
    Running mode: dma_afu
    Attempting Partial Reconfiguration:
    Reading bitstream
    Looking for slot
    Found slot
    Programming bitstream
    Writing bitstream
    Done
    Running fpga_dma_test test...
    
    PASS! Bandwidth = 12708 MB/s     
    Finished Executing DMA Tests
    
    Built-in Self-Test Completed.