0% found this document useful (0 votes)
32 views35 pages

DSP Lab Manual 2023

The document outlines a Digital Signal Processing lab course, detailing various experiments involving MATLAB software. It includes experiments on generating basic signals, verifying linear and circular convolutions, implementing an IIR Butterworth filter, and tone generation for DTMF signals. Each experiment contains objectives, apparatus used, theoretical background, and MATLAB code snippets for implementation.

Uploaded by

rohitsi2252
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views35 pages

DSP Lab Manual 2023

The document outlines a Digital Signal Processing lab course, detailing various experiments involving MATLAB software. It includes experiments on generating basic signals, verifying linear and circular convolutions, implementing an IIR Butterworth filter, and tone generation for DTMF signals. Each experiment contains objectives, apparatus used, theoretical background, and MATLAB code snippets for implementation.

Uploaded by

rohitsi2252
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

ELECTRONICS & COMMUNICATION

ENGINEERING DEPARTMENT

DIGITAL SIGNAL PROCESSING


LAB
KEC-553

NAME OF STUDENT :_________________________________

ROLL No. :_________________________________

SEMESTER :_________________________________

SESSION :_________________________________

FACULTY: DR. ANIL DUBEY


LIST OF EXPERIMENTS

S. Date of Date of
Name of Experiment Signature
No. Experiment Submission

1 Introduction to MATLAB

Write a Program for the generation of basic


2 signals such as unit impulse, unit step, ramp,
exponential, sinusoidal and cosine.

3 Verify Linear convolution of two sequences


using FFT

4 Verify Circular Convolution of two sequences


using FFT.

5 Implement IIR Butterworth analog Low Pass


for a 4 KHz cut off frequency.

6 To verify FFT as sample interpolator.

7 To implement Tone Generation.

8 To implement floating point arithmetic.

Evaluate 4-point DFT of and IDFT of x(n) = 1,


9
0 ≤ n ≤ 3; 0 elsewhere.

10 To study about DSP Processors and architecture


of TMS320C6713 DSP processor.
Experiment No.:- 1

Aim Introduction to MATLAB

Apparatus
Used
MATLAB SOFTWARE

INTRODUCTION TO MATLAB

MATLAB is a software package for high performance numerical computation and


visualization provides an interactive environment with hundreds of built in functions for
technical computation, graphics and animation. The MATLAB name stands for MATrix
LABoratory.
The diagram shows the main features and capabilities of MATLAB.
At its core, MATLAB is essentially a set (a “toolbox”) of routines (called “m files’ or
“mex files”) that sit on your computer and a window that allows you to create new
variables with names (e.g. voltage and time) and process those variables with any of
those routines (e.g. plot voltage against time, find the largest voltage, etc.)
MATLAB® is a high-level language and interactive environment that enables you to
perform computationally intensive tasks faster than with traditional programming
languages such as C, C++, and Fortran.

Key Features:
 High-level language for technical computing.
 Development environment for managing code, files, and data.
 Interactive tools for iterative exploration, design, and problem solving.
 Mathematical functions for linear algebra, statistics, Fourier analysis,
 Filtering, optimization, and numerical integration.
 2-D and 3-D graphics functions for visualizing data.
 Tools for building custom graphical user interfaces.
 Functions for integrating MATLAB based algorithms with external
applications and languages, such as C, C++, Fortran, Java, COM, and Microsoft®
Excel®.

MATLAB Windows:
MATLAB works with through three basic windows

Command Window: This is the main window .It is characterized by MATLAB


command prompt(>>) when you launch the application program MATLAB puts you in
this window all commands including those for user- written programs ,are typed in this
window at the MATLAB prompt. Graphics window: The output of all graphics
commands typed in the command window are flushed to the graphics or figure window,
a separate gray window with white background color the user can create as many
windows as the system memory will allow.
Edit window: This is where you write edit, create and save your own programs in files
called M files.
Input-output: MATLAB supports interactive computation taking the input from the
screen and flushing the output to the screen. In addition it can read input files and write
output files.
Data Type: The fundamental data-type in MATLAB is the array. It encompasses
several distinct data objects- integers, real numbers, matrices.
Character strings, structures and cells. There is no need to declare variables as real or
complex, MATLAB automatically sets the variable to be real.
Dimensioning: Dimensioning is automatic in MATLAB. No dimension statements are
required for vectors or arrays. We can find the dimensions of an existing matrix or a
vector with the size and length commands.

