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

ID 683517
Date 4/29/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.5.2.5.3. Examples

  • Testapp options (for Packet Gen/Val): ./testapp –help
  • Pio Test:
    Testapp command: sudo ./testapp --bdf 0000:01:00.0 --piotest
  • BAS Test:
    The BAS support is enabled on the hardware, enable the following flag in: user/common/include/ifc_mcdma.h
    #define IFC_MCDMA_X16	/* For PCIe x16 */
    #define IFC_MCDMA_X8	/* For PCIe x8 */
    

    Commands:

    To verify the write operation:
    ./cli/testapp/testapp --bdf 0000:01:00.0\
     --reqsize 1048576 --bas --transmit
    To verify the read operation:
    ./cli/testapp/testapp --bdf 0000:01:00.0\
     --reqsize 1048576 --bas --receive
    To verify the bi-direction operation:
    ./cli/testapp/testapp --bdf 0000:01:00.0\
     --reqsize 1048576 --bas --bidirection
    Performance test:
    ./cli/testapp/testapp --bdf 0000:01:00.0\
     --reqsize 1048576 --basperf --bidirection
  • For more example commands, check the software/user/cli/testapp/README.txt file.
Note: Reset the IP before starting the DMA by using the following command:
echo 1 > /sys/bus/pci/devices/\
<b:d:f>/mcdma_ipreset
Note:
  1. Please change following macros in cli/testapp/testapp.h
    #define IFC_MCDMA_BAS_X16 _SHIFT_WIDTH 3 
    #define IFC_MCDMA_BAS_X8 _SHIFT_WIDTH 3
  2. By default, testapp tries to configure and enable BAS on BAR2. In case if there is a change of BAR needed, please change the resource file name in testapp.

if you want to change to BAR0, change resource name in path snprintf(path, PATH_MAX, "/sys/bus/pci/devices/%s/resource0", bdf);

Did you find the information on this page useful?

Characters remaining:

Feedback Message