- L + 1)
Figure 5.10 Tables of coefficient vector and signal buffer
. . .
- L + 2)x(n - L + 1)
. . .
- L + 1)
Figure 5.11 Refreshing the signal buffer for FIR filtering
The signal buffer is refreshed in every sampling period in the fashion illustrated in
Figure 5.11, where the oldest sample xn À L 1 is discarded and other signals are
shifted one location to the right in the buffer. A new sample (from ADC in real-time
application) is inserted to the memory location labeled as x(n). The FIR filtering
operation that computes y(n) using (5.2.29) is then performed. The process of refreshing
the signal buffer shown in Figure 5.11 requires intensive processing time if the operation
is not implemented by the DSP hardware.
The most efficient method for handling a signal buffer is to load the signal samples
into a circular buffer, as illustrated in Figure 5.12(a). Instead of shifting the data
forward while holding the buffer addresses fixed, the data is kept fixed and the addresses
are shifted backwards (counterclockwise) in the circular buffer. The beginning of the
signal sample, x(n), is pointed at with a pointer and the previous samples are loaded
sequentially from that point in a clockwise direction. As we receive a new sample, it is
placed at the position x(n) and our filtering operation defined in (5.2.29) is performed.
After calculating the output y(n), the pointer is moved counterclockwise one position to
the point at xn À L 1 and we wait for the next input signal. The next input at time
n 1 is written to the xn À L 1 position, and is referred to as x(n) for the next
iteration. This is permitted because the old xn À L 1 signal dropped off the end of
our delay chain after the previous calculation as shown in Figure 5.11. The circular
buffer implementation of a signal buffer, or a tapped-delay-line is very efficient. The
update is carried out by adjusting the address pointer without physically shifting any
data in memory. It is especially useful in implementing a comb filter when L is large,
since we only need to access two adjacent samples x(n) and xn À L in the circular
DESIGN AND IMPLEMENTATION OF FIR FILTERS