You are on page 1of 6

A TOOL FOR REAL-TIME DSP DEMONSTRATION AND EXPERIMENTATION

Michael G. Morrow
University of Wisconsin-Madison

Thad B. Welch
US. Naval Academy, MD

Cameron H. G. Wright
U.S. Air Force Academy, CO

ABSTRACT hardware is now dependent on driver files installed as part


of Code Composer Studio, meaning the DSK hardware
An innovative, stand-alone software package that cannot he used except on machines with Code Composer
demonstrates numerous DSP concepts is described, and Studio installed. This can pose a serious burden for
examples of the program’s capabilities are given. By teachers wanting to do demonstrations in classrooms or
providing a simple and intuitive interface to capable DSP laboratories where Code Composer Studio is not installed;
hardware, teachers and students alike can perform real-time whether due to a lack of sufficient licenses or just not
interactive, graphical applications. Experimental learning is having time to install the package and uninstall it for a
facilitated by providing simple access to real-time DSP transitory demonstration. A related problem we found is
filters and other concepts. This package can help ease the that modifications were made to the drivers during major
introduction of DSP theory and application to students at revisions of Code Composer Studio, rendering our
all age levels, and stimulate and encourage student interest software inoperative. Another issue is in fact caused by
in DSP. To facilitate student projects with graphical the extensive professional-grade capabilities of Code
interfaces to DSP hardware, a complete software example Composer Studio itself - it is indeed a very complex
has also been made available for use. software package, and to the novice it is in fact often
overwhelming. If your pedagogical goal is to get students
to experiment with different coefficients in an FIR filter and
observe the results in real-time, then using Code Composer
1. INIRODUCTION Studio is quite likely overkill and potentially an inhibitor to
leaming.
This paper is a follow-up to the authors’ experience with In order to take students on a joumey from theory to
their software package winDSK [ I ] that described a real-time practice, there needs to he an infrastructure in
demonstration platform based in the Texas Instruments place to support them and target as many modes of
TMS320C31 DSP Starter Kit (DSK). Although this DSK is leaming as reasonably possible. [2] One very important
quite limited in memory space and has limited segment of this structure is tools to support both faculty
computational capability, it is nonetheless an effective demonstrations and student experimentation and self-
platform for demonstration use, and in fact remains in leaming. Professional-grade tools such as Code Composer
active use at numerous universities around the world. Studio are generally just simply f o o capable and complex
Since that time, Texas lnstruments has released the to lend themselves easily to this pursuit.
TMS320C6711 DSK, incorporating a much more potent
processor and significantly enhanced memory. This new 2. A SOLUTION
DSK also ships with Texas lnstruments Code Composer
Studio, a complete, integrated production-grade code To overcome these difficulties, the authors developed a
generation, debugging, and analysis environment. new software package tailored to the TMS32OC6711 DSK
While this greatly enhances the ability of skilled and much improved and more capable after several years
programmers to implement significant DSP algorithms m a of experience with winDSK. Our program winDSK6 is a
laboratory setting, it also makes it more difficult to do Windows 9XiNT/2000 application that provides an
demonstrations for several reasons. First, the DSK intuitive and easy to use interface, and ensures that a