BASIC INSTRUCTIONS IN MATLAB


Result :- We successfully understand the basics of MATLAB Software and its Toolbox.
Experiment No.:- 2

Write a Program for the generation of basic signals such as unit impulse, unit
Aim step, ramp, exponential, sinusoidal and cosine.

Apparatus
Used
MATLAB SOFTWARE

PROGRAMS: -

1. Unit Impulse: -
% Program for the generation of unit impulse signal
clc;
clear all;
close all;
t = -2:1:2;
y=[zeros(1,2),ones(1,1),zeros(1,2)];
subplot (2,2,1);
stem (t,y);
ylabel ('Amplitude-->');
xlabel ('(a)n-->');

Output: -
2. Unit Step Sequence: -

% Program for the generation of unit step sequence [u(n)-u(n-N)]


n=input ('Enter the N value');
t=0:1:n-1;
y1=ones(1,n);
subplot(2,2,2);
stem(t,y1);
ylabel('Amplitude-->');
xlabel('(b)n-->');

Output: -

Enter the N value4


3. Ramp Sequence: -

% Program for the generation of ramp sequence


n1=input ('Enter the length of ramp sequence');
t=0:n1;
subplot(2,2,3);
stem(t,t);
ylabel('Amplitude-->');
xlabel('(c)n-->');

Output: -

Enter the length of rampsequence4


4. Exponential Sequence: -

% Program for the generation of exponential sequence


n2=input ('Enter the length of exponential sequence');
t=0:n2;
a=input('Enter the (a) value');
y2=exp(a*t);
subplot(2,2,4);
stem(t,y2);
ylabel('Amplitude-->');
xlabel('(d)n-->');

Output: -

Enter the length of exponential sequence4


Enter the (a) value2
5. Sin Sequence: -

% Program for the generation of sine sequence


t=0:.01:pi;
y=sin(2*pi*t);
figure(2);
subplot(2,1,1);
plot(t,y);
ylabel('Amplitude-->');
xlabel('(a)n-->');

Output: -
6. Cosine Sequence: -

% Program for the generation of cosine sequence


t=0:.01:pi;
y=cos(2*pi*t);
figure(2);
subplot(2,1,1);
plot(t,y);
ylabel('Amplitude-->');
xlabel('(a)n-->');

Output: -

Result :- We successfully generated basic signals such as unit impulse, unit step, ramp,
exponential, sinusoidal and cosine.
Experiment No.:- 3

Aim Verify Linear convolution of two sequences using FFT

Apparatus
Used
MATLAB

THEORY:

Convolution is a formal mathematical operation, just as multiplication, addition, and integration.


Addition takes two numbers and produces a third number, while convolution takes two signals
and produces a third signal. Convolution is used in the mathematics of many fields, such as
probability and statistics. In linear systems, convolution is used to describe the relationship
between three signals of interest: the input signal, the impulse response, and the output signal.

In this equation, x1(k), x2(n-k) and y(n) represent the input to and output from the system at time
n. Here we could see that one of the inputs is shifted in time by a value every time it is multiplied
with the other input signal. Linear Convolution is quite often used as a method of implementing
filters of various types.

Program:

clc;
clear all;
close all;
disp('linear convolution program');
x=input('enter i/p x(n):');
m=length(x);
h=input('enter i/p h(n):');
n=length(h);
x=[x,zeros(1,n)];
subplot(2,2,1), stem(x);
title('i/p sequence x(n)is:');
xlabel('---->n');
ylabel('---->x(n)');grid;
h=[h,zeros(1,m)];
subplot(2,2,2), stem(h);
title('i/p sequence h(n)is:');
xlabel('---->n');
ylabel('---->h(n)');grid;
disp('convolution of x(n) & h(n) is y(n):');
y=zeros(1,m+n-1);
for i=1:m+n-1
y(i)=0;
for j=1:m+n-1
if(j<i+1)
y(i)=y(i)+x(j)*h(i-j+1);
end
end
end
y
subplot(2,2,[3,4]),stem(y);
title('convolution of x(n) & h(n) is :');
xlabel('---->n');
ylabel('---->y(n)');grid;
Output :

Result :- Successfully verified the Linear Convolution of two sequences using FFT using
MATLAB.
Experiment No.:- 4

Aim Verify Circular Convolution of two sequences using FFT.

Apparatus
Used
MATLAB

THEORY:

