Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
convolution equal to L+M-1, both x(n) and h(n) must be appended with appropriate
number of zero valued samples. In other words by increasing the length of the sequences
x (n) and h(n) to L+M -1 points and then circularly convolving the resulting sequences
we obtain the same result as that of linear convolution.
8. What is zero padding? What are its uses?
Let the sequence x (n) has a length L. If we want to find the N-point DFT(N>L)
of the sequence x(n), we have to add (N-L) zeros to the sequence x(n). This is known
as zero padding.
The uses of zero padding are
1) We can get better display of the frequency spectrum.
2) With zero padding the DFT can be used in linear filtering.
9. Define sectional convolution.
If the data sequence x(n) is of long duration it is very difficult to obtain the output
sequence y(n) due to limited memory of a digital computer. Therefore, the data sequence
is divided up into smaller sections. These sections are processed separately one at a time
and controlled later to get the output.
10. What are the two methods used for the sectional
convolution? The two methods used for the sectional
convolution are
1)the overlap-add method and 2)overlap-save method.
11. What is overlap-add method?
In this method the size of the input data block xi(n) is L. To each data block we
append M-1 zeros and perform N point cicular convolution of xi(n) and h(n). Since each
data block is terminated with M-1 zeros the last M -1 points from each output block
must be overlapped and added to first M-1 points of the succeeding blocks.This method
is called overlap-add method.
12. What is overlap-save method?
In this method the data sequence is divided into N point sections xi(n).Each
section contains the last M-1 data points of the previous section followed by L new data
points to form a data sequence of length N=L+M-1.In circular convolution of xi(n) with
h(n) the first M-1 points will not agree with the linear convolution of xi(n) and h(n)
because of aliasing, the remaining points will agree with linear convolution. Hence we
discard the first (M -1) points of filtered section xi(n) N h(n). This process is repeated
for all sections and the filtered sections are abutted together.
13. Why FFT is needed?
The direct evaluation DFT requires N2 complex multiplications and N2 N
complex additions.Thus for large values of N direct evaluation of the DFT is difficult.By
using FFT algorithm the number of complex computations can be reduced. So we use
FFT.
www.roeverengg.edu.in
www.roeverengg.edu.in
Periodicity
Linearity
Time reversal
Circular time shift
www.roeverengg.edu.in
www.roeverengg.edu.in
No.
Linear convolution
www.roeverengg.edu.in
www.roeverengg.edu.in
PART-B
1. Determine the DFT of the sequence
x(n) =1/4, for 0<=n <=2
0, otherwise
Ans: The N point DFT of the sequence x(n) is defined as
N-1
x(k)= x(n)e-j2nk/N K=0,1,2,3,N-1
n=0
x(n) = (1/4,1/4,1/4)
N-1
X(k) = e-j2nk/3[1+2cos(2_k/3)] where k= 0,1,.,N-1
n=0
2. Derive the DFT of the sample data sequence x(n) = {1,1,2,2,3,3}and compute the
corresponding amplitude and phase spectrum.
Ans: The N point DFT of the sequence x(n) is defined as
N-1
X(k)= x(n)e-j2_nk/N K=0,1,2,3,N-1
n=0
X(0) = 12
X(1) = -1.5 + j2.598
X(2) = -1.5 + j0.866
X(3) = 0
X(4) = -1.5 j0.866
X(5) =-1.5-j2.598
X(k) = {12, -1.5 + j2.598, -1.5 + j0.866,0, -1.5 j0.866, -1.5-j2.598}
|X(k)|={12,2.999,1.732,0,1.732,2.999}
3.Given x(n) = {0,1,2,3,4,5,6,7} find X(k) using DIT FFT algorithm.
Ans: Given N = 8
WN k = e-j(2_/N)k
0
W8
=1
1
W8
=0.707-j0.707
2
W8
= -j
3
W8
=-0.707-j0.707
Using butterfly diagram
www.roeverengg.edu.in
www.roeverengg.edu.in
X(k) = {28,-4+j9.656,-4+j4,-4+j1.656,-4,-4-j1.656,-4-j4,-4-j9.656}
WN k = ej(2/N)k
0
W8= 1
1
W8 =0.707+j0.707
2
W8 = j
3
W8 = -0.707+j0.707
www.roeverengg.edu.in
www.roeverengg.edu.in
x(n) = {0,1,2,3,4,5,6,7}
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
Sixteen-point radix-4 decimation-in-time algorithm with input in normal order and output in digit-reversed
order
Complete butterfly diagram
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
Overlap Save
o Use a block length of N=L+P-1
o Append (L-1) zeros to h[n] and compute the N-length DFT H[k] once. It will be used for all blocks.
o Start the input block index at 0.
o Initialize the current x[n] to all zeros.
o Repeat the following:
Get the next length L sequence of input from x[n] starting at the block index
Store it into the last L locations of x[n].
Compute the N-length DFT X[k].
Compute the N-point IDFT of (H[k]X[k]/N) to get a temporary output sequence with some valid
results and some invalid results.
Output the L valid results for linear convolution at the end of the temporary output sequence and
discard the first (P-1) invalid results. (Refer to linear convolution example above.)
Move the last (P-1) values in x[n] to the first [P-1] entries to be used again in the next block
computation
www.roeverengg.edu.in
www.roeverengg.edu.in
II UNIT
UNIT II INFINITE IMPULSE RESPONSE DIGITAL FILTERS:
9
Review of design of analogue Butterworth and Chebyshev Filters, Frequency transformation in
analogue domain - Design of IIR digital filters using impulse invariance technique - Design of digital
filters using bilinear transform - pre warping - Realization using direct, cascade and parallel forms.
PART-A
www.roeverengg.edu.in
larger values of w the relationship is nonlinear. This introduces distortion in thefrequency axis. This effect
compresses the magnitude and phase response. Thiseffect is called warping effect
9. Write a note on pre warping.
The effect of the non linear compression at high frequencies can be compensated.When the desired
magnitude response is piecewise constant over frequency, thiscompression can be compensated by
introducing a suitable rescaling or prewarping the critical frequencies.
10. Give the bilinear transform equation between s plane and z plane
s=2/T (z-1/z+1)
11. Why impulse invariant method is not preferred in the design of IIR filters other
than low pass filter?
In this method the mapping from s plane to z plane is many to one. Thus there ire
an infinite number of poles that map to the same location in the z plane, producing
an aliasing effect. It is inappropriate in designing high pass filters. Therefore this
method is not much preferred.
12. By impulse invariant method obtain the digital filter transfer function and thedifferential
equation of the analog filter h(s) =1/s+1
H (z) =1/1-e-Tz-1
Y/x(s) =1/s+1
Cross multiplying and taking inverse lap lace we get,
D/dt(y(t)+y(t)=x(t)
13. What is meant by impulse invariant method?
In this method of digitizing an analog filter, the impulse response of the resulting
digital filter is a sampled version of the impulse response of the analog filter. For
e.g. if the transfer function is of the form, 1/s-p, then
H (z) =1/1-e-pTz-1
14. What do you understand by backward difference?
One of the simplest methods of converting analog to digital filter is to
approximate the differential equation by an equivalent difference equation.
d/dt(y(t)/t=nT=(y(nT)-y(nT-T))/T
15. What are the properties of chebyshev filter?
1. The magnitude response of the chebyshev filter exhibits ripple either in the stop
band or the pass band.
2. The poles of this filter lies on the ellipse
16. Give the Butterworth filter transfer function and its magnitude characteristics for
different orders of filter.
The transfer function of the Butterworth filter is given by
H (j_) =1/1+j (_/_c) N
17. Give the magnitude function of Butterworth filter.
The magnitude function of Butterworth filter is
www.roeverengg.edu.in
www.roeverengg.edu.in
|h(j_)=1/[1+(_/_c)2N]1/2 ,N=1,2,3,4,.
18. Give the equation for the order N, major, minor axis of an ellipse in case of chebyshev filter?
The order is given by N=cosh-1(((10.1_p)-1/10.1_s-1)1/2))/cosh-1_s/_p
A= (1/N--1/N)/2p
B=p (1/N+ -1/N)/2
19. Give the expression for poles and zeroes of a chebyshev type 2 filters
The zeroes of chebyshev type 2 filter SK=j_s/sink_k, k=1.N
The poles of this filter xk+jyk
xk= _s_k/ _s2+_k2
yk=_s_k/ _s2+_k2 _k=acos_k
20. How can you design a digital filter from analog filter?
Digital filter can de designed from analog filter using the following methods
1. Approximation of derivatives
2. Impulse invariant method
3. Bilinear transformation
21. Write down bilinear transformation.
s=2/T (z-1/z+1)
22. List the Butterworth polynomial for various orders.
N Denominator polynomial
1 S+1
2 S2+.707s+1
3 (s+1)(s2+s+1)
4 (s2+.7653s+1)(s2+1.84s+1)
5 (s+1)(s2+.6183s+1)(s2+1.618s+1)
6 (s2+1.93s+1)(s2+.707s+1)(s2+.5s+1)
7 (s+1)(s2+1.809s+1)(s2+1.24s+1)(s2+.48s+1)
23. Differentiate Butterworth and Chebyshev filter.
Butterworth dampimg factor 1.44 chebyshev 1.06
Butterworth flat response damped response.
24. What is filter?
Filter is a frequency selective device ,which amplify particular range of
frequencies and attenuate particular range of frequencies.
25. What are the types of digital filter according to their impulse response?
IIR(Infinite impulse response )filter
FIR(Finite Impulse Response)filter.
26. How phase distortion and delay distortion are introduced?
The phase distortion is introduced when the phase characteristics of a filter is
nonlinear with in the desired frequency band.
The delay distortion is introduced when the delay is not constant with in the
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
The round off noise can be made small in non recursive realization of FIR filter.
33. What are the disadvantages of FIR FILTER
The duration of impulse response should be large to realize sharp cutoff filters.
The non integral delay can lead to problems in some signal processing
applications.
34. What is the necessary and sufficient condition for the linear phase characteristic of a FIR filter?
The phase function should be a linear function of w, which inturn requires
constant group delay and phase delay.
35.List the well known design technique for linear phase FIR filter design?
Fourier series method and window method
Frequency sampling method.
Optimal filter design method.
36. For what kind of application , the antisymmetrical impulse response can be used?
The ant symmetrical impulse response can be used to design Hilbert transforms
and differentiators.
37. For what kind of application , the symmetrical impulse response can be used?
The impulse response ,which is symmetric having odd number of samples can be
used to design all types of filters ,i.e , lowpass,highpass,bandpass and band reject.
The symmetric impulse response having even number of samples can be used
to design lowpass and bandpass filter.
38.What is the reason that FIR filter is always stable?
FIR filter is always stable because all its poles are at the origin.
39.What condition on the FIR sequence h(n) are to be imposed n order that this filter can be called a
liner phase filter?
The conditions are
(i) Symmetric condition h(n)=h(N-1-n)
(ii) Antisymmetric condition h(n)=-h(N-1-n)
40. Under what conditions a finite duration sequence h(n) will yield constant group
delay in its frequency response characteristics and not the phase delay?
If the impulse response is anti symmetrical ,satisfying the condition
H(n)=-h(N-1-n)
The frequency response of FIR filter will have constant group delay and not the
phase delay .
41. State the condition for a digital filter to be causal and stable?
A digital filter is causal if its impluse response h(n)=0 for n<0.
A digital filter is stable if its impulse response is absolutely summable,
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
is the impulse response h(n) of the system should have the symmetry property,i.e,
H(n) = h(N-1-n)
Where N is the duration of the sequence .
49. What are the advantages of Kaiser widow?
1.It provides flexibility for the designer to select the side lobe level and N .
2. It has the attractive property that the side lobe level can be varied
continuously from the low value in the Blackman window to the high value in the
rectangle window .
50. What is the principle of designing FIR filter using frequency sampling method?
In frequency sampling method the desired magnitude response is sampled and a linear
phase response is specified .The samples of desired frequency response are defined as
DFT coefficients. The filter coefficients are then determined as the IDFT of this set of
samples.
51. For what type of filters frequency sampling method is suitable?
Frequency sampling method is attractive for narrow band frequency selective
filters where only a few of the samples of the frequency response are non-zero.
3. Non recursive
Recursive
Less flexibility
digital
Consists of elements like adder
subtractor and delay units and it is
described by a difference equation
www.roeverengg.edu.in
PART-B
1.Draw the structures of IIR filters
Ans: Direct form I
www.roeverengg.edu.in
www.roeverengg.edu.in
Direct form II
www.roeverengg.edu.in
www.roeverengg.edu.in
Cascade structure
www.roeverengg.edu.in
www.roeverengg.edu.in
Parallel structure
2. Derive the equation for designing IIR filter using backward difference method.
Ans: maping from S plane to Z plane. d/dt y(t)=y(nT)y(nT-T)/T
3. Derive the equation for designing IIR filter using impulse invariant method.
Ans: Maping from S plane to Z plane.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
c. H(0)=1/2,
h(1)=h(-1)=0.3183
h(2)=h(-2)=0
h(3)=h(-3)= -0.106
h(4)=h(-4)=0
h(5)=h(-5)=0.06366
d. Find the transfer function H(Z) which is not realizable conver in to realizable by
multiplying by z-(N-1/2)
e. H(Z) obtained is 0.06366-0.106z-2+.3183Z-4+.5Z-5+.3183Z-6-.106Z-8+0.06366Z10
f. Find H (e jw) and plot amplitude response curve.
www.roeverengg.edu.in
13.Draw the direct form realization of FIR system. 62. Draw the direct form realization of a
linear Phase FIR system for N even. Draw the direct form realization of a linear Phase FIR
system for N odd
www.roeverengg.edu.in
Cascade structure
www.roeverengg.edu.in
www.roeverengg.edu.in
Parallel structure
Lattice structure.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
UNIT III
UNIT III FINITE IMPULSE RESPONSE DIGITAL FILTERS
9
Symmetric and Antisymmetric FIR filters - Linear phase FIR filters - Design using Hamming,
Hanning and Blackmann Windows - Frequency sampling method - Realization of FIR filters Transversal,
Linear
phase
and
Polyphase
structures.
PART-A
1. Define white noise?
A stationary random process is said to be white noise if its power density
spectrum is constant. Hence the white noise has flat frequency response spectrum.
2. What do you understand by a fixed-point number?
In fixed point arithmetic the position of the binary point is fixed. The bit to the right
represent the fractional part of the number & those to the left represent the integer part.
For example, the binary number 01.1100 has the value 1.75 in decimal.
3. What is meant by block floating point representation? What are its advantages?
In block point arithmetic the set of signals to be handled is divided into blocks. Each
block have the same value for the exponent. The arithmetic operations with in the block
uses fixed point arithmetic & only one exponent per block is stored thus saving memory.
This representation of numbers is more suitable in certain FFT flow graph & in digital
audio applications.
4. What are the advantages of floating point arithmetic?
1. Large dynamic range
2. Over flow in floating point representation is unlike.
5. How the multiplication & addition are carried out in floating point arithmetic?
In floating point arithmetic, multiplication are carried out as follows,
Let f1 = M1*2c1 and f2 = M2*2c2. Then f3 = f1*f2 = (M1*M2) 2(c1+c2)
That is, mantissa is multiplied using fixed-point arithmetic and the exponents are
added.
The sum of two floating-point number is carried out by shifting the bits of the mantissa
of the smaller number to the right until the exponents of the two numbers are equal and
then adding the mantissas.
www.roeverengg.edu.in
7. What is the relationship between truncation error e and the bits b for representing a
decimal into binary?
For a 2's complement representation, the error due to truncation for both positive and
negative values of x is 0>=xt-x>-2-b
Where b is the number of bits and xt is the truncated value of x.
The equation holds good for both sign magnitude, 1's complement if x>0
If x<0, then for sign magnitude and for 1's complement the truncation error satisfies.
8. What is meant rounding? Discuss its effect on all types of number representation?
Rounding a number to b bits is accomplished by choosing the rounded result as the b
bit number closest to the original number unrounded.
For fixed point arithmetic, the error made by rounding a number to b bits satisfy the
inequality
for all three types of number systems, i.e., 2's complement, 1's complement & sign
magnitude.
For floating point number the error made by rounding a number to b bits satisfy the
inequality
www.roeverengg.edu.in
The addition of two fixed-point arithmetic numbers cause over flow the sum exceeds
the word size available to store the sum. This overflow caused by adder make the filter
output to oscillate between maximum amplitude limits. Such limit cycles have been
referred to as over flow oscillations.
16. What are the methods used to prevent overflow?
There are two methods used to prevent overflow
1. Saturation arithmetic 2. Scaling
17. what are the two kinds of limit cycle behavior in DSP?
1.zero input limit cycle oscillations
2.Overflow limit cycle oscillations
18. What is meant by "dead band" of the filter
The limit cycle occur as a result of quantization effect in multiplication. The
amplitudes of the output during a limit cycle are confined to a range of values called the
dead band of the filter.
19. Explain briefly the need for scaling in the digital filter implementation.
To prevent overflow, the signal level at certain points in the digital filter must be
scaled so that no overflow occurs in the adder.
20. What is meant by 1s complement form?
In 1,s complement form the positive number is represented as in the sign magnitude form. To obtain
the negative of the positive number, complement all the bits of the positive number.
21. What is meant by 2s complement form?
In 2s complement form the positive number is represented as in the sign magnitude form. To obtain
the negative of the positive number, complement all the bits of the positive number and add 1 to the
LSB.
22. What are the two types of limit cycle behavior of DSP?.
1.Zero limit cycle behavior 2.Over flow limit cycle behavior
www.roeverengg.edu.in
26. What are the three-quantization errors to finite word length registers in digital filters?
1. Input quantization error 2. Coefficient quantization error 3. Product quantizationError
PART-B
4. Derive the expression for steady state I/P Noise Variance and Steady state O/P
Noise Variance
Write the derivation.
www.roeverengg.edu.in
Fixed Point:
In fixed point arithmetic the position of the binary point is fixed. The bit to the right
represent the fractional part of the numbers and those to the left represent the integer part .for example,the
binary number 01.1100 the value 1.75 in decimal.depending on the way negative numbers are
represented,there are three different forms of fixed-point arithmetic. They are 1. Sign magnitude 2. 1s
complement 3. 2s complement.
*It is the fast operation.
*relatively economical
*small dynamic range
*roundoff error occurs only for addition
*overflow occurs in addition
*used in small computer.
Floating point:
In floating point representation a positive number is represented as F=2c.M where m called
mantissa and c is the exponent can be either positive or negative.negative floating point numbers are
generally represented by considering the mantissa as a fixed point number.
*slow operation
*more expensive because of costlier hardware
*increased dynamic range
*roundoff errors can occur with the both addition and multiplication.
*overflow does not arise
*used in larger general purpose computer.
Block floating point
In block floating point arithmetic the set of signals to be handled is divided in to blocks.
Each block has the same value for the exponent. The arithmetic operations within the block use fixed
point arithmetic and only one exponent per block is stored thus saving memory. This representation of
numbers is most suitable in certain FFT flow graphs and in digital audio applications.
www.roeverengg.edu.in
quatization error
Product quantization error.
Coeffient quantization error
The common methods of quantization are truncation and rounding. Truncation is a process of discarding
all bits less significant than least significant bit that is retained.rounding of a number of b bits is
accomplished by choosing the rounded result as the b bit number closest to the original number un
rounded. The error due to truncation and rounding is known as quantization error.
The input quantization error is given by
E(n)=Xq(n)-X(n)
Xq(n)= sampled quantized value
X(n)= sampled unquantized value
The output quantization error is the variance of the sum of independent random variable is the sum of
their variances. If the quantization error are assumed to be independent at different sampling instances.
In fixed point arithmetic the product of two b bit numbers result in numbers 2b bits long. In digital
signal processing applications,it is necessary to round this product to a b bit number,which produce an
error known as product quantization error.
In the design of a digital filter the coefficients are evaluated with infinite precision. But when they are
quantized, the frequency response of the actual filter deviates from that which would have been obtained
with an infinite word length representation and the filter may actually fail to meet the desired
specifications. If the poles of the desired filter are close to the unit circle, then those of the filter with
quantized coefficients may lie just outside the unit circle.
.
7. Explain the different types of limit cycle oscillations and also the solutions
Ans: Zero input limit cycle oscillations
Overflow input limit cycle oscillations
Zero input limit cycle oscillations:
*This limit cycle oscillation has low amplitude.
*This limit cycle occurs when the input applied to the system is very low.
Overflow input limit cycle oscillations
*This limit cycle occurs because of the overflow taking place in the implementation of
digital filters.
www.roeverengg.edu.in
www.roeverengg.edu.in
8. Explain the construction and operation of channel vocoder with block diagram
Ans The channel vocoder is used in the analysis synthesis system. We use filter bank to separate the
frequency bands. There are about eight to ten filters. The amplitude of the filters outputs are encoded by
level detectors and coders. In addition to this, pitch and voice information are also sent along with them.
Also, a wide band excitation signal is generated at the receiving end using the transmitted pitch and
voicing information. For a voiced signal, the excitation consists of periodic signal with an appropriate
frequency.
However for unvoiced signal the excitation is a white noise. At the receiver end a matched filter
bank is available, due to which the output level matches the encode value.further,individual outputs are
combined to produce the speech signal.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
UNIT IV
UNIT IV FINITE WORD LENGTH EFFECTS
9
Fixed point and floating point number representations - Comparison - Truncation and Rounding
errors - Quantization noise - derivation for quantization noise power - coefficient quantization error Product quantization error - Overflow error - Roundoff noise power - limit cycle oscillations due to
product
roundoff
and
overflow
errors
signal
scaling
www.roeverengg.edu.in
www.roeverengg.edu.in
Cross-spectral density
"Just as the Power Spectral Density (PSD) is the Fourier transform of the autocovariance function we may define the Cross Spectral Density (CSD) as the
Fourier transform of the cross-covariance function.
6. Explain deterministic and nondeterministic signals with examples. (Nov2006)
Deterministic signals are functions that are completely specified in time.
The nature and amplitude of such a signal at any time can be predicted.
The pattern of the signal is regular and can be characterized
mathematically.
Example X(t) = t this is a ramp whose amplitude increases linearly with time and
slope is . A non-deterministic signal is one whose occurrence is random in
nature and its pattern is quite irregular. A typical example of non deterministic signal is thermal noise in a
An electric circuit
7. Explain the use of DFT in power spectrum estimate?
We know that the periodogram f the signal is given as,
Pxx(f) = 1/N |X(f)|2
www.roeverengg.edu.in
8. Define autocorrelation.
If x(t) is the stationary random process, then its autocorrelation function is given
as, xx() = E[ x*(t) x(t+ )]
Here E [] denotes the statistical average.
9. List the non-parametric methods for power spectral estimation.
Barlett method
Welch method
Blackman and Turkey method
Welch
The three
method?
steps are
www.roeverengg.edu.in
periodogram.
PART-B
1. (i) With suitable relations, describe briefly the periodogram method of power
spectral estimation. Examine the consistency and bias of periodogram.
(Nov 2008,May 2007)
Periodogram
The periodogram is an estimate of the spectral density of a signal. The term was coined by Arthur
Schuster in 1898[1] as in the following quote:[2]
THE PERIODOGRAM. It is convenient to have a word for some representation of a
www.roeverengg.edu.in
www.roeverengg.edu.in
variable quantity which shall correspond to the 'spectrum' of a luminous radiation. I
propose the word periodogram, and define it more particularly in the following
way:
www.roeverengg.edu.in
www.roeverengg.edu.in
M samples, compute the DFT of each set, square it to get the power spectral density and compute the
average of all of them. This leads to a decrease in the standard deviation as
Averaging (sampe mean) a set of uncorrelated measurements of a random variable results in a consistent
estimate of its mean
In other words: Variance of the sample mean is inversely proportional to the number of measurements
www.roeverengg.edu.in
www.roeverengg.edu.in
Each expected value of the periodogram of the subsequences are identical hence the process of averaging
subsequences Periodograms results in the same average value => asymptotically unbiased
Note that the data length used for the Periodograms are now L and not N anymore, the spectral resolution
becomes worse (this is the price we are paying)
Now we reap the reward: the variance is going to zero as the number of subsequences goes to infinity
If both, K and L go to infinity, this will be a consistent estimate of the power spectrum
In addition, for a given N=K*L, we can trade off between good spectral resolution (large L) and reduction in
variance (Large K
www.roeverengg.edu.in
www.roeverengg.edu.in
One application of autocorrelation is the measurement of optical spectra and the measurement of veryshort-duration light pulses produced by lasers, both using optical autocorrelators.
For measuring particle size distributions of very fine particles or micelles suspended in a fluid. A laser
shining into the mixture produces flicker, which correlates with the motion of the particles.
Autocorrelation of the signal gives a picture of the diffusion speeds of the particles. From this, knowing the
viscosity of the fluid, the sizes of the particles can be calculated.
In signal processing, autocorrelation can give information about repeating events like musical beats (for
example, to determine tempo) or pulsar frequencies, though it cannot tell the position in time of the beat.
It can also be used to estimate the pitch of a musical tone.
In music recording, autocorrelation is used as a pitch detection algorithm prior to vocal processing, as a
distortion effect or to eliminate undesired mistakes and inaccuracies.[6]
Autocorrelation in space rather than time, via the Patterson function, is used by X-ray diffractionists to
help recover the "Fourier phase information" on atom positions not available through diffraction alone.
In statistics, spatial autocorrelation between sample locations also helps one estimate mean value
uncertainties when sampling a heterogeneous population.
The SEQUEST algorithm for analyzing mass spectra makes use of autocorrelation in conjunction with crosscorrelation to score the similarity of an observed spectrum to an idealized spectrum representing a
peptide.
www.roeverengg.edu.in
www.roeverengg.edu.in
In Astrophysics, auto-correlation is used to study and characterize the spatial distribution of galaxies in the
Universe and in multi-wavelength observations of Low Mass X-ray Binaries.
In panel data, spatial autocorrelation refers to correlation of a variable with itself through space.
where rk is the autocorrelation estimate at lag k, M is the maximum lag considered and window length, and
wk is the windowing function. Several window shapes are available in the Toolkit: Bartlett (triangular),
Hamming (cosinusoidal), Hanning (slightly different cosinusoidal), and none.
You may find that the various windows of the same widths give similar results. The more important
choice is how wide the windows should be. The averaging associated with windowing a series reduces the
resolution of the methods, from the frequency intervals of 1/N, to a windowed frequency intervals of
about 1/M (e.g., Kay 1988, p. 81). Thus, wider windows yield higher spectral resolution, and vice versa.
However, there is a trade-off between higher resolution and increasing variance of the spectral estimate.
At the extreme, a single (M=N) direct application of FFT to an unwindowed time series results in a
periodogram with a theoretical standard deviation of the estimates equal to the estimates at each
www.roeverengg.edu.in
www.roeverengg.edu.in
frequency, regardless of the number of observations in the time series (Press et al. 1989, p. 423).
Averaging the results from many short data windows throughout the series (or autocorrelation) effectively
increases the number of independent samples used in estimation and thereby reduces the estimation
variance. Kay (1988, section 4.5) shows that the variance of a power spectrum obtained by a windowed
correlogram is 2M/3N of the estimated power at each frequency. Thus a narrower window should be used
to smooth the spectrum and reduce the sampling errors on the estimate. In practice, Kay (1988)
recommends that windows should be no more than one-fifth to one-tenth the total number of data
points (to obtain desired estimate-variance reductions) and not too much smaller (in order to retain the
ability to distinguish between powers at neighboring frequencies and to obtain the desired leakage
reductions).
Theoretical estimates of variance for Blackman-Tukey power spectra are available (e.g., Kay, 1988) and
the Toolkit provides error bars constructed from them. These can either be plotted about the estimates
themselves, or as a red-noise uncertainty interval. In the latter case, an AR(1) process is fitted to the data,
and the the error bars are centered on the theoretical AR(1) spectrum.
As a "traditional" method, the correlogram is intended to provide a familiar benchmark against which the
other more modern methods provided in the Toolkit can be judged.
Cross-Spectra
Blackman-Tukey correlogram provides a straightforward way to compute the cross-power spectrum PXY
of the two input signals x(t) and y(t):
where X(f) and Y(f) are the correlogram estimates of the individual time series x(t) and y(t).
Cross-power spectrum can be used to estimate coherence between the two signals. However it requires
averaging of spectral estimates of independent realizations of x(t) and y(t). Multi-taper method provides a
practical way to compute Coherence by averaging the individual spectra given by each tapered version of
the data.
Multi-channel SSA is an advanced, data-adaptive method to analyze oscillatory spatio-temporal modes in
multivariate time series. In addition to identifying oscillatory peaks in the cross-spectrum, MSSA allows
reconstruction of the multivariate oscillatory modes.
www.roeverengg.edu.in
www.roeverengg.edu.in
Autocorrelation
Autocorrelation is the cross-correlation of a signal with itself. Informally, it is the similarity between observations
as a function of the time separation between them. It is a mathematical tool for finding repeating patterns, such
as the presence of a periodic signal which has been buried under noise, or identifying the missing fundamental
frequency in a signal implied by its harmonic frequencies. It is often used in signal processing for analyzing
functions or series of values, such as time domain signals
Definitions
different fields of study define autocorrelation differently, and not all of these definitions are equivalent.
In some fields, the term is used interchangeably with autocovariance.
[edit] Statistics
In statistics, the autocorrelation of a random process describes the correlation between values of the
process at different points in time, as a function of the two times or of the time difference. Let X be some
repeatable process, and i be some point in time after the start of that process. (i may be an integer for a
discrete-time process or a real number for a continuous-time process.) Then Xi is the value (or realization)
produced by a given run of the process at time i. Suppose that the process is further known to have defined
values for mean i and variance i2 for all times i. Then the definition of the autocorrelation between any
two time s and t is
where "E" is the expected value operator. Note that this expression is not well-defined for all time series
or processes, because the variance may be zero (for a constant process) or infinite. If the function R is
www.roeverengg.edu.in
www.roeverengg.edu.in
well-defined, its value must lie in the range [1, 1], with 1 indicating perfect correlation and 1 indicating
perfect anti-correlation.
If Xt is a second-order stationary process then the mean and the variance 2 are time-independent, and
further the autocorrelation depends only on the difference between t and s: the correlation depends only on
the time-distance between the pair of values but not on their position in time. This further implies that the
autocorrelation can be expressed as a function of the time-lag, and that this would be an even function of
the lag = s t.
It is common practice in some disciplines, other than statistics and time series analysis, to drop the
normalization by 2 and use the term "autocorrelation" interchangeably with "autocovariance". However,
the normalization is important both because the interpretation of the autocorrelation as a correlation
provides a scale-free measure of the strength of statistical dependence, and because the normalization has
an effect on the statistical properties of the estimated autocorrelations.
The above definitions work for signals that are square integrable, or square summable, that is, of finite
energy. Signals that "last forever" are treated instead as random processes, in which case different
definitions are needed, based on expected values. For wide-sense-stationary random processes, the
autocorrelations are defined asFor processes that are not stationary, these will also be functions of t, or n.
For processes that are also ergodic, the expectation can be replaced by the limit of a time average. The
autocorrelation of an ergodic process is sometimes defined as or equated to[1]
These definitions have the advantage that they give sensible well-defined single-parameter results
for periodic functions, even when those functions are not the output of stationary ergodic processes.
Alternatively, signals that last forever can be treated by a short-time autocorrelation function analysis,
using finite time integrals. (See short-time Fourier transform for a related process.)
Multi-dimensional autocorrelation is defined similarly. For example, in three dimensions the
autocorrelation of a square-summable discrete signal would be
www.roeverengg.edu.in
www.roeverengg.edu.in
When mean values are subtracted from signals before computing an autocorrelation function, the resulting
function is usually called an auto-covariance function.
6.Explain the properties and estimation of auticorrelation function
The properties of one-dimensional autocorrelations only, since most properties are easily transferred from
the one-dimensional case to the multi-dimensional cases.
A fundamental property of the autocorrelation is symmetry, R(i) = R( i), which is easy to prove from the
definition. In the continuous case,
the autocorrelation is an even function
The continuous autocorrelation function reaches its peak at the origin, where it takes a real value, i.e. for
any delay ,
discrete case.
. This is a consequence of the CauchySchwarz inequality. The same result holds in the
The autocorrelation of a periodic function is, itself, periodic with the same period.
The autocorrelation of the sum of two completely uncorrelated functions (the cross-correlation is zero for
all ) is the sum of the autocorrelations of each function separately.
Since autocorrelation is a specific type of cross-correlation, it maintains all the properties of crosscorrelation.
The autocorrelation of a continuous-time white noise signal will have a strong peak (represented by a
Dirac delta function) at = 0 and will be absolutely 0 for all other .
The WienerKhinchin theorem relates the autocorrelation function to the power spectral density via the
Fourier transform:
For real-valued functions, the symmetric autocorrelation function has a real symmetric transform, so the
WienerKhinchin theorem can be re-expressed in terms of real cosines only:
www.roeverengg.edu.in
FR(f) = FFT(X(t))
R() = IFFT(S(f))
where IFFT denotes the inverse Fast Fourier transform. The asterisk denotes complex conjugate.
Alternatively, a multiple correlation can be performed by using brute force calculation for low values,
and then progressively binning the X(t) data with a logarithmic density to compute higher values, resulting
in the same
[edit] Estimation
for any positive integer k < n. When the true mean and variance are known, this estimate is unbiased.
If the true mean and variance of the process are not known there are a several possibilities:
If and 2 are replaced by the standard formulae for sample mean and sample variance, then this is a
biased estimate.
A periodogram-based estimate replaces n k in the above formula with n. This estimate is always biased;
however, it usually has a smaller mean square error.[3][4]
Other possibilities derive from treating the two portions of data
and
separately and calculating
separate sample means and/or sample variances for use in defining the estimate.
The advantage of estimates of the last type is that the set of estimated autocorrelations, as a function of k,
then form a function which is a valid autocorrelation in the sense that it is possible to define a theoretical
process having exactly that autocorrelation. Other estimates can suffer from the problem that, if they are
used to calculate the variance of a linear combination of the X's, the variance calculated may turn out to be
negative.
[edit] Regression analysis
In regression analysis using time series data, autocorrelation of the errors is a problem. Autocorrelation of
the errors, which themselves are unobserved, can generally be detected because it produces
autocorrelation in the observable residuals. (Errors are also known as "error terms", in econometrics.)
Autocorrelation violates the ordinary least squares (OLS) assumption that the error terms are uncorrelated.
While it does not bias the OLS coefficient estimates, the standard errors tend to be underestimated (and
the t-scores overestimated) when the autocorrelations of the errors at low lags are positive.
The traditional test for the presence of first-order autocorrelation is the DurbinWatson statistic or, if the
explanatory variables include a lagged dependent variable, Durbin's h statistic. A more flexible test,
covering autocorrelation of higher orders and applicable whether or not the regressors include lags of the
dependent variable, is the BreuschGodfrey test. This involves an auxiliary regression, wherein the
residuals obtained from estimating the model of interest are regressed on (a) the original regressors and (b)
www.roeverengg.edu.in
www.roeverengg.edu.in
k lags of the residuals, where k is the order of the test. The simplest version of the test statistic from this
auxiliary regression is TR2, where T is the sample size and R2 is the coefficient of determination. Under
the null hypothesis of no autocorrelation, this statistic is asymptotically distributed as 2 with k degrees of
freedom.
Responses to nonzero autocorrelation include generalized least squares and the NeweyWest HAC
estimator (Heteroskedasticity and Autocorrelation Consistent).[5]
If subsequences are doubled in length and hence the spectral resolution is then doubled
Welchs method can be written in terms of the data record as follows
Or in terms of modified Periodograms
www.roeverengg.edu.in
Since N/L is the number of subsequences K used in Bartletts method it follows
In other words, and not surprising, with 50% overlap (and Bartlett window), the variance of Welchs method is
about half that of Bartletts method
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
UNIT V
UNIT V MULTIRATE SIGNAL PROCESSING
9
Introduction to Multirate signal processing-Decimation-Interpolation-Polyphase implementation of
FIR filters for interpolator and decimator -Multistage implementation of sampling rate conversionDesign of narrow band filters - Applications of Multirate signal processing.
L: 45, T: 15, TOTAL= 60 PERIODS
.
4. Give the digital signal processing application with the TMS 320 family. (Nov 2006)
DSP processors should have circular buffers to support circular shift
operations.
The DSP processor should be able to perform multiply and accumulate
operations very fast.
DSP processors should have multiple pointers to support multiple
www.roeverengg.edu.in
www.roeverengg.edu.in
5. What is the advantage of Harvard architecture of TMS 320 series? (Nov 2006)
It
shares
same
memory
for
program
and
data
The
speed
of
execution
is
increased
by
pipelining
It
is
having
a
separate
interval
address
and
data
bus.
It is normally used for Harvard architecture
6.What are the desirable features of DSP Processors? (Nov 2006)
o DSP processors should have multiple registers so that data exchange from
register to register is fast.
o DSP operations require multiple operands simultaneously. Hence DSP
processor should have multiple operand fetch capacity.
o DSP processors should have circular buffers to support circular shift
operations.
o The DSP processor should be able to perform multiply and accumulate
operations very fast.
o DSP processors should have multiple pointers to support multiple
operands jumps and shifts. o
Multi processing ability.
7. What are the different types of DSP Architecture?
Von-NeumannArchitecture
HarvardArchitecture
Modified Harvard Architecture
8. Define MAC unit?
The dedicated hardware unit is called MAC. It is called multiplier- accumulator. It is one of the
computational unit in processor. The complete MAC operation is executed in one clock cycle. The DSP
processors have a special instruction called MACD. This means multiply accumulate with data shift.
9. Mention the Addressing modes in DSP processors.
Shortimmediateaddressing
ShortDirectAddressing
Memory-mappedAddressing
IndirectAddressing
6.5bitreversedaddressingmode
Circular addressing
10. State the features f TMS3205C5x series of DSP processors.
Powerful 16 bit CPU
TDM port
16X16 bit multiplies / Add operations can be performed in single
cycle.
224KX16 bit maximum addressable external memory space.
Full duplex synchronous serial port for coder / decoder interface.
On-chip scan based emulation logic.
www.roeverengg.edu.in
www.roeverengg.edu.in
Boundary scan
Low power dissipation
IEEE standard text access ports
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
Part-B
www.roeverengg.edu.in
www.roeverengg.edu.in
of the Digital
One of the biggest bottlenecks in executing DSP algorithms is transferring information to and
from memory. This includes data, such as samples from the input signal and the filter coefficients, as well
as program instructions, thebinary codes that go into the program sequencer. For example, suppose we
need to multiply two numbers that reside somewhere in memory. To do this,we must fetch three binary
values from memory, the numbers to be multiplied,plus the program instruction describing what to do.
Figure 28-4a shows how this seemingly simple task is done in a traditional microprocessor. This is often
called a Von Neumann architecture, after the brilliant American mathematician John Von Neumann
(1903-1957). VonNeumann guided the mathematics of many important discoveries of the early twentieth
century. His many achievements include: developing the concept of a stored program computer,
formalizing the mathematics of quantum mechanics,and work on the atomic bomb. If it was new and
exciting, Von Neumann was there!
A Von Neumann architecture contains a single memory and a single bus for transferring data into
and out of the central processing unit (CPU). Multiplying two numbers requires at least three clock cycles,
one to transfer each of the three numbers over the bus from the memory to the CPU. We don't count the
time to transfer the result back to memory, because we assume that it remains in the CPU for additional
manipulation (such as the sum of products in an FIR filter). The Von Neumann design is quite satisfactory
when you are content to execute all of the required tasks in serial. In fact, most computers today are of the
Von Neumann design. We only need other architectures when very fast processing is required, and we are
willing to pay the price of increased complexity. This leads us to the Harvard architecture, shown in (b).
This is named for the work done at Harvard University in the 1940s under the leadership of
Howard Aiken (1900-1973). As shown in this illustration, Aiken insisted on separate memories for data
and program instructions, with separate buses for each. Since the buses operate independently, program
instructions and data can be fetched at the same time, improving the speed over the single bus design.
Most present day DSPs use this dual bus architecture.
The next level of sophistication, the Super Harvard Architecture. This term was coined by Analog
Devices to describe the 510 The Scientist and Engineer's Guide to Digital Signal Processing internal
operation of their ADSP-2106x and new ADSP-211xx families of Digital Signal Processors. These are
called SHARC DSPs, a contraction of the longer term, Super Harvard ARChitecture. The idea is to build
upon the Harvard architecture by adding features to improve the throughput. While theSHARC DSPs are
optimized in dozens of ways, two areas are important: an instruction cache, and an I/O controller.
First, let's look at how the instruction cache improves the performance of the Harvard architecture.
A handicap of the basic Harvard design is that the data memory bus is busier than the program memory
bus. When two numbers are multiplied, two binary values (the numbers) must be passed over the data
memory bus, while only one binary value (the program instruction) is passed over the program memory
bus. To improve upon this situation, we start by relocating part of the "data" to program memory. For
instance, we might place the filter coefficients in program memory, while keeping the input signal in data
memory. (This relocated data is called "secondary data" in the illustration). At first glance, this doesn't
seem to help the situation; now we must transfer one value over the data memory bus (the input signal
sample), but two values over the program memory bus (the program instruction and the coefficient). In
www.roeverengg.edu.in
www.roeverengg.edu.in
fact, if we were executing random instructions, this situation would be no better at all.However, DSP
algorithms generally spend most of their execution time in loops, such as instructions 6-12 of Table 28-1.
This means that the same set of program instructions will continually pass from program memory to the
CPU.
The Super Harvard architecture takes advantage of this situation by including an instruction cache
in the CPU. This is a small memory that contains about 32 of the most recent program instructions. The
first time through a loop, the program instructions must be passed over the program
memory bus. This results in slower operation because of the conflict with the coefficients that must also
be fetched along this path. However, on additional executions of the loop, the program instructions can be
pulled from the instruction cache. This means that all of the memory to CPU information
transfers can be accomplished in a single cycle: the sample from the input signal comes over the data
memory bus, the coefficient comes over the program memory bus, and the program instruction comes
from the instruction cache. In the jargon of the field, this efficient transfer of data is called a high
memoryaccess bandwidth. s a more detailed view of the SHARC architecture, showing the I/O controller
connected to data memory. This is how thesignals enter and exit the system. For instance, the SHARC
DSPs provides both serial and parallel communications ports. These are extremely high
speed connections. For example, at a 40 MHz clock speed, there are two serial ports that operate at 40
Mbits/second each, while six parallel ports each provide a 40 Mbytes/second data transfer. When all six
parallel ports are used together, the data transfer rate is an incredible 240 Mbytes/second.
www.roeverengg.edu.in
development cycle. faster than floating point in general purpose computers. However, with DSPs the
speed is about the same, a result of the hardware being highly optimized for math operations. The internal
architecture of a floating point DSP is more complicated than for a fixed point device.
All the registers and data buses must be 32 bits wide instead of only 16; the multiplier and ALU
must be able to quickly perform floating point arithmetic, the instruction set must be larger (so that they
can handle both floating and fixed point numbers), and so on. Floating point (32 bit) has better precision
and a higher dynamic range than fixed point (16 bit) . In addition, floating point programs often have a
shorter development cycle, since the programmer doesn't generally need to worry about issues such as
overflow, underflow, and round-off error. On the other hand, fixed point DSPs have traditionally been
cheaper than floating point devices. Nothing changes more rapidly than the price of
electronics; anything you find in a book will be out-of-date before it is printed. Nevertheless, cost is a key
factor in understanding how DSPs are evolving, and we need to give you a general idea. When this book
was completed in 1999, fixed point DSPs sold for between $5 and $100, while floating point devices were
in the range of $10 to $300. This difference in cost can be viewed as a measure of the relative complexity
between the devices. If you want to find out what the prices are today, you need to look today.
Now let's turn our attention to performance; what can a 32-bit floating point system do that a
16-bit fixed point can't? The answer to this question is signal-to-noise ratio. Suppose we store a number
in a 32 bit floating point format. As previously mentioned, the gap between this number and its adjacent
neighbor is about one ten-millionth of the value of the number. To store the number, it must be round up
or down by a maximum of one-half the gap size. In other words, each time we store a number in floating
point notation, we add noise to the signal.The same thing happens when a number is stored as a 16-bit
fixed point value, except that the added noise is much worse. This is because the gaps between adjacent
numbers are much larger. For instance, suppose we store the number 10,000 as a signed integer (running
from -32,768 to 32,767). The gap between numbers is one ten-thousandth of the value of the number we
are storing. If we 516 The Scientist and Engineer's Guide to Digital Signal Processing want to store the
number 1000, the gap between numbers is only one onethousandth of the value. Noise in signals is usually
represented by its standard deviation. . For here, the important fact is that the standard deviation of this
quantization noise is about one-third of the gap size. This means that the signal-to-noise ratio for storing
a floating point number is about 30 million to one, while for a fixed point number it is only about tenthousand to one. In other words, floating point has roughly 3,000 times less quantization noise than fixed
point. This brings up an important way that DSPs are different from traditional microprocessors.
Suppose we implement an FIR filter in fixed point. To do this, we loop through each coefficient,
multiply it by the appropriate sample from the input signal, and add the product to an accumulator. Here's
the problem. In traditional microprocessors, this accumulator is just another 16 bit fixed point variable.
To avoid overflow, we need to scale the values being added, and will correspondingly add quantization
noise on each step. In the worst case, this quantization noise will simply add, greatly lowering the
signalto- noise ratio of the system. For instance, in a 500 coefficient FIR filter, the noise on each output
sample may be 500 times the noise on each input sample. The signal-to-noise ratio of ten-thousand to one
has dropped to a ghastly twenty to one. Although this is an extreme case, it illustrates the main point: when
many operations are carried out on each sample, it's bad, really bad. DSPs handle this problem by using
www.roeverengg.edu.in
www.roeverengg.edu.in
an extended precision accumulator. This is a special register that has 2-3 times as many bits as the other
memory locations. For example, in a 16 bit DSP it may have 32 to 40 bits, while in the SHARC DSPs it
contains 80 bits for fixed point use. This extended range virtually eliminates round-off noise while the
accumulation is in progress. The only round-off error suffered is when the accumulator is scaled and
stored in the 16 bit memory. This strategy works very well, although it does limit how some algorithms
must be carried out. In comparison, floating point has such low quantization noise that these techniques
are usually not necessary. In addition to having lower quantization noise, floating point systems are also
easier to develop algorithms for. Most DSP techniques are based on repeated multiplications and
additions.
In fixed point, the possibility of an overflow or underflow needs to be considered after each
operation. The programmer needs to continually understand the amplitude of the numbers, how the
quantization errors are accumulating, and what scaling needs to take place. In comparison,
these issues do not arise in floating point; the numbers take care of themselves (except in rare cases).
Fixed Point Floating Point Fixed versus floating point instructions. These are the multiplication
instructions used in the SHARC DSPs. While only a single command is needed for floating point, many
options are needed for fixed point. See the text for an explanation of these options. is, Fn = Fx * Fy, where
Fn, Fx, and Fy are any of the 16 data registers. It could not be any simpler. In comparison, look at all the
possible commands for fixed point multiplication. These are the many options needed to efficiently
handle the problems of round-off, scaling, and format. In Fig. 28-7, Rn, Rx, and Ry refer to any of the 16
data registers, and MRF and MRB are 80 bit accumulators. The vertical lines indicate options. For
instance, the top-left entry in this table means that all the following are valid commands: Rn = Rx * Ry,
MRF = Rx * Ry, and MRB = Rx * Ry. In other words, the value of any two registers can be multiplied
and placed into another register, or into one of the extended precision accumulators. This table also
shows that the numbers may be either signed or unsigned (S or U), and may be fractional or integer
(F or I). The RND and SAT options are ways of controlling rounding and register overflow.
There are other details and options in the table, but they are not important for our present discussion. The
important idea is that the fixed point programmer must understand dozens of ways to carry out the very
basic task of multiplication. In contrast, the floating point programmer can spend his time
concentrating on the algorithm. Given these tradeoffs between fixed and floating point, how do you
choose which to use? Here are some things to consider. First, look at how many bits are used in the ADC
and DAC. In many applications, 12-14 bits per sample is the crossover for using fixed versus floating
point. For instance, television and other video signals typically use 8 bit ADC and DAC, and the precision
of fixed point is acceptable. In comparison, professional audio applications can sample with as high as 20
or 24 bits, and almost certainly need floating point to capture the large dynamic range.The next thing to
look at is the complexity of the algorithm that will be run. If it is relatively simple, think fixed point; if it
is more complicated, think floating point. For example, FIR filtering and other operations in the time
domain only require a few dozen lines of code, making them suitable for fixed point.
In contrast, frequency domain algorithms, such as spectral analysis and FFT convolution, are
very detailed and can be much more difficult to program. While they can be written in fixed point, the
development time will be greatly reduced if floating point is used. Lastly, think about the money: how
important is the cost of the product, and how important is the cost of the development? When fixed point
is chosen, the cost of the product will be reduced, but the development cost will probably be higher due to
the more difficult algorithms. In the reverse manner, floating point will generally result in a quicker and
cheaper development cycle, but a more expensive final product. Figure 28-8 shows some of the major
www.roeverengg.edu.in
www.roeverengg.edu.in
trends in DSPs. Figure (a) illustrates the impact that Digital Signal Processors have had on the embedded
market. These are applications that use a microprocessor to directly operate and control some larger
system, such as a cellular telephone, microwave oven, or automotive instrument display panel. The name
"microcontroller" is often used in referring to these devices, to distinguish them from the microprocessors
used in personal computers. As shown in (a), about 38% of embedded designers have already started using
DSPs, and another 49% are considering the switch..
The high throughput and computational power of DSPs often makes them an ideal choice for
embedded designs. As illustrated in (b), about twice as many engineers currently use fixed point as use
floating point DSPs. However, this depends greatly on the application. Fixed point is more popular in
competitive consumer products where the cost of the electronics must be kept very low. A good example
of this is cellular telephones. When you are in competition to sell millions of your product, a cost
difference of only a few dollars can be the difference between success and failure. In comparison, floating
point is more common when greater performance is needed and cost is not important.
For Major trends in DSPs. As illustrated in (a), about 38% of embedded designers have
already switched from conventional microprocessors to DSPs, and another 49% are considering the
change. In (b), about twice as many engineers use fixed point as use floating point DSPs. This is mainly
driven by consumer products thatmust have low cost electronics, such as cellular telephones. However, as
shown in (c), floating point is thefastest growing segment; over one-half of engineers currently using 16
bit devices plan to migrate to floatingpoint DSPsinstance, suppose you are designing a medical imaging
system, such a computed tomography scanner. Only a few hundred of the model will ever be sold, at a
price of several hundred-thousand dollars each. For this application, the cost of the DSP is insignificant,
but the performance is critical. In spite of the larger number of fixed point DSPs being used, the floating
point market is the fastest growing segment. As shown in (c), over one-half of engineers using 16-bits
devices plan to migrate to floating point at some time in the near future. Before leaving this topic, we
should reemphasize that floating point and fixed point usually use 32 bits and 16 bits, respectively, but not
always. For instance, the SHARC family can represent numbers in 32-bit fixed point, a mode that is
common in digital audio applications. This makes the 232 quantization levels spaced uniformly over a
relatively small range, say, between -1 and 1. In comparison, floating point notation places the 232
quantization levels logarithmically over a huge range, typically 3.41038. This gives 32-bit fixed point
better precision, that is, the quantization error on any one sample will be lower. However, 32-bit floating
point has a higher dynamic range, meaning there is a greater difference between the largest number and
the smallest number that can be represented.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
The McBSPs in the C5403, C5404, C5406, C5407 and C5410 simulators are equivalent to the C5410
McBSPs in real hardware.
McBSPs in other devices are equivalent to their respective hardware.
3.1.1.3 DMA
The DMA in the C5401 and C5402 simulators are equivalent to the C5410 DMA in real hardware.
The DMA in the C5403, C5404, C5406, C5407 and C5410 simulators are equivalent to the C5410
DMA in real hardware.
In the C5416 simulator the DMA supports extended registers but does not support extended I/O and
data pages in DMA memory map.
DMAs in other devices are equivalent to respective hardware.
3.1.1.4 FIFO
(in C5420)
In the C5420 simulator, only one CPU subsystem is supported. One end of the FIFO is connected to
DMA and the other end is connected to host files Rfifo.dat and Wfifo.dat in the current working
directory. Any attempt to write from one DMA to another DMA through FIFO will write in to Wfifo.dat.
Conversely, any read from another DMA through FIFO will read from "Rfifo.dat". If the user wants to
read through FIFO, he should create the file Rfifo.dat just before setting up the DMA. The names of
these two files cannot be changed.
24 Configuration Specifics SPRU598BJuly 2002Revised October 2003
www.ti.com
www.roeverengg.edu.in
A small part of the default configuration file used for C549 configuration is shown below:
MODULE C54X;
CHIP C549; //Processor Number
MODULE C549;
// Template for defining blocks of memory
// MEMORY BLOCK_NAME;
// START < STARTING ADDRESS >;
// LENGTH < LENGTH OF BLOCK >;
// PAGE < IO = 2, DATA = 1, PROG = 0>;
// TYPE < DARAM/SARAM/ROM/WOM/RAM/EXRAM >;
// END BLOCK_NAME;
MEMORY MEM0;
START 0x0000;
LENGTH 0x0800;
PAGE 1;
TYPE DARAM;
END MEM0;
...
...
END C549;
END C54X;
3.2.1 Creating a Memory Map
3.3 Performance Numbers
Performance Numbers
The default configuration files have memory maps for all internal memories and some of the external
memories. Changes to internal memories can cause undefined behavior of the simulator. The user can
only configure the external memory of a particular configuration. For example, the current default config
file for the C549 configuration has the external memory maps up to extended program page three. The
user can add another external program page as follows:
MEMORY MEM27;
START 0x40000;
LENGTH 0x8000;
PAGE 0;
TYPE EXRAM;
END MEM27;
MEMORY MEM28;
START 0x48000;
LENGTH 0x8000;
PAGE 0;
TYPE EXRAM;
END MEM28;
Table 3-1 shows the performance numbers of the simulator for different device configurations. These
numbers were gathered on a 1.7GHz IntelPentium 4 PC with 256MB of RAM. The application used
for measurement in all three cases is the Reed-Solomon encoding and decoding application from a
standard benchmarking suite.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
Table 2-1. Pins Supported by the Pin Connect Feature of the C54x Simulator
CONFIG PINS SUPPORTED
INTERRUPTS BIO SERIAL PORT RELATED PINS HPI
(PULSE TYPE) (1) (PULSE W/ CLOCK RATIO SPECIFIED)(2) PIN
C541 INT INT INT INT BIO FSR0 FSX0 FSR1 FSX1 0123
C542 BFSR BFSX TFSR TFSX HPI
C543 BFSR BFSX TFSR TFSX C545 BFSR BFSX FSR FSX HPI
www.roeverengg.edu.in
www.roeverengg.edu.in
C546 BFSR BFSX FSR FSX C548 BFSR0 BFSX0 - TFSR TFSX - BFSR1 BFSX1 - HPI
C549 BFSR0 BFSX0 - TFSR TFSX - BFSR1 BFSX1 - C5401 McBFSR0 McBFSX0 - McBFSR1 McBFSX1 - McBFSR2 McBFSX2 - HPI
C5402 McBFSR0 McBFSX0 - McBFSR1 McBFSX1 - McBFSR2 McBFSX2 - HPI
C5403 McBFSR0 McBFSX0 CLKS0 McBFSR1 McBFSX1 CLKS1 McBFSR2 McBFSX2 CLKS2 HPI
C5404 McBFSR0 McBFSX0 CLKS0 McBFSR1 McBFSX1 CLKS1 McBFSR2 McBFSX2 CLKS2 HPI
C5406 McBFSR0 McBFSX0 CLKS0 McBFSR1 McBFSX1 CLKS1 McBFSR2 McBFSX2 CLKS2 HPI
C5407 McBFSR0 McBFSX0 CLKS0 McBFSR1 McBFSX1 CLKS1 McBFSR2 McBFSX2 CLKS2 HPI
C5409 McBFSR0 McBFSX0 CLKS0 McBFSR1 McBFSX1 CLKS1 McBFSR2 McBFSX2 CLKS2 HPI
C5410 McBFSR0 McBFSX0 CLKS0 McBFSR1 McBFSX1 CLKS1 McBFSR2 McBFSX2 CLKS2 HPI
C5416 McBFSR0 McBFSX0 - McBFSR1 McBFSX1 - McBFSR2 McBFSX2 - HPI
C5420 McBFSR0 McBFSX0 CLKS0 McBFSR1 McBFSX1 CLKS1 McBFSR2 McBFSX2 CLKS2 HPI
(1) BIO (waveform type)
(2) In the case of serial ports, the CLKX pin functionality is combined with the functionality of the
corresponding FSX pin, and only
one logical pin (FSX) is provided. The same is true of the CLKR pin. In the pin-connect file of these FSX
and FSR pins,
information regarding CLKX (or CLKR), such as the clock ratio with respect to CLOCKOUT, is provided
in addition to the
information regarding external frame synchronization events.
The Pin Connect file can have one or more statements of the following formats for the different types of
pins supported:
Pulse type
Waveform type
Pulse with clock ratio specified type
HPI type
2.1.1.1 Pulse Type
clock-cycle [ rpt { n | EOS } ]
The clock-cycle parameter represents the CPU clock cycle in which the interrupt should occur. The clock
value can be specified in decimal or hexadecimal format (using the 0x or 0X prefix format or the h or H
suffix format).
There can be two types of CPU clock cycles:
Absolute. The clock-cycle value must represent the actual CPU clock cycle in which the interrupt
should occur.
For example:
12 34 56
Interrupts are simulated at the 12th, 34th, and 56th CPU clock Cycles.
Relative. The clock-cycle value is relative to the time at which the last event occurred.
For example:
12 +34 55
Three interrupts are simulated: at the 12th, 46th (12 + 34), and 55th CPU clock cycles. A plus sign (+)
before a clock cycle adds that value to the total clock cycles preceding it. Both relative and absolute
values can be mixed in input file as shown.
SPRU598BJuly 2002Revised October 2003 Supported Simulation Features 13
www.roeverengg.edu.in
www.roeverengg.edu.in
www.ti.com
External Event & Data Simulation
The rpt { n | EOS } parameter is optional and represents a repetition value.
Two forms of repetition in simulating interrupts can be used:
Repeat a fixed number of times. Repeat a particular pattern a fixed number (n) of times.
For example:
5 (+10 +20) rpt 2
The values inside the parentheses represent the portion that is repeated. Therefore, an interrupt is
simulated at the 5th, 15th (5 + 10), 35th (15 + 20), 45th (35 + 10), and 65th (45 + 20) CPU clock
cycles. The parameter n is a positive integer value.
Repeat to the end of simulation. To repeat the same pattern throughout the simulation, the string
EOS should be added to the line.
10 (+5 +20) rpt EOS
Interrupts are simulated at the 10th, 15th (10+5), 35th (15 + 20), 40th (35 + 5), 60th (40 + 20), 65th (60
+ 5), and 85th (65 + 20) CPU cycles, continuing in that pattern until the end of simulation.
2.1.1.2 Waveform Type
[clock-cycle, logic-value] [ rpt { n | EOS } ]
The square brackets ([ ]) are required to encapsulate clock-cycle and its corresponding logic-value.
The logic-value is valid only for the BIO pin and this is the only difference between pulse type and
waveform type. The signal can be forced to go high or low at specified clock cycles. A value of 1 forces
the signal to go high, and a value of 0 forces the signal to go low. For example:
[12,1] [23,0] [45,1]
2.1.1.3 Pulse with Clock Ratio Specified Type
DIVIDE r
clock-cycle [ rpt { n | EOS } ]
The difference in this format and the pulse type format (see Section 2.1.1.1) is the addition of the DIVIDE
command to specify the divide-down ratio for the device clock. The parameter r is a real number or
integer
specifying the ratio of the CPU clock rate to the serial port clock rate. The divide ratio is used when the
serial port is configured to use the external clock.
When the DIVIDE command is used, it must be the first command in the file. The following example
specifies the clock ratio of the transmit clock and the clock cycles for the occurrence of TFSX pulses (if
this file is connected to the TFSX pin):
DIVIDE 5
100 +200 +100
The DIVIDE command specifies the divide-down ratio of the clock against the CPU clock. That is, the
CLKX frequency is 1/5 of the CPU clock. The second line indicates that the TFSX should go high at the
100th, 300th (100 + 200) and 400th (300 + 100) CPU cycles. The TFSX pin goes high in the 500th,
1500th, and 2000th cycles of the serial port clock.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
TYPE EXRAM;
END MEM28;
Table 3-1 shows the performance numbers of the simulator for different device configurations. These
numbers were gathered on a 1.7GHz IntelPentium 4 PC with 256MB of RAM. The application used
for measurement in all three cases is the Reed-Solomon encoding and decoding application from a
standard benchmarking suite.
6.10 Universal Asynchronous Receiver/Transmitter (UART)
C6424 has 2 UART peripherals. Each UART has the following features:
16-byte storage space for both the transmitter and receiver FIFOs
1, 4, 8, or 14 byte selectable receiver FIFO trigger level for autoflow control and DMA
DMA signaling capability for both received and transmitted data
Programmable auto-rts and auto-cts for autoflow control
Frequency pre-scale values from 1 to 65,535 to generate appropriate baud rates
Prioritized interrupts
Programmable serial data formats
5, 6, 7, or 8-bit characters
Even, odd, or no parity bit generation and detection
1, 1.5, or 2 stop bit generation
False start bit detection
Line break generation and detection
Internal diagnostic capabilities
Loopback controls for communications link fault isolation
Break, parity, overrun, and framing error simulation
Modem control functions (CTS, RTS) on UART0 only.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
enabled/disabled and can be individually masked through the interrupt mask register (IMR). Pending
interrupts are indicated in the interrupt flag register (IFR). For detailed information on the structure of the
interrupt vector table, the IMR and the IFR, see the device-specific data sheets. Architecture
TMS320C54x DSP Functional Overview 11
1.2.8 Status Registers (ST0, ST1)
The status registers, ST0 and ST1, contain the status of the various conditions and modes for the 54x
devices. ST0 contains the flags (OV, C, and TC) produced by arithmetic operations and bit manipulations
in addition to the data page pointer (DP) and the auxiliary register pointer (ARP) fields. ST1 contains
the various modes and instructions that the processor operates on and executes.
1.2.9 Auxiliary Registers (AR0AR7)
The eight 16-bit auxiliary registers (AR0AR7) can be accessed by the central airthmetic logic unit
(CALU) and modified by the auxiliary register arithmetic units (ARAUs). The primary function of the
auxiliary registers is generating 16-bit addresses for data space. However, these registers also can act as
general-purpose registers or counters.
1.2.10 Temporary Register (TREG)
The TREG is used to hold one of the multiplicands for multiply and multiply/accumulate instructions. It
can hold a dynamic (execution-time programmable) shift count for instructions with a shift operation such
as ADD, LD, and SUB. It also can hold a dynamic bit address for the BITT instruction. The EXP
instruction stores the exponent value computed into the TREG, while the NORM instruction uses the
TREG value to normalize the number. For ACS operation of Viterbi decoding, TREG holds branch
metrics used by the DADST and DSADT instructions.
1.2.11 Transition Register (TRN)
The TRN is a 16-bit register that is used to hold the transition decision for the path to new metrics to
perform the Viterbi algorithm. The CMPS (compare, select, max, and store) instruction updates the
contents of the TRN based on the comparison between the accumulator high word and the accumulator
low word.
1.2.12 Stack-Pointer Register (SP)
The SP is a 16-bit register that contains the address at the top of the system stack. The SP always points to
the last element pushed onto the stack. The stack is manipulated by interrupts, traps, calls, returns, and the
PUSHD, PSHM, POPD, and POPM instructions. Pushes and pops of the stack predecrement and
postincrement, respectively, all 16 bits of the SP.
1.2.13 Circular-Buffer-Size Register (BK)
The 16-bit BK is used by the ARAUs in circular addressing to specify the data block size.
Architecture
12 TMS320C54x DSP Functional Overview
www.roeverengg.edu.in
repeat mode. The 16-bit block-repeat end address (REA) contains the ending address if the block of
program memory is to be repeated when operating in the repeat mode.
1.2.15 Interrupt Registers (IMR, IFR)
The interrupt-mask register (IMR) is used to mask off specific interrupts individually at required times.
The interrupt-flag register (IFR) indicates the current status of the interrupts.
1.2.16 Processor-Mode Status Register (PMST)
The processor-mode status register (PMST) controls memory configurations of the 54x devices.
1.2.17 Power-Down Modes
There are three power-down modes, activated by the IDLE1, IDLE2, and IDLE3 instructions. In these
modes, the 54x devices enter a dormant state and dissipate considerably less power than in normal
operation. The IDLE1 instruction is used to shut down the CPU. The IDLE2 instruction is used to shut
down the CPU and on-chip peripherals. The IDLE3 instruction is used to shut down the 54x processor
completely. This instruction stops the PLL circuitry as well as the CPU and peripherals. Bus Structure
TMS32
1.4 Memory
The minimum memory address range for the 54x devices is 192K words composed of 64K words in
program space, 64K words in data space, and 64K words in I/O space. Selected devices also provide
extended program memory space of up to 8M words. The program memory space contains the
instructions to be executed as well as tables used in execution. The data memory space stores data used by
the instructions. The I/O memory space interfaces to external memory-mapped peripherals and can also
serve as extra data storage space. The 54x DSPs provide both on-chip RAM and ROM to improve system
performance and integration.
1.4.1 On-Chip ROM
The 54x devices include on-chip maskable ROM that can be mapped into program memory or data
memory depending on the device. On-chip ROM is mapped into program space by the
microprocessor/microcontroller (MP/MC) mode control pin. On-chip ROM that can be mapped into data
space is controlled by the DROM bit in the processor mode status register (PMST). This allows an
instruction to use data stored in the ROM as an operand. Customers can arrange to have the ROM of the
54x programmed with contents unique to any particular application.
1.4.2 Bootloader
A bootloader is available in the standard 54x on-chip ROM. This bootloader can be used to transfer user
code from an external source to anywhere in the program memory at power up automatically. If the
MP/MC pin of the device is sampled low during a hardware reset, execution begins at location FF80h
of the on-chip ROM. This location contains a branch instruction to the start of the bootloader program.
The standard 54x devices provide different ways to download the code to accommodate various system
requirements:
_ Parallel from 8-bit or 16-bit-wide EPROM
_ Parallel from I/O space in 8-bit or 16-bit mode
_ Serial port boot in 8-bit or 16-bit mode through the standard serial port, The TDM serial port, the
buffered serial port (BSP), or the multichannel buffered serial port (McBSP)
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
ROM/RAM security option also internally forces the device into microcomputer mode (MP/MC bit forced
to zero), preventing the ROM from being disabled.
www.roeverengg.edu.in
www.roeverengg.edu.in
the bank-switching is defined by the bank-switching control register (BSCR). For specific information on
the bank-switching capabilities of a specific device, see the device-specific data sheet.
1.5.3 Parallel I/O Ports
Each 54x device has a total of 64K I/O ports. These ports can be addressed by the PORTR instruction or
the PORTW instruction. The IS signal indicates a read/write operation through an I/O port. The devices
can interface easily with external devices through the I/O ports while requiring minimal off-chip
address-decoding circuits. On-Chip Peripherals
www.roeverengg.edu.in
The DMA provides flexible address-indexing modes for easy implementation of data management
schemes such as autobuffers and circular buffers. Source and destination addresses can be indexed
separately and can be postincremented, postdecremented, or postincremented with a specified index offset.
1.5.4.4 DMA in Autoinitialization Mode
The DMA can automatically reinitialize itself after completion of a block transfer. Some of the DMA
registers can be preloaded for the next block transfer through DMA global reload registers (DMGSA,
DMGDA, and DMGCR). Autoinitialization allows:
_ Continuous operation. Normally, the CPU would have to reinitialize the DMA immediately after the
completion of the current block transfer; with the global reload registers, it can reinitialize these values for
the next block transfer any time after the current block transfer begins.
_ Repetitive operation. The CPU does not preload the global reload register with new values for each
block transfer but only loads them on the first block transfer.
The DMA global reload register sets are sharred by all channels. However, select DMAs have been
enhanced to expand the DMA global reload register set to provide each DMA channel its own DMA
global reload register set. For example, the DMA global reload register set for channel 0 includes
DMGSA0, DMGDA0, DMGCR0, and DMGFR0 while DMA channed 1 registers include
DMGSA1, DMGDA1, DMGCR1, and DMGFR1
1.5.4.5 DMA Transfer Counting
The DMA channel element count register (DMCTRx) and the frame count register (DMFRCx) contain bit
fields that represent the number of frames and number of elements per frame to be transferred.
_ Frame count. This 8-bit value defines the total number of frames in the block transfer. The maximum
number of frames per block transfer is 128 (FRAME COUNT= 0ffh). The counter is decremented upon
the last read transfer in a frame transfer. Once the last frame is transferred, the selected
8-bit counter is reloaded with the DMA global frame reload register (DMGFR) if the AUTOINIT is set to
1. A frame count of 0 (default value) means the block transfer contains a single frame. Element count.
This 16-bit value defines the number of elements per frame. This counter is decremented after the read
transfer of each On-Chip Peripherals TMS320C54x DSP Functional Overview 25 element. The maximum
number of elements per frame is 65536 (DMCTRn = 0ffffh). In autoinitialization mode, once the last
frame is transferred, the counter is reloaded with the DMA global count reload register (DMGCR)
1.5.4.6 DMA Transfer in Double-Word Mode
Double-word mode allows the DMA to transfer 32-bit words in any index mode. In double-word mode,
two consecutive 16-bit transfers are initiated and the source and destination addresses are automatically
updated following each transfer. In this mode, each 32-bit word is considered to be one element.
1.5.4.7 DMA Channel Index Registers
The particular DMA channel index register is selected by way of the SIND and DIND field in the DMA
mode control register (DMMCRx). Unlike basic address adjustment, in conjunction with the frame index
DMFRI0 and DMFRI1, the DMA allows different adjustment amount depending on whether or not the
element transfer is the last in the current frame. The normal adjustment value (element index) is contained
in the element index registers, DMIDX0 and DMIDX1. The adjustment value (frame index) for the end of
the frame, is determined by the selected DMA frame index register, either DMFRI0 or
DMFRI1. The element index and the frame index affect address adjustment as follows:
_ Element index. For all except the last transfer in the frame, element index determines the amount to be
added to the DMA channel for the source/destination address register (DMSRCx/DMDSTx) as selected by
the SIND/DIND bits.
_ Frame index. If the transfer is the last in a frame, frame index is used for address adjustment as selected
by the SIND/DIND bits. This occurs in both single-frame and multiframe transfer.
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
www.roeverengg.edu.in
request access to the same memory block, the host has access priority. The HRDY pin provides
handshaking to the host during memory access. On the 5410, the HPI8 also provides the capability to
access memory during reset and power-down states. During reset, data or application code can be
loaded via the HPI8 and the application can be initiated through the HPI option of the bootloader. During
IDLE2/3 states, the HPI and the other six DMA channels continue to operate and all pending DMA events
will complete before the DSP stops the clocks. The HPI has higher priority than the other six DMA
channels. The HPI will continue to have access to memory in IDLE2/3 even after the DSP has stopped the
internal clocks as long as X2/CLKIN is maintained. The HPI8 also remains active during emulation stop.
1.5.5.3 16-Bit HPI (HPI16)
The HPI16 is an enhanced 16-bit version of the C54x 8-bit HPI. The HPI16 is designed to allow a 16-bit
host to access the DSP on-chip memory, with the host acting as the master of the interface. It should be
noted that neither the CPU nor the DMA I/O spaces can be accessed using the HPI16.
On-Chip Peripherals TMS320C54x DSP Functional Overview 29 Some features of the HPI16 include:
_ 16-bit bidirectional data bus
_ Multiple data strobes and control signals to allow glueless interfacing to a variety of hosts
_ Multiplexed and nonmultiplexed address/data modes
_ 18-bit address bus used in nonmultiplexed mode to allow access to all internal memory
(including internal extended address pages)
_ 18-bit address register used in multiplexed mode. Includes address autoincrement feature for faster
accesses to sequential addresses.
_ Interface to on-chip DMA module to allow access to entire internal memory space
_ HRDY signal to hold off host accesses due to DMA latency
_ Control register available in multiplexed mode only. Accessible by either host or DSP to provide
host/DSP interrupts, extended addressing, and data prefetch capability.
_ Maximum data rate: 28 MB/s at 100-MHz DSP clock rate (assuming
multiplexed address/data with no DMA latency).
The HPI16 acts as a slave to a 16-bit host processor and allows access to the on-chip memory of the DSP.
There are two modes of operation as determined by the HMODE signal: multiplexed mode and
nonmultiplexed mode. In multiplexed mode, the HPI16 address and data buses are multiplexed onto a
single bus. This provides a simple and glueless connection to multiplexed-bus processors. In
nonmultiplexed mode, the HPI16 address and data buses are separate dedicated buses. In this mode, there
is no access to the HPI16 control register (HPIC).
1.5.5.4 Combination Enhanced 8-Bit HPI (HPI8) and 16-Bit HPI (HPI16)
Some 54x devices include both the HPI8 and the HPI16 (see Table 18). On these devices, only one HPI
version can be used at a time and the selection is made by the HPI16 input pin. When the HPI16 pin is
driven low, the HPI8 module is enabled; when the pin is driven high, the HPI16 module is enabled.
These devices do not include an HMODE signal, so when the HPI16 module is enabled, only the
nonmultiplexed mode of operation is supported.
10. Give an detail explanation about the serial port in C54x processor
1.5.6 Serial Ports
The 54x devices provide high-speed, full-duplex serial ports that allow direct interface to other 54x
devices, codecs, and other devices in a system. There is a standard serial port, a time-division-multiplexed
(TDM) serial port, a buffered serial port (BSP), and a multichannel buffered serial port (McBSP).
Table 11 shows the availability of each of the serial port types in the 54x family.
1.5.6.1 Standard Serial Port
www.roeverengg.edu.in
www.roeverengg.edu.in
The general-purpose serial port utilizes two memory-mapped registers for data transfer: the data-transmit
register (DXR) and the data-receive register (DRR). Both of these registers can be accessed in the same
manner as any other memory location. The transmit and receive sections of the serial port
each have associated clocks, frame-synchronization pulses, and serial-shift registers; and serial data can be
transferred either in bytes or in 16-bit words. Serial port receive and transmit operations can generate their
own maskable transmit and receive interrupts (XINT and RINT), allowing serial-port transfers to be
managed through software. The 54x serial ports are double-buffered and fully static.
1.5.6.2 TDM Serial Port
The TDM port allows the device to communicate through time-division multiplexing with up to seven
other 54x devices with TDM ports. Time-division multiplexing is the division of time intervals into a
number of subintervals with each subinterval representing a prespecified communications channel. The
TDM port serially transmits 16-bit words on a single data line (TDAT) and destination addresses on a
single address line (TADD). Each device can transmit data on a single channel and receive data from one
or more of the eight channels, providing a simple and efficient interface for multiprocessing applications.
A frame synchronization pulse occurs once every 128 clock cycles, corresponding to the transmission of
one 16-bit word on each of the eight channels. Like the general-purpose serial port, the TDM port is
double-buffered on both input and output data.
1.5.6.3 Buffered Serial Port (BSP)
The buffered serial port (BSP) consists of a full-duplex, double-buffered serial-port interface and an
autobuffering unit (ABU). The serial port block of the BSP is an enhanced version of the standard serial
port. The ABU allows the serial port to read/write directly to the 54x internal memory using a dedicated
bus independent of the CPU. This results in minimal overhead for serial port transactions and faster data
rates. When autobuffering capability is disabled (standard mode), serial port transfers are performed under
software control through interrupts. In this mode, the ABU is transparent and the word-based interrupts
(WXINT and WRINT) provided by the serial port are sent to the CPU as transmit interrupt (XINT) and
receive interrupt (RINT). When autobuffering is enabled, word transfers are done directly between the
serial port and the 54x internal memory using ABU-embedded address generators.
On-Chip Peripherals TMS320C54x DSP Functional Overview 31
The ABU has its own set of circular-addressing registers with corresponding address-generation units.
Memory for the buffers resides in 2K words of the 54x internal memory. The length and starting
addresses of the buffers are user-programmable. A buffer-empty/buffer-full interrupt can be posted to the
CPU. Buffering is easily halted by an autodisabling capability. Autobuffering capability can be enabled
separately for transmit and receive sections. When autobuffering is disabled, operation is similar to that of
the general-purpose
serial port.
The BSP allows transfer of 8-, 10-, 12-, or 16-bit data packets. In burst mode, data packets are directed by
a frame synchronization pulse for every packet. In continuous mode, the frame synchronization pulse
occurs when the data transmission is initiated and no further pulses occur. The frame and clock
strobes are frequency- and polarity-programmable. The BSP is fully static and operates at arbitrarily low
clock frequencies. The BSP maximum operating frequency for 54x devices up to 50 MIPS is CLKOUT.
For higher-speed 54x devices, the BSP maximum operating frequency is 50 Mbps at 20 ns.
Buffer Misalignment (BMINT) Interrupt (549 only)
The BMINT interrupt is generated when a frame sync occurs and the ABU transmit or receive buffer
pointer is not at the top of the buffer address. This is useful for detecting several potential error conditions
on the serial interface, including extraneous and missed clocks, and frame sync pulses. A BMINT
interrupt, therefore, indicates that one or more words may have been lost on the serial interface.
www.roeverengg.edu.in
www.roeverengg.edu.in
BMINT is useful for detecting buffer misalignment only when the buffer pointer(s) are initially loaded
with the top-of-buffer address, and a frame of data contains the same number of words as the buffer
length. These are the only conditions under which a frame sync occurring at a buffer address, other
than the top of buffer, constitute an error condition. In cases where these conditions are met, a frame sync
always occurs when the buffer pointer is at the top of buffer address, if the interface is functioning
properly. If BMINT is enabled under conditions other than those stated above, interrupts may be generated
under circumstances other than actual buffer misalignment. In these cases, BMINT should generally be
masked in the IMR register so that the processor will ignore this interrupt. BMINT is available when
operating autobuffering mode with continuous transfers, the FIG bit cleared to 0, and external serial clocks
or frames. The BSP0 and BSP1 BMINT bits in the IMR and IFR registers are bits 12 and 13, respectively
(bit 15 is the MSB). The interrupt vector locations of IMR and IFR are 070h and 074h, respectively.
1.5.6.4 Multichannel Buffered Serial Port (McBSP)
The 54x devices provide high-speed, full-duplex, multichannel buffered serial ports that allow direct
interface to other 54x devices, codecs, and other devices in a system. The multichannel buffered serial
ports (McBSPs) are On-Chip Peripherals 32 TMS320C54x DSP Functional Overview based on the
standard serial port interface found on other 54x devices. Like its predecessors, the McBSP provides:
_ Full-duplex communication
_ Double-buffer data registers which allow a continuous data stream
_ Independent framing and clocking for receive and transmit
In addition, the McBSP has the following capabilities:
_ Direct interface to:
_ T1/E1 framers
_ MVIP switching-compatible and ST-BUS compliant devices
_ IOM-2 compliant devices
_ AC97-compliant devices
_ IIS-compliant devices
_ Serial peripheral interface
_ Multichannel transmit and receive of up to 128 channels
_ A wide selection of data sizes including 8, 12, 16, 20, 24, or 32 bits
_ -law and A-law companding
_ Programmable polarity for both frame synchronization and data clocks
_ Programmable internal clock and frame generation
The McBSPs consist of separate transmit and receive channels that operatecompletely independently. The
external interface of each McBSP consists of the following pins:
www.roeverengg.edu.in
The CPU or DMA can initiate transmission of data by writing to the data transmit register (DXR). Data
written to DXR is shifted out on the BDX pin through a transmit shift register (XSR). This structure
allows DXR to be loaded with the next word to be sent while the transmission of the current word is in
progress. On the receiver, receive frame synchronization and clocking are indicated by the BFSR and
BCLKR pins, respectively. The CPU or DMA can read received data from the data receive register
(DRR). Data received on the BDR pin is shifted into a receive shift register (RSR) and then buffered in the
receive buffer register (RBR). If DRR is empty, the RBR contents are copied into DRR.
On-Chip Peripherals TMS320C54x DSP Functional Overview 33 If not, RBR holds the data until DRR is
available. This structure allows storage of the two previous words while the reception of the current word
is in progress.To maintain pin compatibility with previous devices, not all 54x devices with
McBSPs implement the BCLKS pin. For this reason, select 54x devices allow either the receive clock pin
(BCLKR) or the transmit clock pin (BCLKX) to be configured as the input clock to the sample rate
generator. This enhancement is enabled through two register bits: pin control register (PCR) bit 7
enhanced sample clock mode (SCLKME), and sample rate generator register 2 (SRGR2) bit 13 McBSP
sample rate generator clock mode (CLKSM). SCLKME is an addition to the PCR contained in the
McBSPs on previous C5000 devices. The selection of the sample rate generator (SRG) clock input
source is made by the combination of the CLKSM and SCLKME bit values. When either of the
bidirectional pins, BCLKR or BCLKX, is configured as the clock input, its output buffer is automatically
disabled. For example, with SCLKME = 1 and CLKSM = 0, the BCLKR pin is configured as the SRG
input. In this case, both the transmitter and receiver circuits can be synchronized to the SRG output by
setting the PCR bits (9:8) for CLKXM = 1 and CLKRM = 1. However, the SRG output is only driven onto
the BCLKX pin because the BCLKR output is automatically disabled. The CPU and DMA can move data
to and from the McBSPs and can synchronize transfers based on McBSP interrupts, event signals, and
status flags. The DMA is capable of handling data movement between the McBSPs and memory with no
intervention from the CPU. In addition to the standard serial port functions, the McBSP provides
programmable clock and frame sync generation. Among the programmable functions are:
_ Frame sync pulse width
_ Frame period
_ Frame sync delay
_ Clock reference (internal vs. external)
_ Clock division
_ Clock and frame sync polarity
The on-chip companding hardware allows compression and expansion of data in either -law or A-law
format. When companding is used, transmit data is encoded according to the specified companding law
and received data is decoded to 2s complement format. The McBSP allows multiple channels to be
independently selected for the transmitter and receiver. When the multiple channels are selected, each
frame represents a time-division multiplexed (TDM) data stream. In using TDM data
On-Chip Peripherals 34 TMS320C54x DSP Functional Overview streams, the DSP CPU can be
programmed to process as many data streams as necessary for the specific application. Thus, to save
memory and bus bandwidth, multichannel selection allows independent enabling of particular
channels for transmission and reception. Up to a maximum of 32 channels in a 128-channel bit stream can
be enabled or disabled. Select devices have been enhanced to allow the enabling or disabling of up to 128
channels in a 128-channel bit stream
www.roeverengg.edu.in
www.roeverengg.edu.in
Four different types of serial port interfaces are available on C54xdevices. The basic standard serial
port interface is implemented on C541, C545, and C546 devices. The TDM serial port interface is
implemented on the C542, C543, C548, and C549 devices. The C542, C543, C545, C546, C548, and
C549 devices include a buffered serial port (BSP) that implements an automatic buffering feature, which
greatly reduces CPU overhead required in handling serial data transfers. The C5402, C5410, and C5420
devices include multichannel buffered serial ports (McBSPs). See Table 91 for information
about the features included in various C54x devices. The BSP operates in either autobuffering or
nonbuffered mode. When operated in nonbuffered (or standard) mode, the BSP functions the same as the
basic standard serial port (except where specifically indicated) and is described in this section. The TDM
serial port operates in either TDM or non- TDM mode. When operated in non-TDM (or standard) mode,
the TDM serial port also functions the same as the basic standard serial port and is described
in this section. The BSP also implements several enhanced features in standard mode. These features,
together with operation of the BSP in autobuffering mode, are described in section 9.3, Buffered Serial
Port (BSP) Interface, on page 9-33. Therefore, when using the C542, C543, C545, C546, C548, and C549
devices, you should consult section 9.3. Operation of the TDM serial port in TDM mode is described in
section 9.4, Time-Division Multiplexed (TDM) Serial Port Interface, on page 9-56. Note that the BSP and
TDM serial ports initialize to a standard serial port compatible mode upon reset. In all C54x DSP serial
ports, both receive and transmit operations are doublebuffered, thus allowing a continuous
communications stream with either 8-bit or 16-bit data packets. The continuous mode provides operation
that, once initiated, requires no further frame synchronization pulses (FSR and FSX) when transmitting at
maximum packet frequency. The serial ports are fully static and thus will function at arbitrarily low
clocking frequencies. The maximum operating frequency for the standard serial port of one-fourth of
CLKOUT (10 Mbit/s at 25 ns, 12.5 Mbit/s at 20 ns) is achieved when using internal serial port clocks. The
maximum operating frequency for the BSP is CLKOUT. When the serial ports are in reset, the device may
be configured to turn off the internal serial port clocks, allowing the device to run in a lower
power mode of operation.
www.roeverengg.edu.in