0-7803-8116-5/02/$17.00 02002 IEEE. 162

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY TIRUCHIRAPALLI. Downloaded on November 29, 2009 at 06:41 from IEEE Xplore. Restrictions apply.
student's first experience with the DSK is a positive and as sampling rate) in real-time while the application is
motivating one. It makes the DSK hardware much more running on the DSK. The available applications include an
accessible to students, and facilitates easy-to-use, ready- oscilloscopelspectrum analyzer, multi-channel signal
made classroom and laboratoly demonstrations. For and/or arbitrary waveform generator, graphic equalizer,
simplicity, all application software and DSK code is audio effects, guitar synthesizer, several filters, and DTMF
embedded in the executable file. A help file provides a generator. More detailed descriptions of some
section on each demonstration that discusses the theory applications follow.
and operation of the application, and context -specific help
is available on each application conh.ol. 3.1. Talk-Through
To eliminate the requirement to have Code Composer
Studio installed on a machine running the software, a The talk-through application is a simple pass-through
completely new DSK driver was developed that operates operation, echoing the input signal to the output. It allows
under Windows 9X/NT/2000. (Operation under Windows for demonstrations of quantization effects by allowing the
XP has not been thoroughly tested as of the submission user to vary the effective number of bits from the maximum
date o f this paper.) winDSK6 is written in C++, and down to just 1. This provides for dramatic demonstrations
centers on an object that encapsulates the DSK's physical of converter resolution versus perceived noise floor. Since
and logical interface to the host computer. The most of the available audio codecs use sigmadelta
applications that form the basis of winDSK6 have evolved converters, it is not possible to demonstrate aliasing at
over time and experience, with the authors' needs in the normal audio frequencies. By decimating without filtering,
classroom and laboratory being the motivating force winDSK6 makes it possible to vary the effective sample
behind new applications and capabilities in the current frequency and demonstrate aliasing effects even when
version. using these converters. Spectral inversion can also he
Individual applications are dialog-based, and perform demonstrated.
a similar sequence of operations to execute an application
program:
Reset and reboot the DSK
Download the application software
Locate the shared memory block and initialize
any data to synchronize the host computer
and the DSK
Run the DSK application
This occurs immediately upon selecting an application.
Once the application is running, communications through
the shared memory block are used to control the DSK
Figure 1 Screen capture of talk-through appplicatioa
application's behavior in response to user input on the
host computer. This gives users real-time interactivity and 3.2. Graphic Equalizer
immediate feedback when changes are made on the host
computer. The graphic equalizer application implements a five-band
graphic equalizer on each channel of the analog interface.
3. DEMONSTRATIONAPPLICATIONS It is implemented as five parallel FIR filters, an intentionally
brute force method to demonstrate the available
The winDSK6 demonstration applications highlight a processing power. Individual slider controls are used
number of signal processing operations. Nearly all manipulate the gain in each band and overall.
applications require only the basic DSK hardware to
operate, although the limitations of the DSK's onboard
codec do significantly restrict what can he accomplished.
In our experience, we have found that using one of the CD-
quality codec daughtercards (available from Texas
Instruments, Educational DSP, and other sources) to be
much more useful. For this reason, winDSK6 provides
support for these more capable analog interfaces in most
applications. Applications also include a DSK Settings
Figure 2 Screen capture of graphic equalizer application.
button that allows for the control of codec functions (such

163

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY TIRUCHIRAPALLI. Downloaded on November 29, 2009 at 06:41 from IEEE Xplore. Restrictions apply.
Texas Instrument THS1206 evaluation module (EVM). This
3.3. Arbitrary Waveform Generator analog interface provides four simultaneously sampled 12-
bit channels at variable sample rates ranging up to in
The arbitrary waveform generator application is capable of excess of 1OOKHz.
generating sine, triangle, or square waveforms, or noise, to
the limits of the analog interface (amplitude and
frequency). The user can also download a series of values
from an ASCII text file on the host computer for arbitrary
waveform generation with one-shot or continuous
playback. On multichannel codecs, each channel is
independently controllable. This application is useful as a
no-additional-cost function generator for experimentation
when test equipment may not be available.
.. .

I
Figure 4 Screen capture of oscilloscope controls.

For spectral analysis, a number of different data


window types can be selected and the resulting effect
observed in real time. A very useful demonstration is
obtained with a variable frequency source at the input, and
sweeping across the frequency range while observing the
spectrum using different windows. (How would your
students explain the periodic changes in the shape of the
‘spike’ as it moves across the frequency axis when using a
rectangular window?) The actual spectral analysis
Figure 3 Screen capture of arbitrary waveform generator. computations are performed on the DSK, with the host
computer serving as a display device. The display itself is
3.4. OscilloscopeI Spectrum Analyzer a separate, resizable window, capable of operating as a
conventional oscilloscope or as a waterfall display using
The oscilloscope and spectrum analyzer application uses one of several color maps. Figure 5 shows a waterfall
the DSK to acquire and process the input data. The display acquired from a commercial radio broadcast using a
analog output can either pass through the input signal, or stereo analog interface.
function as a noise generator. By connecting the noise
output to the scope input through a given circuit, students
can investigate the response of a system. Standard
oscilloscope controls, operational modes, and triggering
are implemented, in addition to operation as a spectrum
analyzer. The scope display can be copied to the Windows
clipboard for documenting an experiment. In addition to a
number of audio codecs, this application also supports the

164

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY TIRUCHIRAPALLI. Downloaded on November 29, 2009 at 06:41 from IEEE Xplore. Restrictions apply.
valid range. Fixed’point values are displayed in both their
fractional equivalent representations and the actual integer
value.

Figure 5 Screen capture of spectrogram display.


Figure 7 Screen capture of FJR Nter application.
3.5. Audio Effects
3.7. W Filter (SOS)
The audio effects application implements a variety r f
effects often used in music production. These include The IIR filter (SOS) application operates similarly to the
echo, chorus, tremolo, and flanging. The parameters FIR filter described above, but implements 20 cascaded
governing the effects can be varied beyond the customary second order sections. It also operates in both floating-
values to create unusual effects. This application has been point and fixed-point modes, with similar import features
used often as a motivational demonstration, sparking for acquiring coefficients from ASCII text and C language
student interest in wanting to know how the effects are files. One additional import capability is the ability to paste
implemented. in a series of coefficients from the Windows clipboard. The
format required is the same as that which is obtained by
displaying the coefficient matrix obtained from the
Mathworks’ MATLAB tf2sos function. This is intended to
provide an easy cut-and-paste method of testing filter
coefficients generated in the MATLAB environment.

Figure 6 Screen capture of audio effects application.

3.6. FIR Filter

The FIR filter application permits real-time experimentation


with filter coefficients, using either floating-point or fixed-
point computations. A 512-tap finite impulse response
filter is implemented on all codec channels. Fixed-point
integer coefficients are supported in both Q15 and 412 Figure 8 Screen capture o f W filter application.
formats. If the ‘Saturate’ mode is selected, all entries will
be automatically saturated to within the bounds of the Q
format in use.
Coefficients may be imported from ASCII text files, or
from C language files. If out of range values are
encountered when importing, the user is pompted to
accept the setting of saturation mode to limit values to the

165

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY TIRUCHIRAPALLI. Downloaded on November 29, 2009 at 06:41 from IEEE Xplore. Restrictions apply.
3.8. THS1206 Aliasing

The THS1206 Aliasing application provides a means to


both demonstrate aliasing and show how it can be used in
under-sampling. This application requires the Texas
Instruments THS1206 4channel simultaneous sampling
ADC for the analog input, with the onboard codec used for
analog output. The sampling frequency used is the fixed
8KHz rate of the onboard codec, and any combination of
the THS1206 channels can be summed together. The input
to the 7HS1206 is unfiltered and the converter itself is a . . . . . . . . . 1
pipelined converter, so aliasing is easily demonstrated Figure 10 Screen capture of HPI Test application.
without the inherent issues of sigmadelta converters.
Since the input bandwidth of the THS1206 is rated at 3.10. DSK Confidence Test
SOMHz, this application can also be used to demonstrate
the under-sampling of a radio frequency signal direct to an The DSK Confidence Test application provides a graphical
audio baseband signal, and to investigate the issues interface to a number of DSK functionality tests. Based on
involved. the DOS based confidence test software that is shipped
with the DSK, this application provides a easy to use
method for determining if the DSK is operating correctly.
In addition, it tests the bandwidth of the parallel port
interface and reports the results to the user. The tests may
be run individually, or in an automatic sequence.

I. . . . .
,

Figure 9 Screen capture of THS1206 aliasing application.

3.9. IIPI Interface Test . . . . .. .- - ..........


.-
.e , LED B e Tea(
. ,
-
.. ... .. .. ... . . . . . . . .~ . ._
....... __
.... ....
The HPI Test application is designed to provide a 9';. WDEC Tak.Thoughlert
__
.a+:.
graphical debugger to control and debug the shared . :_".....-. . - . -
. . . ... . . . .. .......
.- ._
memory interface between the host computer and the DSK I C@@ECOulpw ToncTsl
application. This tool supports DSK program loading, and
the inspection and modification of DSK memory. It is
invaluable for use when developing graphical interfaces
for DSK applications based on the winDSK6 kernel, a topic
discussed further in paragraph (4) below. In addition to a
number of individually controllable memory locations, it Figure 11 Screen capture of confidence test application.
provides a block viewer that is automatically set to the
shared memory block area when a program is loaded.
Memory locations can be viewed as floating point or
integer values, and addresses can be entered directly or by
look-up of known program symbols.

166

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY TIRUCHIRAPALLI. Downloaded on November 29, 2009 at 06:41 from IEEE Xplore. Restrictions apply.
4. SUPPORTING STUDENTPROJECTS
As educators, we need to provide informative and
One consequence of using winDSK6 has been a provocative demonstrations in our classrooms and labs, to
corresponding desire by students to create a simil& stimulate student interest and encourage learning.
interface for the DSP applications that they have written. winDSE6 is a tool that helps us to accomplish all these
However, the development and debugging of a complete things and more. The authors have found its capabilities to
interface of this nature is not possible for most students, he invaluable in a wide variety of situations, including the
given that they usually lack any significant experience in expected use in DSP and communications courses, but
writing software applications for the Microsoft Windows also very effective in computer engineering courses and in
API, the relative complexity of the DSK’s hardware high-school outreach programs. Paired with the significant
interface, the generally poor availability of good hardware capabilities of the TMS320C6711 DSK, winDSK6
documentation for the purpose, and simply having enough is an excellent demonstration platform in the classroom and
time to put it all together. (The authors’ experience in this in the laboratory. Although the authors have not
same endeavor has provided the opportunity for an in- conducted a scientifically valid study of the effects of
depth verification of these issues.) using winDSE6 specifically, observation and anecdotal
Recognizing this, the authors packaged the winDSE6 evidence indicate that it can play a significant role in both
DSK interface kernel with a complete and functional motivating students and providing them with a pathway to
project to give students a realistic opportunity to pursue experimentation and self-learning. Many students have
development of a graphical user interface for their remarked about the lasting impression that these real-time
applications. This package includes all source code for demonstrations made on them.
both a complete Microsoft Visual C++ application for the The authors freely distribute this software for
host PC and a complete Code Composer Studio application educational, non-profit use, and it may be downloaded
for the DSK. This sample application actually. implements hm:
most of the functionality of the Talk-Through application. http://eeeservO.ece.wise.edu/-morrowlsoff
By using this framework as a starting point, students are Source code for DSK applications is also available to
able to create a Windows interface to control their DSP educators. Interested parties are invited to contact the
application in a reasonable amount of time. This framework authors via email (morrow@ieee.org, tb.welch@ieee.org,
is available for download as described below. c.h.g.wright@ieee.org).

5. CONCLUSIONS &REFERENCES

To provide positive, motivating experiences to students [ I J M. G. Morrow, T. B. Welch, and C. H. G. Wright, “An
early in their DSP education, we must provide them with inexpensive software tool for teaching real-time DSP,” in
software tools that are intuitive, attention getting, robust, Proceedings of the 1st IEEE DSP in Education Workshop,
and easily installed. We must encourage experimental (Hunt, TX), IEEE Signal Processing Society, Oct. 2000.
learning, and provide vehicles for students who are not yet
ready for the complexities of real-time DSP programming. [2] C. H. Wright, T. B. Welch, D. M. Etter, and M. G.
These tools must also be intuitive, graphical, feature-rich, Morrow, “Teaching DSP: Bridging the Gap from Theory to
robust, and, of course, affordable. Real-Time Hardware,” in Proceedings of the 2002 ASEE
Annual Conference, (Montreal, Quebec, Canada), June
2002. Session 3220.

167

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY TIRUCHIRAPALLI. Downloaded on November 29, 2009 at 06:41 from IEEE Xplore. Restrictions apply.

You might also like