This action might not be possible to undo. Are you sure you want to continue?
Henri Penttinen 2004-03-24 Abstract This text will give some guidelines for using the Texas Instruments Code Composer Studio (CCS) environment for DSP coding. The short example uses the simulator-template used on the course S89.510 Digital Signal Processors and Audio Signal Processing at Helsinki University of Technology, Espoo, Finland. S-89.510. An associated manual is the DSK-GUIDE: GUIDE TO THE S-89.510 PROJECT TEMPLATE CODE FOR TEXAS INSTRUMENTS TMS320C5416 DSK by Aki Härmä, available on the course web pages. You should also get familiar with the DSKGUIDE. Other helpful guides are the CCS Help manuals, see e.g., Code Composer Studio Help’s “Tutorial - Learn how to begin developing DSP applications with Code Composer Studio IDE.” READ THIS FIRST: In this manual you will find supportive information and guidelines. Read Texas C-54 family manuals for descriptive information. Recommended manuals:
• TMS320C54x DSP Reference Set, Volume 1: CPU and Peripherals
o The CPU architecture, internal register structure, data and program addressing, instruction pipeline, and on-chip peripherals for the TMS320C54x digital signal processors. Also includes development support information, parts lists, and design considerations for using the XDS510 emulator.
• TMS320C54x DSP Reference Set, Volume 2: Mnemonic Instruction Set [\CD-ROM\C54xx\pdf\spru172c.pdf]
o o You will be coding in Mnemonic, therefore vol. 3 is not included. The mnemonic instructions. Also includes a summary of instruction set classes and cycles.
• TMS320C54x DSP Reference Set, Volume 4: Applications Guide [\CD-ROM\C54xx\pdf\spru173.pdf]
o Software and hardware applications for the TMS320C54x digital signal processors. Also includes development support information, parts lists, and design considerations for using the XDS510 emulator. Example codes.
TMS320C54x Assembly Language Tools User's Guide [ \CD-ROM\C54xx\pdf\spru102e.pdf ]
o o Important info on directives, labels, symbolic constants Assembly language tools designed for the TMS320C54x devices. - Assembler - Archiver - Linker - Absolute lister - Cross-reference utility - Hex-conversion utility - Mnemonic-to-algebraic translator utility
Before starting to code assembly you should clarify to yourself from manuals, at least, what the following things and concepts actually mean: o directive o label o symbolic constants
1 Quick guide on How to use the simulator-template
Here very basic features for de-bugging DSP code with CCS will be introduced in a compact form. Start CCS 2.2. Check if the settings are as described in section 1.2. From parallel debug manager choose: Open -> C5416 Device Simulator/CPU. Open project: Project->Open [ ti\myprojects\...\Simulator-Template\template ]. Rebuild All (icon or Project-> Rebuild All). Load program: File -> Load program [Simulator-Template\Debug\template]. Open simulator-template.c to the file view by double clicking it [template.pjt – source simulator-template.c]. 8) Add a break-point on line ‘ output[i]= right_output; ’ either by double clicking the grey area on the side or clicking the hand-icon (Toggle Break Points). A read circle appears on the left. 9) Run the program. Now it automatically stops at the break point on line 112. 10) View memory: Open from View-> Memory. A MemoryWindowOptions dialog appears. Write to Address: input, Page:Data. a. Deselect Float in Main Window: Click right mouse button and deselect Float in Main Window. This way you can look at the code and memory at the same time. 11) Add a Watch Window: Choose from View -> Watch Window. Now the screen should look something like in Figure 1. 12) Run Program: Now run the program a few times. It stops at the break point until the loop expires. You can see how the values from the input vector appear to the output section in memory, BUT with a delay. a. Re-load the after gone through the loop. Now watch the _buffer1 section from the memory and how it runs circularly. [View-> Memory -> Address: _buffer1] 13) To see the values in registers open CPU registers from View->Registers->CPU Registers. 1) 2) 3) 4) 5) 6) 7)
Figure 1: Screen shot of CCS 2.2. running simulator-template with memory and watch windows open.
1. 1 Setting CCS 2.2 for simulation
For proper usage of the simulator do the following, if not done yet. Thank you to Tuomas Kantonen for pointing this out. In the File View window of CCS choose: 1) DSP/BIOS Config (folder) -> template.cdb (file) [double click] 2) System -> MEM – Memory Section Manager 3) Right click SARAM03 -> properties 4) If base is 0x028000 change to 0x008000 5) Click OK. a) b) c) d) e) DSP/BIOS Config -> template.cdb System -> Input/Output Right click RTDX - Real-Time Data Exchange Settings -> properties If RTDX Mode is JTAG, change to Simulator. Click OK.
2 Other useful features
In the previous chapter you learned how to follow changes in the memory, in variables, and CPU registers. These are the basic tools when de-bugging a DSP code. In addition to these features the CCS environment enables other helpful tools, such as using a so called Probe Point and displaying memory sections as graphs. Here how to display graphs will be discussed and the main points of the Probe Point will be given. How to use the Probe Point is explained and exemplified in Code Composer Studio Help’s “Tutorial - Learn how to begin developing DSP applications with Code Composer Studio IDE.”
2.1 Displaying Graphs
1) Open Graph Property Dialog (see Fig. 2): View-> Graph -> Time/Frequency 2) Choose: a. Display Type: Single Time b. Graph Title: Input c. Start Address: input d. Page: Data e. Acquisition Buffer Size: 30 f. Display Data Size: 30 g. DSP Data Type: 16-bit signed integer i. This is because AD-converter input is Int16 type, if you choose the wrong data type the graph will be incorrect, try it out. h. Click OK. 3) Run the program until the loop expires by clicking the Run button numerous times or by removing the break point before. Then halt the process. Now something has been written to the output vector. 4) Repeat procedure 2) but change title and start address to output. 5) Now you see something like in Fig. 3. 6) What you see from the figures is that the output put is shifted related to the input. (How many samples has it been shifted?). The template code is a delay, therefore the shift. 7) It is often practical to view things on a graph, BUT do not forget how useful plain numbers on a screen are.
Figure 3: Displaying output (top-pane) and input (bottom-pane).
Figure 2: Graph Display Dialog.
2.3 What is a Probe Point?
Here only the main points of Probe Points are given. See Composer Studio Help’s “Tutorial - Learn how to begin developing DSP applications with Code Composer Studio IDE.” on how to use it (utilizing activating teaching methods). A Probe Point can be used for:
• • •
To transfer input data from a file on the host PC to a buffer on the target for use by the algorithm To transfer output data from a buffer on the target to a file on the host PC for analysis (basic debugging, MATLAB etc.) To update a window, such as a graph, with data
+ Note that Probe Point:
Probe Points halt the target momentarily, perform a single action, and resume target execution.
+ Calculators (including the windows accessories->calculator [scientific mode]) have often decimal and hexadecimal converting utilities. To start the Tutorial choose Help->Tutorial -> Either choose straight the Developing a Simple Program highlighted in blue or from Code Composer Studio IDE -> Developing a simple program. The Probe Point section is named ‘Adding a Probe Point for File I/O’.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.