Introduction and Organization
1.3. HOW TO USE THIS BOOK 9 more information). Using the HPI interface board on the C6713 DSK permits full use of
all the winDSK features that appear throughout this book; this add-on board is not needed for the OMAP-L138 Experimenter Kit.
As mentioned above, the OMAP-L138 Experimenter Kit has many built-in I/O options.
In addition to a number of specialized connections, the board includes multiple USB ports, an RJ-45 (Ethernet), and an RS-232 (serial port) connector. When using Code Composer Studio to run C programs on the C6748 core, the USB “mini-B” receptacle located closest to the RS-232 connector is used. Both this USB connector and the RS-232 connector can be seen at the upper left of the board in Figure 1.1(a). However, this USB connector is not currently used with winDSK. While we ultimately hope to use either the RJ-45 (Ethernet) or one of the USB connectors for host computer communications in a future implementation5 of winDSK, the RS-232 port represented a more readily available solution for establishing reliable high-speed host to real-time target communications that would allow the full suite of winDSK programs to run [55, 56].
To prepare the OMAP board for use with winDSK8, the user loads the necessary code into the OMAP-L138 Experimenter Kit’s flash memory utilizing the RS-232 port and a free flash programming utility (see instructions on the bookware CD-ROM). This needs to be done only once (unless the user needs to reprogram the flash memory for some other purpose later). Power-on program execution is determined by the board’s DIP switches.
With the DIP switches in the correct position (again, see instructions on the bookware CD-ROM), the ARM9 processor will load the winDSK8 code from the flash memory upon power up, and the ARM9 then takes control of the C6748 DSP core with communication to the host computer accomplished via the RS-232 port. In this way, the ARM9 is acting in much the same way that the host port interface (HPI) board acted on the older C6713 DSK, but accomplishes these communication functions locally via the RS-232 port and the SoC without the need for an additional interface board. In this configuration, both the ARM9 core and the C6748 core are being used.
Many newer computers, particularly laptops, don’t come with serial ports anymore, since the ubiquitous USB interface has taken over many of the I/O needs of users. If the particular host computer to be used with the OMAP board and winDSK8 has no serial port, an inexpensive USB-to-serial adapter works quite well. We have achieved transfer rates of over 900 kBaud using these adapters (but be aware that some older USB-to-serial adapters do not support such high rates).
When using winDSK6 with a C6713 DSK, clicking on a button in the graphical user interface (GUI) on the host computer initiates a download of the appropriate code from the host to the DSK, and starts the code running on the DSK. When using winDSK8 with the OMAP-L138 Experimenter Kit, clicking on a button in the GUI on the host computer sends a short message to the ARM9 core on the OMAP SoC, telling it to load the appropriate winDSK8 code from the on-board flash memory into the C6748 core and start it running.
From the user’s perspective, the primary difference between running winDSK6 on the C6713 DSK and running winDSK8 on the OMAP-L138 board is that the former uses the USB connection on the HPI interface board, while the latter uses the serial RS-232 connection on the main OMAP-L138 board. The “user experience” is very similar, regardless of the DSP hardware being used.
In a course-based laboratory setting, a mix of C6713 and OMAP-L138 Experimenter Kit boards could be used as desired for nearly all aspects of this book, including winDSK demonstrations and C programs using Code Composer Studio. The authors have gone to great lengths to maintain compatibility and similar operation for both of these boards
5Any changes that affect instructions provided in this book will be minimized and will be listed on the authors’ book web site (http://rt-dsp.com) as soon as possible.
10 CHAPTER 1. INTRODUCTION AND ORGANIZATION throughout the book.
1.3.3 Transition to Real-Time
For each DSP concept in this book, we will typically take a four-step approach. Specifically, we will follow the approach listed below.
• Briefly review the relevant DSP theory.
• Demonstrate the concept with an easy-to-use tool called winDSK. With winDSK, you can program and manipulate the real-time hardware without having to write a pro-gram.
• Explain and demonstrate how MATLAB techniques can be used to implement the concept (not necessarily in real-time, but in a way most students find easy to under-stand).
• Provide and explain the C code necessary for you to implement your own real-time program using a DSK and its software development tools.
For most readers of this book, the first step should serve only as a refresher and to set in context the overall discussion.6 The next step permits the reader to further explore the concept and facilitates “what if” experimentation unencumbered by the need to program any code. The next step, using MATLAB examples, helps to reinforce your understanding of the underlying DSP theories. These examples use standard MATLAB commands that occasionally require the Signal Processing Toolbox.7 Our well-commented MATLAB code is written such that the algorithm is clearly evident; optimizations that may obscure the underlying concept are avoided. Once the reader has worked through this non-real-time DSP experience, the final step is the key to “bridging the gap” to real-time operation.
From the discussion in the book, the reader will be able to confidently implement the same algorithms in C using state-of-the-art real-time DSP hardware. Each chapter ends with a list of follow-on challenges that the reader should now be prepared to implement as desired. Section I (Enduring Fundamentals) chapters also include end-of-chapter problems for homework or self-study.
A cautionary note: some of our students have tried to “save time” by skipping the MATLAB step and jumping right into the C code. Don’t do it! It’s been demonstrated time and time again that the students who first work with the algorithms in MATLAB consistently get the C version to work correctly. Those who skip the MATLAB step have a much harder time, and often can’t get their code to work properly at all. Don’t say we didn’t try to warn you!
1.3.4 Chapter Coverage
The first nine chapters of this book cover topics that we believe are a significant part of the enduring fundamentals of DSP, presented in the context of real-time operation. The experience you gain while studying these chapters is crucial to being ready for the real-time DSP projects that are presented in the chapters of Section II (Projects). A special mention
6As mentioned in the Preface, we anticipate that the reader will use this book in conjunction with a more traditional, theoretical signal processing text if this is their first exposure to DSP. The book you are now reading is not intended to teach basic DSP theory.
7The Signal Processing Toolbox is an optional product for MATLAB, also available from The Math-Works. You may also want to explore graphical programming environments suitable for DSP (i.e., Simulink from The MathWorks and LabVIEW from National Instruments).
1.3. HOW TO USE THIS BOOK 11 Table 1.1: Top-level directory organization of the book’s CD-ROM. CCS stands for Code Composer Studio, the software development environment for Texas Instruments DSPs.
File or Directory Comment
code contains subdirectories with source code for each chapter code\chapter_xx\matlab contains MATLAB files for Chapter xx
code\chapter_xx\ccs contains CCS files for Chapter xx code\appendix_x contains files related to Appendix x code\common_code contains files related to all CCS projects code\target_configuration contains board setup for all CCS projects
docs contains supplemental information
test_signals contains test signals for exercises and projects
pc_apps contains winDSK6 and winDSK8 software
needs to be made here regarding the appendices in Section III. While most other DSP books force you to track down and look up various key pieces of information that you need for real-time DSP from a plethora of sources, the appendices at the end of this book (with supplemental information provided on the CD-ROM) collect in a single location a distilled and simplified version of all the important topics that are needed to work effectively with DSP hardware such as the C67xx DSK. The appendices by themselves are probably worth the price of this book!
1.3.5 Hardware and Software Installation
The CD-ROM that accompanies this book contains a great deal of useful software (see Table 1.1 for the directory organization). This software is an integral part of the book, and the remaining chapters assume that you have already installed it all properly, along with the DSK itself and the software that accompanies the DSK. To install the DSK hardware and software, complete the “Hardware Getting Started” guide and the “Software Getting Started” guide that come with your DSK. To install the software that accompanies this book, follow the procedure outlined below.
1. Put the bookware CD-ROM into your computer’s CD drive.
2. View the ReadMe file for the latest information.
3. Run the setup program contained on the bookware CD-ROM.
The setup program is provided to make the overall software installation much easier, and will also install winDSK6 or winDSK8 as appropriate. Just copying files yourself from the CD-ROM to your hard disk may not result in the files being copied to the appropriate directories. We highly recommend using the setup program.
After you have completed the hardware and software installation discussed above, launch either winDSK6 or winDSK8 (depending upon which DSK you are using). Important:
Ensure the correct selections have been made in the “DSK and Host Configuration” panel of winDSK6 or the “Board and Interface Configuration” panel of winDSK8 for each parameter8
8You may want to experiment with communication port parameters, as more than one speed or con-figuration will probably work. In general, with either version of winDSK, try to use the fastest mode that works with your computer. See the winDSK “Help” button for more information.
12 CHAPTER 1. INTRODUCTION AND ORGANIZATION prior to initiating the DSK Confidence Test. A successfully completed DSK confidence test will be one of your best indicators that you have properly installed the DSK. You can also use the winDSK confidence test in the future to easily verify the proper operation of your DSK.
Note that when using a C6713 DSK, the USB port on the HPI interface card, shown in Figure 1.2(b), is used when running winDSK6, but the USB port on the DSK itself is used when running C code with Code Composer Studio. This has been a common point of confusion in the past. When using the OMAP-L138 Experimenter Kit, the RS-232 serial connector is used when running winDSK8, but the USB port located next to the RS-232 connector is used when running C code with Code Composer Studio. Both of these connectors on the OMAP-L138 Experimenter Kit are shown at the upper left of the board in Figure 1.1(a). See the previous discussion in Section 1.3.2 for more details.
A minor point: where the text shows figures depicting various screen shots of winDSK, MATLAB, Code Composer Studio, or other software tools, keep in mind that later versions of these tools may have slightly different screen representations for the user interface. There will also be slight variations between winDSK6 and winDSK8 screens, but the functionality will be essentially the same. It should be fairly obvious to the reader how a given figure as shown in the text relates to a possible newer version of the same software tool.
1.3.6 Reading Program Listings
Important: Some of the code listings in this book include lines that, despite our best efforts, are too long to fit within the book’s margins and yet still use meaningful variable and function names. So be watchful when reading program listings for those instances where a line wrap occurred in the listing due only to page margins. In that case, the wrapped part of the line is indented, and the characters “[+]” show up to identify the beginning of the wrapped part of the line. The “[+]” characters are not part of the program, which you’ll confirm if you compare the listing as printed in the book to the actual program file on the CD-ROM. Note that the line numbers shown at the left edge of the listings do not increment for the wrapped part of a line.
A minor point: a particular code listing shown in the text may not always match exactly the associated code listing you’ll find on the CD-ROM (but should be very similar). This is because the text is “frozen” before the code, and there may be slight improvements in the code before the CD-ROM is created. There may also be improvements and updates to the code available on the textbook web site, as mentioned in the Preface.