You are on page 1of 9

Ex No: INTRODUCTION TO DSP & DSK (TMS320C6711)

Date:

Aim:

To study and to become familiar with DSP & DSK (TMS320C6711).

INTRODUCTION TO DIGITAL SIGNAL PROCESSORS

Digital signal processing (DSP) is a rapidly growing field within electrical and
computer engineering. Analog processing is achieved using components such as
resistors, capacitors, and inductors, whereas digital processing uses a programmable
microprocessor. The main advantage of digital processing is that applications can be
changed, corrected, or updated very easily by reprogramming the microprocessor,
unlike analog systems, which would require components, such as resistors or
capacitors, to be physically changed.

Additionally, DSPs also reduce noise, power consumption, and cost, when
compared with analog systems.

A DSP is a special purpose processor that is different from a general purpose


processor such as an Intel Pentium processor. While the latter is used for large
memory, advanced operating applications, the DSP is small, low power consumption,
low cost device.

Digital signal processors are used for a wide range of applications, from
communications and controls to speech and image processing. They're found in
cellular phones, fax/modems, disk drives, radio, GPS (global positioning system)
receivers, portable medical equipment, and digital music players.
DSK SUPPORT TOOLS

To perform this lab experiments, the following tools are used:

1. TI’s DSP starter kit (DSK). The DSK package includes:


a) Code Composer Studio (CCS), which provides the necessary software support
tools. CCS provides an integrated development environment (IDE), bringing
together the C compiler, assembler, linker, debugger, and so on.
b) A board, shown in Figure 1.1, that contains the TMS320C6711 (C6711)
floating-point digital signal processor as well as a 16-bit codec for input and
output (I/O) support.
c) A parallel cable (DB25) that connects the DSK board to a PC.
d) A power supply for the DSK board.

2. An IBM-compatible PC. The DSK board connects to the parallel port of the PC
through the DB25 cable included with the DSK package.
3. An oscilloscope, signal generator/microphone, and speakers.

DSK BOARD

The DSK package is powerful, yet relatively inexpensive, with the necessary
hardware and software support tools for real-time signal processing. It is a complete
DSP system. The DSK board includes:
1. The C6711 floating-point digital signal processor and a 16-bit codec AD535 for
input and output.
2. A 4-MHz clock onboard the DSK connects to this codec to provide a fixed
sampling rate of 8 kHz.
3. A daughter card expansion is also provided on the DSK board.
4. 16MB (megabytes) of synchronous dynamic RAM (SDRAM) and 128kB
(kilobytes) of flash ROM.
5. Two connectors on the board provide input and output and are labeled IN (J7) and
OUT (J6).
6. 150 MHz onboard clock. Also onboard the DSK are voltage regulators that
provide 1.8V for the C6711 core and 3.3 V for its memory and peripherals.
TMS320C6711 DIGITAL SIGNAL PROCESSOR

TMS320C6711 DSP Block Diagram


The TMS320C6711 (C6711) is based on the very-long-instruction-word (VLIW)
architecture, which is very well suited for numerically intensive algorithms. The internal
program memory is structured so that a total of eight instructions can be fetched every
cycle.
Features of the C6711 include 72 kB of internal memory, eight functional or
execution units composed of six ALUs and two multiplier units, a 32-bit address bus to
address 4 GB (gigabytes), and two sets of 32-bit general-purpose registers.
The C67xx (such as the C6701 and C6711) belong to the family of the C6x
floating-point processors; whereas the C62xx and C64xx belong to the family of the C6x
fixed-point processors. The C6711 is capable of both fixed- and floating-point processing.

Image of TI TMS320C6711
CODE COMPOSER STUDIO:

The Code Composer Studio (CCS) provides an integrated development


