Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 4/01/2024
Public

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

Document Table of Contents

5.1.6.2.4. DMA Descriptor Fetch Operation

In the DMA, descriptor cache storage (up to 16 descriptors) is available for each DMA channel.

The DMA attempts to fetch multiple descriptors in a burst. The maximum burst length during descriptor fetches for a DMA channel, is dependent on:
  • Programmed burst length in the TxPBL field of the DMA_CH(#i)_Tx_Control register.
  • Space available in the descriptor cache for that DMA Channel.
  • Number of descriptors created by the Host (offset of the tail pointer with respect to the last fetched descriptor).
  • The address alignment requirement with respect to current descriptor address in case bit[12] AAL of DMA_SysBus_Mode is set to 1.

EMAC selects the minimum of these, to calculate the burst length for descriptor fetches and fill-up the cache. After the current descriptor burst fetch is completed, the TX DMA or RX DMA engines do not initiate further descriptor fetches until the space available in the descriptor cache falls below the threshold size programmed in the respective DMA_Tx_EDMA_Control or DMA_Rx_EDMA_Control register. The DMA engine also checks the OWN bit (xDES3[31]) of the descriptor to confirm whether the descriptor contents are valid and can be processed by the DMA. In case any of the descriptor has its OWN bit = 0, then, that descriptor and the rest of the descriptors in that burst are dropped and not written into the cache. The DMA tries to fetch the descriptors again in a burst of length decided as per the conditions, from that point onwards.

The descriptors in the cache are read and given to the data transfer engine. Once the data transfer engine accepts the descriptor, the next descriptor is read from the cache and thus frees up the cache space. The buffer unavailable (TBU/RBU) interrupt is generated when all the descriptors created by the host (as indicated by the tail pointer) are fetched. It is asserted even if some descriptors are still available in the cache for processing. This advance interrupt provides the opportunity for the software to create more descriptors in advance before the cache gets emptied out completely.

The xBU interrupt is also generated when the DMA engine finds that the OWN bit = 0 for two successive fetches of the same descriptor. It then goes into SUSPEND mode and waits for the software to wake it up by updating/writing into the tail pointer register.