[sdiy] XMOS board with Wavefront DSP (x3) and CODEC boards

Richie Burnett rburnett at richieburnett.co.uk
Thu Mar 8 13:57:59 CET 2012


Hi Tom and all,

> 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...  <snip>
>
> I love this kind of streamlined DSP coding. I'll have to get into the 
> Freescale Soundbite at some point...

...then there's the zero-overhead looping and circular buffer support ;-)) 
Really just things we take for granted on any half-decent DSP these days 
though.

I'm at the same stage as you with a DSP project at work.  Optimising the 
code.  I think you put it best when you said that it's not a case of 
learning how the chip works, but rather learning how to work the chip. 
Rearranging algorithms so that data can be pre-fetched just before it's 
needed, and results can be written back to memory whilst working on 
something else, all takes a lot of effort but the results are rewarding. 
That's how you manage to get lots of throughput out of a dirt cheap DSP, but 
it sure can make the source more difficult to read!  (Watch out for 
Read-After-Write "RAW" data dependencies too.  This has bitten me a couple 
of times because of the way dsPIC pipelines instructions.)

As far as audio processing goes, the dsPIC being 16-bit definetely isn't 
ideal, but you can work around it.  You just need to be careful to use 
double-precision for things that matter, like IIR filters with low cutoff 
frequencies.  Having two 40-bit accumulators means that you can at least 
keep track of two state variables to double-precision during most algorithms 
just by letting them sit in the full width accumulators.

When I looked at the Wavefront DSPs I couldn't figure out how you would 
implement a decent size lookup table.  That ruled them out for what I was 
doing at the time.  Unless there's a clever way round this, I'd have thought 
it would limit the device's usefulness for things like wavetable playback.

The log and anti-log instructions of the Wavefront DSPs are nice.  However, 
for the amount of times I actually need this function I either use a 
polynomial or lookup table that covers one "octave" and then range extend 
that as necessary.  It's nowhere near as fast as a dedicated instruction, 
but for converting MIDI notes to frequency, or amplitudes to dB's its plenty 
fast enough.

-Richie, 




More information about the Synth-diy mailing list