AN2113 Freescale Semiconductor / Motorola, AN2113 Datasheet

no-image

AN2113

Manufacturer Part Number
AN2113
Description
AN2113 Multichannel Voice Coding System on the RTXC Operating System
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
MOTOROLA
Semiconductor Products Sector Engineering Bulletin
Multichannel Voice Coding System on
the RTXC Operating System
By Duberly Mazuelos, Felicia Benavidez, Iantha Scheiwe
© Motorola, Inc. 2001
DSP applications are moving away from assembly language and
home-grown scheduling kernels to systems developed using
high-level languages and running on off-the-shelf Real-Time
Operating Systems (RTOSs). Assembly programming requires
intimate knowledge of the device architecture and prohibits easy
portability to a new architecture if cost or availability change. C
programming is becoming more commonplace in the DSP market
because of pressures for a fast time-to-market, low cost, and
reusability. Also, C compiler technology is finally maturing to a
point where the inherent benefits of a DSP architecture can be
realized in the C language.
Engineers designing and programming complex systems
containing DSPs have long relied on their own scheduler to
determine when tasks should be handled in an application. These
schedulers are often developed in-house and are
application-specific. As the complexity of the systems increases,
the complexity of the scheduler also increases, and the task of
designing and implementing these schedulers becomes a
significant portion of the system development time. However,
RTOSs are available to ease the task of system integration and
provide the scheduling tasks necessary to meet stringent
application requirements.
Various telecommunications standards dictate specific voice
coders for each telecommunications application. Because these
voice coders are standard building-blocks in a system, third
parties have come forward to develop highly optimized assembly
language implementations of voice coders for customer use.
This application note describes a multichannel voice coding
system developed in C and executing on an RTOS. The voice
coding software from a third party is integrated with other tasks
under the RTXC RTOS. Topics covered include the voice coding
application, features of the RTXC RTOS, and a methodology for
integrating this type of system. This knowledge can assist you in
developing future systems using an RTOS.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
1 Project Purpose .......................... 2
2 Voice Coding .............................. 2
2.1
2.2
3 Multichannel Applications ........ 6
4 C Compilers ............................... 7
5 Real-time Operating Systems ... 9
6 System Overview ..................... 10
6.1
6.2
7 Software Description ............... 13
7.1
7.1.1 Audio Codec Initialization............. 14
7.1.2 Synchronous Interface ................... 15
7.2
7.2.1 Double Buffering ........................... 16
7.2.2 Wrappers........................................ 18
7.3
7.4
7.4.1 RTXCbug....................................... 21
7.5
8 Conclusions .............................. 23
9 References ................................ 24
Encoding/Decoding ......................... 4
Third-Party Voice Coding Software 6
Target Hardware ............................ 10
Application Software ..................... 12
Data Input/Output .......................... 13
Voice Coders ................................. 16
User Interface ................................ 18
RTXC............................................. 20
Integration...................................... 22
Contents
Rev. 0, 3/2001
AN2113/D:

Related parts for AN2113

AN2113 Summary of contents

Page 1

... System Overview ..................... 10 6.1 6.2 7 Software Description ............... 13 7.1 7.1.1 Audio Codec Initialization............. 14 7.1.2 Synchronous Interface ................... 15 7.2 7.2.1 Double Buffering ........................... 16 7.2.2 Wrappers........................................ 18 7.3 7.4 7.4.1 RTXCbug....................................... 21 7.5 8 Conclusions .............................. 23 9 References ................................ 24 Go to: www.freescale.com AN2113/D: Rev. 0, 3/2001 Contents Encoding/Decoding ......................... 4 Third-Party Voice Coding Software 6 Target Hardware ............................ 10 Application Software ..................... 12 Data Input/Output .......................... 13 Voice Coders ................................. 16 User Interface ................................ 18 RTXC............................................. 20 Integration...................................... 22 ...

Page 2

... RTOSs The system described in this application note executes multiple channels of the IS-96-A voice coder on a Motorola DSP56307EVM. Using a variety of software tools and code, we experienced the intricacies that arise from such an approach. We developed and debugged the application software using the Tasking 2.2r2 DSP563xx Software Development Toolset. C code snippets shown in this document adhere to guidelines set forth by the 2.2r2 version of the Tasking tool set. Hand-coded assembly code interfaces to the IS-96-A voice coding library supplied by Signals and Software Limited (SASL). Embedded Power Corporation’ ...

Page 3

Freescale Semiconductor, Inc. especially important in recreating voiced speech. Peaks of the spectral envelope are called formants, which represent the resonant modes of the vocal tract. The research into speech coding and development of voice coders for telecommunication standards focuses ...

Page 4

Freescale Semiconductor, Inc. Voice Coding 2.1 Encoding/Decoding Each of the many different voice coding algorithms combines knowledge of the human vocal system with an understanding of the quality of speech required by the application and the processing power available to ...

Page 5

Freescale Semiconductor, Inc. both a codebook index value indicating which excitation parameter is appropriate and a codebook gain indicating the strength of the excitation. The tables for IS-96-A require 6622 words of data space when implemented on the DSP56300 family. ...

Page 6

Freescale Semiconductor, Inc. Multichannel Applications x Codebook Code Gain Figure 5. IS-96 Decode Block Diagram 2.2 Third-Party Voice Coding Software Since voice coders are an integral part of systems implementing various telecommunications standards essential that they be programmed ...

