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.4. BAM Test

  1. If the BAM support is enabled on hardware, enable the following flag in p0_software/user/common/mk/common.mk for 256-bit or 128-bit read or write operations:

    __cflags += -DIFC_PIO_256 → 256b read/write operations on the PIO BAR.

    __cflags += -DIFC_PIO_128 → 128b read/write operations on the PIO BAR.

    Note: For PIO using MQDMA Bypass with BAM/BAS user mode, you are required to undefine the following software flag:

    #undef IFC_QDMA_INTF_ST(p0_software/user/common/ include/mcdma_ip_params.h)

  2. Complete the instructions outlined in Prerequisites to install the Linux Kernel driver, and build the driver application for testing.
  3. If the data width has changed from the default 64 bits due to the flag settings mentioned above, rebuild the application for the new setting to take effect by following the instructions in Build the Reference Application.

If only the 64-bit BAM PIO is enabled:

root@bapveac025t:perfq_app# sudo ./perfq_app -b 0000:98:00.0 -o --bam_perf
PIO 64 Write Performance Test ...
Total Bandwidth:                0.05GBPS
Pass
root@bapveac025t:perfq_app#

If 128-bit and 256-bit BAM PIO are also enabled:

root@bapveac025t:perfq_app# sudo ./perfq_app -b 0000:98:00.0 -o --bam_perf
PIO 128 Write Performance Test ...
Total Bandwidth:                0.07GBPS
Pass
root@bapveac025t:perfq_app#

root@bapveac025t:perfq_app# sudo ./perfq_app -b 0000:98:00.0 -o --bam_perf
PIO 256 Write Performance Test ...
Total Bandwidth:                0.17GBPS
Pass
  • By default, BAR 2 is used for BAM. Pass the BAR number parameter as shown below:

    --bar=2 for BAM

  • For example:

    ./perfq_app -b 0000:01:00.0 --bam_perf -o --bar=2

  • The Performance mode of BAM tries to send the data for 10 seconds and calculates the bandwidth.
  • The PIO 256b test may display a Fail because only a 2k memory is enabled in the device and the PIO test is trying to access a memory greater than 2k.
Note: Refer to BAR Mappings for BAR mapping information.