DSP Interface
DSP Interface
TMS320C54x DSP
APPLICATION REPORT: SPRA453
Cisco Systems
Ramesh Iyer, Texas Instruments
Texas Instruments (TI) reserves the right to make changes to its products or to discontinue any
semiconductor product or service without notice, and advises its customers to obtain the latest version of
relevant information to verify, before placing orders, that the information being relied on is current and
complete.
TI warrants performance of its semiconductor products and related software to the specifications applicable
at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques
are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of
each device is not necessarily performed, except those mandated by government requirements.
Certain application using semiconductor products may involve potential risks of death, personal injury, or
severe property or environmental damage (“Critical Applications”).
Inclusion of TI products in such applications is understood to be fully at the risk of the customer. Use of TI
products in such applications requires the written approval of an appropriate TI officer. Questions concerning
potential risk applications should be directed to TI through a local SC sales office.
In order to minimize risks associated with the customer’s applications, adequate design and operating
safeguards should be provided by the customer to minimize inherent or procedural hazards.
TI assumes no liability for applications assistance, customer product design, software performance, or
infringement of patents or services described herein. Nor does TI warrant or represent that any license,
either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual
property right of TI covering or relating to any combination, machine, or process in which such
semiconductor products or services might be or are used.
Other brands and names are the property of their respective owners.
CONTACT INFORMATION
Abstract
This application report describes the hardware logic required to
interface the Texas Instruments (TI™) TMS320C54x digital signal
processor (DSP) buffered serial port to a T1/E1-type serial bus.
This interface allows the system designer to dynamically
reconfigure the DSPs to compress/decompress voice on selected
time slots.
Product Support
Email
For technical issues or clarification on switching products, please
send a detailed email to dsph@[Link]. Questions receive prompt
attention and are usually answered within one business day.
Introduction
The Pulse Code Modulation (PCM) technique digitally transmits
analog voice signals. PCM samples the original analog signal at
8000 Hz and quantifies each sample into a coded set of binary
digits.
Companding is a technique used in the quantizer to improve the
signal to quantizing noise (SQR) ratio. In a linear quantizing
system, SQR increases with increasing signal amplitudes so that
large signals have a higher SQR than smaller signals. This
condition is not desirable in systems using small signals.
To remedy this, the size of the quantization intervals in the
quantizer is adjusted with respect to the input signal level so that
the intervals are smaller for small signals and larger for large
signals. This creates a non-linear output versus input relationship,
and results in the output being compressed with respect to the
input.
At the receiving end, the signal must be expanded to retrieve the
original signal. This combination of compression and expansion
techniques in a codec is called Compander
COMpressor/exPANDER). When companding is used, the SQR
is approximately the same across the range of input signal levels.
The North American and Japanese markets use P-255
companding, whereas the European networks use A-law
companding.
After the input speech has been sampled, quantized, and encoded
in digital form, it must be transmitted to its final destination. Since
every speech channel occupies 64000 bits/second (= 8000
samples multiplied by 8 bits/sample), it is uneconomical to send
only one encoded voice channel over a single transmission
channel. A multiplexing scheme that multiplexes the transmission
of multiple voice channels over a single transmission channel is
used. Since the multiplexing scheme sends information separated
in time, it is called Time Division Multiplexing (TDM).
CH 1
CH 2 CH 3 CH 4 CH 5 . . . . . . . . . CH 24
8 BITS
CH 1 CH 2 . . . . . . . . . CH 15 CH 16 CH 17 . . . . . . . . . . . CH 30
C54x Peripherals
The C54x devices support three different types of synchronous
serial port interfaces:
Standard synchronous serial port
Buffered serial port (BSP)
Time division multiplexed (TDM) serial port
The standard synchronous serial port provides a full-duplex
communication with serial devices, such as codecs and A/D
converters, and not TDM sources, such as a T1 or E1 line.
The BSP features a buffering mechanism that greatly reduces the
CPU overhead in handling serial data transfers. Except for the
buffering mechanism, the BSP functions in a similar manner to the
synchronous serial port. Hence, the BSP is also not capable of
handling TDM data sources.
The TDM serial port allows the device to communicate serially
with up to 7 other devices. This port is therefore well suited for
multiprocessor applications. Unfortunately, this port cannot be
used to handle telephony data coming from a T1 or an E1 line.
Designing an Interface
This interface is designed to operate in a multiprocessor
environment. The target system, used in a voice-over Frame
Relay application, comprises multiple C54x DSPs controlled by a
Motorola host processor, the MPC860 (see Figure 3). The host
processor determines which voice channel will be
compressed/decompressed by a DSP using a predetermined
voice-coding scheme.
B
S TMS320C542/8/9
P Compressed
HPI voice
T1/E1
FRAMER channels
Uncompressed
voice channels FPGA MPC 860 HOST
PROCESSOR
Requirements
The following is required of a TDM interface:
Indication of start of channel 0
Synchronization to a T1 clock (1.544 MHz) or an E1 clock
(2.044 MHz)
A means of selecting a time slot
CLKR
FSR
DR
{FO=1} A1 A2 A3 A4 A5 A6 A7 A8 B1 B2
M SB LSB
RRDY
RINT
DRR DRR
loaded read
from RSR
1
The capability of a DSP to handle n channels of speech depends on the voice coding scheme
and other system-dependent features such as Line Echo Cancellation, Fax Relay etc.
14 A TDM Interface for the TMS320C54x DSP
SPRA453
Practical Usage
While the given circuit might seem like overkill for most
applications, it is designed based on some of the other needs of
the customer, details of which are not available. The Altera FPGA
used in this circuit costs about $10.00. The authors suggest that
cheaper FPGAs/PALs are available and can be used depending
on the needs of individual hardware designers.
HD0-HD7 D0-D7
HBIL A31
HCNTL0 A30
HCNTL1 A29
HR/W- R/W-
HCS- CSx-
C54x MPC860
BDR HDS1- WE0-
HDS2-
BDX
HINT- IRQ-
HAS-
Vdd
INT3-
HPIENA
INT2- ADDR.
BCLKR BCLKX BFSR BFSX PCLK W E -
FSCx HSEL-
GRCLKx
PCLK
2.048 MHz WE-
CLK
FS- FPGA
ADDR.
D0-D4
8 kHz FS
BIT0
LDN QA
A QB
B
QC BIT6
C
D QD TSC0
E
QE TSC1
F
G QF TSC2
H
QG TSC3
GN
QH TSC4
DNUP
SETN
CLRN
2.048 MHz CLK
CLK
GND
D0
D1
D2
D3
D4
FSC0
A2 To Target DSP 0
GRCLK0
A3
A5 P0TS
CS0-
CS1-
WE-
FSC1
PCLK
To Target DSP 1
TSC0 GRCLK1
TSC1
TSC2 P1TS
TSC3
TSC4
CLK
BIT6
Figure 8. Inside the Time Slot Selection Latch for Slot A, DSP 0
PRN
D0
D
Q P0CHAD0
PCLK
ENA
CLRN
PRN
D1
D
Q P0CHAD1
ENA
CLRN
PRN
D2
D
Q P0CHAD2
ENA
CLRN
PRN
D3
D
Q P0CHAD3
ENA
CLRN
PRN
D4
D
Q P0CHAD4
A2 ENA
CLRN
A3
A5
WE-
CS0-
Figure 9. Inside the Time Slot Selection Latch for Slot B, DSP 0
PRN
D0
D
Q P0CHBD0
PCLK
ENA
CLRN
PRN
D1
D
Q P0CHBD1
ENA
CLRN
PRN
D2
D
Q P0CHBD2
ENA
CLRN
PRN
D3
D
Q P0CHBD3
ENA
CLRN
PRN
D4
D
Q P0CHBD4
A2
ENA
CLRN
A3
A5
WE-
CS0-
P0CHAD0
FS0 PRN
TSC0
D
Q
P0CHAD1
FSC0
TSC1 ENA
CLRN
P0CHAD2
TSC2
CLK
P0CHAD3
TSC3
P0CHAD4
TSC4
P0CHBD0
TSC0
P0CHBD1 TSE0-
TSC1 BIT6
P0CHBD2
TSC2
P0CHBD3
TSC3
P0CHBD4
TSC4
P0TS
FS0
PRN PRN PRN
D FS0D D FS0DD D
Q Q Q
X
CLK-
CLK CLK-
BIT6
ENA ENA ENA
CLRN CLRN CLRN
TSC0
TSC1
TSC2 TSE0-
TSC3
TSC4
CLK CLK-
P0TS
PRN
D
Q
CLK
ENA
CLRN
BDXx (from
DSP 1)
P1TS
PRN
D
Q
CLK
ENA
CLRN
BDXx (from
DSP 2)
P2TS
PRN
D
Q
CLK
TO PCM RX
BUS
ENA
CLRN
BDXx (from
DSP 3)
P3TS
PRN
D
Q
CLK
ENA
CLRN
BDXx (from
DSP 4)
P4TS
PRN
D
Q
CLK
ENA
CLRN
BDXx (from
DSP 5)
P5TS
PRN
D
Q
CLK
ENA
CLRN
A10
A5
A11
HSEL0-
A12
CS0-
SEL2-
A10- A5
A11
HSEL1-
A12
SEL2- CS1-
A10 A5
A11-
HSEL2-
A12
CS2-
SEL2-
A10- A5
A11-
HSEL3-
A12
CS3-
SEL2-
A10 A5
A11
HSEL4-
A12-
SEL2- CS4-
A10- A5
A11
HSEL5-
A12-
CS5-
SEL2-
BIT6
COMPARATOR O/P
FSC0
FS0D
FS0DD
P0TS
GRCLK0
References
TMS320C54x DSP CPU and Peripherals User’s Guide, Literature
number SPRU131D
Stephen J. Bigelow, Understanding Telephone Electronics, Third Edition
TM
MPC860 PowerQUICC User’s Manual, Motorola Inc., 1996
Altera Flex 8000 Handbook, Altera Inc.