Manufacturing Industry

DSP Software Crunch

Electronic News, Nov 1, 1999 by Charles Small

Because digital signal processing brings precision and flexibility to a host of applications, increasing amounts of DSP code is being be written. Therein has created a major problem. Programmers and engineers all agree that DSP programs are among the hardest and most time consuming of all programs to write, debug and maintain.

Programmers and engineers complain that, in general, management does not understand how hard software is to write and debug. As a consequence, time and time again, software projects are understaffed, underfunded, and have unrealistic project-completion goals. So the projects go over budget and miss critical market windows.

What makes DSP code so hard to write and what can be done about the situation? Explaining the intricacies of DSP programming is difficult because all three initials -- "D," "S," and "P" -- are abstruse, to say the least. "S" for signal is perhaps the easiest to interpret. To an engineer or programmer, virtually anything that goes on in the real world that can be measured is a "signal." This concept of "signal" encompasses speech, music, TV pictures, the forces affecting the steering in your car, feedback from the mechanism in your PC's hard drive that makes those little clicks and the funny noises your FAX machine makes when it contacts another FAX machine.

"D" for digital means that these signals are measured at regular intervals and quantified into digital numbers. Lastly, "P" for processing means that mathematical operations are performed on this stream of digitized data, sometimes at very high rates. Analog data has been stored for years on tape and disk. So it is not hard to imagine why digitized data might also be stored. The purpose of performing calculations is less easy to imagine.

These calculations can do many wonderful things. They can, for example, extract a crystal-clear cellular phone conversation out of a hash of static. They can drive a high-fidelity speaker so accurately, a speaker the size of a box of animal crackers can sound better than a conventionally sized one. If you have a home theatre, they enable an entire movie to be recorded on a single DVD disk in compressed form. And when the DVD is played back, they not only uncompress the video, they enhance the audio, making sounds seem as though they coming from sources moving about in your living room.

"The switch from analog to digital has meant that everything is more efficient because it can be expressed mathematically with formulas instead of using large analog components to manipulate signals. Traditional analog solutions are subject to environmental conditions such as temperature and humidity," said Anne Mascarin, market segment manager for DSP products, The MathWorks.

The DSP Programming Process

The DSP programming process differs markedly from conventional applications programming. First of all, it does not begin with writing software at all. Instead DSP software development really begins with algorithm development. DSP programmers often use mathematics packages such as The MathWorks' MatLab to develop an algorithm as a system of equations. Or they write systems of equations in the C programming language.

But cooking up an algorithm is only a small part of the first step. Because DSP programs have to output results continuously over long periods of time with miniscule error rates, extremely large sets of test data must be fed into an algorithm under development and the algorithm's output verified against expected results to make sure the algorithm is correct. "A lot of these algorithms are data dependent, so we have to run a lot of data through them and testing becomes major issue. Often we spend more time testing than writing code," said Dave Bishop, manager of the Software Development group, Lucent Technologies Microelectronics Group.

At this point, it must be emphasized that the algorithm is only running on the development computer in anything but real time. It is far from able to do any useful work and it is far from being structured in its most optimal form.

Running on the Target DSP Processor

Next, the algorithm has to be translated into a program that will run on the target DSP. At this point in the development process, you get two diametrically opposed versions of what happens next.

Most DSP processor makers claim their devices are "compiler friendly," meaning that DSP programs can be written quickly in a high-level language, usually C. Kalyan Chakravarthy, product marketing manager for DSP, LSI Logic, said that, "Previously, DSP code has been written in assembly. But DSP programmers are progressing to a model were DSP processors run not only DSP code but also control code. Therefore they want very efficient tools so that they can write code quickly in C. The performance of next-generation DSP processors is high enough that some inefficiencies can be tolerated."

DSP programmers, on the other hand, say that C is not adequate for the critical parts of their algorithms. "I have never seen a C DSP compiler that can handle complex algorithms," said Lucent's Bishop.

 

BNET TalkbackShare your ideas and expertise on this topic

Please add your comment:

  1. You are currently: a Guest |
  2.  

Basic HTML tags that work in comments are: bold (<b></b>), italic (<i></i>), underline (<u></u>), and hyperlink (<a href></a)

advertisement
advertisement
  • Click Here
  • Click Here
  • Click Here
advertisement

Content provided in partnership with Thompson Gale