AN 708: Application Note - PCI Express DMA Reference Design Using External Memory

ID 683390
Date 5/17/2017
Public
Give Feedback

Running the Linux DMA Software

  1. In the terminal window of computer 1, change to the directory in which you installed the Linux driver.
  2. Type su.
  3. Type your root password.
  4. Type make to compile the driver and application.
  5. Type ./install to install the driver.
  6. To run the DMA application, type ./run .
    The application prints out the commands available to specify the DMA traffic you want to run. By default, the software enables DMA reads, DMA writes, and Simultaneous DMA reads and writes.
    Table 11.   Available Commands for DMA Operation

    Command

    Operation

    1

    Start the DMA

    2

    Enable or disable read DMA

    3

    Enable or disable write DMA

    4

    Enable or disable simultaneous read and write DMA

    5

    Set the number of dwords per descriptor. The legal range is 256-4096 dwords

    6

    Set the number of descriptors. The legal range is 1-127 descriptors.

    8

    Run a loop DMA.

    10

    Exit.

  7. To start the DMA, type 1. This command runs the DMA for one loop. Type 8 to run the DMA in a loop.

The following figure shows the performance for DMA reads, DMA writes, and simultaneous DMA reads and writes.

Figure 3. Output from 256-Bit DMA Driver

This DMA performance was achieved using the following PCIe Gen3 x8 in the system:

  • Motherboard: Asus PBZ77-V
  • Memory:   Corsair 8 GB 2 dimm x [4GB (2x2GB)] @ 1600 MHz
  • CPU:
    • Vendor_ID: GenuineIntel
    • CPU family: 6
    • Model: 58
    • Model name: Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz
    • Stepping: 9
    • Microcode: 0xc
    • CPU MHz: 3101.000
    •  Cache size: 6144 KByte (KB)