Circular convolution is another way of finding the convolution sum of two input signals. It
resembles the linear convolution, except that the sample values of one of the input signals is
folded and right shifted before the convolution sum is found. Also note that circular convolution
could also be found by taking the DFT of the two input signals and finding the product of the two
frequency domain signals. The Inverse DFT of the product would give the output of the signal in
the time domain which is the circular convolution output. The two input signals could have been
of varying sample lengths. But we take the DFT of higher point, which ever signals levels to. For
example, If one of the signal is of length 256 and the other spans 51 samples, then we could only
take 256 point DFT. So the output of IDFT would be containing 256 samples instead of 306
samples, which follows N1+N2 – 1 where N1 & N2 are the lengths 256 and 51 respectively of the
two inputs. Thus the output which should have been 306 samples long is fitted into 256 samples.
The256 points end up being a distorted version of the correct signal. This process is called
circular convolution.

Program:

clc;
clear all;
close all;
disp('circular convolution program');
x=input('enter i/p x(n):');
m=length(x);
h=input('enter i/p sequence h(n)');
n=length(h);
subplot(2,2,1),
stem(x);
title('i/p sequence x(n)is:');
xlabel('---->n');
ylabel('---->x(n)');
grid;
subplot(2,2,2),
stem(h);
title('i/p sequence h(n)is:');
xlabel('---->n');
ylabel('---->h(n)');
grid;
if(m-n~=0)
if(m>n)
h=[h,zeros(1,m-n)];
n=m;
end
x=[x,zeros(1,n-m)];
m=n;
end
y=zeros(1,n);
y(1)=0;
a(1)=h(1);
for j=2:n
a(j)=h(n-j+2);
end
%circular convolution
for i=1:n
y(1)=y(1)+x(i)*a(i);
end
for k=2:n
y(k)=0;
% circular shift
for j=2:n
x2(j)=a(j-1);
end
x2(1)=a(n);
for i=1:n
if(i<n+1)
a(i)=x2(i);
y(k)=y(k)+x(i)*a(i);
end
end
end
y
subplot(2,2,[3,4]),stem(y);
title('convolution of x(n) & h(n) is:');
xlabel('---->n');
ylabel('---->y(n)');grid;

Output :

Result :- Successfully verified the Circular Convolution of two sequences using FFT using
MATLAB.
Experiment No.:- 5

Aim Implement IIR Butterworth analog Low Pass for a 4 KHz cut off frequency

Apparatus
Used
MATLAB SOFTWARE

PROGRAMS: - MATLAB CODE:

%Program for the design of butterworth low pass analog filter


clc;
close all;
clear all;
format long
rs=input('enter the stopband ripple...');
rp=input('enter the passband ripple...');
ws=input('enter the stopband freq...');
wp=input('enter the passband freq...');
fs=input('enter the sampling freq...');
w1=2*wp/fs;
w2=2*ws/fs;
[n,wn]=buttord(w1,w2,rp,rs);
[z,p,k]=butter(n,wn);
[b,a]=zp2tf(z,p,k);
[b,a]=butter(n,wn);
w=0:0.01:pi;
[h,om]=freqs(b,a,w);
m=20*log10(abs(h));
an=angle(h);
subplot(2,1,1);
plot(om/pi,m);
ylabel('GainindB-->');
xlabel('(a)Normalised frequency-->');
subplot(2,1,2);
plot(om/pi,an)
xlabel('(b)Normalised frequency-->');
ylabel('Phase in radians-->');

OUTPUT:

enter the stopband ripple...60


enter the passband ripple...0.15
enter the stopband freq...3000
enter the passband freq...1500
enter the sampling freq...7000

Result :- Successfully Implemented IIR Butterworth analog Low Pass filter.


Experiment No.:- 6

Aim To verify FFT as sample interpolator.

Apparatus
Used
MATLAB SOFTWARE

THEORY: Interpolate 1-D data using the FFT method and visualize the result. Generate some
sample points in the interval for the function. Use a spacing interval dx to ensure the data is
evenly spaced. Plot the sample points.

PROGRAMS: - MATLAB CODE:

dx = 3*pi/30;
x = 0:dx:3*pi;
f = sin(x).^2 .* cos(x);
plot(x,f,'o')

