Programming DSP hardware (slightly off topic, i know...)

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

hi.

has anyone of you got any experience of programming audio DSP ciruits. or does anyone know where to start looking for info on the subject? are there any often used 'standard circuits'? how much does it cost to get started?

yeah, you get the point. i know practically nothing and would like some help from someone who does...

thanks in advance
/kef

Post

I've not actually programmed any DSP 'hardware', although some of the people that I work with have. I have used a few DSP techniques (filters) in embedded devices though.

I'm not sure what you mean by programming 'DSP circuits' - thats a hardware problem!

Actually programming for a DSP device is often done in C or straight assembler. Obviously a much more manageable project if you do it in C. Not as fast though. A lot of DSP's have C compilrers for them, although they tend to be quite expensive. Some will allow inline assembler to be used to speed up critical routines.

There are usually a number of additional keywords that allow you to use specific features of the DSP, and often a couple of new types (e.g. int24)
that can be efficiently handled by the device.

It is always useful setting up a simulator environment if possible that you can run off your development platform - it really is useful to have. One of the people I work with has developed a completely generic set of modules that can be used to build these kinds of projects. When all of the processors functions have been defined it takes minutes to get a bit of code up and running that waggles a pin on the device so that you know you're up and running.

If possible you should set up a 'monitor' pretty early on that utilises a serial interface on the device so that you can debug / test the hardware easily. You can use something like teraterm on a pc to talk to the hardware over rs232. This should allow you to set up a load of functions that test various aspects of your system, and it is invaluable when debugging - it is worth setting up a few macros that exclude this functionality from your retail builds.

A lot of DSP have an ICE (in circuit emulator) available for them, which is also a very handy thing to have.

Post

The last DSP I saw is the Blackfin from AD, and the evaluation card has 4 inputs and 6 outputs, so, it's rather enough ;).
BUT the new processors are mainly RISCs, and that means that they use a lot of pipelined instructions too - it was not tantamount in the past, but now, all RISCs are higly pipelined with Harvard architecture -, and that means that programming in assembly will lead to less performance... Why ? Bcause the compilers can optimize with thinking of the pipeline, the cache, ... what we human will sadly not be able to do. So C is enough far enough if you want to make efficient programs.

Post

wow. thanks. thats a lot of useful info (which i understood most parts of...). is there any particular device you could recommend which is particularly cheap/easy to begin experimenting with? and does anyone know of any good web resources for people who are just getting starded with (audio) dsp hardware programming?

Post

Microchip have just released a new device in their PIC range, called dsPIC30. It has hardware multiply accumulate (very good for DSP), and a load of other DSP oriented features.
They tend to have pretty good tools for them. Unfortunately it looks like their server is down at the moment, otherwise I would have posted a link.

You might also consider some of the ARM devices. I think someone at work has managed to use the GNU compiler for one, although he had a great amount of difficulty setting it up.


IAR do very good compilers (although I think they might be expensive). I've been using one for an atmel atmega128 (not a DSP), and I've found the compiler to perform well.

They do compilers for DSP's and this is what they say on their website:

High-level programming languages is conquering the DSP world
As the use of Digital Signal Processors (DSP’s) is growing, handling more and more complex calculation tasks, the need to structure the code design in a high-level language increases. Today, no full-blown C compiler exists that allows a DSP developer to program the whole application in portable C language. IAR has taken the lead in delivering truly efficient DSP C and C++ compilers for pure DSP architecture, and has thus gained vast experience in requirements for making a DSP core architecture work well with modern compiler technology.

Post

