Вы находитесь на странице: 1из 37

1

DSP LAB
LIST OF EXPERIMENTS 2
 To study the architecture of DSP chips - TMS 320C 5X/6X
Instructions.
 To verify linear convolution.
 To verify the circular convolution.
 To design FIR filter (LP/HP) using windowing technique
 Using rectangular window
 Using triangular window
 Using Kaiser window
 To Implement IIR filter (LP/HP) on DSP Processors
 N-point FFT algorithm.
 MATLAB program to generate sum of sinusoidal signals.
 MATLAB program to find frequency response of analog
LP/HP filters.
 To compute power density spectrum of a sequence.
 To find the FFT of given 1 -D signal and plot.
3

Experiment-1
To study the architecture of DSP
chips - TMS 320C 5X/6X Instructions.
DSP PROCESSOR 4
 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 5
 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 6
 Contains - CPU
 - RAM
 - ROM
 -I/O ports
 - Timer &
 - Interrupt circuitry
 Some Micro Controllers also contain A/D, D/A and Flash
Memory
DSP Processors 7
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
8
TMS 320 C5X DSP
PROCESSORS:
The above processor is the fifth generation processor of TMS
320c family and it is very long instruction word (VLIW)
architecture developed by TI and it is 32 bit processor.

Applications:
 Various application in cell phones
 wireless communication
 Digital computer applications
9
TMS 320C6X DSP
PROCESSORS:
 The above processor is the sixth generation processor of
TMS 320c family and it is very long instruction word (VLIW)
architecture developed by TI and can execute 1600 MIPS
10

APPLICATIONS:

 Wireless base stations


 Pooled modems
 Remote Access Servers
 Digital Subscriber Loop Systems
 Cable modems
 Multi Channel Telephone Systems
11
FEATURES:
 32-bit Processor
 Eight functional units-----2 multipliers, 6 ALUs
 32-bit 32 general purpose registers
 ALU performs 40 bit Arithmatic Operations
 Enhanced DMA
 16-bit host port interface
 Multichannel buffered serial ports
 2-general purpose PLL’s
TMS320C6713 DSP Starter Kit (DSK) 12

The TMS320C6713 DSP Starter Kit (DSK) developed jointly with Spectrum
Digital is a low-cost development platform designed to speed the
development of high precision applications based on TI´s TMS320C6000
floating point DSP generation.
'C6713 DSK Block Diagram
13
Program CE0 Daughter Card
Cache SDRAM CE2

(8 MB)
Internal Room
CPU EMIF for
Memory
CE1 Expansion
Flash ROM
Data (256 kB) CE3
Cache I/O Port

 DSK uses all four External Memory regions


 CE0 for SDRAM
 CE1 for Flash Memory and I/O Port (switches, LED’s, etc.)
 CE2 and CE3 pinned-out to daughter card connector
DSK 6713 STARTER KIT 14
DSK6713 Block Diagram 15
 1. USB2.0 CY7C68013-56PVC, compatible with
USB2.0 and USB1.1, including 8051 16
 2. DSP TMS320C6713 TQFP-208 Package Device
with, 4 layers board
 3. SDRAM MT48LC4M16A2 1meg*16 *4 bank
micron
 4. FLASH AM29LV800B 8Mbit1Mbyte of AMD
 5. RESET chip specialize for reset with button for
manually reset
 6. POWER supply externally, special 5V, 3.3V, 1.6V
chip for steady voltage with remaining for other
devices.
 7. EEPROM 24LC64 for download of USB firmware
 8. CPLD XC95144XL
 9. AIC TLV320AIC23B sampling with 8-96KHZ, 4
channels
C6713 DSK Memory Map
TMS320C6713 ‘C6713 DSK 17
0000_0000
8 MB SDRAM
256 kB Internal
Program / Data

0180_0000 256 kB FLASH


Peripheral Regs
CPLD 9008_0000
CPLD:
8000_0000  LED’s
128 MB External
 DIP Switches
9000_0000  DSK status
128 MB External
 DSK rev#
A000_0000 Available via  Daughter Card
128 MB External Daughter Card
B000_0000 Connector
128 MB External

FFFF_FFFF
Bus Structure 18
 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.
19
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
20
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
21
Accumulators A and B store the output
Accumulators
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)
22
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
23
The multiplier/adder unit performs 17 _ 17-bit
Multiplier/Adder

