Rapid Prototyping System for Teaching Real-Time Digital Signal Processing

Similar documents
Embedded Target for TI C6000 DSP 2.0 Release Notes

Chapter 7. Hardware Implementation Tools

Transition from Simulink to MATLAB in Real-Time Digital Signal Processing Education*

Classification of Semiconductor LSI

Parallel-computing approach for FFT implementation on digital signal processor (DSP)

Rapid Development of Real-Time Applications Using MATLAB/Simulink on TI C6000-based DSP

Digital Signal Processor 2010/1/4

A DSP Systems Design Course based on TI s C6000 Family of DSPs

Lab 6 : Introduction to Simulink, Link for CCS & Real-Time Workshop

Experiment 3. Getting Start with Simulink

2008/12/23. System Arch 2008 (Fire Tom Wada) 1

Multi-function DSP Experimental System Based on TMS320VC5509 Qiu-feng SHANG and Wei LIU

A framework for automatic generation of audio processing applications on a dual-core system

An introduction to DSP s. Examples of DSP applications Why a DSP? Characteristics of a DSP Architectures

RTW SUPPORT FOR PARALLEL 64bit ALPHA AXP-BASED PLATFORMS. Christian Vialatte, Jiri Kadlec,

A Rapid Prototyping Methodology for Algorithm Development in Wireless Communications

Development of Simulink blockset for embedded system with complex peripherals

Experiment 6 SIMULINK

Developing and Integrating FPGA Co-processors with the Tic6x Family of DSP Processors

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

Further Studies of a FFT-Based Auditory Spectrum with Application in Audio Classification

DSP Platforms Lab (AD-SHARC) Session 05

General Purpose Signal Processors

A Novel Digital Relay Model Based on SIMULINK and Its Validation Based on Expert System

Code Generation for TMS320C6x in Ptolemy

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

Real-Time DSP for Educators

TMS320C5x Interrupt Response Time

Digital Signal Processing System Design: LabVIEW-Based Hybrid Programming Nasser Kehtarnavaz

FPGA Based FIR Filter using Parallel Pipelined Structure

In this tutorial, we will discuss the architecture, pin diagram and other key concepts of microprocessors.

Cache Justification for Digital Signal Processors

Better sharc data such as vliw format, number of kind of functional units

LabVIEW: A Teaching Tool for the Engineering Courses

Efficient Methods for FFT calculations Using Memory Reduction Techniques.

LOW-COST SIMD. Considerations For Selecting a DSP Processor Why Buy The ADSP-21161?

Automatic Code Generation Technology Adoption Lessons Learned from Commercial Vehicle Case Studies

SQA Advanced Unit specification: general information for centres

REAL TIME DIGITAL SIGNAL PROCESSING

Conclusions. Introduction. Objectives. Module Topics

A NOVEL BASED METHOD TO DESIGN A 4G NETWORK AND TO IMPLEMENT IN REAL TIME USING DSP INTERFACE

Implementation of Low-Memory Reference FFT on Digital Signal Processor

FPGA Based Design and Simulation of 32- Point FFT Through Radix-2 DIT Algorith

Benchmarking: Classic DSPs vs. Microcontrollers

ECE4703 B Term Laboratory Assignment 2 Floating Point Filters Using the TMS320C6713 DSK Project Code and Report Due at 3 pm 9-Nov-2017

An Optimizing Compiler for the TMS320C25 DSP Chip

Separating Reality from Hype in Processors' DSP Performance. Evaluating DSP Performance

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured

SCPI measuring device

REAL-TIME DIGITAL SIGNAL PROCESSING

II. RTW BUILD METHODS In order to understand how RTW generates C code and produces an executable image, the build process can be divided into three st

Digital Signal Processor Core Technology

WHITE PAPER. Fraunhofer Institute for Integrated Circuits IIS

DSP Applications Using C and the TMS320C6x DSK