dr.kef wrote:wow. thanks. thats a lot of useful info (which i understood most parts of...). is there any particular device you could recommend which is particularly cheap/easy to begin experimenting with? and does anyone know of any good web resources for people who are just getting starded with (audio) dsp hardware programming?
Analog Devices SHARC and TigerSHARC are sort of an industry standard in audio development (or at least that's the impression I got). The development kits and libraries can always be found at manufacturers site (often for free), biggest names are (apart from ADi): Texas Instruments, Motorola, LSI and afaik Intel.

Some manufactureres of microcontrolers also make hybrid microcontroler/DSP chips whics seems usefull too.

If you're new to hardware DSP but not new to DSP then the best option (I know of) is to download white papers and shit from manufacturer sites.

Also, afaik people usually use Matlab to design their shtuff so you should get a copy of it, or some open source knock off (there are few of those, not cool as Matlab but usefull).

Post

texture wrote:Microchip have just released a new device in their PIC range, called dsPIC30.
I was looking at these also. Cost is going to be a big factor I'm guessing unless your a big company. DSP developement boards can be extremely exspensive. dsPIC seems much more affoardable.

Anyone know of any good low cost DSP's that can do audio effect stuff?

Post

ChumpitO wrote:Anyone know of any good low cost DSP's that can do audio effect stuff?
Athlons? Pentiums?

Post

ChumpitO wrote: I was looking at these also. Cost is going to be a big factor I'm guessing unless your a big company. DSP developement boards can be extremely exspensive. dsPIC seems much more affoardable.
Not huge, about 35-40 people. A lot of clients we have are big though, so they tend to stomach a large proportion of the cost!

Post

nuffink wrote:
Athlons? Pentiums?
Have developed on these? I'm thinking small effects boxes.
texture wrote:
Not huge, about 35-40 people. A lot of clients we have are big though, so they tend to stomach a large proportion of the cost!
I was hoping against that, I've been wanting to do something like this from a hobbyist stance. Thought maybe I found someone similar. :cry:

Anyways from what I've been told by a couple (2) different people Texas Inst. are the ones to go to for DSP. They recommended against Motorola and I guess not as many use Analog Devices. Browse their web sites once you figure out what you're going to do a little better.

Oh yeah, Matlab is a good program for algorithm developent. You can process image and audio using your functions also.

Post

ok. thanks a lot! i will check out the info you all provided, and then probably return with more stupid quesions...

Post

ChumpitO wrote:
nuffink wrote:
Athlons? Pentiums?
Have developed on these? I'm thinking small effects boxes.
Sorry, I was being fascetious. However...

The ITX standard board is only 170mm square and dirt cheap compared to any custom board option in small volumes.
Maybe you should be thinking about slightly larger effects pedals?

One other thought. Can you run linux off a flash card?

Post

might find this useful for simple, cheap 'hardware' DSP:

http://elm-chan.org/works/vp/report.html

Post

...
ARM DSP's are NOT DSP... They are MCUs with some DSP data paths, but not DSP... I wonder if there is a mode for using the DSP data path... A lot of so-called DSP are that... And the Microchip perhaps also - I hate PICs, they are not efficient compared to ATMELs... -

What you need is a REAL DSP, like the SHARC - used on Creamware cards -, or TI or Motorola's, but nothing else.
What I'm used in my training job is a Blackfin from AD, it's powerful - 1 cm² at 600MHz without fan, 2 16 bits MACs, DMAs, ... - because it's a DSP with normal MCU instruction, so the opposite of ARM way of thinking. The evaluation card costs 250$, I think, 4 inputs, 6 ouputs, 2 Mo Flash, 128Mo SDRAM, ...
For a starter, this is really good AND cheap - comes with the compiler, ... and a µCLinux is being developped for the processor, the 533 -

One of the example I had yesterday. I had to compute a sum of 8 squares. I made it in a loop, and the compiler unrolled it, used the SIMD instructions, and the result was less than 8 32-bits instructions... at 600MHz, 16-bits data path, it's some ns...

Post

Miles1981 wrote: What I'm used in my training job is a Blackfin from AD, it's powerful - 1 cm² at 600MHz without fan, 2 16 bits MACs, DMAs, ...
That's still pretty exspensive unless it's for profit... Would you be able to do something as complicated as a Virtual Synthesizer on it? Also what is the method to get audio in or control signals, no built in A/D I'm sure but is there AC2?

Post Reply

Return to “DSP and Plugin Development”