dsp implementation using the tms320c6711 demo eastern mediterranean university department of...

97
DSP Implementation Using DSP Implementation Using The TMS320C6711 Demo The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Texas Instrume Instrume nts nts Assistant: Assistant: Bur Bur çin ÖZMEN çin ÖZMEN Lecturer: Lecturer: Erhan A. Erhan A. İNCE İNCE

Upload: rodger-small

Post on 14-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

DSP Implementation Using The DSP Implementation Using The TMS320C6711 DemoTMS320C6711 Demo

Eastern Mediterranean UniversityDepartment of Electrical & Electronics Engineering

Texas Texas InstrumentsInstruments

Assistant: Assistant: BurBurçin ÖZMENçin ÖZMEN

Lecturer: Lecturer: Erhan A. Erhan A. İNCEİNCE

Page 2: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 2

Learning ObjectivesLearning Objectives

Why process signals digitally?Why process signals digitally? Definition of a real-time application.Definition of a real-time application. Why use Why use DDigital igital SSignal ignal PProcessing rocessing

processors?processors? What are the typical What are the typical DSPDSP algorithms? algorithms? Parameters to consider when choosing a Parameters to consider when choosing a

DSP processor.DSP processor.

Page 3: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 3

Why go digital?Why go digital?

Digital signal processing techniques are Digital signal processing techniques are now so powerful that sometimes it is now so powerful that sometimes it is extremely difficult, if not impossible, for extremely difficult, if not impossible, for analogue signal processing to achieve analogue signal processing to achieve similar performance.similar performance.

Examples:Examples: FIR filter with linear phase.FIR filter with linear phase. Adaptive filters.Adaptive filters.

Page 4: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 4

Why go digital?Why go digital?

Analogue signal processing is achieved Analogue signal processing is achieved by using analogue components such as:by using analogue components such as: Resistors.Resistors. Capacitors.Capacitors. Inductors.Inductors.

The inherent tolerances associated with The inherent tolerances associated with these components, temperature, voltage these components, temperature, voltage changes and mechanical vibrations can changes and mechanical vibrations can dramatically affect the effectiveness of dramatically affect the effectiveness of the analogue circuitry.the analogue circuitry.

Page 5: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 5

Why go digital?Why go digital?

With DSP it is easy to:With DSP it is easy to: Change applications.Change applications. Correct applications.Correct applications. Update applications.Update applications.

Additionally DSP reduces:Additionally DSP reduces: Noise susceptibility.Noise susceptibility. Chip count.Chip count. Development time.Development time. Cost.Cost. Power consumption.Power consumption.

Page 6: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 6

Why NOT go digital?Why NOT go digital?

High frequency signals cannot be High frequency signals cannot be processed digitally because of two processed digitally because of two reasons:reasons: AAnalog to nalog to DDigital igital CConverters, onverters, ADCADC cannot cannot

work fast enough.work fast enough. The application can be too complex to be The application can be too complex to be

performed in performed in real-time.real-time.

Page 7: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 8

Why not use a General Purpose Why not use a General Purpose Processor (GPP) such as a Pentium Processor (GPP) such as a Pentium instead of a DSP processor?instead of a DSP processor? What is the What is the power consumptionpower consumption of a of a

Pentium and a DSP processor?Pentium and a DSP processor? What is the What is the costcost of a Pentium and a DSP of a Pentium and a DSP

processor?processor?

Why do we need DSP processors?Why do we need DSP processors?

Page 8: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 9

Use a DSP processor when the following are Use a DSP processor when the following are required:required: Cost saving.Cost saving. Smaller size.Smaller size. Low power consumption.Low power consumption. Processing of many “high” frequency signals in Processing of many “high” frequency signals in

real-time.real-time. Use a GPP processor when the following are Use a GPP processor when the following are

required:required: Large memory.Large memory. Advanced operating systems.Advanced operating systems.

Why do we need DSP processors?Why do we need DSP processors?

Page 9: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 10

What are the typical DSP algorithms?What are the typical DSP algorithms?

Algorithm Equation

Finite Impulse Response Filter

M

kk knxany