N = 200; % Use FFT interpolation to find the function value at 200 query points.
y = interpft(f,N);
dy = dx*length(x)/N; % Calculate the spacing of the interpolated data from the spacing of the
sample points with dy = dx*length(x)/N, where N is the number of interpolation points.
x2 = 0:dy:3*pi; % Truncate the data in y to match the sampling density of x2.
y = y(1:length(x2));
hold on
plot(x2,y,'.') % Plot the results
title('FFT Interpolation of Periodic Function')
OUTPUT:

Result :- Successfully verified FFT as sample interpolator.


Experiment No.:- 7

Aim To implement Tone Generation.

Apparatus
Used
MATLAB SOFTWARE

THOERY: To generate DTMF Signals using MATLAB Software


The DTMF stands for “Dual Tone Multi Frequency”, and is a method of representing digits with
tone frequencies, in order to transmit them over an analog communications network, for example
a telephone line. In telephone networks, DTMF signals are used to encode dial trains and other
information.
Dual-tone Multi-Frequency (DTMF) signaling is the basis for voice communications control and
is widely used worldwide in modern telephony to dial numbers and configure switchboards. It is
also used in systems such as in voice mail, electronic mail and telephone banking.
A DTMF signal consists of the sum of two sinusoids - or tones - with frequencies taken from two
mutually exclusive groups. These frequencies were chosen to prevent any harmonics from being
incorrectly detected by the receiver as some other DTMF frequency. Each pair of tones contains
one frequency of the low group (697 Hz, 770 Hz, 852 Hz, 941 Hz) and one frequency of the high
group (1209 Hz, 1336 Hz, 1477Hz) and represents a unique symbol.

MATLAB CODE:

Clc;
Clear all;
Close all;
t = -2:0.05:2;
x=input('enter the input number');
fr1=697;
fr2=770;
fr3=852;
fr4=941;
fc1=1209;
fc2=1336;
fc3=1477;
fc4=1633;
y0 = sin(2*pi*fr4*t) + sin(2*pi*fc2*t); % 0
y1 = sin(2*pi*fr1*t) + sin(2*pi*fc1*t); % 1
y2 = sin(2*pi*fr1*t) + sin(2*pi*fc2*t); % 2
y3 = sin(2*pi*fr1*t) + sin(2*pi*fc3*t); % 3
y4 = sin(2*pi*fr2*t) + sin(2*pi*fc1*t); % 4
y5 = sin(2*pi*fr2*t) + sin(2*pi*fc2*t); % 5
y6 = sin(2*pi*fr2*t) + sin(2*pi*fc3*t); % 6
y7 = sin(2*pi*fr3*t) + sin(2*pi*fc1*t); % 7
y8 = sin(2*pi*fr3*t) + sin(2*pi*fc2*t); % 8
y9 = sin(2*pi*fr3*t) + sin(2*pi*fc3*t); % 9
y_start = sin(2*pi*fr4*t) + sin(2*pi*fc1*t); % *
y_canc = sin(2*pi*fr4*t) + sin(2*pi*fc3*t); % #
if (x==1)
plot(t,y1)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==2)
plot(t,y2)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==3)
plot(t,y3)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==4)
plot(t,y4)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==5)
plot(t,y5)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==6)
plot(t,y6)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==7)
plot(t,y7)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==8)
plot(t,y8)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==9)
plot(t,y9)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==0)
plot(t,y0)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==11)
plot(t,y_start)
xlabel('time(t)')
ylabel('amplitude')
elseif (x==12)
plot(t,y_canc)
xlabel('time(t)')
ylabel('amplitude')
else
disp('enter the correct input')
end

OUTPUT:
INPUT:
Enter the input number = 7

Result :- Successfully generated DTMF Signals using MATLAB Software.


Experiment No.:- 8

Aim To implement floating point arithmetic.

Apparatus
Used
MATLAB SOFTWARE

THOERY: Floating-Point Numbers


Fixed-point numbers are limited in that they cannot simultaneously represent very large or very
small numbers using a reasonable word size. This limitation can be overcome by using scientific
notation. Scientific notation dynamically places the binary point at a convenient location and use
powers of the binary to keep track of that location. Thus it helps in representation of a range of
very large and very small numbers with only a few digits.
Any binary floating-point number in scientific notation form as-
f2e
where, f is the fraction (or mantissa),
2 is the radix or base (binary in this case), and
e is the exponent of the radix.
The radix is always a positive number, while f and e can be positive or negative.
When performing arithmetic operations, floating-point hardware must take into account that the
sign, exponent, and fraction are all encoded within the same binary word. This results in complex
logic circuits when compared with the circuits for binary fixed-point operations.
The Fixed-Point Designer™ software supports single-precision and double-precision floating-
point numbers as defined by the IEEE® Standard 754. Additionally, a nonstandard IEEE-style
number is supported.

