P-tile Avalon® Memory-mapped Intel® FPGA IP for PCI Express* Design Example User Guide

ID 683853
Date 3/28/2022
Public

2.2. Programming Model for the Design Example

The programming model for the DMA example design performs the following steps:
  1. In system memory, prepare a contiguous set of descriptors. The last of these descriptors is an immediate write descriptor, with the destination address set to some special system memory status location. The descriptor table must start on a 64-byte aligned address. Even though each descriptor is only about 174-bit long, 512 bits are reserved for each descriptor. The descriptors are LSB-aligned in that 512-bit field.
  2. In system memory, prepare one more descriptor which reads from the beginning of the descriptors from Step 1 and writes them to a special FIFO Avalon® -MM address in FPGA.
  3. Write the descriptor in Step 2 to the same special FIFO Avalon® -MM address by:
    1. Writing one dword at a time, ending with the most significant dword.
    2. Writing three dwords of padding and the entire descriptor for a total of eight dwords (the descriptor takes up only five dwords, but CPUs do not typically support single-TLP, five-dword writes).
  4. Poll the special status location in system memory to see if the final immediate write has occurred, indicating the DMA completion.