|
||||||||||||||||||||||||||
Special Report: Choosing a DSP
Special Report: Choosing a DSP Once upon a time, digital signal processors were used only as coprocessors in signal processing applications and programmed mostly in assembly. Today, DSPs are used in almost every application domain. From the nitty to the gritty, here's what to look for in a DSP When the industry's first digital signal processor (DSP) was used in the Speak & Spell toy in the late seventies who could have predicted that the chip would proliferate the way it has? DSPs were designed to be number crunchers, usually sampling an analog signal then processing those samples digitally. At first, they were used in telecommunications and media products, because DSPs could run the intense math needed to convert a continuous analog signal into a discrete digital signal, process the data, and spit out a new analog output signal in little time. Its math abilities soon lead the DSP into other uses, such a s motion control with high-end servo control, radio in the form of "soft" or completely programmable radio, cinema, studio and consumer audio, MP3 players, scientific and engineering instrumentation and test equipment, Internet connectivity with Voice over IP and Video over IP, PDAs, and many more. That's a long way from Speak & Spell. Digital signal processing In the analog domain, all signals are continuous. In the digital domain, we deal with finite approximations of the continuous. The term digital signal processing refers to the act of translating analog signals into a digital form and then manipulating the data for whatever purpose we choose. The basic algorithms for accomplishing this translation can be implemented on almost any device, from an 8-bit microcontroller to a PC, but if it needs to be done quickly, we generally turn to the DSP. Big M AC The single-cycle, multiply and accumulate (MAC) instruction is an innovation particular to the DSP. The MAC multiplies two numbers (generally a weight coefficient and an input sample) and adds the result to another "saved" value. Performed continuously, this process is called a convolution, which is one of the fundamental elements in the implementation of all types of filters and predictors. A good DSP will be able to execute at least one MAC in a single instruction cycle, and that instruction cycle should require only one clock cycle. Until recently, non-DSP processors have had no rapid and efficient way to process this sort of math. In recent years, however, DSP has expanded into almost every area of engineering. Now, microcontrollers used for engine control include the MAC instruction, the ordinary PC has DSP extensions for audio and video (Intel's MMX instructions), and there are specialized DSPs with on-board peripherals for everything from motion control to audio to telephonics. Design considerations If you're planning a DSP-enabled project and you need to evaluate various processors, here are some important characteristics to take into account. Word length and accuracy To maintain the highest degree of accuracy, the DSP you choose should have an accumulator long enough to store the intermediate results of all your calculations before finally storing them in system memory. Each time you store your values to system memory, they must be rounded or truncated to the word length of the memory; this is called quantization. Your results are never any better than your input; numerous quantizations during a calculation can create drift or bias in your result. Not all applications require accuracy. Some, such a s servo control, only require repeatability. It is important in either case that you have enough bits available to represent your results and intermediate results with enough resolution to prevent limit cycling, which occurs when there isn't enough resolution in a system to represent a result in a feedback loop. (The necessary resolution is less than the least significant bit, so the system toggles back and forth between the higher result and the lower result.) Processing speed Pipelined branches and conditional instructions are a real advantage. If pipelined branches are not available on the machine you choose, it means that when the processor makes the branch, it must refill the pipeline before continuing execution. This amounts to a stall. Depending on the program flow, this can occur frequently and will directly affect your speed of processing. Pipelining the branches allows them to occur without reloading the pipeline, so that any nonlinear programming doesn't bog down. Conditional instructions are instructions you have designated to execute or not execute based on the results of a logical or arithmetic test, such as a compare or a subtraction. Conditional instructions are almost as useful as pipelined branches in that they allow the selective execution without repeating tests or requiring additional code to branch around certain instructions. You can skip through a great deal of nonlinearity that way . The hardware architecture can make a real difference. The most obvious difference manifests itself in the number of actions or instructions that the DSP can perform in a single instruction cycle. If you have two data memories (or a single, separable data memory), for instance, as well as a program memory, it is fairly straightforward to load two data words and one instruction on a single line. This would result in an efficient implementation of the MAC instruction mentioned earlier. Separate data and program memory is a characteristic of the Harvard architecture. There are even DSPs that have a separate I/O bus in addition to the memory buses. A Von Neumann architecture, in which program and data memory are combined, slows down the loading of coefficients and data, since the code fetches must be interlaced. Special stuff With the explosion in handheld multimedia devices like PDAs and MP3 players, some companies are producing devices with both a microcontroller and DSP on the same chip. Of note are the TI OMAPs, which combine an enhanced ARM processor with a fast fixed-point DSP. Atmel provides this combination with an ARM processor and an OAK DSP. Intel is another major player with its Xscale processors, one of which (the PXA250) is the core of many popular PDAs. These processors are now targeted to general multimedia but they are also well equipped for use in wi reless, VoIP, and streaming video. Key elements to look for in a portable device are memory (RAM and flash) and power consumption. Some more subtle enhancements that can set DSPs apart from one another are in their instruction sets. Analog Device's SHARC series comes with an instruction set that is nicely tailored to transform processing, such as (but not limited to) the Fast Fourier Transform and Discrete Cosine Transform. These processors are also good for audio and video applications. In terms of hardware enhancements, both TI and Analog Devices now offer a line of extremely fast dual-pipeline processors that are useful in a number of multifunction applications, including audio and video. The TI series is the TMS320C6000. Analog Devices calls its multipipelined processors Black Fin. Motorola's DSP56300 series has some devices with a coprocessor for parallel convolutions, making these devices suitable for cell phone applications. Motorola also sports a DSP based on the StarCore that can perform four MACs in a single cycle for high speed audio and video applications. The end? Or just the beginning? A wealth of digital processing products is available today; this short introduction is just a starting point. Have a look, keep your application in mind, and have fun. esp Don Morgan is a senior engineer at Ultra Stereo Labs and a consultant with 25 years experience in signal processing, embedded systems, hardware, and software. He is the author of several books including Numerical Methods for DSP Systems in C and Practical DSP Modeling, Techniques, and Programming in C. You may reach him at dgm@baykitty.com. DSP Vendor List The following vendors make DSPs. For details about specific products, visit the Embedded.com Buyer's Guide at www.embedded.com/bg. You'll find them under integrated circuits.
|
Home | Feedback | Register | Site Map |
All material on this site Copyright © 2017 Design And Reuse S.A. All rights reserved. |