Single-Precision Format
The IEEE single-precision floating-point format is a 32-bit word divided into a 1-bit sign
indicator s, an 8-bit biased exponent e, and a 23-bit fraction f. For more information, see The Sign
Bit, The Exponent Field, and The Fraction Field. A representation of this format is given below.
Double-Precision Format

The IEEE double-precision floating-point format is a 64-bit word divided into a 1-bit sign
indicator s, an 11-bit biased exponent e, and a 52-bit fraction f. For more information, see The
Sign Bit, The Exponent Field, and The Fraction Field. A representation of this format is shown in
the following figure-

Floating-Point Data Type Parameters


The high and low limits, exponent bias, and precision for the supported floating-point data types
are given in the following table.

Result :- Successfully implemented floating point arithmetic using MATLAB Software.


Experiment No.:- 9

Evaluate 4-point DFT of and IDFT of x(n) = 1, 0 ≤ n ≤ 3; 0


Aim
elsewhere.

Apparatus
Used
MATLAB SOFTWARE

THOERY:

MATLAB CODE:

N=4;

x=[1,1,1,1];

t=0:N-1;

subplot(311)

stem(t,x);

xlabel('time (s)');

ylabel('Amplitude');
title('input sequence');

subplot(312);

stem(0:N-1,abs(fft(x)));

xlabel('frequency');

ylabel('|x(k)|');

title('magnitude response');

subplot(313);

stem(0:N-1,angle(fft(x)));

xlabel('frequency');

ylabel('phase');

title('phase response');

OUTPUT:

Result :- Successfully Evaluate 4-point DFT of and IDFT of x(n) = 1, 0 ≤ n ≤ 3; 0 elsewhere.


MATLAB Software.
Experiment No.:- 10

To study about DSP Processors and architecture of TMS320C6713 DSP


Aim processor.

Apparatus
TMS320C6713 DSP Processors
Used

INTRODUCTION TO DSP PROCESSORS

A signal can be defined as a function that conveys information, generally about


the state or behavior of a physical system. There are two basic types of signals viz.
Analog (continuous time signals which are defined along a continuum of times) and
Digital (discrete-time).Remarkably, under reasonable constraints; a continuous time
signal can be adequately represented by samples, obtaining discrete time signals. Thus
digital signal processing is an ideal choice for anyone who needs the performance
advantage of digital manipulation along with today’s analog reality. Hence a processor
which is designed to perform the special operations (digital manipulations) on the
digital signal within very less time can be called as a Digital signal processor. The
difference between a DSP processor, conventional microprocessor and a
microcontroller are listed below.

Microprocessor or General Purpose Processor such as Intel xx86 or Motorola 680xx


family Contains - only CPU
-No RAM
-No ROM
-No I/O ports
-No Timer

Microcontroller such as 8051 family Contains - CPU


- RAM
- ROM
-I/O ports
- Timer &
- Interrupt circuitry
Some Micro Controllers also contain A/D, D/A and Flash Memory

DSP Processors such as Texas instruments and Analog Devices Contains - CPU
- RAM
-ROM
- I/O ports
- Timer
Optimized for – fast arithmetic
- Extended precision
- Dual operand fetch
- Zero overhead loop
- Circular buffering

The basic features of a DSP Processor are

Feature Use
Fast-Multiply Most DSP algorithms, including filtering, transforms, etc. are
accumulate multiplication- intensive
Multiple – access Many data-intensive DSP operations require reading a program
memory instruction and multiple data items
Specialized Efficient handling of data arrays and first-in, first-out buffers in
addressing modes memory
Specialized program Efficient control of loops for many iterative DSP algorithms. Fast
control interrupt handling for frequent I/O
On-chip peripherals On-chip peripherals like A/D converters allow for small low cost
and I/O system designs. Similarly I/O

ARCHITECTURE OF 6713 DSP PROCESSOR

This chapter provides an overview of the architectural structure of the TMS320C67xx


