Reply
Thread Tools
Posts: 124 | Thanked: 52 times | Joined on May 2010 @ Sweden
#1
Theres not much on this forum about DSP programming... one of the few threads i found:
http://talk.maemo.org/showthread.php?t=18746


i guess DSP programming may be one of the most extreme arts of programming - only meant for legendary hardcore developers.

Not neceserily only because its difficult learning DSP assembler, on top of arm assembler (which itself should require much dedication to maintain the massive knowledge and education) - but also that the DSP's usefulness is within some limited target applications.


Now to the questions:

1. Whats so special with the DSP? is it really worthwhile developing for a 430mhz DSP rather than a 600mhz CPU? i know Mhz vs. Mhz can be a whole science, so to make the question short: Where does the DSP shine, from a system level perspective? (...Floating point calculations? MOV's?)

2. Can the DSP be used in conjunction/simultaneously with the CPU on the N900? or does it generate too much overhead on the BUS?

3. Which applications can benefit from using the DSP?
i would guess all kinds of sound and video encoding/decoding is where it shines? But why is that? Can it also be used for regular file compression (ZIP/RAR)?

4. Are there any tools available to compile and build code? Will it cause any software conflicts running such code builds in Maemo? i would guess it isnt a good idea to try using the camera video recording while simultaneously using the DSP for other activities - there hardly would be any resource handling or multitasking kernel running for the DSP...
 
giannoug's Avatar
Posts: 334 | Thanked: 171 times | Joined on Dec 2009
#2
DSP is something like a "second" processor. More like a programmable hardware encoder / decoder for media(only?). When you play H.264 files on your N900 they are actually decoded on the DSP, the CPU does nothing at all.

You need to program it with NEON instructions. Beyond there there is a huge black gap. I don't know more about it
 

The Following User Says Thank You to giannoug For This Useful Post:
Posts: 96 | Thanked: 55 times | Joined on Apr 2010 @ İstanbul - Turkey
#3
Originally Posted by giannoug View Post
You need to program it with NEON instructions. Beyond there there is a huge black gap. I don't know more about it
Are you sure about that? As far as I know, NEON is used just by the SIMD unit of Cortex A8. DSP is a different chip(made by TI) than the CPU and uses different assembler than the ARM's. I never programmed it though.
 

The Following User Says Thank You to Optln For This Useful Post:
Posts: 196 | Thanked: 141 times | Joined on Aug 2007
#4
DSP discussions tend to happen more on the maemo-dev mailing list rather than talk.maemo.org. You won't hear much about the results on TMO other than "some media program runs faster/uses less battery/sounds or displays better due to using the DSP"

..or the opposite.
 

The Following User Says Thank You to jcharpak For This Useful Post:
Posts: 124 | Thanked: 52 times | Joined on May 2010 @ Sweden
#5
alright. thanks everyone for your input.

i guess that mailing list is a good source then, and ill also check out if TI provides any support for DSP developer wannabees
 
Posts: 124 | Thanked: 52 times | Joined on May 2010 @ Sweden
#6
...wow... i took some looks at the developers DSP documents at TI's website:

http://focus.ti.com/dsp/docs/dspsupp...ocCategoryId=6

it would probably take one year just to learn this book:

http://www.ti.com/litv/pdf/spru732j (C64x+ DSP CPU and Instruction Set Reference Guide)

after that i would need to understand how to use all of that knowledge efficiently as well... reading the other DSP (cache and memory) documents on that site as well)... then creating a "video encoder" will take several more months just to invent... all of this while keeping the knowledge of the first studies fresh...

with all of that in mind i havent even included all the time that will be needed to learn CortexA8 assembler and communicating with the camera... wow... it almost feels like an impossible mission.


here i thought i was progressing nicely with the x86 assembler book "Programming the 8086/8088":
http://www.amazon.com/Programming-80.../dp/0895881209

DSP coding seems to differs alot for many reasons... just to mention one it seems that i have to start coding fixed-point arithmetic instead of floating point... another difference is the huge number of registers (64) and all these rules that applies to each of them, and these rules changes depending on exactly what im attempting to do (and how many cycles each instruction needs)...

Asm is hard as it is without having an additional 1000 rules of what can be done at a certain time

i will start every day from now on by telling miself: "i am god - nothing should be impossible!"

things will probably take a bit longer than i expected though.
maybe i should rearrange these plans of mine a little, and set a new deadline 10 years forward - when no one even uses these cpu's/risc's anymore...

are we commiting suicide, anyone?

...wow...

Last edited by S0urcerr0r; 2010-09-16 at 04:59.
 

The Following 2 Users Say Thank You to S0urcerr0r For This Useful Post:
clasificado's Avatar
Posts: 466 | Thanked: 180 times | Joined on Feb 2010
#7
oh cmon. cant be that hard.

just trolling we may achieve at least a "hello world" example for dsp? i think that we have zero source code to guide us even to start up

PS: thanks for the books, ill take a look at them, just to see what real programmers do
 

The Following User Says Thank You to clasificado For This Useful Post:
Posts: 18 | Thanked: 26 times | Joined on Jan 2010 @ Kaunas, Lithuania
#8
DSP not like ordinary CPU have multiply-accumulate units,so it's faster for signal processing tasks, like FIR, IIR filters, Furrier transformation.... Simple DSP develompment boards come with audio inputs. outputs so you can perform signal processing tasks with audio. Programing is not very different from µCPU, of course if you using C or C++, not ASM.
__________________
English blog - http://www.electronicsblog.net
Lithuanian blog - http://www.radiocool.lt
 

The Following User Says Thank You to Dariu5 For This Useful Post:
Posts: 137 | Thanked: 150 times | Joined on Jan 2010
#9
ARM processors have multiply-accumulate too. I also wonder if the DSP is really faster for many tasks, or is the advantage just that you can have the CPU doing other stuff at the same time.

It is hard enough finding tutorial type information for NEON, nevermind the DSP
 
Posts: 131 | Thanked: 78 times | Joined on May 2010
#10
Originally Posted by CormacB View Post
ARM processors have multiply-accumulate too. I also wonder if the DSP is really faster for many tasks, or is the advantage just that you can have the CPU doing other stuff at the same time.

It is hard enough finding tutorial type information for NEON, nevermind the DSP
DSP is really faster, because it has several multiply-accumulate units cascaded with each other. This makes it very efficient in certain tasks, i.e. those stated above (filters, fourier transform, etc). CPU does not have cascading to the same extent.
 

The Following 3 Users Say Thank You to m0da For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 08:17.