[Technology Report]
DSCs—The Right Size For The Right Task
Digital signal controllers thrive in growing niches where fast data manipulation is essential.
What do streaming audio, motor control, and power conversion have in common? Digital signal controllers (DSCs) to solve the problem. These DSP wolves in microcontroller clothing combine the integer number-crunching of a DSP with the peripherals and onboard memory of a microcontroller, providing single-chip solutions for a range of applications.
Generally, DSCs continuously process the same kind of information. And usually it's with tight timing tolerances, such as each time a motor's rotor turns a few degrees, or when handling a digitally controlled power supply (see "Overcoming The Challenges Of Moving To Full Digital Power-Supply Control" at www.electronicdesign.com, Drill Deeper 13203).
Typical DSCs are 16- and 32-bit microcontrollers with DSP functionality. These days, most vendors push an 8- to 32-bit microcontroller continuum by supporting a common set of peripherals, pinouts, and development tools.
This seemingly squeezes the 16-bit processors out, yet they've found a niche in the 16-bit DSC market with a growth path to 32-bit DSCs. In fact, DSCs target numerous applications thanks to the range of available solutions.
Onboard clocks for Microchip's dsPIC family churn out 16 to 40 MIPS, while Analog Devices' Blackfin tops out at 756 MIPS. Of course, how all of this power is used will depend on the application and the peripherals that developers can bring to bear on these microcontrollers. Many peripherals are customized or accelerated for particular applications, such as motor control.
As for the DSC's architecture, it's relatively consistent among vendors, though the details vary significantly (Fig. 1). For example, data and address manipulation tend to be split, and multiple operations often can be performed in each area.
Dual multiply-accumulates (MACs) are common. So is dual address pointer manipulation, which lets DSCs step through arrays of information and perform manipulation on each cycle—just like a DSP.
Often, the DSC's DMA is more sophisticated than a typical microcontroller's DMA because of the incoming data's repetitive nature. The DMA consistently must perform scatter/merge operations to place incoming data in a layout conducive to SIMD-style algorithms. Likewise, DSCs usually repeat the same procedure forever, such as bringing in video data for each frame. An intelligent DMA often can be set once and allowed to run forever.
HARDWARE SIMPLIFIES DSC CHORES DSCs provide compute power. Yet even massive horsepower may not be enough for many applications without adding matching peripheral hardware support.
Microchip's 16-bit dsPIC30F1010 and dsPIC30F202x chips incorporate a pair of high-speed, 1-ns resolution, pulse-width modulators (PWMs) and 2-Msample/s, 10-bit analog-to-digital converters (ADCs). As a result, the chips will suit multiloop switch-mode power supplies (SMPSs) and other power-conversion applications, like ac-dc converters, isolated dc-dc power-converters, and uninterruptible power supplies (UPSs).
Without these enhanced peripherals, the standard dsPIC would be hard-pressed to attack some high-end applications, requiring developers to use even higher-performance but more expensive solutions. Of course, a wide selection of DSC options can make things interesting when choosing a chip (see " Choosing The Right DSC For Your Application," above).
Texas Instruments takes a similar peripheral approach with its 32-bit C280xx DSCs. These chips' enhanced PWM (ePWM) unit has over 11 bits of resolution at a 2-MHz frequency, thanks to TI's Micro Edge Positioning technology. The ePWM incorporates a range of submodules for synchronization, asynchronous override, dead-band generation, and PWM chopping.
The C280xx's enhanced capture (eCAP) module can work with the ePWM. Power and motor-control applications usually need to synchronize the PWM output with inputs processed by the eCAP module.
In many cases, the hardware can handle much of the peripheral-interaction, as the processor provides the initial setup or tuning. Still, DSCs with the C280xx's power often will be able to interact with these peripherals on an interrupt basis.
The ADCs in the C280xx also look to reduce processor overhead. For instance, the hardware can remove the offsets by trimming the internal offsets and by dynamically trimming the digital result in the ADC output register.
The big problem for developers is the wide range of options that are available from different vendors, since these enhanced peripherals aren't available across the board. In fact, common peripherals such as PWMs, ADCs, and quadrature encoders differ significantly from vendor to vendor and even within vendor product lines.
In many cases, a 16-bit DSC with the right peripheral support can run rings around a faster 32-bit DSC with a nonenhanced peripheral. Therefore, finding the right hardware may be a challenge. But it's a relatively minor task compared to finding the right software.
DSC SOFTWARE CHALLENGE DSC programming can be, let's say, interesting, due to the complexity of the algorithms and their application to the underlying hardware. Couple this with the timing dependencies of most DSC applications, and the number of developers who can handle the entire software chore shrinks dramtically.
Fortunately, most vendors offer software tools that can greatly-simplify the development process. For instance, Freescale's CodeWarrior's "expert beans" provide a way to customize the interface between an application and its peripherals. This lets users configure just a few of the many options a peripheral may have, as well as get all of the necessary source-code files when the process is complete.
Although such a process usually targets real peripherals, it's just as easy to employ a virtual peripheral. This might be strictly a software entity or a combination of hardware peripherals that will cooperate with each other, like the PWM and capture support found in many DSCs.
Code generation is one way to blackbox functionality like a virtual peripheral. But it has some drawbacks, especially when the support within the box is kept secret. A software vendor may have a digital filter that it licenses for less money in binary form. This approach is frequently used with runtime libraries.