DSP, which comprises the central processing unit (CPU), memory, and on-chip
peripherals. The C67xE DSPs use an advanced modified Harvard architecture that
maximizes processing power with eight buses. Separate program and data spaces
allow simultaneous access to program instructions and data, providing a high degree
of parallelism. For example, three reads and one write can be performed in a single
cycle. Instructions with parallel store and application-specific instructions fully utilize
this architecture. In addition, data can be transferred between data and program spaces.
Such Parallelism supports a powerful set of arithmetic, logic, and bit-manipulation
operations that can all be performed in a single machine cycle. Also, the C67xx DSP
includes the control mechanisms to manage interrupts, repeated operations, and
function calling.
Bus Structure

The C67xx DSP architecture is built around eight major 16-bit buses (four
program/data buses and four address buses):
_ The program bus (PB) carries the instruction code and immediate operands from program
memory.
_ Three data buses (CB, DB, and EB) interconnect to various elements, such as the CPU,
data address generation logic, program address generation logic, on-chip peripherals, and
data memory.
_ The CB and DB carry the operands that are read from data memory.
_ The EB carries the data to be written to memory.
_ Four address buses (PAB, CAB, DAB, and EAB) carry the addresses needed for
instruction execution.

Central Processing Unit (CPU)

The CPU is common to all C67xE devices. The C67x CPU contains:

_ 40-bit arithmetic logic unit (ALU)


_ Two 40-bit accumulators
_ Barrel shifter
_ 17 × 17-bit multiplier
_ 40-bit adder
_ Compare, select, and store unit (CSSU)
_ Data address generation unit
_ Program address generation unit
Arithmetic Logic Unit (ALU)

The C67x DSP performs 2s-complement arithmetic with a 40-bit arithmetic logic unit
(ALU) and two 40-bit accumulators (accumulators A and B). The ALU can also
perform Boolean operations. The ALU uses these inputs:

_ 16-bit immediate value


_ 16-bit word from data memory
_ 16-bit value in the temporary register, T
_ Two 16-bit words from data memory
_ 32-bit word from data memory
_ 40-bit word from either accumulator

The ALU can also function as two 16-bit ALUs and perform two 16-bit operations
simultaneously.

Accumulators

Accumulators A and B store the output from the ALU or the multiplier/adder block.
They can also provide a second input to the ALU; accumulator A can be an input to
the multiplier/adder. Each accumulator is divided into three parts:
_ Guard bits (bits 39–32)
_ High-order word (bits 31–16)
_ Low-order word (bits 15–0)
Instructions are provided for storing the guard bits, for storing the high- and the low-
order accumulator words in data memory, and for transferring 32-bit accumulator
words in or out of data memory. Also, either of the accumulators can be used as
temporary storage for the other.
Barrel Shifter

The C67x DSP barrel shifter has a 40-bit input connected to the accumulators or to
data memory (using CB or DB), and a 40-bit output connected to the ALU or to data
memory (using EB). The barrel shifter can produce a left shift of 0 to 31 bits and a
right shift of 0 to 16 bits on the input data. The shift requirements are defined in the
shift count field of the instruction, the shift count field (ASM) of status register ST1,
or in temporary register T (when it is designated as a shift count register).The barrel
shifter and the exponent encoder normalize the values in an accumulator in a single
cycle. The LSBs of the output are filled with 0s, and the MSBs can be either zero
filled or sign extended, depending on the state of the sign-extension mode bit (SXM)
in ST1. Additional shift capabilities enable the processor to perform numerical scaling,
bit extraction, extended arithmetic,and overflow prevention operations.

Multiplier/Adder Unit

The multiplier/adder unit performs 17-bit 2s-complement multiplication with a 40-bit


addition in a single instruction cycle. The multiplier/adder block consists of several
elements: a multiplier, an adder, signed/unsigned input control logic, fractional
control logic, a zero detector, a rounder (2s complement), overflow/saturation logic,
and a 16-bit temporary storage register (T). The multiplier has two inputs: one input is
selected from T, a data-memory operand, or accumulator A; the other is selected from
program memory, data memory, accumulator A, or an immediate value. The fast, on-
chip multiplier allows the C54x DSP to perform operations efficiently such as
convolution, correlation, and filtering. In addition, the multiplier and ALU together
execute multiply/accumulate (MAC) computations and ALU operations in parallel in a
single instruction cycle. This function is used in determining the Euclidian distance
and in implementing symmetrical and LMS filters, which are required for complex
DSP algorithms.
These are the some of the important parts of the processor and you are instructed to go
through the detailed architecture once which helps you in developing the optimized
code for the required application.

RESULT: The architecture of DSP chips-TMS 320c 5x/6x is studied successfully.

You might also like