All MSEE students are required to take the following two core courses: Linear systems Probability and Random Processes

Optimize DSP Designs and Code using Fixed-Point Designer

SRAM SRAM SRAM. Data Bus EXTAL ESSI KHz MHz. In Headphone CS MHz. Figure 1 DSP56302EVM Functional Block Diagram

Day Hour Timing pm pm am am

VIII. DSP Processors. Digital Signal Processing 8 December 24, 2009

In this article, we present and analyze

: REAL TIME SYSTEMS LABORATORY DEVELOPMENT: EXPERIMENTS FOCUSING ON A DUAL CORE PROCESSOR

Interrupts and Timers

LABORATORY USE OF A MICROCOMPUTER (Last Revision: August 27, 2000)

Digital Signal Processing Introduction to Finite-Precision Numerical Effects

Implementation of FFT Processor using Urdhva Tiryakbhyam Sutra of Vedic Mathematics

Implementation Techniques for DSP

Architecture for automatically generating an efficient IEC based communications platform for the rapid prototyping of protection schemes

USING THE SYSTEM-C LIBRARY FOR BIT TRUE SIMULATIONS IN MATLAB

Embedding Simulink Algorithms into ifix and GE Fanuc Series 90 PLCs

Evaluating MMX Technology Using DSP and Multimedia Applications

A Genetic Algorithm for the Optimisation of a Reconfigurable Pipelined FFT Processor

Academic Course Description. VL2003 Digital Processing Structures for VLSI First Semester, (Odd semester)

Chapter II HARDWARE AND SOFTWARE DETAILS

Realizing an Intelligent FFT-Analyzer using TMS320C40 DSPs

Aplha accelerator for RTW Windows Target. Centre for Applied Cybernetics, UTIA AV CR Prague

Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711

Real-Time Windows Target

Digital Signal Processor

WS_CCESSH-OUT-v1.00.doc Page 1 of 8

A MATLAB TOOLBOX FOR REAL-TIME CONTROL USING C167 MICROCONTROLLERS

External and Flash Memory

D Demonstration of disturbance recording functions for PQ monitoring

Lab Manual For Digital Signal Processing

Speech Control for Virtual Instruments Using the TMS320C30 DSP

Moving MATLAB Algorithms into Complete Designs with Fixed-Point Simulation and Code Generation

A high performance real-time plasma control and event detection DSP based VME system

Because of the good performance of vocoder and the potential

COMPARISON OF DIFFERENT REALIZATION TECHNIQUES OF IIR FILTERS USING SYSTEM GENERATOR

2014, IJARCSSE All Rights Reserved Page 461

DSP Builder Handbook Volume 1: Introduction to DSP Builder

A SIMULINK-TO-FPGA MULTI-RATE HIERARCHICAL FIR FILTER DESIGN

ECE 487 LAB 1 ÇANKAYA UNIVERSITY Overview of DSP Board

REAL TIME DIGITAL SIGNAL PROCESSING

Combining the Power of DAVE and SIMULINK

LESSON PLAN. Sub Name: Discrete Time Systems and Signal Processing. Unit: I Branch: BE (EE) Semester: IV

Interfacing C and TMS320C6713 Assembly Language (Part-I)

SIMULATION OF MCU HARDWARE PERIPHERALS

2015 The MathWorks, Inc. 1

Performance Analysis of Line Echo Cancellation Implementation Using TMS320C6201

Optimization of Vertical and Horizontal Beamforming Kernels on the PowerPC G4 Processor with AltiVec Technology

Transcription:

IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 1, FEBRUARY 2000 19 Rapid Prototyping System for Teaching Real-Time Digital Signal Processing Woon-Seng Gan, Member, IEEE, Yong-Kim Chong, Wilson Gong, and Wei-Tong Tan Abstract A low-cost rapid-prototyping system using Texas Instruments' (TI) TMS320C30 Evaluation Module (EVM) based on the MathWorks' development software is presented in this paper. The rapid prototyping system serves as an educational tool in learning digital signal processing (DSP) and seeing the concept realized in real time. The development software modules, Simulink, uses graphical block diagrams to create models for real-time implementation and the real-time workshop (RTW), generates C code to be downloaded onto the EVM. The entire building process is fully automatic. This includes compiling, assembling, and downloading of the real-time algorithms. The system was found to be well suited for learning real-time DSP algorithms for both undergraduate and postgraduate levels. Index Terms Real-time signal processing, real-time workshop, simulink. I. INTRODUCTION DIGITAL signal processing (DSP) is an area of science and engineering that has developed rapidly over the past 30 years. DSP is becoming an important area in multimedia, digital communication, and consumer electronic products. It has enabled us to clean up noisy signals, speed up communications, store more data and much more. Unfortunately, the development of signal processing algorithms for real-time purposes are still difficult and often requires specialized training in a particular assembly language for the targeted DSP. Moreover, even if the skill is acquired, the process of project development is tedious and time consuming as the level of complexity increases. Hence, fast development tools for testing of new DSP algorithms are necessary, as the need to shorten the design cycle for new applications becomes critical. This is also true in conducting DSP courses, where students are required to develop and test various real-time DSP algorithms quickly on actual physical systems. One of the DSP development tools which produces code directly from block-set models is the real-time workshop (RTW) [1] for use with MATLAB and Simulink [2]. It automatically builds programs that can be run in a variety of environments, including real-time systems and stand-alone simulations. The RTW allows rapid prototyping, a process that conceptualizes solutions using a block diagram-modeling environment. It reduces algorithm coding to an automated process, which includes coding, compiling, linking, and downloading to the targeted Manuscript received July 29, 1998; revised November 3, 1999. The authors are with the School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore. Publisher Item Identifier S 0018-9359(00)01447-3. hardware. Thereby, it shortens the development cycles and in turn, reduces cost. The code produced via RTW is in standard ANSI C code. The C language is a valuable programming tool for real-time computation. It has high-level language capabilities (such as structures and functions), as well as low-level assembly language capabilities (such as direct hardware input output and macros), which makes C an ideal language for digital signal processing. This paper presents the use of RTW with the TMS320C30-EVM [3] manufactured by Texas Instruments (TI) as the targeted hardware for general-purpose real-time applications. The use of integrated graphics allows visualization, which is very valuable in the rapid prototyping of DSP system. II. SYSTEM OVERVIEW The rapid prototyping system connects the MathWorks' development software Matlab, Simulink, and RTW with TI's plug-in board to form an integrated and ready-to-use development environment for real-time applications. It provides an automatic and seamless implementation of Matlab and Simulink graphical models onto real-time hardware systems for real-time signal processing. All Simulink models for which code can be generated by means of the RTW can be implemented. The package includes application modules that allow user to build complete programs targeting a wide variety of environments. The plug-in board also provides a low cost hardware implementation for the purpose of system integration. Program building is fully automated as shown in Fig. 1. The key aspect of rapid prototyping is automatic code generation. It reduces algorithm coding to an automated process; this includes coding, compiling, linking, and downloading to the targeted hardware. This automation allows design changes to be made directly to the block diagram and is ready for new test within seconds. A typical development and test session for a real-time application based on the implemented system comprises the following steps. Begin in the Simulink environment by creating DSP models. Run the model in Simulink; use Matlab, Simulink and toolboxes to develop algorithms and analyze the results. Once achieved the desired simulation results, use the RTW to generate C codes for real-time application. The RTW runs through all the necessary steps to prepare the application. Finally the application is downloaded to the floatingpoint TMS320C3x plug-in for real-time implementation. 0018 9359/00$10.00 2000 IEEE

