GTS AXI Multichannel DMA IP for PCI Express* User Guide

ID 847470
Date 8/25/2025
Public
Document Table of Contents

B.1.4. Software Flow

Figure 59. GTS AXI Multichannel DMA IP for PCI Express Software Operation Flow

Step 1

  • Application creates the thread based on the required port of a channel.
  • After spawning the thread, the thread tries to acquire the available channel’s port. In case all the channel's ports are busy, the thread waits in poll mode.
  • In the context of the thread, libqdma allocates a descriptor buffer memory in the host.
  • libqdma initializes the following registers in the QCSR associated with the queue, (which include the starting address of descriptors, queue size, write back address for the Consumed Head, payload size in D2H descriptors), and then enables the channels.

QCSR registers:

  • Q_RESET (offset 8’h48)
  • Q_TAIL_POINTER (offset 8’h14) Set to 0
  • Q_START_ADDR_L (Offset 8’h08)
  • Q_START_ADDR_H (Offset 8’h0C)
  • Q_SIZE (Offset 8’h10)
  • Q_CONSUMED_HEAD_ADDR_L (Offset 8’h20)
  • Q_CONSUMED_HEAD_ADDR_H (Offset 8’h24)
  • Q_BATCH_DELAY (Offset 8’h28)
  • Set q_en, q_wb/intr_en bits Q_CTRL (Offset 8’h00)
  • (Q_PYLD_COUNT) (Offset 8'h44)

GCSR register:

  • WB_INTR_DELAY (Offset 8’h08)

Step 2

  • Threads continuously try to send/receive the data and library keeps checking if channel is busy or descriptor ring is full.
  • If channel is not busy and descriptor ring is not full, the thread goes to step 3. If channel is busy or descriptors ring is full, the thread tries to initiate the transfer again.

Descriptor ring full is identified by checking the Consumed Head and Tail pointer registers.

Step 3

Thread requests for new descriptor to submit the request and updates the required field, i.e. descriptor index, SOF, EOF, Payload, MSI-X enable and writeback enable.

Step 4

After initializing the descriptor ring buffer, the libqdma writes the number of descriptor updates into the tail register of the QCSR region. On every descriptor update the tail pointer is increased by 1.

QCSR tail pointer register: Q_TAIL_POINTER (Offset 8’h14)

Step 5

  • Once the tail pointer write happens, GTS AXI MCDMA IP fetches descriptors from host memory starting from the programmed Q_START_ADDR_L/H address.
  • GTS AXI MCDMA IP parses the descriptor content to find the sources, destination addresses and length of the data from descriptor and starts DMA operation.

Step 6

Once descriptor processing is completed, IP notifies the completion status based on the following methods, which can be enabled in each descriptor.

  • MSI-X Interrupt: GTS AXI MCDMA IP sends MSI-X interrupt to host if enabled in Q_CTRL.
  • Writeback: Multichannel DMA IP for PCI Express updates Q_CONSUMED_HEAD_ADDR_L/H, if writeback is enabled in Q_CTRL.