Sunteți pe pagina 1din 29

DSP LAB - Introduction

6713 DSK
DSK 6713 Features

Key features include:


A Texas Instruments TMS320C6713 DSP
operating at 225 MHz.
An AIC23 stereo codec
8 Mbytes of synchronous DRAM
512 Kbytes of non-volatile Flash memory
4 user accessible LEDs and DIP switches
DSK 6713 Features

Software board configuration through registers


implemented in CPLD
Configurable boot options
Standard expansion connectors for daughter
card use
JTAG emulation through on-board JTAG
emulator with USB host interface or external
emulator
Single voltage power supply (+5V)
CPLD
A programmable logic device called a CPLD is used to
implement glue logic that ties the board components
together.

The CPLD has a register based user interface that lets the
user configure the board by reading and writing to its
registers.

The DSK includes 4 LEDs and a 4 position DIP switch as a


simple way to provide the user with interactive feedback.
Both are accessed by reading and writing to the CPLD
registers.
CPLD Registers
The 4 CPLD memory-mapped registers allows
users to control CPLD functions in software.

On the 6713 DSK the registers are primarily used


to access the LEDs and DIP switches and control
the daughter card interface.

The registers are mapped into EMIF CE1 data


space at address 0x90080000. They appear as 8-bit
registers with a simple asynchronous memory
interface.
USER_REG Register

USER_REG is used to read the state of the


4 DIP switches and turn the 4 LEDs on or
off to allow the user to interact with the
DSK. The DIP switches are read by reading
the top 4 bits of the register and the LEDs
are set by writing to the low 4 bits.
Memory Map
The memory map shows the address space of a generic
6713 processor on the left with specific details of how each
region is used on the right. By default, the internal memory
sits at the beginning of the address space.

Portions of the internal memory can be reconfigured in


software as L2 cache rather than fixed RAM.

The EMIF has 4 separate addressable regions called chip


enable spaces (CE0-CE3).

The SDRAM occupies CE0 while the Flash and CPLD


share CE1. CE2 and CE3 are generally reserved for
daughtercards.
List of Experiments (Lab 2)
Experiment 1:
1. Generate the following waveforms and observe the
output using the graphical display utility of the Code
Compose Studio (CCS).
a.Sine b. Triangular c. Square.

2. Modify your program, to vary the amplitude and


frequency of the generated waveforms, using GEL
function. Observe the variables through watch window
facility of CCS.

3. Generate a 1 KHz sine function sampled at 8 KHz.


Observe the spectrum using CCS. Observe the effect of
windowing.
Experiment 2:
1. Write a program to implement the following
Linear Convolution
Difference Equation

2. Use the above algorithms to verify the operation of


FIR filter (Obtain the coefficients using MATLAB).
IIR filter (Obtain the polynomial coefficients from MATLAB)
respectively.

3. Verify your algorithms by inputting a signal from the


signal generator (Configure the Codec in the 6713DSK
Board).
Steps to Create and run a Project
Turn on the DSK6713 kit and open the code Composer
Studio (CCS).
Creating a New Project:
Create a folder in C:\CCStudio_v3.1\myprojects folder in
your batch name, where you can save all your projects.
From the Project menu, choose New.
In the Project Name field, type the project name.
In the Location field, type or browse to the folder you created in
step 1.
By default, Project Type is set as Executable (.out)
In the Target field select TMS320C67XX.
Click Finish. Code Composer Studio creates a project file called
projectname.pjt. This file stores your project settings and references
the various files used by your project.
Project Creation Wizard
Steps to Create and run a Project
After creating a new project file, add the files for your source code,
object libraries, and linker command file to the project list.
Create a source file from the file menu. File -- New -- Source File.
Type your program and save it in your project file as filename.c.
Add files to the project by choosing Add Files to Project from the
Project menu. You can also right-click the project in the Project View
window on the left and then select Add Files to Project.
Add the C source file from the appropriate path (project file).
Add rts6700.lib from c:\CCStudio_v3.1\c6000\cgtools\lib. (Select
Object & library (*.o, *.l) in the Type of fields)
Add volume.cmd (this is a linker command file that maps sections to
memory) from c:\CCStudio_v3.1\tutorial\dsk6713\volume1. (Select
Linker Command File (*.cmd) in the Type of fields)
Copy the header files (of type *.h if included in the source file) to your
project folder.
Add Files to Project
Steps to Create and run a Project
Building Your Program:
Use the Build All function the first time you build the
project. An output window will show the build process and
status. When the build is finished, the output window will
display Build complete 0 errors, 0 warnings.

