Advertisment

The good old C in a DSP chip

author-image
CIOL Bureau
Updated On
New Update

The biggest advantage of a DSP chip is that it is programmable. One can write

C and assembly level programs for a chip depending on the specific application

that the DSP chip is designed to deliver. Taking you through the architecture of

a DSP chip, we detail here how the software helps the chip carry out the

specified function.

Advertisment

Any discussion about the software requisites for DSP would be incomplete

without approaching it from the basic component of any DSP system: the chip.

Unlike the general-purpose microprocessor, a DSP chip is optimally designed

keeping in view some critical considerations that clearly set apart a DSP system

from a conventional microprocessor-based system. A DSP chip has to compute in

real time and the computation involves intensive "number crunching".

There is also this urgent need to develop chips that are less

power-intensive. Which explains the number of companies working on this aspect,

and not without some astonishing results. There are now chips that run on a volt

of power and a lot of research is being done on systems or chips that would run

on body heat. Think of that! A wearable computer or a device which is strapped

to your arm and would not require batteries. That would really do away with all

the hassle of running to the nearest power socket every now and then to charge

the batteries.

The next important aspect to be kept in mind while designing the DSP chip is

the input/output (I/O), a factor that is seldom brought into any DSP discussion.

So, how critical is I/O in a DSP chip? Very critical, I would say. Take for

example a CD player. The analog output from the read-head has to be converted

into digital by the chip wherein all the processing of the signal is done. Then,

the digital output from the chip is converted to analog, which is outputted to a

speaker. All these just go to prove the importance of input/output from a chip.

Thus, you have I/O processors, which are an integral part of a DSP chip. Not

like that of a microprocessor wherein the I/O is just an add-on card which you

plug in to the motherboard.

Advertisment

The architecture of a DSP chip is vastly different from a microprocessor. A

DSP chip is designed using the Harvard architecture, which is different from the

classic Von Neuman architecture of a microprocessor. The Von Neuman architecture

provides a processor with a single integrated memory, which is seen as a whole

by the system and is not differentiated into program memory, data memory etc.

The Harvard architecture divides the memory into program memory and data memory,

thus giving rise to two buses: one bus for program memory and one for data

memory. This kind of design vastly improves the chip’s efficiency with more

operations executed per second. Also, you get a more compact and application

specific code, which is one of the prerequisites of an embedded system. Thus,

the software developer has to be aware of the architecture of the chip and

develop the code accordingly.

The operating system that helps the DSP carry out the specified functions,

controls the chip and acts as the interface to the chip. This is done through

instructions that are embedded into the program memory of the chip. So, how is

this achieved?

An application developer would break down his application into a set of

rules, or algorithms, and test it on an application environment like MATLAB,

which would allow him to identify and remove any discrepancies in his algorithm.

A person would develop his algorithm for his application in MATLAB, optimize it

and develop an efficient set of instructions, which would implement the

algorithm. He then goes to an Integrated Development Environment (IDE), such as

VisualDSP or Code Composer Studio, which would enable him to implement his

algorithm using C or assembly language and test his application on the IDE.

Traditionally, C and assembly language have been the de facto standards for

writing software for DSP. Assembly language is invariably used for some section

of code that is executed repeatedly. This is done because assembly language,

being more hardware oriented, would make the whole code more efficient in terms

of memory space and would directly work at the register level, something that

all processors love to work with. C is used at a higher level of the code like

initializing values and in infrequently used tasks. Thus, varying amounts of C

and assembly language are used to build up the code which would help the

processor function to its fullest.

The code based on the above factors, once complete, will now be ready to

drive those sleek mobile phones and MP3 players that are influencing our lives

so much.

tech-news