20 IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 1, FEBRUARY 2000 A. The DSP Hardware TMS320C30 Evaluation Module (EVM) The TMS320C30-EVM has the ability to perform, in a single cycle, parallel multiplies and adds (subtracts) an integer or floating-point data. It gives the EVM its peak computational rate of 33.3 MFLOPS. Key features of the EVM include: 60-ns single cycle instruction time, 33.3 MFLOPS, 16.7 MIPS; 16-bit bidirectional PC host communications port; Voice quality analog data acquisition via the TLC32044 (AIC). Standard RCA jacks for line-level analog input and output; Two 1 K 32 single-cycle dual access RAM blocks; One 4 K 32 single-cycle dual access on-chip ROM blocks; 64 32-bit instruction cache; 32-bit instruction and data words, 24-bit addresses; 32/40-bit floating-point and integer multiplier; 32/40-bit floating-point, integer, and logical ALU; Eight extended precision registers (accumulators); Two address-generators with eight auxiliary registers; On-chip direct memory access (DMA) controller for concurrent I/O and CPU operation; Two serial ports. Serial port 0 is used for the on-board AIC. Two 32-bit timers Two general-purpose external flags; four external interrupts. Fig. 1. Development environments of the MathWorks and Texas Instruments' plug-in board. B. The MathWorks' Development Software The MathWorks' development software consisting of Matlab, Simulink, and RTW with the targeted hardware form an integrated and ready-to-use development environment for real-time applications. Simulink is a software package for modeling, simulating, and analyzing dynamic systems. It supports linear and nonlinear systems, modeled in continuous time, sampled time, or hybrid of the two. Systems can also be multirate, having different parts that are sampled at different rates. With this interface, models are built in a hierarchical form, using both top-down and bottom-up approaches. Simulink includes comprehensive block libraries that are grouped in separate libraries as illustrated in Fig. 2. The MathWorks offers block-sets for use with Simulink. Block-sets are collections of blocks for use in rapid prototyping and simulation of systems. With RTW, Simulink models can be run in real time on targeted DSP processor. It provides a real-time development environment that features: a rapid and direct path from system design to hardware implementation; seamless integration with Matlab and Simulink; a simple and easy to use interface; an open and extensible architecture; fully configurable code generator using target language compiler (TLC) [4]; fast design cycle by editing block diagrams and automatically building a new executable file. Fig. 2. The main Simulink library. The RTW includes a set of target files that are compiled by the TLC to produce ANSI C code. The target files are ASCII text files that describe how to convert the Simulink model to code. To create a target-specific application, RTW also requires a template makefile (*.tmf) that specifies the appropriate C compiler and compiler options for the building process. Target-specific versions of the run-time interface (a main file) must also be included to conform to the target specific requirements such as the interrupt service routine (ISR). III. SYSTEM CONFIGURATIONS FOR REAL-TIME PROGRAM BUILDING The program building process is initiated from Simulink's graphical user interface. After proper setup, the real-time algorithm is automatically generated using various software drivers described before. To automate the building process, proper system configurations on the hardware and the software drivers are necessary, as shown in Fig. 3. A. Configuration of Template Makefile The RTW uses *.tmf [2] to build the executable file from the generated code. A makefile is created from the *.tmf by copying each line from the latter. The makefile is then passed to a make utility which builds an executable file (*.out) from a set of files (e.g., model.c, *.h, etc.). The make utility will perform date

