Texas Instruments TMS320 DSP User Manual Page 65

  • Download
  • Add to my manuals
  • Print
  • Page
    / 88
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 64
www.ti.com
6.7 Abstract Interface
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 framework-callable function, the client of the algorithm is free
to move all its memory to a different location and share its scratch memory following the rules in the IALG
interface. It is important that data transfers do not occur across functions that can be called by the client to
avoid a situation where the DMA is transferring data and the framework is moving the locations of the
buffers at the same time.
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 a algActivate() by using either the ACPY2_complete() or
the ACPY2_wait() API.
Note: Similar to the above-mentioned ACPY2 APIs, the ACPY3 library mentioned in Using DMA with
Framework Components for C64x+ (SPRAAG1) can be used by algorithms that implement the IDMA3
interfaces, to request DMA services from the C64x+ EDMA3 controller. However, unlike the ACPY2
library, the use of the ACPY3 library is NOT mandatory with the IDMA3 interfaces.
eXpressDSP-compliant algorithms are modules that implement the abstract interface IALG. Algorithms
that want to utilize the DMA resource must implement the abstract interface IDMA2 or IDMA3. This means
that the module must declare and initialize a structure of type IDMA2_Fxns, the structure must have a
global scope, its name must follow the uniform naming conventions, and the structure must be declared in
the header file included with the module's library.
The algorithm producer implements the IDMA2 or IDMA3 interface to declare the algorithm's DMA
resource requirement. The algorithm's client 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 eXpressDSP-compliant algorithms support both run-time and design-time creation of algorithm objects.
To optimize with regards to code space for design-time object creation, it is important that all methods
defined by the IDMA2 or IDMA3 interface are independently relocatable.
SPRU352G June 2005 Revised February 2007 Use of the DMA Resource 65
Submit Documentation Feedback
Page view 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 87 88

Comments to this Manuals

No comments