Re: FW: [lpc2000] Digest Number 591
2005-05-09 by Peter Maloy
> > > From: "James Dabbs" <jdabbs@...> > > Subject: RE: LPC2132 as DSP processor > > >Compared to dedicated DSP's, I've found the bigger limitation to be > >ARM's lack of circular buffer management. In a 4-pole IIR filter, I saw > >most of the CPU BW spent managing pointers and ldr/str'ing rather than > >doing the actual math. Agreed! Whenever I optimise DSP-like code, I concentrate on managing the data movement; try to use LDM and STM instructions rather than LDR and STR, possibly interleave history and coefficients, and perform as many operations in registers as possible between loads and stores - it's possible to perform four or five FIR or IIR operations in parallel within the ARM's registers. Following these principles I was able to get a five-times speedup of a quite reasonable assembler implementation of a notch filter, though managing register re-use so that the STM instruction left the results in the right order for the next call to the function required a couple of days of skull-sweat. This is one of the few situations I've seen where I would justify the use of assembler over a C code implementation - though I still like having a proven C implementation available so that I can validate the results returned by the assembler function. "All software is guilty until proven innocent". Peter. [Non-text portions of this message have been removed]