Page 7

... Cross View Pro Debugger and Embedded Development Environment (EDE). Collectively, these tools are called the DSP56xxx software development tools. Examining some features of the Tasking tools can give you an idea of what today’s C compilers must provide to be usable in real-time DSP applications. ...

Page 8

Freescale Semiconductor, Inc. C Compilers In addition to the compiler, powerful easy-to-use debuggers are required for DSP C code development. Figure 6 shows some of the useful features of Tasking’s source window, which displays the program as C, assembly, or ...

Page 9

... Resource Management RTXC ISR Calls (KS_ISR...) Interrupt Service Routines Figure 7. RTXC Services and Task Interface 4. TRXC is the recommended RTOS for the DSP56300 family. See http://www1.motorola-dsp.com/tools- info/rtos-dev.html for details. For More Information On This Product, 4 RTXC is a multitasking, prioritizable, preemptive operating Task... ...

Page 10

Freescale Semiconductor, Inc. System Overview By selecting the tasks properly, the developer can isolate the “application” tasks (labeled Task 1 through Task n) from the “device-specific” tasks (shown as interrupt service routines and device driver tasks), which makes it easier ...

Page 11

Freescale Semiconductor, Inc. DSP communicates with the multichannel board via the Enhanced Synchronous Serial Interface 0 (ESSI0) port on the EVM. Each codec on the board executes A/D or D/A operations for two channels of audio data (stereo audio requires ...

Page 12

Freescale Semiconductor, Inc. System Overview 6.2 Application Software The application software manipulates four independent audio data streams or channels: ch0, ch1, ch2 and ch3. Each audio channel is processed on the basis of one of four user-selected modes: • Off. ...

Page 13

Freescale Semiconductor, Inc. 7 Software Description This section addresses the following topics: • Data Input and Output (I/O) • Voice coders • User interface • RTOS First, we created a stand-alone system for data I/O using the ESSI and multichannel ...

Page 14

Freescale Semiconductor, Inc. Software Description The ESSI provides a full duplex serial port for serial communications with a variety of serial devices, including industry-standard analog-to-digital codecs, other DSPs, microprocessors, and peripherals. The SCI provides a full duplex port for serial ...

Page 15

Freescale Semiconductor, Inc. 7.2.2 Synchronous Interface ESSI0 transfers the data to and from the codecs. The ESSI0 interface has three main modes for handling synchronous data transfers: normal, on-demand, and network. We use the network mode, which allows multiple time ...

Page 16

Freescale Semiconductor, Inc. Software Description 1. ESSI Tx Event 2. Read from transmit buffer TX_buff Figure 11. ESSI Data Receive Mechanism 7.3 Voice Coders This section discusses two key features of the voice coder: the double buffering mechanism for rapidly ...

Page 17

Freescale Semiconductor, Inc. *rx_fbuff_base P1 P2 *in_fbuff_base Processing *out_fbuff_base P3 P4 *tx_fbuff_base Figure 12. Double Buffer Diagram Multichannel Voice Coding System For More Information On This Product, Go to: www.freescale.com Software Description The receive and input both use P1 and ...

Page 18

Freescale Semiconductor, Inc. Software Description 7.3.2 Wrappers Voice coding software purchased from a third-party developer includes the software to implement a given telecommunications standard on a specific DSP device. This software does not handle data input/output or other system issues ...

Page 19

Freescale Semiconductor, Inc. Figure 13. Command Line Interface Figure 14 shows the mechanism for receiving user commands over the SCI peripheral. The SCI peripheral signals an event when it receives a character, causing the SCI receive interrupt routine to execute. ...

Page 20

Freescale Semiconductor, Inc. Software Description 1. SCI Rx Event 3. Write Character buffer 5. Read Character Using the mechanism shown in Figure 14, the hardware-specific ISR is isolated from the application-specific sci_drv task. This makes it easier to reuse or ...

Page 21

... RTXCbug operates as a task and is usually set up as the highest-priority task. Whenever RTXCbug runs, it freezes the rest of the system, thereby permitting coherent snapshots of RTXC components. RTXCbug is not a replacement for other debugging tools but assists you in tuning the performance of the RTXC environment or checking out problems within it. ...

Page 22

Freescale Semiconductor, Inc. Software Description 7.6 Integration Once the individual tasks are defined and tested, the integration simply involves properly selecting task priorities and RTXC objects to synchronize and communicate these tasks. We integrated the ESSI data I/O software with ...

Page 23

Freescale Semiconductor, Inc. The integration of the command line interface task cli_drv with the SCI character I/O mechanisms described in Section 7.4 is shown in Figure 18. The CLI driver task character command is detected in the SCI input driver ...

Page 24

... SPS, Technical Information Center 3-20-1, Minami-Azabu, Minato-ku Tokyo 106-8573 Japan 81-3-3440-3569 ASIA/PACIFIC Motorola Semiconductors H.K. Ltd. Silicon Harbour Centre 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T., Hong Kong 852-26668334 Go to: www.freescale.com Home Page http://www.mot.com/SPS/DSP DSP Helpline http://www.motorola.com/SPS/DSP/ support/index.html email: dsphelp@dsp.sps.mot.com AN2113/D ...

Related keywords