Update Delay in DSP

Thread Starter

gary1wang

Joined Sep 18, 2008
23
Hi guys

I am new in DSP programming, I do not understand update delay in the code below. It is in the FIR filter.


for (i = N-1; i > 0; i--)
d = d[i-1]; //update delays with data move


how the delay is implemented and what usage
 

guitarguy12387

Joined Apr 10, 2008
359
This is implementing your delay line/buffer. Presumably you shift in new data first, then shift everything down, every sample. You'll then loop over the delay line with your coefficients for the MAC operations.

FYI, use a circular buffer with pointers instead. This implementation, while it will work for lower order filters, is very inefficient and wastes many clock cycles.
 
Top