Islamic University of Gaza Faculty of Engineering ...site. Islamic University of Gaza Faculty of...

download Islamic University of Gaza Faculty of Engineering ...site. Islamic University of Gaza Faculty of Engineering

of 19

  • date post

    16-Mar-2020
  • Category

    Documents

  • view

    7
  • download

    0

Embed Size (px)

Transcript of Islamic University of Gaza Faculty of Engineering ...site. Islamic University of Gaza Faculty of...

  • Islamic University of Gaza

    Faculty of Engineering Electrical Engineering Department

    Spring-2011 _________________________________________________________________________________

    DSP Laboratory (EELE 4110)

    Lab#2 Introduction to Texas Instruments DSK TMS320C6711

    OBJECTIVES:

    Our aim is to become familiar with:

     Testing the software and hardware tools with Code Composer Studio CSS.

     TMS320C6711 DSP chip and supporting architecture (DSK).

     C Programming examples to test the tools

    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.

    and so on.

    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, and speakers. A signal/spectrum analyzer is optional.

    Shareware utilities are available that utilize the PC and a sound card to create a virtual

    instrument such as an oscilloscope, a function generator, or a spectrum analyzer. Eperiment Introduction to the TMS320C6711 DSK And Code Composer Studio

    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

    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.

  • 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

    Figure 1.1: A photograph of TI TMS320C6711

  • 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 pr