Sie sind auf Seite 1von 3

DSP Applications Using C and the TMS320C6x DSK.

Rulph Chassaing
Copyright © 2002 John Wiley & Sons, Inc.
ISBNs: 0-471-20754-3 (Hardback); 0-471-22112-0 (Electronic)

G
DSP/BIOS and RTDX for
Real-Time Data Transfer

DSP/BIOS provides CCS the capability for analysis, scheduling, and data exchange
in real time [1–5]. An application program can be analyzed while the digital signal
processor is running (the target processor need not be stopped). There are many
DSP/BIOS application programming interface (API) modules available for real-
time analysis, input/output, and so on. API functions are included with CCS to con-
figure and control operation of the codec. They initialize the DSK, the McBSP, and
the codec.

1. Real-time analysis. This can be either critical or not so critical. For example,
one needs to respond to input samples so that information is not lost. On the
other hand, the transfer of data from the digital signal processor to the host
PC may be done between incoming samples.
2. Real-time scheduling. Data transfer is scheduled through DSP/BIOS software
interrupts. Tasks/functions are initially assigned different priorities. Based on
results obtained from a CPU execution graph, one can reprioritize these dif-
ferent tasks. The CPU execution graph shows when various tasks are executed,
and whether or not the CPU misses real-time data. This graph is similar to the
type of plots obtained with a logic analyzer.An execution graph associated with
an audio example (included with CCS) is shown in Figure G.1.This graph shows
the execution of threads.A thread can be an independent stream of instructions
executed by the DSP processor. It may contain an ISR, a function call, and so
on. Different types of threads are given different priorities. Hardware inter-
rupts (HWIs) have the highest priorities, followed by software interrupts
(SWI), which include periodic functions (PRD).
3. Real-time data exchange (RTDX). This allows the exchange of data between
the host and the processor, via the Joint Test Action Group (JTAG) interface,
325

www.cadfamily.com EMail:cadserv21@hotmail.com
The document is for study only,if tort to your rights,please inform us,we will delete
326 DSP/BIOS and RTDX for Real-Time Data Transfer

FIGURE G.1. CCS plot of execution graphs as CPU is being overloaded with NOPs: (a)
output not degraded when setting audioSwi with the highest priority; (b) output degraded
when setting audioSwi with lower priority.

while the processor is running. RTDX consists of both target and host com-
ponents. Data are transferred through two “pipes” (one for receiving and one
for transmitting). If the CPU starts missing real-time data, one can find out
from the execution graph. Reprioritizing, if possible, could then solve this
problem.

Examples of DSP/BIOS with RTDX


An audio example is included with the DSK package. It is essentially a “loop”
example. It can illustrate overloading the CPU. This is accomplished by executing
NOPs. As the number of NOPs is increased, the effects on the output can be moni-
tored. Figure G.1a indicates that the task of “audioSwi” has the highest priority and
can interrupt the lower priority task of “loadPrd.” In Figure G.1b, “audioSwi” has
a lower priority and has to wait for the higher-priority tasks of loadPrd and Prd_swi.
This causes data to be missed. For example, with music as input, and the number of
NOPs increasing (up to a million), one can hear the gradual degradation of the
output signal as the CPU starts missing execution. The execution graph can show
when the CPU starts missing data.
Another example included with CCS makes use of the LOG module LOG_
printf() to monitor a program in real time. The C function printf(), supported
by real-time library support, takes too many cycles to be desirable for real-time
monitoring; the LOG module LOG_printf() takes considerably less time. The
LOG_printf() function can be used to record data in critical time while the trans-
fer of data from the target processor to the host can occur in not so critical time.
Results on the performance of LOG_printf() supported with DSP/BIOS versus

www.cadfamily.com EMail:cadserv21@hotmail.com
The document is for study only,if tort to your rights,please inform us,we will delete
References 327

printf() supported with the runtime support library show that printf() can
take 100 times more cycles to execute.
The project example PLL, discussed in Chapter 9, includes the code version (on
the disk) associated with DSP/BIOS’s RTDX.

REFERENCES

1. TMS320C6000 DSP/BIOS User’s Guide, SPRU303B, Texas Instruments, Dallas, TX, 2000.
2. An Audio Example Using DSP/BIOS, SPRA598, Texas Instruments, Dallas, TX, 1999.
3. TMS320C6000 DSP/BIOS Application Programming Interface (API) Reference Guide,
SPRU403A, Texas Instruments, Dallas, TX, 2000.
4. Application Report, DSP/BIOS by Degrees: Using DSP/BIOS Features in an Existing
Application, SPRA591, Texas Instruments, Dallas, TX, 1999.
5. Real-Time Data Exchange, SPRY012, Texas Instruments, Dallas, TX, 1998.

www.cadfamily.com EMail:cadserv21@hotmail.com
The document is for study only,if tort to your rights,please inform us,we will delete

Das könnte Ihnen auch gefallen