EasyManua.ls Logo

Texas Instruments TMS320 DSP User Manual

Texas Instruments TMS320 DSP
88 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #67 background image
www.ti.com
6.9 Runtime APIs
6.10 Strong Ordering of DMA Transfer Requests
Runtime APIs
For example, in the table above, the "process" operation is using two logical channels. On logical channel
0, it performs on average 5 data transfers and a maximum of 7 data transfers. The average number of
bytes for each transfer is 768, and the maximum number of bytes is 1024.
The IDMA2 interface is used to request and grant an algorithm some DMA resources, and also change
these resources in real-time. We also need to define runtime APIs that are actually called from within the
algorithm to configure the logical channel, start a data transfer and synchronize the data transfer(s).
The following APCY2 APIs are allowed to be called from within an algorithm that has implemented the
IDMA2.
Configuration:
ACPY2_configure (), ACPY2_setSrcFrameIndex,ACPY2_setDstFrameIndex, ACPY2_setNumFrames
Synchronization: ACPY2_complete(), ACPY2_wait()
Scheduling: ACPY2_start (), ACPY2_startAligned()
It is important to notice that the algorithm's client is free to implement these APIs as appropriate, granted
that they satisfy their semantics in the TMS320 DSP Algorithm Standard API Reference (SPRU360).
The IDMA3 interface which is required to be implemented by algorithms that use the C64x+ EDMA3
controller, can be optionally associated with a custom IDMA3 protocol. When a non-null protocol object is
provided, the DMA resource manager uses IDMA3_Protocol functions to perform additional memory
allocation for the logical DMA channel’s environment field or to call protocol-specific, handle initialization
and de-initialization functions. This feature allows frameworks to support custom DMA service function
libraries with custom initialization and finalization functions.
The ACPY3 library is an example of such a custom DMA library that is similar to the ACPY2 library in its
role and definition. However, it provides a much lower level of abstraction compared to the ACPY2
interface; it is designed to target EDMA3.0/QDMA, while ACPY2 provides a generic DMA abstraction
layer. Details of the ACPY3 library can be found in Using DMA with Framework Components for C64x+
(SPRAAG1). Use of the ACPY3 library is not mandatory when using the IDMA3 interfaces; algorithms are
free to use their own DMA functions to program the physical DMA resources acquired through the IDMA3
protocol.
An important enhancement that was introduced through the ACPY2 APIs over the deprecated ACPY APIs
is the strict FIFO ordering property of DMA transfers submitted by an algorithm on a logical DMA channel.
Often algorithms need to issue back-to-back DMA transfers from and into the same data region and they
can take advantage of the FIFO property. For example, an algorithm can schedule a transfer to copy out
the result stored in a buffer used by an in-place computation phase, and immediately schedule a transfer
to bring in the next set of input data into the same buffer for the next round of processing. Without the
strong ordering property, an ACPY2_wait() synchronization call would be needed prior to submitting the
second transfer request. This additional synchronization is needed to prevent the incoming (next round's)
input data from corrupting the current output that is potentially still being copied out. The strong ordering
guarantee ensures that the second transfer will not start until after the first transfer finishes. This leads to
two levels of optimizations.
The extra ACPY2_wait() call/synchronization overhead is eliminated, but even more importantly, the
algorithm can now continue to perform other tasks (e.g., process some other buffer, etc.) until it absolutely
needs to synchronize with the completion of the second transfer.
Another related ACPY2 enhancement is the introduction of the concept of a serializer (QueueID) property
for logical channels. A common QueueID extends the strong FIFO ordering property to all transfers
submitted on any of the logical channels assigned the same QueueId by the same algorithm. QueueIDs
are assigned by the algorithm and published through its IDMA2 interface.
IDMA3 does not support the queue IDs defined in IDMA2. This means there is no requirement to enforce
inter-channel FIFO ordering of submitted DMA transfers. When FIFO ordering is needed, you must use
linked transfers.
SPRU352G June 2005 Revised February 2007 Use of the DMA Resource 67
Submit Documentation Feedback

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 DSP and is the answer not in the manual?

Texas Instruments TMS320 DSP Specifications

General IconGeneral
CategoryDigital Signal Processor
ManufacturerTexas Instruments
Data Bus WidthVaries by model (e.g., 16-bit, 32-bit)
ArchitectureHarvard architecture
Address Bus WidthVaries by model
MemoryVaries by model
On-Chip RAMVaries by model
On-Chip ROMVaries by model
ApplicationsAudio processing, telecommunications
Operating TemperatureVaries by model
Package TypeVaries by model (e.g., QFP, BGA)

Summary

Preface

Read This First

Provides introductory information and context for the document.

Overview

Scope of the Standard

Defines the levels of guidelines for the TMS320 DSP Algorithm Standard.

Requirements of the Standard

Lists key elements and objectives for the TMS320 DSP Algorithm Standard.

Goals of the Standard

Outlines the objectives for creating and adhering to the TMS320 DSP Algorithm Standard.

Intentional Omissions

Lists aspects intentionally omitted from the current version of the standard.

System Architecture

Describes the common partitioning of modern DSP system architectures.

General Programming Guidelines

Use of C Language

Specifies adherence to C language run-time conventions for algorithm interoperability.

Threads and Reentrancy

Defines threads and discusses reentrancy requirements for algorithms.

Data Memory

Discusses memory allocation, types, and management for algorithms.

Program Memory

Covers requirements for code relocation and alignment in program memory.

ROM-ability

Addresses the ability of algorithm code to be placed in ROM.

Use of Peripherals

Prohibits direct peripheral access and outlines how algorithms can use DMA.

Algorithm Component Model

Interfaces and Modules

Describes modules as the basic software component and their interfaces.

Algorithms

Defines algorithms as modules implementing the IALG interface.

Packaging

Details how to bundle modules into a deliverable form for development systems.

Algorithm Performance Characterization

Data Memory

Characterizes algorithm data memory requirements (heap, stack, static).

Program Memory

Details requirements for characterizing algorithm program memory usage.

Interrupt Latency

Specifies how to characterize and limit worst-case interrupt latency.

Execution Time

Explains how to characterize typical and worst-case execution times for algorithms.

DSP-Specific Guidelines

CPU Register Types

Categorizes CPU registers and provides guidelines for their use.

Use of Floating Point

Advises against the use of floating-point data types to reduce library dependencies.

TMS320C6xxx Rules and Guidelines

Provides specific rules and guidelines for TMS320C6000 family DSPs.

TMS320C54xx Rules and Guidelines

Provides specific rules and guidelines for TMS320C5400 family DSPs.

TMS320C55x Rules and Guidelines

Provides specific rules and guidelines for TMS320C5500 family DSPs.

TMS320C24xx Guidelines

Provides specific rules and guidelines for TMS320C24xx family DSPs.

TMS320C28x Rules and Guidelines

Provides specific rules and guidelines for TMS320C28x family DSPs.

Use of the DMA Resource

Overview

Introduces rules and guidelines for algorithms utilizing DMA resources.

Algorithm and Framework

Defines the relationship between algorithms and frameworks for DMA resource management.

Requirements for the Use of the DMA Resource

Lists requirements for DMA usage in eXpressDSP-compliant algorithms.

Logical Channel

Explains the concept of logical DMA channels for algorithm use.

Data Transfer Properties

Defines parameters for DMA transfer blocks (frames, elements).

Data Transfer Synchronization

Discusses methods to ensure DMA transfers complete before CPU access.

Abstract Interface

Describes the IDMA2/IDMA3 interfaces for declaring DMA resource requirements.

Resource Characterization

Details how to characterize DMA resource usage (concurrency, size, frequency).

Runtime APIs

Lists allowed runtime APIs for configuring and managing DMA transfers.

Strong Ordering of DMA Transfer Requests

Explains FIFO ordering and queue ID properties for DMA transfers.

Submitting DMA Transfer Requests

Describes functions for submitting DMA transfer requests and their alignment requirements.

Device Independent DMA Optimization Guideline

Provides a guideline to minimize DMA channel reconfiguration overhead.

C6xxx Specific DMA Rules and Guidelines

Covers DMA rules and guidelines specific to C6000 series DSPs.

C55x Specific DMA Rules and Guidelines

Covers DMA rules and guidelines specific to C55x series DSPs.

Inter-Algorithm Synchronization

Discusses sharing physical DMA channels between algorithms.

Rules and Guidelines

General Rules

Enforces rules for eXpressDSP-compliant software and identifies guideline types.

Performance Characterization Rules

Lists rules related to characterizing algorithm performance metrics.

DMA Rules

Lists rules specifically for algorithms utilizing the DMA resource.

General Guidelines

Lists general recommendations for algorithm development.

DMA Guidelines

Lists guidelines related to DMA usage by algorithms.

Core Run-Time APIs

TI C-Language Run-Time Support Library

Lists allowable TI C-language run-time support library functions for algorithms.

DSP/BIOS Run-time Support Library

Lists allowable DSP/BIOS run-time support functions for algorithms.

Bibliography

Glossary

Glossary of Terms

Defines key terms used throughout the TMS320 DSP Algorithm Standard document.

Related product manuals