Special Report: Choosing a DSP - Embedded.com

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 as 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.


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
Accuracy depends on the elements (such as A/D) you use to convert from the analog domain to the digital. Precision is the number of bits you use to represent this conversion.

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 as 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
Very often the efficiency and utility of your product depends on the speed of your processor. To determine a DSP's speed, here are some questions you should ask:

  • What is the clock speed?
  • How many clocks per instruction cycle?
  • How many instructions can be executed in a single instruction cycle?
  • Does the device have pipelined branches?
  • Can any instruction be made conditional?
  • Does it have a barrel shifter?
  • What kind of architecture does it use? Von Neumann or Harvard?
  • Is there an on-chip cache?

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
DSPs increasingly have instructions or peripherals that offer special advantages in certain applications. Motion control, for example, is receiving a great deal of attention from the DSP vendors. Analog Devices, Motorola, and TI (to name a few) have all come out with a series of processors that ease the design and development of complex motion control systems. These include peripherals for generating the PWM and implementing encoders, along with a wealth of general purpose I/O. If you are interested, you might check out the ADMC 300 and ADMC 400 from Analog Devices, Motorola's DSP56F800 series, and TI's TMS320F2800 series.

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 wireless, 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 .

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.

16271 Laguna Canyon Rd., Ste. 200
Irvine, CA 92618
United States
(949) 435-0600
Amphion Semiconductor
2001 Gateway Place, Ste. 130W
San Jose, CA 95110
United States
(408) 441-1248
Analog Devices
Three Technology Way
Norwood, MA 02062
United States
(800) 262-5643
2325 Orchard Parkway
San Jose, Ca 95131
(408) 441-0311
1200 Charleston Rd.
Mountain View, CA 94043
United States
(888) 890-BOPS
2150 Washington St.
Newton, MA 02462
United States
(617) 928-0100
Delphi Communication Systems
Two Clock Tower Place, Ste. 310
Maynard, MA 01754
United States
(978) 897-5650
DSP Group
3120 Scott Boulevard
Santa Clara, CA 95054
United States
(408) 986-4300
Infineon Technologies
1730 North First Street
San Jose, CA 95112
United States
(408) 501-6385
2200 Mission College Blvd.
Santa Clara, CA 95052
United States
(408) 765-8080
LSI Logic
1551 McCarthy Blvd.
Milpitas, CA 95035
United States
(866) 574-5741
Lucent Technologies
600 Mountain Avenue
Murray Hill, NJ 07974
United States
(888) 4-LUCENT
6501 William Cannon Dr.
Austin, TX 78735
United States
(512) 895-2000
Netergy Microelectronics
2445 Mission College Blvd.
Santa Clara, CA 95054
United States
(408) 727-1212
Oxford Micro Devices
731 Main Street, Building 2
Monroe, CT 06468
United States
(203) 445-0562

Philips Semiconductors
P.O. Box 218
The Netherlands
Sharp Plaza
Mahwah, NJ 07430
United States
(201) 529-8200
Route de Pré-Bois, 20
P.O. Box 1898
CH-1215 Geneva 15
Texas Instruments
12500 TI Blvd.
Dallas, TX 75243
United States
(800) 477-8924

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.