Table Of ContentCommunication System Design
Using DSP Algorithms
With Laboratory Experiments
for the TMS320C30
Applications of Communications Theory
Series Editor: R. W. Lucky, Bel/core
Editorial Board:
Anthony S. Acampora, Columbia University
Larry Greenstein, AT&T Bell Laboratories
Tingye Li, AT&T Bell Laboratories
William H. Tranter, University of Missouri. Rolla
Recent volumes in the series:
BASIC CONCEPTS IN INFORMATION THEORY AND CODING:
The Adventures of Secret Agent 00 III
Solomon W. Golomb, Robert E. Peile, and Robert A. Scholtz
COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS: With
Laboratory Experiments for the TMS320C30
Steven A. Tretter
COMPUTER COMMUNICATIONS AND NETWORKS
John R. Freer
COMPUTER NETWORK ARCHITECTURES AND PROTOCOLS
Second Edition. Edited by Carl A. Sunshine
DATA COMMUNICATIONS PRINCIPLES
Richard D. Gitlin, Jeremiah F. Hayes, and Stephen B. Weinstein
DATA TRANSPORTATION AND PROTECTION
John E. Hershey and R. K. Rao Yarlagadda
DIGITAL PICTURES: Representation and Compression
Arun N. Netravali and Barry G. Haskell
FUNDAMENTALS OF DIGITAL SWITCHING
Second Edition. Edited by John C. McDonald
AN INTRODUCTION TO BROADBAND NETWORKS: LANs, MANs, ATM,
B-ISDN, and Optical Networks for Integrated Multimedia Telecommunications
Anthony S. Acampora
AN INTRODUCTION TO PHOTONIC SWITCHING FABRICS
H. Scott Hinton
OPTICAL CHANNELS: Fibers, Clouds, Water, and the Atmosphere
Sherman Karp, Robert M. Gagliardi, Steven E. Moran, and Larry B. Stotts
PRACTICAL COMPUTER DATA COMMUNICATIONS
William J. Barksdale
SIMULATION OF COMMUNICATIONS SYSTEMS
Michel C. Jeruchim, Philip Balaban, and K. Sam Shanmugan
A Continuation Order Plan is available for this series. A continuation order will bring delivery of each
new volume immediately upon publication. Volumes are billed only upon actual shipment. For further
information please contact the publisher.
Communication System Design
Using DSP Algorithms
With Laboratory Experiments
for the TMS320C30
Steven A. Tretter
University ofM aryland
College Park, Maryland
SPRINGER SCIENCE+BUSINESS MEDIA, LLC
Library of Congress Cataloging-in-Publication Data
Tretter, Steven A.
Communication system design using DSP algorithms.: with laboratory
experiments for the TMS320C30 I Steven A. Tretter.
p. em. -- (Applications of communications theory)
Includes bibliographical references and index.
ISBN 978-0-306-45032-7 ISBN 978-1-4757-9763-3 (eBook)
DOI 10.1007/978-1-4757-9763-3
1. Signal processing--Digital techniques. 2. Digital
communications--Equipment and supplies--Design--Data processing.
3. Texas Instruments TMS320 series microprocessors. 4. Real-time
data processing. I. Title. II. Series.
TK5102.9.T74 1995
621.382·2·078--dc20 95-36860
CIP
If your diskette is defective in manufacture or has been damaged in transit, it will be replaced
at no charge if returned within 30 days of receipt to Managing Editor, Springer Science+Business
Media, LLC.
The publisher makes no warranty of any kind, expressed or implied, with regard to the
software reproduced on the diskette or the accompanying documentation. The publisher shall
not be liable in any event for incidental or consequential damages or loss in connection with,
or arising out of. the furnishing, performance, or use of the software.
Additional material to this book can be downloaded from http://extras.springer.com
ISBN 978-0-306-45032-7
© 1995 Springer Science+Business Media New York
Originally published by Plenum Press, New York in 1995
1098765432
All rights reserved
No part of this book may be reproduced, stored in a retrieval system, or transmitted in any
form or by any means, electronic, mechanical, photocopying, microfilming, recording, or
otherwise. without written permission from the Publisher
To Terry, Anne, and in memory of David
Preface
This book began in January 1993 when I was "elected" by Dr. William Destler, who was then Chainnan of the
Electrical Engineering Department and is now Dean of the College of Engineering, to set up and write experiments
for a new Senior elective laboratory course, ENEE418c Communications Laboratory, scheduled to be given for the
first time in the Fall 1993 semester. Books with standard digital signal processing and filter design experiments
existed, but no book focusing on analog and digital communications techniques was available. My enthusiasm for
the project gradually grew until I became almost totally immersed in it.
Labs in the Electrical Engineering Department at the University of Maryland are separate courses. Occurring
on a weekly basis, these labs include a I-hour lecture by a regular faculty member, who introduces the theory and
explains the experiments, and a 3-hour laboratory period run by a graduate teaching assistant. Students can get keys
for the Communications Lab room and work whenever they please. One section of the lab was frrst offered in the
Fall 1993 semester and two in the Spring 1994 semester. The students were highly enthusiastic and often spent extra
hours working on the experiments because they found them to be very interesting and challenging. They also had the
feeling that this was something that would directly help them with their future jobs. In fact, several graduate students
and one faculty member sat in on the lab to learn some real-world practical skills.
The goal of this book is to explore the digital signal processing and communication systems theoretical concepts
presented in typical Senior elective courses on these subjects by implementing them on actual hardware in real time.
In the process, students will gain experience using equipment commonly used in industry, including oscilloscopes,
spectrum analyzers, signal generators, error rate test sets, digital signal processors, and analog-to-digital and digital
to-analog converters.
This book differs from any others on the market in that its primary focus is on communication systems. Fun
damental digital signal processing concepts like digital filters and FFTs are included because they are required in
communication systems. Approaches that are particularly useful for DSP implementations are presented. While the
experiments, particularly the earlier ones, are described for the TMS320C30 Evaluation Module, they can be easily
modified for any PC DSP board with an AID and D/A converter.
There are several books on digital signal processing experiments for stable software packages like MATHCAD
and MATLAB. In my view, one of the purposes of a laboratory course is to help prepare students for industrial jobs.
Oflline software simulation is no substitute for making actual hardware work in real-time. It does not present students
with the strange, unexpected, and often frustrating things that occur when using actual hardware in real-time-things
that cannot be explained by nice equations - nor does it teach them how to use standard lab equipment.
The prerequisites for this course are an understanding of linear systems and transfonn methods at a level that
is often presented in a Junior required course on Signals and Systems, and a working know ledge of PCs and C
programming. Students who have programmed in other languages, such as BASIC or FORTRAN, can quickly
learn enough C to do the experiments if they are willing to make the effort. Corequisite are a Senior-level elective
course in Digital Signal Processing and/or Communication Systems. Ideally, both courses should be taken before
vii
viii Preface
the Communications Laboratory. However, this is not usually possible for our Seniors. We wanted our students to
have the opportunity to take this lab, so we made just one of them a corequisite. With the engineering background
of a Senior, the presentation of the necessary theory in the text, and the I-hour lab lecture to explain the theory,
students have quickly learned the signal processing and communication system concepts required for the experiments.
In addition, it can be argued that a lab course should help prepare students for the work world where they will have
to figure out new things for themselves so the experiments should have some uncertainty and require students to fIll
in some of the details.
There is a large inital hurdle for the students to get over while learning the details required to use the lab's
hardware and software tools. The experiments in Chapters 1 and 2 gradually introduce them to these tools and the
architecture of the TMS320C30 floating-point DSP. The tools include the TMS320C30 Evaluation Module (EVM),
C compilers for the PC and TMS320C30, and an assembler and linker for the TMS320C30. An attempt has been
made to reduce this hurdle by including some basic programs on the program disk for initializing the EVM that can
be used as a starting point for the experiments.
FIR and I1R filter design and implementation are explored in Chapter 3. Experiments comparing the relative
merits of C and assembly language implementations are performed. Filters are required in most of the following
experiments.
Chapter 4 investigates the FFT and power spectrum estimation. A simple spectrum analyzer is made.
Chapters 5-8 explore the classical analog communication methods of amplitude modulation, double-sideband
suppressed-carrier amplitude modulation, single-sideband modulation, and frequency modulation. Transmitters and
receivers are built using DSP techniques. Noncoherent receivers using envelope detectors and coherent receivers using
phase-locked loops are implemented. The use of Hilbert transforms and complex signal representations in modulation
systems are explored.
Chapters 9-15 introduce some modem digital communication techniques. These experiments focus on methods
used in high-speed wire-line data modems where DSPs have been used extensively. Topics covered include linear shift
register scramblers, the RS232C interface, pulse amplitude modulation (PAM), and quadrature amplitude modulation
(QAM). The experiments lead up to building almost a complete V.22bis transmitter and receiver. Symbol clock
recovery, carrier tracking, and adaptive equalizer receiver functions are implemented. The echo cancelling technique
used in V.32 modems is studied in Chapter IS. Enough details are included so that this set of experiments could
form a good practical guide to engineers in industry interested in modem design. I learned many of these techniques
while consulting since 1970 for companies that build high-speed wire-line modems, and have seen them employed in
hundreds of thousands of modems.
Chapter 16 briefly presents some ideas for additional projects related to current high-speed wire-line modem
design. These ideas can be expanded to satisy the capstone design project requirements of the ABET accrediting
committee.
Appendix A discusses how to transfer data back and forth between the TMS320C30 Evaluation Module and Pc.
The transfers are used in some of the experiments to display signals processed by the DSP. We wanted the students
to concentrate on learning communication system concepts rather than getting bogged down with involved hardware
details. Therefore, complete working programs for transferring data from the EVM to the PC are included on the
program disk.
Appendix D contains a complete list of the equipment used for this laboratory at the University of Maryland.
It has been included as a guide to others setting up a similar lab and is not intended to be an endorsement of any
specific manufacturer. Clearly, any equipment with equivalent capabilities can be substituted for items in the list.
A detailed listing of the directory structure on the PC hard disk is shown in Appendix E as a guide to others
setting up a communications lab.
There are many more experiments in this book than can be performed in one semester. Based on two semesters
of experience, an ambitious goal is to have all students complete Chapters 1-3 followed by a choice of any three
additional chapters. It would be nice if students could continue in the lab for a second semester for additional credit
and build on their earlier experiments.
Preface ix
Acknowledgments
I would like to thank Mark Kohler and Sonjai Gupta for helping to unpack equipment and install and debug
hardware and software in the PCs during the Spring 1993 semester when the lab was initially being set up. The
students in the original Communications Laboratory section offered in the Fall 1993 semester as well as their Teaching
Assistant Yifeng Cui deserve a great deal of thanks for being extremely patient and enthusiastic guinea pigs. They
helped correct and significantly improve the first few experiments. In particular, I want to thank Mike Barr who,
with his partner Brian Silverman, forged well ahead of the rest of the students and was so enthusiastic by the end
of the semester that he asked about helping with the lab in the Spring 1994 semester. The Electrical Engineering
Department was able to make an exception and assign Mike as a Senior to be the TA for one section and he did an
outstanding job. Mrs. Tahereh Fazel was also an excellent Graduate TA for a second lab section in the Spring 1994
semester.
I would also like to thank my friends from RIXON - which was in Silver Spring, Maryland, but has long since
dissipated in a chain of corporate take-overs - and at Penril Datability Networks in Gaithersburg, Maryland, for helping
me stay at the state-of-the-art in DSP applications to wire-line modems by using me as a consultant.
I also want to thank Texas Instruments for granting us permission to include on our program disk the C callable
utility functions developed by Gerry Shoults and included with TI's TMS320C3x DSP Design Workshop. These
functions provide a convenient interface to the various registers and peripherals in the TMS320C30. Any questions
about these functions should be addressed to me, and not to TI.
And last but not least, I want to thank Dr. William Destler for "electing" me to this task.
College Park, Maryland Steven A. Tretter
Contents
1. Brief Overview of the Hardware and Software Tools .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1. Some DSP Chip History and Typical Applications ........................................... 1
1.2. Introduction to the TMS320C30 Floating-Point DSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1. The Central Processing Unit (CPU) ................................................. 5
1.2.2. Memory Organization ............................................................. 5
1.2.3. The Internal Bus ................................................................ 6
1.2.4. The External Buses and Interrupts .................................................. 6
1.2.5. Peripherals ..................................................................... 6
1.2.6. The Direct Memory Access (DMA) Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.7. Brief Description of the Instruction Set .............................................. 6
1.3. The TMS320C30 Evaluation Module ..................................................... 7
1.4. Software Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.1. Software Supplied by Texas Instruments ...... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.2. Digital Filter Design Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.3. Other Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5. Introductory Experiments ............................................................... 11
2. Learning to Use the Hardware and Software Tools by Generating a Sine Wave .................... 13
2.1. Some Basic Utility Files, Programs, and Environment Variables Required by the TMS320C30
Assembler, C S:ompiler, and Linker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2. Method 1 for Generating a Sine Wave ............ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3. Method 2 for Generating a Sine Wave--Using Interrupts ..................................... 24
2.4. Method 3-DMA from a Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 26
xi