AN2113 Freescale Semiconductor / Motorola, AN2113 Datasheet - Page 13

no-image

AN2113

Manufacturer Part Number
AN2113
Description
AN2113 Multichannel Voice Coding System on the RTXC Operating System
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
7
7.1 Reentrant Requirement
7.2 Data Input/Output
This section addresses the following topics:
First, we created a stand-alone system for data I/O using the ESSI and multichannel vocoder board, another
system that uses the SASL voice coders (using the analog-to-digital (A/D) codec on the DSP56307EVM),
and a third system that implements the user interface. We developed these systems without use of an RTOS
and then incorporated RTXC. Use of an RTOS made it much easier to integrate the final system. When we
used RTXC, each stand-alone system consisted mainly of one or more interrupt service routines (ISRs) and
one or more tasks.
The integration work mostly involved creating an additional task to “dispatch” the appropriate task based
on the operating mode chosen by the user and selecting the appropriate task priorities. Also, the RTXC
mechanisms for task synchronization and communication were incorporated as needed.
At this point, the concepts of re-entrancy and the requirements of multichannel systems must be
understood. A re-entrant computer program or routine is written so that multiple users/tasks can share the
same copy of the code in memory. Re-entrant code is commonly required in RTOSs and in application
programs shared in multi-user multi-tasking systems. A programmer writes a re-entrant program by
making sure that no instructions modify the contents of variable values in other functions within the
program. Each time the program/processor is entered for a user/task, a data area is obtained in which to
keep all the variable values for that instance of the user/task. When the process is interrupted to give
another user/task a turn to use the program/processor, information about the data area associated with that
user is saved. When the interrupted user/task of the program recovers control of the program/processor,
context information in the saved data area is recovered and the module is reentered and processing
continues. If a routine follows these rules, it is re-entrant:
In DSP applications, input/output (I/O) handling is critical to maintaining real-time data processing.
Therefore, DSPs such as those in the DSP56300 family provide multiple I/O-handling peripherals and
extremely fast interrupt servicing. For example, the DSP56307 has two ESSIs, the Serial Communications
Interface (SCI), and the 8-bit host interface (HI08) for efficient data I/O implementation. These features
provide optimal I/O solutions for various applications.
Software Description
Data Input and Output (I/O)
Voice coders
User interface
RTOS
All local data is allocated on the stack.
The routine does not use any global variables.
The routine can be interrupted at any time without affecting the execution of the routine.
The routine calls only other re-entrant routines. It does not call non-re-entrant routines (for
example, standard I/O, malloc, free, and so on).
Freescale Semiconductor, Inc.
For More Information On This Product,
Multichannel Voice Coding System
Go to: www.freescale.com
Software Description
13

Related parts for AN2113