GAN et al.: RAPID PROTOTYPING SYSTEM FOR TEACHING REAL-TIME DIGITAL SIGNAL PROCESSING 21 Fig. 4. Make utility flow diagram. Fig. 3. The automatic build process for a real-time system. checking on the dependencies between the object (*.obj) and C files and rebuilds the object files if needed. The user may configure the building process by modifying the template makefile. When program building is invoked, the template makefile will be used to create a set of macro definitions and rules describing how to generate the executable file from the C-coded files. This automates the building of real-time program onto TMS320C30 EVM board, which involves definitions and rules declaration in the template makefile. Fig. 4 describes the flow of the make utility. B. Run-Time Interface Building the real-time program requires a number of source files in addition to the generated code. The run-time-interface [1] serves as an entry point for RTW to build the model code into a complete, stand-alone program. The main program is responsible for managing the execution of the real-time program created from the Simulink block diagram. It contains the program's main function main(), the ISR, and the step function. The main function controls program timing, creates tasks, installs interrupt handlers and performs error checking. The ISR is catered for use with the TMS320C30-EVM serial port. It fetches data, initiates data process function, and outputs data. The step Fig. 5. The interrupt timing. function performs computation of output values and updates the states of the blocks. C. Program Timing Real-time programs require careful timing of interrupts to ensure that model code executes to completion before another interrupt occurs. This timing duration includes reading and writing to/from external devices. The RTW supports both single-tasking and multitasking modes of execution for the generated code. Fig. 5 illustrates the requirements of the interrupt timing of a single-tasking system. The sample interval must be long enough to allow model code execution between interrupts. The left diagram shows an example of a real-time program that can complete one step within the interval. The rest of the duration may be utilized for other background tasks such as data logging. On the other hand, the one on the right results in an execution error. The sample interval is too short to complete one step of the generated code. Hence, it is important to set a suitable base sample time of the model to ensure real-time execution of the generated code.

22 IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 1, FEBRUARY 2000 Fig. 6. Fifth-order FIR implementation in Simulink. Fig. 9. Real-time waveforms observed using oscilloscope. the Simulink, the programs are automatically built by invoking the RTW. The models may be used for real-time application. Fig. 7. Passing a chirp signal through the fifth-order FIR Filter. A. The Direct-Form Finite Impulse Response (FIR) Filter Fig. 6 shows a fifth-order direct-form FIR filter. This model is created using elementary blocksets from Simulink libraries. Before the real-time application is generated, the filter model is put under test by passing a chirp signal through the FIR filter, as shown in Fig. 7. Observe the outcome with the scope in the diagram. Once the outcome satisfies the requirement, terminates the filter block with proper input output terminators. Then invokes the RTW to generate real-time application and automatically downloads to the targeted EVM hardware. Fig. 8 below shows the input and output waveforms observed under the simulation model, while Fig. 9 shows the actual real-time signals observed using an oscilloscope. Table I shows the various sample rates achievable for the real-time implementation of fifth-, tenth-, and 50th-order direct-form FIR filters: It must be pointed out that the C code generated by this first version of rapid prototyping tool is not the most efficient. The RTW has generated several redundant modules that are unnecessary and increase software overheads. We have taken steps to improve and modify the C code generated by the RTW and have achieved a substantial increase in performance. These techniques will be reported in a later publication. Fig. 8. Waveforms observed under simulation model. IV. BUILDING REAL-TIME DSP SYSTEMS This rapid prototyping platform has been assessed at the Nanyang Technological University and found to be well suited for learning real-time DSP algorithms for both undergraduate and postgraduate levels. In this paper, two practical DSP models, i.e., a finite impulse response (FIR) filter and a power spectrum estimation model using fast Fourier transform are illustrated. After testing the models by running simulations on B. Power Spectrum Estimation Using Fast Fourier Transform (FFT) The Fourier transform of the autocorrelation function yields the power density spectrum (PSD) [7], providing the transformation from the time domain to the frequency domain. The direct method of the energy density spectrum of a signal from its sample may be computed using the Fourier transform of

