GTS AXI Multichannel DMA IP for PCI Express User Guide

ID 847470
Date 5/06/2025
Public

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

Document Table of Contents

A.1.1.2. D2H Data Mover

The D2H Data Mover (D2HDM) transfers data from the device memory to host memory. It receives the data from the user logic through the AXI-MM Subordinate/AXI-Stream Subordinate interface and generates MemWr TLPs to move the data to the host based on descriptor information such as the PCIe address (destination), data size, and MPS value to transmit data to the receive buffer in the host memory.

In AXI-MM mode, the D2HDM sends a series of AXI-MM reads based on PCIe address, MPS, and DMA transfer size. The AXI-MM read is generated as follows:

  • First AXI-MM read to the 64-byte address boundary. Multiple bursts are read on first AXI-MM read if:
    • AXI-MM address is 64-byte aligned.
    • Total payload count of the descriptor is 64-byte aligned and less than the maximum supported MPS.
  • Following with AXI-MM reads with the maximum supported MPS size.
  • Last AXI-MM Read of the remaining size.

In AXI-S mode, D2HDM deasserts ready when descriptors are not available.

  • Host sets up software descriptors for a port. Maximum payload count can be up to 1MB. SOF/EOF fields in the descriptor may not be set by the Host.
    • D2HDM uses a descriptor update sequence to update SOF, EOF, Rx payload count fields in the software descriptor at a Host location through a Memory Write request.
  • Once there is an available descriptor, incoming data from the user logic triggers a descriptor update sequence by D2HDM to mark the start of the AXI-Stream frame.
    • D2HDM issues a MWr to set the SOF field in the descriptor.
    • WB/MSI-X, if set in the descriptor, is issued.
  • AXI-Stream d2h_axi_st_tlast signal assertion triggers a descriptor update sequence by D2HDM to mark the end of the AXI-Stream frame. The descriptor update sequence is as follows:
    • D2HDM terminates the descriptor and initiates a descriptor update sequence.
    • During the descriptor update sequence, a MWr is issued to set the EOF field in the descriptor and update the Rx payload count field with the total bytes transferred.
    • WB/MSI-X, if set in the descriptor, is issued.
  • The descriptor immediately after the EOF sequence is considered as the start of the next AVST data frame and initiates a descriptor update sequence to set the SOF field.

When a descriptor is completed, that is, all DMA data corresponding to the descriptor has been sent to the host, the D2HDM performs housekeeping tasks that include:

  • Schedule MSI-X for a completed queue, if enabled in the descriptor.
  • Schedule Writeback Consumed Head Pointer for a completed queue, if enabled in the descriptor.
  • Update Consume Head Pointer for software polling.
  • MSI-X and Writeback are memory writes to the host via the D2HDM to avoid a race condition due to out-of-order writes.

Based on the updated status, software can proceed with releasing the receive buffer and reuse the descriptor ring entries.