Multi Channel DMA Intel® FPGA IP for PCI Express* Design Example User Guide

ID 683517
Date 6/09/2025
Public
Document Table of Contents

3.5.8.3.1. Avalon-MM DMA (AVMM DMA)

  1. Complete the instructions outlined in Prerequisites before verifying the AVMM DMA design example variant using the following command:

    Command:

    $ sudo ./perfq_app -b 0000:01:00.0 -p 32768 -l 5 -u -c 2 -d 2 -a 2

    Configuration:
    • bdf (-b 0000:01:00.0)
    • 2 channels (-c 2)
    • bi-directional DMA transfer (-u)
    • Payload length of 32768 bytes in each descriptor (-p 32768)
    • Time Limit set to 5 seconds(-l 5)
    • Display log interval is set to 2 seconds (-d 2)
    • One thread per channel (-a 2)
    Note: To test the data validity, you need to perform H2D then D2H operations.
    Figure 31. Custom AVMM DMA Gen4 x16: F-Tile Hardware Test Result
  2. To enable data validation using the -v option, set the software flags in p0_software/user/ common/mk/common.mk as follows:
    cflags += -UPERFQ_PERF 
    cflags += -DPERFQ_LOAD_DATA
    
    Figure 32. Custom AVMM DMA Gen4 x16: F-Tile Hardware Test Result with Data Validation
  3. Rebuild the driver and application by following the instructions in section 3.5.8.1.3 and section 3.5.8.1.4 for the software flags to take effect.
  4. Run the DMA test with data validation by adding the “-v” option to the test command. The resulting printout looks the same as without the “-v” option. When data corruption occurs, it is indicated in the “Failed” column.

    Command:

    $ sudo ./perfq_app -b 0000:38:00.0 -p 32768 -l 5 -u -c 2 -d 2 -a 2 -v

DMA Test Beyond 256 Channels

If the design example is generated with the number of channels > 256, follow this procedure to run a DMA test with the number of channels greater than 256:

  1. Enable the following software flags in p0_software/user/common/mk/common.mk
    __cflags += -DIFC_MCDMA_DIDF
    __cflags += -DIFC_MCDMA_SINGLE_FUNC
    
  2. If the Linux kernel driver has been installed, build the driver and application by following the instructions in section 3.5.8.1.3 and section 3.5.8.1.4. Otherwise, the Linux kernel driver needs to be installed before building the driver and application.
  3. Run the test using the command below:

    sudo ./perfq_app -b 0000:98:00.0 -d 1 -c 512 -a 8 -p 64 -l 2 -u

    Configuration:
    • 512 channels (-c 512)
    • Packet gen bidirectional (-u)
    • Payload length of 128 bytes in each descriptor (-p 64)
    • Transfer the data 2 seconds (-l 2)
    • Number of threads that needs to be used (-a 8)
    • Dump the progress logs every second (-d 1)
Note:
  1. Currently, in DIDF mode, a single page is supported.
  2. Simultaneous process currently cannot be supported in DIDF mode. You can run one process with 2k channels.