
www.ti.com
Abstract Interface
DMA Guideline 1
The data transfer should complete before the CPU operations executing in parallel.
However, we can never guarantee that the data transfers are complete before data are accessed by the CPU, even if the algorithm is designed in such a way (e.g., future increase in CPU speed and not DMA transfer rate). However, since it is important that the data transfer completes before accessing the data to ensure accurate execution of the algorithm, we have provided two ways to synchronize the methods of transfer and data access.
∙The algorithm can call the ACPY2_complete() runtime API to check if all data transfers on a particular logical channel have completed.
∙The algorithm can call the ACPY2_wait() runtime API to wait for all data transfers on a particular logical channel to complete. When using the ACPY2 library with IDMA2 interfaces, the algorithms can call the ACPY2_complete() runtime API to check if all data transfers on a particular logical channel have completed
After an algorithm returns to the caller from a
DMA Rule 1
All data transfer must be completed before return to caller.
When using the ACPY2 library, the algorithm can use the ACPY2_complete() or ACPY2_wait() APIs to ensure that all data transfers have completed before returning to the caller.
For example, an algorithm can not start a data transfer in algActivate() by calling ACPY2_start() or ACPY2_startAligned() and then check for completion of the data transfer in the algorithm's"process" function by calling ACPY2_complete(), or wait for the completion by calling ACPY2_wait().The algorithm must ensure the data transfer is complete in aalgActivate() by using either the ACPY2_complete() or the ACPY2_wait() API.
Note: Similar to the
6.7Abstract Interface
The algorithm producer implements the IDMA2 or IDMA3 interface to declare the algorithm'sDMA resource requirement. The algorithm'sclient calls this interface to get the resource requirement, grant resources, and change resources at runtime.
DMA Rule 2
All algorithms using the DMA resource must implement the IDMA2 or IDMA3 interface.
All
SPRU352G | Use of the DMA Resource | 65 |