DSPs Can Speed Signal Analysis Tasks
Before you buy a DSP add-in board, consider how a DSP can aid your application.
Richard G. Lyons, TRW, Sunnyvale, CA, and Grant Griffin, Iowegian International, Shawnee Mission, KS -- Test & Measurement World, 4/15/1999
| Searching for Suppliers of DSP software-development tools
and DSP add-in boards ? Look no more. Read our list. |
||||||||||||
| Traditionally, test engineers have used
desktop personal computers (PCs) in automated measurement systems to let users control the
system and to display test results, perform data quality checks, and to store and retrieve
test data. Test engineers can now perform the majority of their measurements with PC-based
systems that offer performance equal to, but at a fraction of the cost of, traditional
stand-alone test instruments. Add to that performance advantage the increased testing
repeatability, flexibility, and speed of digital signal processing, and you can see why
PC-based test systems are becoming more popular. Leading the way are commercial digital
signal processor (DSP) boards for desktop PCs. Many test engineers have been hesitant to incorporate digital signal processing methods in their test systems because DSP architectures appear complicated, software development for DSP boards has a steep learning curve, and the mathematics of digital signal processing has the reputation of being hard to understand. Times have changed. Third-party vendors now supply DSP software-development systems that insulate test engineers from the details of processor architecture and reduce the aggravation of developing algorithms. If your PC-based test system can benefit from faster signal processing or can take advantage of more sophisticated test signal analysis algorithms, you should consider adding a DSP board to your PC (Fig. 1). Perhaps your testing requires computationally intensive signal processing such as high-performance (narrowband) digital filtering; spectral, statistical, or wave analysis; or signal recognition.
Reduce Information Overload To help you determine if your application will benefit from an add-in DSP board, you should know more about how DSPs process data to appreciate how they can speed signal processing. Even if you decide to write applications software at a high levelin Visual C++, LabView, or another languagean appreciation of a DSPs operation will help you determine the types of tasks it can tackle. A DSP forms the heart of every DSP board. Like other microprocessors, DSPs include registers, a memory bus, interrupts, timers, and so on. Some DSPs even include features such as parallel I/O ports and UARTs for serial I/O. But unlike other microprocessors, DSPs are fundamentally "number crunchers, designed specifically to perform the most common DSP operations: filtering and spectral analysis. At the most primitive level, virtually all DSP algorithms involve multiply-accumulate operations, or MACs. A MAC involves multiplying two numbers together (usually a data sample and a coefficient) and adding the result to a previous sum (Sum = Sum + Sample * Coefficient). Though simple in principle, a MAC really comprises four distinct processes: fetch data, fetch coefficient, multiply, and accumulate. Therefore, to streamline common DSP algorithms, DSPs perform all four MAC processes in a single instruction cycle. Because a MAC requires two fetches, DSPs always implement a "dual access mechanism to fetch both the data and the coefficient during the same instruction cycle. Also, the DSP automatically fetches the data, without requiring a separate data-move instruction. Since signal samples and coefficients are typically accessed in sequences, the data and coefficient blocks are pointed to by "index" registers, which, after being set up, get auto-incremented to point to the next operand after each MAC. DSPs also include loop counters that automatically count the passes through a loop. The software needs no decrement-and-test operation to determine when it completes all passes through a loop. This zero-overhead looping helps DSPs hustle through their code. Together, single-instruction MACs and the zero-overhead looping implement most of the elements of a digital finite-impulse response (FIR) filter, at the price of just one instruction per FIR tap. The only other element needed to implement a FIR filter is the data-delay buffer. Again, hardware makes a big difference. DSPs implement "circular buffer memories using address-update logic. Whenever the buffers pointer gets incremented past the end of the memory, hardware automatically returns it to the beginning of the memory. Thus, samples dont "shift from one delay element to the next. Instead, the DSP accesses them in a circular sequence defined by the memory-addressing hardware. New samples overwrite the oldest samples, thus implementing the data delay mechanism (Fig. 2).
Aside from digital filtering, the other primary DSP algorithm that requires special hardware support is the fast Fourier Transform (FFT). FFTs depend on fast MAC operations and on "bit-reversed addressing. (Bit reversal describes the scrambled order of the spectral results obtained from FFT algorithms.1) Performing bit-reversals in software would require many instructions, but performing them in hardware requires relatively few gates, so DSPs provide this hardware feature. For input/output functions, most DSPs provide high-speed synchronous serial ports, along with hardware that automatically buffers the data samples to/from memory. These features provide an efficient interface with serial analog-to-digital and digital-to-analog converters. Add a DSP Board to Your PC But beyond increasing a PCs number-crunching capabilities, there are other reasons to use dedicated DSP boards in lieu of a PCs processor. Digital signal processing often requires a steady stream of high-rate input or output data. Processing this data with your PC would require transferring it over the PCs bus, which could slow the bus and degrade its performance. Also, since many processes share the PCs bus, it may not always transfer every sample on time. In contrast, DSP add-in boards can connect directly to I/O devices through dedicated high-speed buses, thus ensuring the boards a steady stream of "on-time data. Digital signal processing cannot tolerate missed samples in a sequence of data. Missed samples result in glitches that create unwanted noise and distortions that reduce measurement accuracy. By using a dedicated DSP chip for digital signal processing, the DSP software can run autonomously, and the PCs processor can remain responsive to other system requirements. This relieves you from having to deal with the complexities of a PCs preemptive multitasking software when you need to run multiple real-time tasks. A less obvious reason to use DSP boards is to simplify software development. In the past, engineers have programmed DSP chips in either assembly language or in C. Powerful code-development systems such as Go DSPs Visual C++-like environment and White Mountain DSPs DSP tools and emulators make programming easier. Digital signal processing tasks tend to consist of well-defined functional blocks like filters, mixers, and I/O operations, which leads to programming by simply stringing together DSP blocks (Fig. 3).
Several software-development tools provide graphical tools that let you connect signal-processing functional blocks, and these tools work with popular add-in DSP boards. Thus, you can purchase software-development tools and a compatible DSP board, and then create a working DSP system in a relatively short time. Youll avoid the details of how the processors work, and avoid having to master low-level DSP software-development tools such as assemblers, linkers, locators, and so on. When Do You Not Need a DSP Board? Of course, if your test application only processes previously recorded data "off-line, and you dont need high-speed real-time processing, then count your blessings. In this case, you can choose from a variety of commercial signal-processing software packages for the PC, such as SystemView, O-Matrix, DADiSP, HiQ, MathCad, and Matlab. If your off-line processing is more statistical in nature, however, a different array of software packages may better suit your needs. 2 Intels Pentium II processor incorporates some DSP-like features that may make a DSP board unnecessary for some test applications. But youll have difficulty determining how to make the tradeoff. Intel coined the term "native signal processing (NSP) to describe its Pentium processors ability to execute some single-instruction, multiple-data, instructions in one clock cycle (which sounds a lot like standard multiply-accumulate operations). Berkeley Design Technology (Berkeley, CA) (www.bdti.com) has published benchmark studies showing that the Pentium II performs some fixed-point digital signal processing operations faster than many popular DSP chips. You can download Intels Signal Processing Library functions from developer.intel.com. But actual performance depends on how quickly your PC can process information. That performance proves difficult to quantify and the problem lies deep in the PCs architecture and in the Windows operating system software. (See "Pentiums Do DSP, Too") If you can satisfy your processing needs with a Pentium II PC, youll eliminate the cost of a DSP board and development software. Youll have to learn how to use Intels Signal Processing Library software, however, which may not be worth the tradeoff. T&MWFOOTNOTES Richard G. Lyons works as a systems engineer at TRW. He has been involved in designing and testing electronic signal-processing systems for more than 15 years. He is the author of Understanding Digital Signal Processing. Grant Griffin is president of Iowegian International. He has been a DSP hardware and software designer for more than 14 years and is the author of Iowegians ScopeDSP and ScopeFIR DSP software-development tools.
|





















