[sdiy] STM32 processor

Eric Brombaugh ebrombaugh1 at cox.net
Thu Oct 13 00:44:08 CEST 2011


On 10/12/2011 03:12 PM, KD KD wrote:
> could one hope write DSP code in C?

You can always write DSP code in C. How well it performs is another 
story entirely. Inferring your DSP intent from C code is a notoriously 
difficult problem for compiler writers, so there are typically two 
approaches:

1) Provide libraries of hand-optimized assembly callable from C. That's 
what MCHP does for their dsPIC.

2) Provide 'intrinsics' - little compiler supported pseudo functions 
that hook into the DSP features of your processor without requiring you 
to do heavy assembly.

Neither of these is particularly intuitive or portable, but they're the 
only way to solve the problem absent artificial intelligence in the 
compiler. My own approach is to hand-code the critical functions and do 
the rest high level.

Eric





More information about the Synth-diy mailing list