The Rebuild All command is mainly used to rebuild the


project when the project options or any files in the project
have changed.
Steps to Create and run a Project
Loading Your Program:
After the program has been built successfully, from the Debug
menu, select connect and then load the program by going to
File -- Load Program. By default, Code Composer Studio IDE will
create a subdirectory called Debug within your project directory and
store the .out file in it. Select projectname.out and click Open to load
the program.
Remember to reload the program by choosing File -- Reload
Program if you rebuild the project after making changes.

To Execute the Project:


From the Debug menu select Run.
Viewing Variables
Variables can be viewed in the watch window when
the CPU has been halted. The watch window can be
opened by selecting View - - Watch Window. The
Watch Locals tab shows all the relevant variables in
the current execution.

To view the output graphically Selcet View - - graph


- - time and frequency
Viewing Variables
Setting the probe point.
Build your project.
Choose FileLoad Program. Select filename.out, and
click Open.
Double-click on the filename.c file in the Project View.
Or From the Debug menu, choose Go main (The
cursor stops at the beginning of your C source file).
Put your cursor in a line of the main function to which
you want to add a probe point. Put the probe point at the
appropriate line by Clicking the Toggle Software Probe
Point toolbar button.
Setting the probe point Cont..
Create the output window where you want to se the
output variations. (Select Graphical Display or watch
window).
From the File menu choose file I/O. The File I/O dialog
appears so that you can select input and output files. In
the File I/O dialog, change the Address and the Length
values.
Click Add Probe Point to show Probe Points tab of the
Break/Probe Points dialog.
In the Probe Point list, select the Probe Point you created
previously.
In the Connect To field, click the down arrow and select a
.dat file from the list.
Setting the probe point Cont..

Click Replace. The Probe Point list changes to show


that this point is connected to the sine.dat file.
Click OK. The File I/O dialog shows that the file is
now connected to a Probe Point.
Click OK to close the File I/O dialog.
Run the project

You can set probe point to view the input variation also
using the same procedure. So you can set two graphical
displays (one for input and one for output) accordingly and
it serves the purpose of a dual channel CRO.
File I/O Dialog
Probe Point Tab
GEL Function
Controlling DSP Variables With GEL:

First, you create a GEL file defining a slider control.


From the File menu, choose New -- Source File.
In the source file, type the following text:
slider Vary_Counter(0, 10, 1, 1, counterParam)
{
counterValue = counterParam;
} (Replace the counter Value by your variable name)
From the File menu, choose Save As. And browse your project file.
In the Save As box, choose General Extension Language Files
(*.gel).
Type gelname.gel as the file name and click Save.
GEL Function
Build your project.
From the File menu, choose Load GEL.
Browse to the location where you saved *.gel.
Select *.gel and click Open.
Load your program.
Choose GEL default -- vary_Counter.
Vary your parameter in the slider.
Run the project.
To view the variation set a graphical display with probe
point connected at the appropriate line to view the
variation.
To perform Single Step Debugging

Keep the cursor on the line from where you want to start
single step debugging. You can set the breakpoint by
selecting the Toggle Breakpoint toolbar button. When a
breakpoint has been set, a red icon will appear in the
selection margin.
Load the *.out file onto the target.
Go to View and select Watch Window.
Debug -- Run.
Execution should halt at the break point.
Press F10 to see the changes happening in the watch window.
Similarly go to view & select CPU registers to view the
changes happening in CPU registers.

S-ar putea să vă placă și