environment (IDE) to incorporate the software tools. CCS includes tools for code
generation, such as a C compiler, an assembler, and a linker. It has graphical capabilities
and supports real-time debugging. It provides an easy-to-use software tool to build and
debug programs.
The C compiler compiles a C source program with extension .c to produce an
assembly source file with extension.asm. The assembler assembles an.asm source file to
produce a machine language object file with extension.obj. The linker combines object
files and object libraries as input to produce an executable file with extension. out. This
executable file represents a linked common object file format (COFF), popular in Unix-
based systems and adopted by several makers of digital signal processors. This executable
file can be loaded and run directly on the C6711 processor.

PROGRAMMING LANGUAGES:
Assembly language was once the most commonly used programming language
for DSP chips (such as TI’s TMS320 series) and microprocessors (such as Motorola’s
68MC11 series). Coding in assembly forces the programmer to manage CPU core
registers (located on the DSP chip) and to schedule events in the CPU core. It is the most
time consuming way to program, but it is the only way to fully optimize a program.
Assembly language is specific to a given architecture and is primarily used to schedule
time-critical and memory-critical parts of algorithms.
The preferred way to code algorithms is to code them in C. Coding in C requires a
compiler that will convert C code to the assembly code of a given DSP instruction set. C
compilers are very common, so this is not a limitation.
In fact, it is an advantage, because C coded algorithms may be implemented on a
variety of platforms (provided there is a C compiler for a given architecture and
instruction set).
Finally, a hybrid between assembly language and C exists within CCS. It is called
linear assembly code. Linear assembly looks much like assembly language code, but it
allows for symbolic names and does not require the programmer to specify delay slots
and CPU core registers on the DSP. Its advantage over C code is that it uses the DSP
more efficiently, and its advantage over assembly code is that it does not require the
programmer to manage the CPU core registers.
USEFUL TYPES OF FILES
You will be working with a number of files with different extensions. They include:
1. file.pjt: to create and build a project named file.
2. file.c: C source program.
3. file.asm: assembly source program created by the user, by the C compiler, or by
the linear optimizer.
4. file.sa: linear assembly source program. The linear optimizer uses file.sa as input
to produce an assembly program file.asm.
5. file.h: header support file.
6. file.lib: library file, such as the run-time support library file rts6701.lib.
7. file.cmd: linker command file that maps sections to memory.
8. file.obj: object file created by the assembler.
9. file.out: executable file created by the linker to be loaded and run on the
processor.

PROGRAMMING EXAMPLES TO TEST THE DSK TOOLS


Two programming examples are introduced in this experiment to illustrate
some of the features of CCS and the DSK board. The primary focus is to become
familiar with both the software and hardware tools.

QUICK TEST OF DSK


Launch CCS from the icon on the desktop. Press GEL → Check DSK → Quick Test.
The Quick Test can be used for confirmation of correct operation and installation.
The following message is then displayed:
Switches: 7
Revision: 2
Target is OK
This assumes that the first three switches, USER_SW1, USER_SW2, and
USER_SW3, are all in the up (ON) position.
This assumes that the first three switches, USER_SW1, USER_SW2, and
USER_SW3,are all in the up (ON) position.
Change the switches to (1 1 0 x)2 so that
the first two switches are up (press the third switch down). The fourth switch is not
used.
Repeat the procedure to select GEL Check DSK Quick Test and verify
that the value of the switches is now 3 (with the display “Switches: 3”).You can set
the value of the first three user switches from 0 to 7.Within your program you can
then direct the execution of your code based on these eight values. Note that the
Quick Test cycles the LEDs three times.

Targeting Your C6711 DSK using Real-Time workshop in Simulink

The Embedded Target for TI C6000 DSP for Texas Instruments DSP lets you
use Real-Time Workshop to generate, target, and execute Simulink models on the
Texas Instruments (TI) C6711 DSP Starter Kit (C6711 DSK). In combination with the
C6711 DSK, your Embedded Target for TI C6000 DSP software is the ideal resource
for rapidly prototyping and developing embedded systems applications for the TI
C6711 Digital Signal Processor. The Embedded Target for TI C6000 DSP software
focuses on developing real-time digital signal processing (DSP) applications for the
C6711 DSK.
Building the Audio Reverberation Model
To build the model for audio reverberation, follow these steps:
1. Open Simulink.
2. Create a new model by selecting File -> New -> Model from the Simulink menu.
3. Use Simulink blocks to create the following model.
Adding C6711 DSK Blocks to Your Model