0

)()(

Infinite Impulse Response Filter

N

kk

M

kk knybknxany

10

)()()(

Convolution

N

k

knhkxny0

)()()(

Discrete Fourier Transform

1

0

])/2(exp[)()(N

n

nkNjnxkX

Discrete Cosine Transform

1

0

122

cos).().(N

x

xuN

xfucuF

The Sum of Products (SOP) is the key The Sum of Products (SOP) is the key element in most DSP algorithms:element in most DSP algorithms:

Page 10: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 11

Floating vs. Fixed point processorsFloating vs. Fixed point processors

Applications which require:Applications which require: High precision.High precision. Wide dynamic range.Wide dynamic range. High signal-to-noise ratio.High signal-to-noise ratio. Ease of use.Ease of use.

Need a floating point processor.Need a floating point processor. Drawback of floating point processors:Drawback of floating point processors:

Higher power consumption.Higher power consumption. Can beCan be higher cost. higher cost. Can beCan be slower than fixed-point counterparts and larger in size. slower than fixed-point counterparts and larger in size.

Page 11: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 12

Floating vs. Fixed point processorsFloating vs. Fixed point processors

It is the application that dictates which It is the application that dictates which device and platform to use in order to device and platform to use in order to achieve optimum performance at a low cost.achieve optimum performance at a low cost.

For educational purposes, use the floating-For educational purposes, use the floating-point device (C6711) as it can support both point device (C6711) as it can support both fixed and floating point operations.fixed and floating point operations.

Page 12: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 13

Learning ObjectivesLearning Objectives

Introduction to Code Composer Studio Introduction to Code Composer Studio (CCS).(CCS).

Introduction to the DSK.Introduction to the DSK. Laboratory.Laboratory.

Page 13: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 14

Code Composer StudioCode Composer Studio The Code Composer Studio (CCS) application provides an integrated environment with the The Code Composer Studio (CCS) application provides an integrated environment with the

following capabilities:following capabilities: Integrated development environment with an editor, debugger, project manager, profiler, etc.Integrated development environment with an editor, debugger, project manager, profiler, etc. ‘‘C/C++’ compiler, assembly optimiser and linker (code generation tools).C/C++’ compiler, assembly optimiser and linker (code generation tools). Simulator.Simulator. Real-time operating system (DSP/BIOS™).Real-time operating system (DSP/BIOS™). Real-Time Data Exchange (RTDX™) between the Host and Target.Real-Time Data Exchange (RTDX™) between the Host and Target. Real-time analysis and data visualisation. Real-time analysis and data visualisation.

Page 14: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 15

Start CCS by either:Start CCS by either: Using the desktop icon:Using the desktop icon:

Start -> Programs -> Texas Instruments -> Code Composer Studio Start -> Programs -> Texas Instruments -> Code Composer Studio 2 -> Code Composer Studio.2 -> Code Composer Studio.

Run cc_app.exe in c:\ti\cc\bin\Run cc_app.exe in c:\ti\cc\bin\

Using CCSUsing CCS

CCS 2.lnk

Page 15: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 16

TroubleshootingTroubleshooting

If the following window appears on your screen then:If the following window appears on your screen then: Check that the DSK is connected properly and powered Check that the DSK is connected properly and powered

up.up. Check if the port address and mode is correct (See Slide Check if the port address and mode is correct (See Slide

7).7).

Page 16: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 17

Introduction to the ‘C6711 DSKIntroduction to the ‘C6711 DSK

The ‘C6711 DSK provides a powerful, low-cost development The ‘C6711 DSK provides a powerful, low-cost development environment.environment.

The DSK comes with CCS code development tools (does not include The DSK comes with CCS code development tools (does not include the simulator).the simulator).

A laboratory at the end of this section takes you through the DSK A laboratory at the end of this section takes you through the DSK setup and shows you how to run the confidence test to check it is setup and shows you how to run the confidence test to check it is working correctly.working correctly.

Page 17: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 18

DSK ContentsDSK ContentsHardware (Schematics)

150 MHz ‘C6711 DSP TI 16-bit A/D Converter (‘AD535) External Memory

16M Bytes SDRAM 128K Bytes Flash ROM

LED’s Daughter card expansion Power Supply & Parallel Port Cable

Software Code Generation Tools

(C Compiler, Assembler & Linker) Code Composer Debugger

(256K program limitation) Example Programs & S/W Utilities

Power-on Self Test Flash Utility Program Board Confidence Test Host access via DLL Sample Program(s)

Page 18: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 19

1.8V Power Supply 16M SDRAM 128K FLASH Daughter Card I/F(EMIF Connector)

ParallelPort I/F

PowerJack

PowerLED

3.3V Power Supply

JTAG Header

EmulationJTAG Header

Reset

Line Level Output (speakers)Line Level Input (microphone)

16-bit codec (A/D & D/A)Three User LEDs

User DIPswitches

‘C6711DSP

D. Card I/F(Periph Con.)

TMS320C6711

Hardware: (1) OverviewHardware: (1) Overview

The daughter card interface socket provides a The daughter card interface socket provides a method for accessing most of the C6711 DSP for method for accessing most of the C6711 DSP for hardware extension.hardware extension.

Page 19: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 20

Hardware: (2) Power On Self Test (POST)Hardware: (2) Power On Self Test (POST)

TestTest LED 3LED 3 LED 2LED 2 LED 1LED 1 DescriptionDescription00 00 00 00 Start stateStart state11 00 00 11 DSP internal SRAM testDSP internal SRAM test22 00 11 00 External SDRAM testExternal SDRAM test33 00 11 11 DSP McBSP0 loop back testDSP McBSP0 loop back test44 11 00 00 External codec read/write testExternal codec read/write test55 11 00 11 External codec tone generation testExternal codec tone generation test66 11 11 00 External LED and DSP timer testExternal LED and DSP timer test77 11 11 11 Unused – available for future test useUnused – available for future test use

B L I N K A L LB L I N K A L L All tests completed successfullyAll tests completed successfully

There are three LEDs to provide the user with There are three LEDs to provide the user with feedback from the test procedure.feedback from the test procedure.

The test program (stored in the FLASH memory, code The test program (stored in the FLASH memory, code available on the DSK CD-ROM) runs every time DSK available on the DSK CD-ROM) runs every time DSK is powered on and reset.is powered on and reset.

Page 20: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 21

TMS320C6711

Hardware: (3) ResetsHardware: (3) Resets

Apply Power POST runs

CCS Reset Menu selection:

DebugDSP Reset Resets ‘C6711 DSP Causes bootload

from FLASH which overwrites internal memory

Absolute ResetOn rare occasions you might have to:

Pull power jack Pull parallel port Reset Pushbutton

Don’t push when CCSis running

Does not force FULLsystem reset

To fully reset board, pull power plug

Power On Self Test (POST) Counts 1 - 7 4: mic input spkr out 5: sinewave spkr out Don’t start CCS until end

(all 3 LEDs flash at the end) If switches are set to 0100, a fast version of

POST is run

Page 21: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 22

Software: (1) PC Host UtilitiesSoftware: (1) PC Host Utilities

DSK LoaderDSK Loader dsk6ldr.exe dsk6ldr.exe filename.outfilename.out

Runs on PC hostRuns on PC host Downloads .out file to DSK memory mapDownloads .out file to DSK memory map Stand alone DSK loader for when you want to bypass CCSStand alone DSK loader for when you want to bypass CCS

FLASH ProgrammingFLASH Programming hex6x.exe hex6x.exe f.out h.cmdf.out h.cmd

flash.exe flash.exe f.hexf.hex First, convert First, convert file.outfile.out to to file.hexfile.hex The flash utility downloads the hex file into the on-DSK FLASHThe flash utility downloads the hex file into the on-DSK FLASH Both programs run on the PC host. Both programs run on the PC host. Links\SPRA804.pdf

DSK Confidence TestDSK Confidence Test dsk6xtstdsk6xtst Run from MSDOS promptRun from MSDOS prompt Command-line utility tests proper installation of the DSK boardCommand-line utility tests proper installation of the DSK board Additionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP, Additionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP,

Timers, EDMA, LEDs and Audio codecTimers, EDMA, LEDs and Audio codec

Page 22: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 23

Software: (2) CCS DSK UtilitiesSoftware: (2) CCS DSK Utilities

Confidence TestConfidence Test

1.1. Unload any gel files already Unload any gel files already loaded in CCSloaded in CCS

2.2. Load Load conftest.gelconftest.gel

3.3. Run confidence tests from Run confidence tests from GEL menuGEL menu

Quick TestQuick Test

Run from CCS GEL menuRun from CCS GEL menu Defined in Defined in dsk6xinit.geldsk6xinit.gel Non-intrusiveNon-intrusive test by reading test by reading

and writing:and writing: LEDsLEDs SwitchesSwitches DSK board revisionDSK board revision

Outputs switch valuesOutputs switch valuesGeneral Extension Language (GEL):

An interpretive language that enables you to write functions to configure the IDE and access the target processor.

Page 23: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 24

Software: (3) DSK HelpSoftware: (3) DSK Help

DSK6711 help is available via the Help menu DSK6711 help is available via the Help menu in CCS.in CCS.

Page 24: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 25

Laboratory Exercise: DSK Hardware SetupLaboratory Exercise: DSK Hardware Setup

(1)(1) Connect the following cables:Connect the following cables: Parallel port.Parallel port. Audio cables.Audio cables.

(2)(2) Connect the power and observe the Power On Self-Test (POST) (Refer to Slide 15).Connect the power and observe the Power On Self-Test (POST) (Refer to Slide 15).

(3)(3) Run the confidence test for the PC. There are three methods to run this test:Run the confidence test for the PC. There are three methods to run this test:

(a)(a) Run the “dsk6xtst.exe” by double-clicking on the Run the “dsk6xtst.exe” by double-clicking on the file in “\Code\Chapter 03 - CCS and DSK\”.file in “\Code\Chapter 03 - CCS and DSK\”.

(b)(b) Run the “dsk6xtst.exe” file from windows by Run the “dsk6xtst.exe” file from windows by double clicking on the file in double clicking on the file in “\ti\c6000\dsk\conftest\Host\Debug”.“\ti\c6000\dsk\conftest\Host\Debug”.

(c)(c) Open a DOS window and run the “dsk6xtst.exe” Open a DOS window and run the “dsk6xtst.exe” file located in the directory above.file located in the directory above.

Page 25: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 26

Laboratory exercise: DSK hardware setupLaboratory exercise: DSK hardware setupNotes:Notes: The SDRAM may take a while due to the large amount of SDRAM on the ‘C6711 DSK.The SDRAM may take a while due to the large amount of SDRAM on the ‘C6711 DSK. The CODEC test performs two operations: (1) a 1kHz tone output, and (2) an audio input to output loopback. You must have a speaker connected to the the output jack to hear the test.The CODEC test performs two operations: (1) a 1kHz tone output, and (2) an audio input to output loopback. You must have a speaker connected to the the output jack to hear the test. If the confidence test fails:If the confidence test fails:

(1)(1) Remove the power and parallel cable from the DSK.Remove the power and parallel cable from the DSK.

(2)(2) Reset your PC.Reset your PC.

(3)(3) Reconnect the power and the parallel cable.Reconnect the power and the parallel cable.

(4)(4) Invoke CCS.Invoke CCS.

Page 26: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 27

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCSImplement:Implement:

with: with: aaii = {40, 39, …, 1} = {40, 39, …, 1}

xxii = {1, 2, …, 40} = {1, 2, …, 40}

(1)(1) Create a working directory and copy the following files from \Code\Chapter 03 - CCS and DSK\:Create a working directory and copy the following files from \Code\Chapter 03 - CCS and DSK\:

(a)(a) lab3.cdblab3.cdb

(b)(b) lab3.clab3.c

(c)(c) lab3cfg.cmdlab3cfg.cmd

(2)(2) Create a new project:Create a new project:

(a)(a) Start CCS.Start CCS.

(b)(b) Create a new project as shown on the following Create a new project as shown on the following slide.slide.

1

0

N

iiixay

Page 27: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 28

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS

Page 28: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 29

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS

(3)(3) Add files to the project (lab3.c, lab3.cdb, lab3cfg.cmd).Add files to the project (lab3.c, lab3.cdb, lab3cfg.cmd).

Page 29: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 30

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS

(4)(4) Change the build options (compile and link):Change the build options (compile and link):

Page 30: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 31

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(5)(5) Build the output program (lab3.out):Build the output program (lab3.out):

(a)(a) Build the project by:Build the project by:

(i)(i) Clicking the Rebuild All Clicking the Rebuild All toolbar icon.toolbar icon.

(ii)(ii) Selecting Rebuild All in Selecting Rebuild All in the project menu.the project menu.

(b)(b) Verify that the build output Verify that the build output window is complete with “0 window is complete with “0 errors, 0 warnings”:errors, 0 warnings”:

Page 31: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 32

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(6)(6) Load the output file lab3.out into DSP memory:Load the output file lab3.out into DSP memory:

(a)(a) The program will be automatically loaded The program will be automatically loaded after each project build if the “Program Load after each project build if the “Program Load after Build” option is selected after Build” option is selected as shown below:as shown below:

Page 32: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 33

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(6)(6) Load the output file lab3.out into DSP memory:Load the output file lab3.out into DSP memory:

(b)(b) Load the lab3.out by selecting Load the lab3.out by selecting FFile:Load ile:Load PProgram as shown below:rogram as shown below:

Page 33: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 34

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(7)(7) Debug and run code:Debug and run code:

(a)(a) Go to the beginning of the program, that is Go to the beginning of the program, that is main() by selecting Debug:Go Main.main() by selecting Debug:Go Main.

(b)(b) Watch variables:Watch variables:

(i) (i) Select the variable (to be watched) from the Select the variable (to be watched) from the lab3.c file, right click and select “Add To lab3.c file, right click and select “Add To Watch Window”. If the variable is y for Watch Window”. If the variable is y for instance, the following window will be instance, the following window will be shown.shown.

(ii)(ii) To add another variable to the watch select To add another variable to the watch select it and then drag and drop it on to the it and then drag and drop it on to the window.window.

Page 34: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 35

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(7)(7) Debug and run code:Debug and run code:

(c) (c) CCS will automatically add the local variables:CCS will automatically add the local variables:

Page 35: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 36

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(7)(7) Debug and run code:Debug and run code:

(d) (d) You can run or step through the code by using You can run or step through the code by using the various icons on the toolbar or use the the various icons on the toolbar or use the Debug menu:Debug menu:

Page 36: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 37

(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(a)(a) Stop the processor, reload the code or select Stop the processor, reload the code or select Debug:Restart then select Debug:Go Main.Debug:Restart then select Debug:Go Main.

(b)(b) Open a new profiling session and name it Open a new profiling session and name it “Session 1” and select “Profile All Functions” “Session 1” and select “Profile All Functions” by clicking the following toolbar button:by clicking the following toolbar button:

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(e)(e) Stop the processor from running and watch the Stop the processor from running and watch the variable y:variable y:

y = 0x2cdb or 11480y = 0x2cdb or 11480

Page 37: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 38

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(c)(c) Expand the lab3.c as shown below:Expand the lab3.c as shown below:

Page 38: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 39

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(d)(d) Add a breakpoint at “for(;;);”. This can be Add a breakpoint at “for(;;);”. This can be done by:done by:

(i)(i) Click the cursor on the highlighted line Click the cursor on the highlighted line below.below.

(ii)(ii) Click the “Add Breakpoint” toolbar Click the “Add Breakpoint” toolbar button:button:

Page 39: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 40

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(e)(e) Run the program and examine the profile Run the program and examine the profile window:window:

Page 40: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 41

Part Part 22

DevelopDeveloping A Simple Programing A Simple Program

Page 41: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 42

Learning ObjectivesLearning Objectives

Learn how to create a simple programLearn how to create a simple program Learn basic debug techniquesLearn basic debug techniques Understand how CCS facilitates Understand how CCS facilitates

developmentdevelopment

Page 42: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 43

Creating a New Project Creating a New Project

Double-click the Code Composer Studio icon Double-click the Code Composer Studio icon on your desktop. on your desktop.

Page 43: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 44

Creating a New ProjectCreating a New Project

From the Project From the Project menu, choose New.menu, choose New.

In the Project Name In the Project Name field, type volume1.field, type volume1.

In the Location field, In the Location field, browse to the browse to the working folder you working folder you created in step 1.created in step 1.

In the Project Type In the Project Type field, select field, select Executable (.out).Executable (.out).

In the Target field, In the Target field, select the target you select the target you have CCS configured have CCS configured for and click Finish.for and click Finish.

Page 44: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 45

Adding Files to a ProjectAdding Files to a Project

Choose ProjectChoose Project→→Add Files to Project. Add Files to Project. Select volume.c and click Open. Select volume.c and click Open.

Choose ProjectChoose Project→→Add Files to Project.Add Files to Project. Select Asm Source Files (*.a*, *.s*) in the Select Asm Source Files (*.a*, *.s*) in the

Files of type box. Files of type box. Select vectors.asm and load.asm, and click Select vectors.asm and load.asm, and click

Open. Open. Choose ProjectChoose Project→→Add Files to Project. Add Files to Project.

Select Linker Command File (*.cmd) in the Select Linker Command File (*.cmd) in the Files of type box. Files of type box.

Select volume.cmd and click Open. Select volume.cmd and click Open.

Page 45: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 46

Adding Files to a Project Adding Files to a Project

Choose ProjectChoose Project→→Add Files to Project. Add Files to Project. Go to the compiler library folder (Go to the compiler library folder (C:\tiC:\ti\\c6000\cgtools\lib). c6000\cgtools\lib). Select Object and Library Files (*.o*, *.lib) Select Object and Library Files (*.o*, *.lib)

in the Files of type box. in the Files of type box. Select the Select the rtsrts.lib.lib file for the file for the targettarget you are you are

configured for and click Open. configured for and click Open. In the Project View window, right-click In the Project View window, right-click

on volume1.pjt and select Scan All on volume1.pjt and select Scan All Dependencies. Dependencies. volume.h should appear under the Include volume.h should appear under the Include

folder in the Project View window. folder in the Project View window.

Page 46: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 47

Adding Files to a Project Adding Files to a Project

Expand the Project Expand the Project list by clicking the + list by clicking the + signs next to signs next to Project, Project, volume1.pjt, volume1.pjt, Libraries, and Libraries, and Source. Source.

This list is called This list is called the Project View.the Project View.

Page 47: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 48

Reviewing the Source Code Reviewing the Source Code

The processing function multiplies each value The processing function multiplies each value in the input buffer by the gain and puts the in the input buffer by the gain and puts the resulting values into the output buffer. resulting values into the output buffer.

It also calls the assembly load routine, which It also calls the assembly load routine, which consumes instruction cycles based on the consumes instruction cycles based on the processingLoad value passed to the routine.processingLoad value passed to the routine.

The dataIO function in this example does not The dataIO function in this example does not perform any actions other than to return. perform any actions other than to return.

Rather than using C code to perform I/O, we Rather than using C code to perform I/O, we will use a Probe Point within Code Composer will use a Probe Point within Code Composer Studio to read data from a file on the host into Studio to read data from a file on the host into the inp_buffer location.the inp_buffer location.

Page 48: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 49

Building and Running the Program Building and Running the Program

Choose ProjectChoose Project→→Rebuild All or click the Rebuild All or click the (Rebuild All) toolbar button. (Rebuild All) toolbar button.

By default, the .out file is built into a debug By default, the .out file is built into a debug directory located under your current project directory located under your current project folder. folder.

Choose FileChoose File→→Load Program. Select the program Load Program. Select the program you just rebuilt, Volume1.out, and click Open. you just rebuilt, Volume1.out, and click Open.

Choose View®Mixed Source/ASM. Choose View®Mixed Source/ASM. This allows you to view your c source and the resulting This allows you to view your c source and the resulting

assembly code at the same time. assembly code at the same time.

Page 49: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 50

Building and Running the ProgramBuilding and Running the Program

Choose DebugChoose Debug→→Go Main to begin execution from Go Main to begin execution from the main function. The execution halts at main and the main function. The execution halts at main and is identified by .is identified by .

Choose DebugChoose Debug→→Run or click the (Run) toolbar Run or click the (Run) toolbar button.button.

Choose DebugChoose Debug→→ Halt to quit running the Halt to quit running the program.program.

From the View menu, From the View menu, choose Mixed Source/ASM. This allows you to view c choose Mixed Source/ASM. This allows you to view c

code without the assembly so you can accomplish the code without the assembly so you can accomplish the next task: Changing Program Options and Fixing next task: Changing Program Options and Fixing Syntax errorsSyntax errors

Page 50: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 51

Changing Program Options and Fixing Changing Program Options and Fixing Syntax ErrorsSyntax Errors

Choose Choose ProjectProject→→Build Build Options.Options.

In the Compiler tab In the Compiler tab of the Build of the Build Options window, Options window, select Preprocessor select Preprocessor

from the Category from the Category list. Type FILEIO list. Type FILEIO in the Define in the Define Symbols field. Press Symbols field. Press the Tab key.the Tab key.

Page 51: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 52

Changing Program Options and Fixing Changing Program Options and Fixing Syntax ErrorsSyntax Errors

Click OK to save your new option settings.Click OK to save your new option settings. Choose ProjectChoose Project→→Rebuild All or click the (Rebuild Rebuild All or click the (Rebuild

All) toolbar button. You need to rebuild all the files All) toolbar button. You need to rebuild all the files whenever the project options change.whenever the project options change.

A build message indicates the program contains A build message indicates the program contains compile errors. Click the Build tab and scroll up in compile errors. Click the Build tab and scroll up in the Build tab area. You see a syntax error message.the Build tab area. You see a syntax error message.

Page 52: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 53

Changing Program Options and Fixing Changing Program Options and Fixing Syntax ErrorsSyntax Errors

Double-click on the red text that describes the Double-click on the red text that describes the location of the syntax error (line 68). Notice location of the syntax error (line 68). Notice that the volume.c source file opens, and your that the volume.c source file opens, and your cursor is on the following line:cursor is on the following line:

  processing(input, output);processing(input, output); Fix the syntax error in the line above the Fix the syntax error in the line above the

cursor location (The semicolon is missing.) It cursor location (The semicolon is missing.) It should look like this:should look like this:

puts("begin processing");puts("begin processing"); Notice that an asterisk (*) appears next to the Notice that an asterisk (*) appears next to the

filename in the Edit window's title bar, filename in the Edit window's title bar, indicating that the source file has been indicating that the source file has been modified. The asterisk disappears when the modified. The asterisk disappears when the file is saved.file is saved.

Choose FileChoose File→→Save or press Ctrl+S to save Save or press Ctrl+S to save your changes to volume.c.your changes to volume.c.

Page 53: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 54

Changing Program Options and Fixing Changing Program Options and Fixing Syntax ErrorsSyntax Errors

Choose ProjectChoose Project→→Build or click the (Incre-mental Build or click the (Incre-mental Build) toolbar button. Code Composer Studio Build) toolbar button. Code Composer Studio rebuilds files that have been updated.rebuilds files that have been updated.

Choose FileChoose File→→Load Program and select volume1.out.Load Program and select volume1.out. Choose DebugChoose Debug→→Go Main to begin execution from Go Main to begin execution from

the main function. The execution halts at main and is the main function. The execution halts at main and is identified by .identified by .

Choose DebugChoose Debug→→Run or click the (Run) toolbar Run or click the (Run) toolbar button.button.

Choose DebugChoose Debug→→ Halt to quit running the program. Halt to quit running the program.

Page 54: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 55

Adding a Probe Point for File I/OAdding a Probe Point for File I/O

To transfer input data from a file on the To transfer input data from a file on the host PC to a buffer on the target for use host PC to a buffer on the target for use by the algorithmby the algorithm

To transfer output data from a buffer To transfer output data from a buffer on the target to a file on the host PC for on the target to a file on the host PC for analysisanalysis

To update a window, such as a graph, To update a window, such as a graph, with datawith data

Page 55: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 56

Adding a Probe Point for File I/OAdding a Probe Point for File I/O

Choose FileChoose File→→Load Program. Select volume1.out, Load Program. Select volume1.out, and click Open.and click Open.

Double-click on the volume.c file in the Project Double-click on the volume.c file in the Project View.View.

Put your cursor in the line of the main function Put your cursor in the line of the main function that says:that says:

dataIO();dataIO();

Click the (Toggle Probe Point) toolbar Click the (Toggle Probe Point) toolbar button. The selection margin indicates that a button. The selection margin indicates that a probepoint has been set. probepoint has been set.

From the File menu, choose File I/O. From the File menu, choose File I/O. The File I/O dialog appears so that you can select The File I/O dialog appears so that you can select

input and output files. input and output files.

Page 56: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 57

Adding a Probe Point for File I/OAdding a Probe Point for File I/O

In the File Input In the File Input tab, click Add File.tab, click Add File.

Browse to the Browse to the volume1 project volume1 project folder you created, folder you created, select sine.dat and select sine.dat and click Open.click Open.

In the File I/O In the File I/O dialog, change the dialog, change the Address to Address to inp_buffer and the inp_buffer and the Length to 100. Length to 100. Also, put a check Also, put a check mark in the Wrap mark in the Wrap Around box.Around box.

Page 57: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 58

Adding a Probe Point for File I/OAdding a Probe Point for File I/O

Click Add Probe Point. The Click Add Probe Point. The Probe Points tab of the Probe Points tab of the Break/Probe Points dialog Break/Probe Points dialog appears. appears.

In the Probe Point list, In the Probe Point list, highlight the line that says highlight the line that says VOLUME.C line 61 --> No VOLUME.C line 61 --> No Connection.Connection.

In the Connect To field, In the Connect To field, click the down arrow and click the down arrow and select the sine.dat file from select the sine.dat file from the list.the list.

Click Replace. The Probe Click Replace. The Probe Point list changes to show Point list changes to show that this Probe Point is that this Probe Point is connected to the sine.dat connected to the sine.dat file.file.

Click OK. The File I/O Click OK. The File I/O dialog shows that the file is dialog shows that the file is now connected to a Probe now connected to a Probe Point.Point.

Click OK to close the File Click OK to close the File I/O dialog.I/O dialog.

Page 58: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 59

Displaying GraphsDisplaying Graphs

Choose Choose ViewView→→GraphGraph→→Time/Frequency.Time/Frequency.

In the Graph Property Dialog, In the Graph Property Dialog, change some of the variable change some of the variable properties to the values shown properties to the values shown here. here.

Click OK. An Input graph Click OK. An Input graph window for the Input Buffer window for the Input Buffer appears.appears.

Right-click on the Input graph Right-click on the Input graph window and choose Clear Display window and choose Clear Display from the pop-up menu.from the pop-up menu.

Choose Choose ViewView→→GraphGraph→→Time/Frequency Time/Frequency again.again.

This time, change the Graph This time, change the Graph Title to Output and the Start Title to Output and the Start Address to out_buffer. All the Address to out_buffer. All the other settings are correct.other settings are correct.

Click OK to display the Output Click OK to display the Output graph window. graph window.

Page 59: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 60

Animating the Program and Graphs Animating the Program and Graphs

In the volume.c window, put your cursor in the In the volume.c window, put your cursor in the line that calls dataIO.line that calls dataIO.

Click the (Toggle Breakpoint) toolbar button Click the (Toggle Breakpoint) toolbar button or press F9. A red icon is placed in the selection or press F9. A red icon is placed in the selection margin to represent the breakpoint.margin to represent the breakpoint.

Arrange the windows so that you can see both Arrange the windows so that you can see both graphs.graphs.

Click the (Animate) toolbar button or press Click the (Animate) toolbar button or press F12 to run the program.F12 to run the program.

Each time the Probe Point is reached, Code Each time the Probe Point is reached, Code Composer Studio gets 100 values from the Composer Studio gets 100 values from the sine.dat file and writes them to the inp_buffer sine.dat file and writes them to the inp_buffer address.address.

Page 60: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 61

Animating the Program and GraphsAnimating the Program and Graphs

Choose Debug→Halt to quit running the program.

Page 61: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 62

Adjusting the Gain Adjusting the Gain

Choose ViewChoose View→→Watch Window and select the Watch Window and select the Watch1 tab.Watch1 tab.

Click on the expression icon in the Name Click on the expression icon in the Name column and type gain as the name of the variable column and type gain as the name of the variable to watch.to watch.

Click on the white space in the watch window to Click on the white space in the watch window to save the change. The value should immediately save the change. The value should immediately appear as in the following example.appear as in the following example.

Page 62: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 63

Adjusting the GainAdjusting the Gain

If you have halted the program, click the If you have halted the program, click the (Animate) toolbar button to restart the program. (Animate) toolbar button to restart the program. Observe the input and output graph you created Observe the input and output graph you created earlier.earlier.

From the Debug menu, choose Halt.From the Debug menu, choose Halt. In the Watch Window, select the value of gain (1) In the Watch Window, select the value of gain (1)

and change it to 10.and change it to 10. From the Debug menu, choose Animate. Notice From the Debug menu, choose Animate. Notice

that the amplitude of the signal in the Output that the amplitude of the signal in the Output graph changes to reflect the increased gain as in graph changes to reflect the increased gain as in the following example:the following example:

Page 63: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 64

Adjusting the GainAdjusting the Gain

From the Debug menu, choose Halt.From the Debug menu, choose Halt. From the Project menu, choose Close.From the Project menu, choose Close. Close all other windows and graphs.Close all other windows and graphs.

Page 64: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 65

Part Part 33

Finite Impulse Response (FIR) FiltersFinite Impulse Response (FIR) Filters

Page 65: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 66

Learning ObjectivesLearning Objectives

Introduction to the theory behind FIR Introduction to the theory behind FIR filters:filters: Properties (including aliasing).Properties (including aliasing). Coefficient calculation.Coefficient calculation. Structure selection.Structure selection.

Implementation in Matlab and C.Implementation in Matlab and C.

Page 66: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 67

IntroductionIntroduction

Amongst all the obvious advantages that digital filters offer, the FIR filter can Amongst all the obvious advantages that digital filters offer, the FIR filter can guarantee linear phase characteristics.guarantee linear phase characteristics.

Neither analogue or IIR filters can achieve this.Neither analogue or IIR filters can achieve this. There are many commercially available software packages for filter design. However, There are many commercially available software packages for filter design. However,

without basic theoretical knowledge of the FIR filter, it will be difficult to use them.without basic theoretical knowledge of the FIR filter, it will be difficult to use them.

Page 67: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 68

Properties of an FIR FilterProperties of an FIR Filter

Filter coefficients:Filter coefficients:

1

0

N

kk knxbny

x[n] x[n] represents the filter input,represents the filter input,bbk k represents the filter coefficients,represents the filter coefficients,

y[n] y[n] represents the filter output,represents the filter output,NN is the number of filter coefficients is the number of filter coefficients

(order of the filter).(order of the filter).

Page 68: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 69

Properties of an FIR FilterProperties of an FIR Filter

Filter coefficients:Filter coefficients:

1

0

N

kk knxbny

z-1

+

z-1 z-1

+ +

z-1

y(n)

x(n)

x xxxb0 b1 b2 bN-1

FIR equationFIR equation

Filter structureFilter structure

Page 69: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 70

Properties of an FIR FilterProperties of an FIR Filter

Filter coefficients:Filter coefficients:

1

0

N

kk knxbny

If the signal x[n] is replaced by an impulse If the signal x[n] is replaced by an impulse [n] then: [n] then:

1

0

N

kk knbny

Nbbby k 100 10

Page 70: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 71

Properties of an FIR FilterProperties of an FIR Filter

Filter coefficients:Filter coefficients:

1

0

N

kk knxbny

If the signal x[n] is replaced by an impulse If the signal x[n] is replaced by an impulse [n] then: [n] then:

1

0

N

kk knbny

Nnbnbnbny k 110

Page 71: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 72

Properties of an FIR FilterProperties of an FIR Filter

Filter coefficients:Filter coefficients:

1

0

N

kk knxbny

If the signal x[n] is replaced by an impulse If the signal x[n] is replaced by an impulse [n] then: [n] then:

1

0

N

kk knbny

kn for 0

knfor 1kn

Page 72: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 73

Properties of an FIR FilterProperties of an FIR Filter

Filter coefficients:Filter coefficients:

1

0

N

kk knxbny

Finally: Finally:

khb

hb

hb

k

1

0

1

0

Page 73: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 74

Properties of an FIR FilterProperties of an FIR Filter

Filter coefficients:Filter coefficients:

1

0

N

kk knxbny

With: With: khbk

The coefficients of a filter are the same as The coefficients of a filter are the same as the impulse response samples of the filter.the impulse response samples of the filter.

Page 74: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 75

Frequency Response of an FIR FilterFrequency Response of an FIR Filter

By taking the z-transform of h[n], H(z):By taking the z-transform of h[n], H(z):

Replacing z by eReplacing z by e-j-j in order to find the in order to find the frequency response leads to:frequency response leads to:

1

0

N

n

nznhzH

1

0

N

n

jn

ezenhHzH j

Page 75: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 76

Frequency Response of an FIR FilterFrequency Response of an FIR Filter

Since eSince e-j2-j2kk = 1 then: = 1 then:

Therefore:Therefore:

1

0

1

0

22N

n

jnN

n

jn enhenhH

HkH 2

FIR filters have a periodic frequency FIR filters have a periodic frequency response and the period is 2response and the period is 2..

Page 76: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 77

Frequency Response of an FIR FilterFrequency Response of an FIR Filter

Frequency response:Frequency response: HH 2

FIRFIR y[n]y[n]x[n]x[n]

FFss/2/2FFss/2/2

FreqFreq

FreqFreq

x[n

]x[

n]

y[n

]y[

n]

Page 77: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 78

Frequency Response of an FIR FilterFrequency Response of an FIR Filter

Solution: Use an anti-aliasing filter.Solution: Use an anti-aliasing filter.

FIRFIR y[n]y[n]x[n]x[n]ADCADC

Analogue Analogue Anti-AliasingAnti-Aliasing

x(t)x(t)

FFss/2/2FFss/2/2FreqFreqFreqFreq

x(t)

x(t)

y[n

]y[

n]

Page 78: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 79

Phase Linearity of an FIR FilterPhase Linearity of an FIR Filter

A causal FIR filter whose impulse response is symmetrical is A causal FIR filter whose impulse response is symmetrical is guaranteed to have a linear phase response.guaranteed to have a linear phase response.

0n

h(n)

1 n n+1 2n+12n

N = 2n + 2

0n

h(n)

1 n n+1 2n2n-1n-1

N = 2n + 1

Even symmetryEven symmetry Odd symmetryOdd symmetry

Page 79: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 80

Phase Linearity of an FIR FilterPhase Linearity of an FIR Filter

A causal FIR filter whose impulse response is symmetrical (ie h[n] = h[N-A causal FIR filter whose impulse response is symmetrical (ie h[n] = h[N-1-n] for n = 0, 1, …, N-1) is guaranteed to have a linear phase response.1-n] for n = 0, 1, …, N-1) is guaranteed to have a linear phase response.

Condition Phase

2

1Nk Phase Property Filter Type

1 nNhnh

Positive Symmetryk Linear phase

Odd Symmetry – Type 1

Even Symmetry – Type 2

Page 80: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 81

Phase Linearity of an FIR FilterPhase Linearity of an FIR Filter

Application of 90° linear phase shift:Application of 90° linear phase shift:

Signal separationSignal separation

9090oo

delaydelay

9090oo

delaydelay

++

++

++

--

II

QQ

ReverseReverse

ForwardForward

IHIH

QHQH

tBtAI rf sincos

tBtAQ rf cossin tBtA

tBtAIH

rf

rf

cossin

2sin

2cos

tBQIH rcos2

tBIQH fsin2

Page 81: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 82

Design ProcedureDesign Procedure To fully design and implement a filter five steps are required:To fully design and implement a filter five steps are required:

(1)(1) Filter specification.Filter specification.

(2)(2) Coefficient calculation.Coefficient calculation.

(3)(3) Structure selection.Structure selection.

(4)(4) Simulation (optional).Simulation (optional).

(5)(5) Implementation.Implementation.

Page 82: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 83

Filter Specification - Step 1Filter Specification - Step 1

(a)

1

f(norm)fc : cut-off frequency

pass-band stop-band

pass-band stop-bandtransition band

1

s

pass-bandripple

stop-bandripple

fpb : pass-band frequency

fsb : stop-band frequency

f(norm)

(b)

p1

s

p0

-3

p1

fs/2

fc : cut-off frequency

fs/2

|H(f)|(dB)

|H(f)|(linear)

|H(f)|

Page 83: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 84

Coefficient Calculation - Step 2Coefficient Calculation - Step 2 There are several different methods available, the most popular are:There are several different methods available, the most popular are:

Window method.Window method. Frequency sampling.Frequency sampling. Parks-McClellan.Parks-McClellan.

We will just consider the window method.We will just consider the window method.

Page 84: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 85

Window MethodWindow Method

First stage of this method is to calculate the coefficients of the First stage of this method is to calculate the coefficients of the ideal filterideal filter.. This is calculated as follows:This is calculated as follows:

0nfor

0nfor

2

sin2

12

1

2

1

c

c

cc

nj

njd

fn

nf

de

deHnh

c

c

Page 85: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 86

Window MethodWindow Method Second stage of this method is to select a window function based on the passband or Second stage of this method is to select a window function based on the passband or

attenuation specifications, then determine the filter length based on the required width of the attenuation specifications, then determine the filter length based on the required width of the transition band.transition band.

W i n d o w T y p e N o r m a l i s e d T r a n s i t i o nW i d t h ( f ( H z ) )

P a s s b a n d R i p p l e ( d B ) S t o p b a n d A t t e n u a t i o n( d B )

R e c t a n g u l a rN

9.00 . 7 4 1 6 2 1

H a n n i n gN

1.30 . 0 5 4 6 4 4

H a m m i n gN

3.30 . 0 1 9 4 5 3

B l a c k m a nN

5.50 . 0 0 1 7 7 4

K a i s e r

54.493.2

N

96.871.5

N

0 . 0 2 7 4

0 . 0 0 0 2 7 5

5 0

9 0

13284.12.1

3.33.3

kHz

kHzfNUsing the Hamming Using the Hamming

Window:Window:

Page 86: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 87

Window MethodWindow Method

The third stage is to calculate the set of truncated or windowed The third stage is to calculate the set of truncated or windowed impulse response coefficients, h[n]:impulse response coefficients, h[n]:

nWnhnh d even Nfor

odd Nfor

22

2

1

2

1

Nn

N

Nn

N

133

2cos46.054.0

2

cos46.054.0

n

N

nnW

forfor

Where:Where:6666 nforfor

Page 87: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 88

Window MethodWindow Method

Matlab code for calculating coefficients:Matlab code for calculating coefficients:close all;clear all;

fc = 8000/44100; % cut-off frequencyN = 133; % number of tapsn = -((N-1)/2):((N-1)/2);n = n+(n==0)*eps; % avoiding division by zero

[h] = sin(n*2*pi*fc)./(n*pi); % generate sequence of ideal coefficients[w] = 0.54 + 0.46*cos(2*pi*n/N); % generate window functiond = h.*w; % window the ideal coefficients

[g,f] = freqz(d,1,512,44100); % transform into frequency domain for plotting

figure(1)plot(f,20*log10(abs(g))); % plot transfer functionaxis([0 2*10^4 -70 10]);

figure(2);stem(d); % plot coefficient valuesxlabel('Coefficient number');ylabel ('Value');title('Truncated Impulse Response');

figure(3)freqz(d,1,512,44100); % use freqz to plot magnitude and phase responseaxis([0 2*10^4 -70 10]);

Page 88: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 89

Window MethodWindow Method

0 0.5 1 1.5 2

x 104

-6000

-4000

-2000

0

Frequency (Hz)

Pha

se (

degr

ees)

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

x 104

-60

-40

-20

0

Frequency (Hz)

Mag

nitu

de (

dB)

0 20 40 60 80 100 120 140-0.1

0

0.1

0.2

0.3

0.4

Coefficient number

Val

ue

Truncated Impulse Response

Page 89: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 90

Realisation Structure Selection - Step 3Realisation Structure Selection - Step 3

1

0

N

k

kk zbzH

zXzHzY 1....1 110 Nnxbnxbnxbny N

z-1

z-1

z-1

+ + +

b0

b2

bN-1

y(n)

x(n)

b1

Direct form structure for an FIR filter:Direct form structure for an FIR filter:

Page 90: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 91

Realisation Structure Selection - Step 3Realisation Structure Selection - Step 3

1

0

N

k

kk zbzH

Linear phase structures:Linear phase structures:

N even:N even:

N Odd:N Odd:

1

2

0

1

N

k

kNkk zzbzH

2

1

0

2

1

2

11

N

k

N

NkNk

k zbzzbzH

Direct form structure for an FIR filter:Direct form structure for an FIR filter:

Page 91: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 92

Realisation Structure Selection - Step 3Realisation Structure Selection - Step 3

(a) N even.(a) N even.

(b) N odd.(b) N odd.+

b0

+

+

+

+b

1

+b

2

+b

N/2-1

y(n)

(a)

z-1

z-1

z-1

z-1

z-1

+

b0

+

+

+

+b

1

+b

2

+b (N-3)/2

y(n)

x(n)

b(N-1)/2

+

(b)

z-1

z-1

z-1

z-1

z-1

z-1

Page 92: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 93

Realisation Structure Selection - Step 3Realisation Structure Selection - Step 3

1

0

N

k

kk zbzH

Cascade structures:Cascade structures:

M

kkk

NN

NN

N

k

kk

zbzbb

zb

bz

b

bz

b

bb

zbzbzbbzbzH

1

22,

11,0

1

0

12

0

21

0

10

11

22

110

1

0

1

...1

...

Direct form structure for an FIR filter:Direct form structure for an FIR filter:

Page 93: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 94

Realisation Structure Selection - Step 3Realisation Structure Selection - Step 3

1

0

N

k

kk zbzH

Cascade structures:Cascade structures:

z -1

+b

1,1

x(n)

z -1

+

b1,2

z -1

+b

2,1

z -1

+

b2,2

z -1

+b

M,1

z -1

+

bM,2

y(n)b0

Direct form structure for an FIR filter:Direct form structure for an FIR filter:

Page 94: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 95

Implementation - Step 5Implementation - Step 5 Implementation procedure in ‘C’ with fixed-point:Implementation procedure in ‘C’ with fixed-point:

Set up the codec (Set up the codec (\Links\\Links\CodecSetupCodecSetup..pdfpdf).).

Transform: to ‘C’ code. Transform: to ‘C’ code.

((\Links\\Links\FIRFixedFIRFixed..pdfpdf)) Configure timer 1 to generate an interrupt at 8000Hz (Configure timer 1 to generate an interrupt at 8000Hz (\Links\\Links\TimerSetupTimerSetup..pdfpdf).). Set the interrupt generator to generate an interrupt to invoke the Interrupt Service Routine (ISR) (Set the interrupt generator to generate an interrupt to invoke the Interrupt Service Routine (ISR) (\Links\\Links\InterruptSetupInterruptSetup..pdfpdf).).

1

0

N

kk knxbny

Page 95: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 96

Implementation - Step 5Implementation - Step 5 Implementation procedure in ‘C’ with floating-point:Implementation procedure in ‘C’ with floating-point:

Same set up as fixed-point plus:Same set up as fixed-point plus: Convert the input signal to floating-point format.Convert the input signal to floating-point format. Convert the coefficients to floating-point format.Convert the coefficients to floating-point format. With floating-point multiplications there is no need for the shift required when using Q15 format.With floating-point multiplications there is no need for the shift required when using Q15 format.

See See \Links\\Links\FIRFloatFIRFloat..pdfpdf

Page 96: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 97

Implementation - Step 5Implementation - Step 5 Implementation procedure in assembly:Implementation procedure in assembly:

Same set up as fixed-point, however:Same set up as fixed-point, however: is written in assembly.is written in assembly.

((\Links\\Links\FIRFixedAsmFIRFixedAsm..pdfpdf))

The ISR is now declared as external.The ISR is now declared as external.

1

0

N

kk knxbny

Page 97: DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:

Dr. Erhan Ince and Burcin Ozmen, Eastern Mediterranean University, (c) Texas Instruments 2002

Slide 98

Thanks for ListeningThanks for Listening