Scalable Scatter-Gather DMA Intel® FPGA IP User Guide

ID 823097
Date 4/07/2025
Public
Document Table of Contents

3.11.1. General DMA Operation Flow

The general SSGDMA operation is described in the following sequence:

  1. Software organizes each DMA queue as a ring of descriptors where the number of descriptor entries is programmable via the q_size field of the Q_SIZE register (for link and data descriptors) and the q_resp_size field of the Q_RESP_SIZE register (for responder descriptor). Dedicated queue buffers are allocated for each device port.
  2. Software programs the following registers for all device ports that are enabled:
    • Q_CTRL
    • Q_START_ADDR_L
    • Q_START_ADDR_H
    • Q_SIZE
    • Q_RESP_SIZE (up to 128 Responder block entries)
    • WB_INTR_TIMEOUT (if completion write back is enabled)
    • Responder Table (Q_RESPONDER_ADDR_L and Q_RESPONDER_ADDR_H)
    • MSI-X Table (for DMA PCIe mode only)
    Note: Expect the software to configure both Q_SIZE and Q_RESP_SIZE registers only during the beginning of the initialization flow or in the event of Device Port CSR re-initialization upon completion of soft reset sequence for the corresponding device port.
  3. For the last descriptor block in the queue buffer, software must configure the NextBlockAddress field in the Link Descriptor to point to the first queue entry (i.e. the value configured in the Q_START_ADDR_L and Q_START_ADDR_H registers of Device Port CSR.
  4. When the queue descriptor setup is complete, the software notifies the SSGDMA IP on the last valid queue descriptor index through the Q_INSERT_POINTER register.
  5. Software writes to run_prefetch_engine bit of CTRL register to initiate SSGDMA descriptor fetching operation.
  6. The Prefetcher Engine of SSGDMA IP begins fetching the queue descriptors up to the last valid index and executes them in the same order. The first element of each descriptor block (Link Descriptor) provides the necessary information (block size, next block address in the queue) for the current descriptor block.
  7. Depending on the descriptor writeback and interrupt settings, the SSGDMA IP notifies software in the following ways upon descriptor completion:
    • For Writeback mode, SSGDMA IP issues the response writeback or interrupt, or both. The software polls for the Complete bit within the Responder Descriptor to be set by SSGDMA hardware upon descriptor completion.
    • For Register mode (i.e. if write back and interrupt are disabled), software polls the Q_EXTRACT_POINTER register for current completion status.
  8. For DMA SoC Mode, software updates Q_EXTRACT_POINTER_ACK to notify SSGDMA IP of the last descriptor index that is serviced.
  9. Upon acknowledging descriptor completion, the software releases the associated buffers, and the descriptor entries can be reused.