So that you can send signals to your C6711 DSK and get signals back, TI C6000 includes a
block library that contains five blocks designed to work with the codec and LEDs on your
C6711 DSK:
 Input block (C6711 DSK ADC)
 Output block (C6711 DSK DAC)
 Light emitting diode block (C6711 DSK LED)
 DIP switch block (C6711 DIP Switch)
 Reset block (Reset C6711 DSK)

Type c6711dsklib at the MATLAB prompt to bring up this window showing the library
contents.

Configuring the Embedded Target for TI C6000 DSP Blocks

To configure the Embedded Target for TI C6000 DSP blocks in your model, follow
these steps:
1. Click the C6711 DSK ADC block to select it.
2. Select Block Parameters from the Simulink Edit menu.
3. Set the following parameters for the block:
 Select the +20 dB mic gain boost check box
 For Output data type, select Double from the list
 Set Scaling to Normalize
 Set Source gain to 0.0
 Enter 64 for Samples per frame
4. For ADC source, select Mic In/ DSP Sine Wave With Fs=8 KHZ.
5. Click OK to close the Block Parameters: ADC dialog.
6. Now set the options for the C6711 DSK DAC block.
 Set Scaling to Normalize
 For DAC attenuation, enter 0.0
 Set Overflow mode to Saturate.
7. Click OK to close the dialog.

Now we have completed the model. Now configure the Real-Time Workshop
simulation options to build and download your new model to your C6711 DSK.

Configuring Simulation Parameters for Your Model

The following sections describe how to build and run your real-time digital
signal processing model on your C6711 DSK. Running the model on the target starts
with configuring and building your model from the Simulation Parameters dialog in
Simulink.
Setting Simulink Simulation Parameters

After you have designed and implemented your digital signal processing model in
Simulink, complete the following steps to set the simulation parameters for the model:
1. Open the Simulation Parameters dialog and set the appropriate options on the
Solver pane for your model and for the Embedded Target for TI C6000 DSP.
 Set Start time to 0.0 and Stop time to inf (model runs without stopping)
 Under Solver options, select the fixed-step and discrete settings from the lists
 Set the Fixed step size to auto and select Single Tasking for the Mode
Ignore the Workspace I/O, Diagnostics, and Advanced panes in the Simulation
Parameters dialog. The default settings are correct for your new model.

Setting Real-Time Workshop Target Build Options

To configure Real-Time Workshop to use the correct target files and to


compile and run the model executable, you set the options on the Real-Time
Workshop pane of the Simulation Parameters dialog. Follow these steps to set the
Real-Time Workshop options to target your C6711 DSK for running your model:
1. Click the Real-Time Workshop tab.
2. For Category, select Target configuration.
3. Under Configuration, click Browse to select the system target file for theC6000
hardware targets.
4. On the System Target File Browser, select the system target file ti_c6000.tlc and
click OK to close the browser. Real-Time Workshop fills the Template makefile
and Make command options with the appropriate files based on your system
target file selection.
5. To choose your C6000 target, change Category to TI C6000 target selection.
6. From the Code generation target type list, choose C6711_DSK.
7. For Category, select TI C6000 compiler to set the Real-Time Workshop compile
options.
8. Set the following options in the dialog:
• Byte order should be Little endian
• Set Compiler verbosity to Quiet
9. Change the Category to TI C6000 linker.
10. Set the linker operation options. • Select the Retain .obj files check box
• For the Linker command file, select Full memory map from the list
11. Change the Category to TI C6000 runtime.
12. Set the following Real-Time Workshop run-time options:
 Build action: Build_and_execute.
 Overrun action: Notify_and_halt
 Overrun notification method: Turn_on_LEDs

Result:
Hence the details of TMS320C6711 DSP chip and supporting
architecture (DSK) is studied.

You might also like