[sdiy] XMOS board with Wavefront DSP (x3) and CODEC boards
Tom Wiltshire
tom at electricdruid.net
Thu Mar 8 11:45:22 CET 2012
On 7 Mar 2012, at 23:05, KD KD wrote:
> Nice project....
>
>> performs automatic memory addressing for FIFO's, and also has functions for
>> log/antilog - and it does these at 50 MIP's. So doing a single tap for an FIR
>> for the DSP-1K takes one instruction (and one instruction cycle!) while the
>> same function on a conventional CPU (like the XMOS core) takes up to six
>> (load coefficient, load sample, multiply/accumulate, shift accumulator right
>> to maintain decimal point, increment coefficient pointer, increment sample
>> pointer). So 50 DSP-1K MIPS is comparable to 300 CPU MIPs.
>
> Interesting comparison!
Seems to me what he's basically saying there is "it's a DSP".
The dsPIC does the same things. The MAC instruction can preload two values (coefficient and sample, say), do the actual multiply-and-accumlate, increment two pointers, and even store the other accumulator, all in a single instruction. It's five or sometimes six actions at once. This makes it the most powerful instruction on the chip by some distance, and makes it worthwhile rearranging things fairly substantially just to use it. If you've got a few samples to do, even a fair chunk of set-up overhead is worth it, because the savings more than make up for it.
Imagine 16 samples. If we process with MAC we can get 16x5 = 80 actions done in 16 instructions. That means that if we can get set up for that in less than 80-16=64 instructions then there's savings to be had. And that can't be hard to do. 20 instructions of setup is more likely, which means we can do it in 36 instructions, half the time.
That said, I think his comparison is misleading because there are only specific tasks that can be handled this way. I spent quite a long time trying to rewrite some envelope generator code to try and take advantage of these features, but found it very difficult. Ultimately I needed a certain amount of logic and branching, and that takes the same time on a DSP as any other processor. But for the stuff they're designed for (crunching blocks of oscillator or filter samples) they're astonishing.
I love this kind of streamlined DSP coding. I'll have to get into the Freescale Soundbite at some point...
T.
More information about the Synth-diy
mailing list