Scatter-Gather with Custom Descriptor List Interface
The normal scatter-gather descriptors are stored in the external memory. The DMA must retrieve the next descriptor from the external memory each time it completes an operation. However, it causes latency when the DMA waits for the descriptor to come back from external memory. This latency penalty is crucial for video and imaging applications that require real-time logical processing. The DMA introduces a method to let users store the descriptor information using custom logic through the DMA custom descriptor list interface. Custom logic can be a ROM for descriptors or a simple counter logic that provides information like source address, destination address, and type of operation. This minimizes the latency of the DMA when fetching the descriptor in this operation mode.
The following is the custom descriptor list example:
Custom Descriptor List Example
dmasg_output_memory (DMASG_BASE, ST32_IN, 0, 16);
dmasg_input_stream(DMASG_BASE, ST32_IN, 0, 1, 0);
dmasg_linked_list_sg_start(DMASG_BASE, ST32_IN);
dmasg_input_memory (DMASG_BASE, ST32_OUT, 0, 16);
dmasg_output_stream(DMASG_BASE, ST32_OUT, 0, 0, 0, 1);
timestamp_s = clint_getTime(BSP_CLINT);
dmasg_linked_list_sg_start(DMASG_BASE, ST32_OUT);