Module 5-1
Module 5-1
Devices
Introduction
A typical DSP system has DSP with external memory, input devices
of manufacturers of DSP
Also there are variety of memory and I/O devices available, the
signals generated by DSP may not suit memory and I/O devices to be
connected to DSP
Thus, there is a need for interfacing devices the purpose of it being to
parallel mode
In the serial mode, data transfer takes place bit by bit; in the parallel
small
It exhibits better performance by DSP because of better data flow
within pipeline
The purpose of such memory is to hold Program/Code/Instructions,
Not only constants are stored in such memory, they are also used to
hold variable data and intermediate results so that the processor need
memory
Program memory can be ROM, Dual Access RAM (DARAM),
SARAM and two sets of address bus and data bus is available in the
case of DARAM
The DSP can thus access two memory locations simultaneously
There are 3 bits available in memory mapped register, PMST for the
at system reset
Second bit is OVLY
program space
If this bit is 0, on-chip DARAM 4-7 is not mapped into data space
and if this bit is 1, on-chip DARAM 4-7 is mapped into Data Space
table below
Data memory can be on-chip / off-chip
Data memory 64 K
memory
It enhances speed of program execution by using parallelism, i.e,
write
The external memory to DSP can be interfaced with 16 - 23 bit
memory
The signals required by the memory are typically chip Select, Output
SARAM
Extended external Program Memory is interfaced with 23 address
Signal
The characteristics of the signal depend on the purpose it serves
The signals available in TMS320C54xx are listed in table (a) & table
(b)
Table (a): External Bus Interfacing Signals
In external bus interfacing signals, address bus and data bus are
multi-lines bus
Address bus is unidirectional and carries address of the location
referred
Data Space Select, Program Space Select, I/O Space Select are meant
They are active during the entire operation of data memory / program
device or writing
Read/Write Signal is low when DSP is writing and high when DSP is
reading
Strobe Interfacing Signals, Memory Strobe and I/O Strobe both are
active low
They remain low during the entire read & write operations of
External Bus Interfacing Signals from 1-8 are all are unidirectional
DMA controller
There are two Interrupt related signals: Interrupt Request and
signal
It initiates an action or informs about the completion of a transaction
control signal
A low on this signal makes the DSP to respond or attend to the
peripheral device
It informs about the completion of a transaction to the DSP
Memory Interface
The memory is organized as several locations of certain number of
bits
The number of locations decides the address bus width and memory
capacity
The number of bits per locations decides the data bus width and
memory IC
Thus, there may be insufficient word length
Chip Select Signal selects one or more memory ICs among many
memory location
Output Enable signal enables the availability of data from a memory
Enable control signals are active high or low and they carry signals
into the memory ICs
The task of the memory interface is to use DSP signals and generate
Read and write are to memory device and hence memory strobe is
low
Internal program memory reads take one clock cycle and External
3 bit Field in SWWSR are meant for indicating number of wait states
000 implies no wait state and 111 implies seven wait states
pages each of 32K words and to I/O space of one page of 64K
Further to interface devices requiring more than 7 wait states,
purpose of decoding
The arrangement of ICs for extension of memory word length is
own speed
Programmed I/O requires handshaking signals
DSP waits for the readiness of the I/O readiness signal which is one
below
I/O strobe and I/O space select are issued by the DSP
Two clock cycles each are required for I/O read and I/O write
operations
conversion
In programmed I/O mode, external flag signal is issued by DSP to
the conversion
The DSP issues address of the ADC, I/O strobe and read / write
After reading, DSP issues start of conversion once again after the
below
signals
DSP is interrupted by the I/O whenever it is ready
One flag, Global enable bit (INTM), in ST1 register is used to enable
maskable
If the interrupt is non-maskable, DSP issues the interrupt
checked
If that bit is 0, implying that the interrupt is masked, DSP does not
below
Since amount of data is large, it will engage DSP in data transfer task
manipulation
The intervention of DSP has to be avoided for two reasons: to utilize
DSP for useful signal processing task and to increase the speed of
transfer by direct data transfer between memory or memory and I/O
The direct data transfer is referred to as direct memory access
(DMA)
The arrangement expected is shown in fig below
DMA controller helps in data transfer instead of DSP
DMA channels
Each channel is between certain source & destination
One channel at a time can be used for data transfer and not all six
simultaneously
These channels can be prioritized
for one DMA transfer depends on several factors such as source and
destination location, external interface conditions, number of active
DMA channels, wait states and bank switching time
The time for data transfer between two internal memory is 4 cycles
of 16 / 32 bits
Block size, frame size, data are programmable
The context register DMSRC & DMDST are source & destination
address holders
DMCTR is for holding number of data elements in a frame
DMA sub bank Address Register (DMSA), DMA sub bank Data
Register with auto increment (DMSDI) and DMA sub bank Data
Register (DMSDN)
To access each of the DMA Registers Register sub addressing
Technique is employed
The schematic of the arrangement is shown in fig below
A set of DMA registers of all channels (62) are made available in set
Introduction
In the case of parallel peripheral interface, the data word will be
time
Such devices are referred to as serial I/O devices or peripherals
slow
The time taken depends on the number of bits in the data word
CODEC Interface Circuit
CODEC, a coder-decoder is an example for synchronous serial I/O
6. FSR: Frame sync signal for receive, First bit, during transmission
or reception, is in sync with these signals
7. RRDY: indicator for receiving all bits of data and
SSI, respectively
cycle. RRDY / XRDY is initially high, goes LOW to HIGH after the
completion of data transfer
Each transfer of bit requires one clock cycle
5.13
Fig 5.13 Transmit Timing for SSI
digital form
Decimation filter reduces the sampling rate and thus processing does
signal
Interpolation increases the sampling rate back to original value
LPF smoothens the analog reconstructed signal by removing high
frequency components
The Serial Interface monitors serial data transfer
LRCIN
The Mode Control initializes the serial data transfer
It sets all the desired modes, the number of bits and the mode
Load Signal
It defines start and end of latching bits into CODEC device
CPLD in Interface also provides system clock for DSP and for
interface
Fig 5.15 PCM3003 Interface to DSP in DSK
PCM3002 CODEC handles data size of 16 / 20 bits
DIN, DOUT is the single line data lines to carry the data into the
is CODEC SYSCLK / 4
LRCIN is frame sync signal for Left and Right Channels
signal
With two signals encoded and the pulse width as tp, the total time
duration is 5tp
Since the time gap between the pulses represent the sample value, at
the receiving end the time gap has to be measured and the value so
obtained has to be translated to sample value
The scheme for decoding is shown in fig 5.18
DSP Internal Timer employed
The count in the timer is equivalent to the sample value that has been
encoded
Thus, ADC is avoided while decoding the PPM signal
PPM signal interface generates the interrupt for DSP. DSP entertains
analog signals
And heart rate is determined referring to the ECG obtained by
decoding
Fig 5.20 DSP based biotelemetry Receiver Implementation
Heart Rate (HR) is a measure of time interval between QRS
beat
There is periodicity in its appearance indicating the heart rate
nonlinear filtering
Mean of half of peak amplitudes is determined, which is threshold
of DSP
Heart Rate, heart beat per minute is computed using the relation
circuit
Schematic of speech production is shown in Fig 5.22
The vocal tract has vocal cord at one end and mouth at the other end
The shape of the vocal tract depends on position of lips, jaws, tongue
The overall voice that sounds depends on both, the vocal tract and
nasal tract
Two types of speech are voiced sound and unvoiced sound
noise
The final output is the synthesized speech signal
intervals of 20ms
Fundamental frequency of speech can be determined by
autocorrelation method
In other words, it is a method of determination of pitch period
frequency of speech
A three level clipping scheme is discussed here to measure the
average of absolute values of 1st 100 samples and last 100 samples
The scheme is shown in fig 5.26
in Fig 5.26
If the sample value is greater than +CL, the output y(n) of the clipper
is set to 1
If the sample value is more negative than - CL, the output y(n) of the
clipper is set to -1
If the sample value is between –CL and +CL, the output y(n) of the
clipper is set to 0
defined by eq (1)
The largest peak in autocorrelation is found and the peak value is
as unvoiced segment
If the peak value is above threshold, the segment of s(n) is classified
as voiced segment
The functioning of autocorrelation is shown in fig 5.28
𝑁 −1 −𝑘
𝑅𝑛 ( 𝑘 ) = ∑ ¿¿
𝑚 =0
As shown in fig 5.29, A is a sample sequence y(n)
samples of y(n)
There is maximum match
reduces
When window is moved further say to a position D, again there is
maximum match
Thus, sequence y(n) is periodic
The period of repetition can be measured by locating the peaks and
technique
It is based on discrete cosine transform (DCT)
major variations
High frequency components are ignored because they represent
Low frequency coefficients are of higher value and hence they are
retained
The amount of high frequency components to be retained is decided
quantized
As already noted low frequency coefficients are significant and
employed
The contents of Quantization Table indicate the step size for
quantization
An entry as smaller value implies smaller step size, leading to more
Fig 5.31 Matrix used for quantization and dequantization
The quantized coefficients are coded using Huffman coding
) --- (3)