AN2384 Freescale Semiconductor / Motorola, AN2384 Datasheet - Page 21

no-image

AN2384

Manufacturer Part Number
AN2384
Description
Generic Tone Detection Using Teager-Kaiser Energy Operators on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Memory requirements are as follows:
6
The Freescale Starcore DSPs based on the SC140 core and supporting development tools provide a rich set of
features to optimize performance in demanding signal processing applications. Different code optimization
techniques are used to boost performance in MCPS and reduce code size. The following method was chosen to
implement the tone detector:
For example, this method reduced the peak search in the AGC from 20 cycles per sample. The method resulted in
an overall savings of 0.5 cycles per sample, yielding a savings of approximately 97 percent in program speed and
offering significant reduction in memory usage. Easy to integrate on a multi-channel system, the detector [11]
requires only the following elementary tasks, which are illustrated by the driver code on the next page:
You can empty this vector after several function calls by clearing the 16-bit value. Clearing the output vector is
optional. The output vector size must be large enough to store the maximum number of keys between two checks
of these keys. One interval of silence followed by a key may last down to 93 ms (Q.24 requirements for signaling
Freescale Semiconductor
Using the DTMF Detector
1.
2.
3.
Generic Tone Detection Using Teager-Kaiser Energy Operators on the StarCore SC140 Core, Rev. 1
Stack size: 80 bytes for the detector, 0 bytes for the initialization function.
Tables: 100 bytes.
Program: 2620 bytes.
Data: 64 bytes/channel.
Adapt original C code to take advantage of DSP architecture, that is, four parallel DALUs (data
arithmetic logic units).
Use the Metrowerks Compiler (Version 1.5 here) to compile this C code with automated optimization.
Finally, perform hand optimization on the assembler to take further advantage of efficient assembly
instructions, such as multi-word move instructions.
After memory is assigned to a channel data structure, initialize it by calling the
fsl_dtmf_det_init function.
Ensure that the input vector size is equal to or larger than 80 samples. Otherwise, performance may
degrade due to amplitude modulation introduced by the AGC.
The fsl_dtmf_det function fills the output vector with the number of elements given by the 16-bit
unsigned integer in dtmf_det_chan (dtmf_det_chan is the data structure associated to a chan-
nel) with offset 46.
Mitel Test 7a
Mitel Test 7b
Mitel Test 7c
Test average
Mitel Test 5
Mitel Test 6
Mitel Test 8
Input File
Table 6. Assembly Code Results (Continued)
Minimum MCPS
0.1540
0.1540
0.1540
0.1540
0.1540
0.1540
0.1540
Average MCPS
0.1718
0.1971
0.2602
0.2640
0.2649
0.1982
0.2273
Maximum MCPS
0.3785
0.3860
0.3900
0.3875
0.3815
0.4235
0.3987
Using the DTMF Detector
21

Related parts for AN2384