Unit with a 40-bit
2s-complement multiplication
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
WORKING WITH MAT LAB 24
1)Double click on Matlab icon.
 -> Then Matlab will be opened
2) To write the Matlab Program
 Goto file menu-> New -> Script(Mfile) ->
In the opened Script file write the Matlab
code and save the file with an extension
of .m
Ex: “linear.m”
3)To execute Matlab Program
 Select the all lines in matlab
program(ctrl+A) of mfile and press “F9” to
execute the matlab code
25
4)Entering the inputs in command window
 If the command window is displaying the
message like “enter the input sequence”
then enter the sequence with square
brackets and each sample values is
spaced with single space
 Ex: Enter input sequence [1 2 3 4]
 If it is asking a value input write the value
without brackets
 Ex: “enter length of sequence 4”
 After entering inputs It displays the Output
Graphs.
PROCEDURE TO WORK ON CODE COMPOSER
26
 Test the USB port by running DSK Port test from
STUDIO
the start menu

 Use StartProgramsTexas InstrumentsCode
Composer StudioCode Composer Studio
CDSK6713 Tools DSK6713 Diagnostic Utilities

 Select StartSelect DSK6713 Diagnostic Utility
Icon from Desktop
 Select Start Option
 Utility Program will test the board
 After testing Diagnostic Status you will get PASS
 To create the New Project
27
 Project  New (File Name. pjt , Eg: Vectors.pjt)

 To Create a Source file


 File  New  Type the code (Save & give file
name, Eg: sum.c).

 To Add Source files to Project


 Project  Add files to Project  c/ccs
studio3.1/my projects/your project name/
sum.c(select the file type as c/c++ source files)
To Add rts.lib file & hello.cmd: 28

 Project  Add files to Project rts6700.lib


 (Path: c/ccs studio3.1/cg tools/c6000/lib/
rts6700.lib)
 Note: Select Object & Library in(*.o,*.l) in Type of
files

 Project  Add files to Project hello.cmd


 CMD file – Which is common for all non real time
programs.
 (Path: c/ccs studio3.1\tutorial\dsk 6713
\hello1\hello.cmd)
 Note: Select Linker Command file(*.cmd) in
Type of files
29
Compile:

 To Compile: Project  Compile project



 To Build: Project  build project,

 To Rebuild: Project  rebuild,
 Which will create the final
.out executable file.(Eg. Vectors.out).
30
 Load the program to DSK: File  Load
Procedure to Load
program  Vectors. out
and Run
program:
 To Execute project: Debug  Run.

 Execution should halt at break point.

 Now press F10. See the changes happening


in the watch window.

 Similarly go to view & select CPU registers to


view the changes happening in CPU registers
31

Configure the graphical


window as shown below
32
PROCEDURE
CONNECTING DSPFOR EXECUTING
PROCESSOR TO PC REAL TIME
PROGRAMS
 Connect the dsp processor to the pc using usb cable
connector.
 Check the DSK6713 diagnostics (IF you get the “pass”then
click on ok).
 Click on ccs studio3.1 desktop icon. Then the window will
be opened.
 Go to debug click on connect (then target device
will be connected to pc)
33
TO CREATE PROJECT
 Project new given project name and select the
family’TMS320C67XX’Then click ok
 File new source file write deown the ‘c’program
and save it with.’c’ exetention in current project file
 File new dsp/bios.config file select dsk67xx click
on dsk6713 and save it in current project.
 Project add files to project add
34
source file
 Project add files to project add library
file by following the given path
 c/ccs
studio3.1/cgtools/c6000/dsk6713/DSK6713
.bs/file.
 Project add files to the project .Add
the configuration file.
 Now files are generated and included in
generated files . in that open the 3rd file,
and copy the header file and paste it in
source file. Copy the include files named
as ”dsk6713.h” and “dsk6713_aic23.h”
paste it in current project folder.
35
 Now compile project.(project
compile)
 Project build.
 Project rebuild all.
 File load program projectname.pjt
debug “project name .out” file
click on open debug click on run
 Now apply the input sine wave to line in
of dsk6713 kit.
 Observe the output at line out of dsk6713
by using CRO.
36
37

PREPARED BY
Surendra loya
Usha Rama

Вам также может понравиться