www.ti.com
Submitting DMA Transfer Requests
6.11 Submitting DMA Transfer Requests
The specification of the ACPY2 interface strives to perform a delicate
The ACPY2 interface provides algorithm developers two interface functions to submit DMA transfer requests: ACPY2_start() and ACPY2_startAligned(). The only operational difference between ACPY2_startAligned() and ACPY2_start() is the additional requirement by ACPY2_startAligned() for its source and destination addresses to be properly aligned with respect to the configured element size. When using
ACPY2_start() makes no assumptions on the alignment of the source and destination addresses. It accepts addresses at any alignment and when allowed by the architecture, adjusts the transfer parameters (including element size, number of elements, transfer type) to transparently perform the desired transfer using the given alignment. It is intended to simplify algorithm development in the initial states. ACPY2_start() thus strives to maintain simplicity while maintaining reasonable levels of performance. The ACPY2_startAligned() API, on the other hand, makes no
6.12 Device Independent DMA Optimization Guideline
In this section, we outline a general guideline applicable to all architectures that may result in significant performance optimizations. The basic premise is that configuring a logical channel is an expensive operation in terms of cycles, even when compared to the standard ACPY2 scheduling and synchronization APIs. Therein lies the motivation for the following new guideline:
DMA Guideline 2
All algorithms should minimize channel (re)configuration overhead by requesting a dedicated logical DMA channel for each distinct type of DMA transfer it issues, and avoid calling ACPY2_configure and use the new fast configuration APIs where possible.
DMA Guideline 2 is useful when different types of DMA transfers are needed in a critical loop of an algorithm. By defining different IDMA2 logical channels for each transfer type, ACPY2_configure() can be called on each channel at the beginning of the algorithm code. Then, transfer requests can be rapidly submitted on these preconfigured channels in the critical loop using the new ACPY2_start() or ACPY2_startAligned() function.
In the next two sections, we present additional DMA rules and guidelines specific to C5000 or C6000 architectures.
68 | Use of the DMA Resource | SPRU352G |