Intel Acceleration Stack Quick Start Guide: Intel FPGA Programmable Acceleration Card D5005

ID 683394
Date 7/09/2021
Public
Document Table of Contents

5. Running FPGA Diagnostics

This section presents instructions on how to run FPGA diagnostics using the fpgadiag and fpgabist utility. You can run the diagnostic test, provided with the Acceleration Stack Runtime/Development package, to ensure the board interface components (PCIe + SDRAM) are operating as expected. The fpgabist tool accepts dma_afu AFU and fpgadiag tool accepts nlb_mode_3 AFU.
Note: If a flash is programmed with a root entry hash, you must ensure that the AFUs are signed with an appropriate root key and code signing key before running the FPGA diagnostics. For more information on signing, refer to the Security User Guide: Intel FPGA Programmable Acceleration Card D5005.
  1. Configure the number of system hugepages the FPGA fpgadiag utility requires:
    sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/hugepages-\ 
    2048kB/nr_hugepages"
    Note: The above configuration is for a single card system. For multiple cards, set the number of 2 MB hugepages to 20*<number_of_cards>.
  2. Configure and run diagnostics with the nlb_mode_3 AFU image.
    sudo fpgasupdate $OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_3/bin/\
    nlb_mode_3_unsigned.gbs

    The fpgasupdate tool accepts PCIe B:D:F if you need to target a specific Intel® FPGA PAC in multi-card systems.

    Replace the PCIe B:D:F value with appropriate values in the following commands:

    $ 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
    For more information, refer to the fpgadiag tool.
  3. Configure two 1 GB hugepages for DMA AFU diagnostics.
    sudo sh -c "echo 2 > /sys/kernel/mm/hugepages/hugepages-\
    1048576kB/nr_hugepages"
    Note: The above configuration is for a single card system. For multiple cards, set the number of 1 GB hugepages to 2*<number_of_cards>.
  4. Configure and run diagnostics with the DMA AFU image.
    sudo fpgabist $OPAE_PLATFORM_ROOT/hw/samples/dma_afu/bin/\
    dma_afu_unsigned.gbs

    Sample output:
    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.