GAN et al.: RAPID PROTOTYPING SYSTEM FOR TEACHING REAL-TIME DIGITAL SIGNAL PROCESSING 23 TABLE I SAMPLING RATE ACHIEVABLE IN IMPLEMENTING DIRECT-FORM FIR FILTER Fig. 11. Model for power spectrum estimation of a signal. Hence, can be obtained using FFT, which is a common and important algorithm in DSP. Figs. 10 and 11 illustrate the implementation of the PSD of a signal using the structure of a radix-2 8-point FFT. The model was tested and downloaded onto the EVM board for real-time execution. It involved 6390 machine cycles in the ISR, which had a maximum achievable sampling rate of about 2.5 khz. This example shows that the FFT may also be easily implemented using this graphical approach. Fig. 10. The eight-point decimation-in-frequency FFT graphical structure and the basic butterfly for radix-2 FFT. The spectrum can be computed numerically at a set of frequency points by means of discrete Fourier transform (DFT). Thus V. CONCLUSION In the implementation of the rapid-prototyping system, the template makefile and the run-time interface file were highlighted. These files can be viewed as the drivers of the system, which links to the targeted hardware. The proper configurations of the targeted hardware TI's C30-EVM are crucial in implementing the general-purpose DSP system. The above discussion illustrated the use of the rapid prototyping system, where DSP concept may be implemented in real-time, using TI's TMS320C30-EVM system. It is a fully automated program building process, where the system is tested

24 IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 1, FEBRUARY 2000 prior to the generation of the executable file. This saves tremendous amount of time, besides reducing the hardware cost. In the continued effort to train more DSP engineer, the rapid prototyping system can help to speed up the learning and implementation of real-time DSP applications. We have used this rapid prototyping tool to teach a group of 30 undergraduates in learning fundamental DSP theory and real-time DSP concept. From the students' response, they can easily use this tool to construct different structures, size of digital filter and FFT s and change their parameters instantly. Furthermore, they can actually plug in real signals to the EVM and see how these signals are modified in real time. They were able to explore more challenging problems within the short lab session. Our experience has shown that this teaching platform has clearly heightened student interest in the learning of DSP algorithms. ACKNOWLEDGMENT The authors would like to acknowledge the support from TechSource Systems Pte Ltd. in sponsoring the software tools. They would also like to thank F. Hong for his valuable comments in this project. REFERENCES [1] For Use with SIMULINK: User's Guide Version 2.1, Real-time Workshop, The MathWorks Inc., 1997. [2] SIMULINK Dynamic System Simulation for MATLAB: User's Guide Version 2.1, The MathWorks Inc., 1997. [3] TMS320C3x: User's Guide, Texas Instruments, 1996. [4] SIMULINK Dynamic System Simulation for MATLAB: Target Language Compiler Reference Guide Version 1, The MathWorks Inc., 1997. [5] TMS320C30 Evaluation Module: Technical Reference, Texas Instruments, 1990. [6] Chassaing and Rulph, Digital Signal Processing with C and the TMS320C30. New York, NY: Wiley, 1992. [7] J. Proakis and D. Manolakis, Digital Signal Processing Principles, Algorithms, and Applications, 2nd ed. New York: Macmillan, 1992. Woon-Seng Gan (M 93) received the B.Eng. (1st Class Hon.) and Ph.D. degrees from the University of Strathclyde, U.K., in 1990 and 1993, respectively. He is currently an Associate Professor in the Nanyang Technological University, Singapore. His main interests include real-time DSP implementation for adaptive and audio signal processing applications. Yong-Kim Chong received the B.Eng. (Hon.) degree in electrical engineering from the National University of Singapore in 1986 and the M.S. degree in computer engineering from the University of Southern California in 1993. He is currently an Assistant Professor in the School of EEE at the Nanyang Technological University of Singapore. His research interests include computer architecture, parallel processing, and digital signal processing. Wilson Gong received the Bachelor of Engineering (electrical) degree from the Nanyang Technological University, Singapore. His area of interest is in audio signal processing and software programming. He has written several software products for leading semiconductor companies. Wei-Tong Tan received the Bachelor of Engineering (electrical) degree from the Nanyang Technological University, Singapore. His area of interest includes the wireless communications and DSP implementation for real-time systems. He has been involved in a few projects involving DSP implementation.