Patent Publication Number: US-2002010727-A1

Title: Area efficient fir filter with programmable coefficients

Description:
BACKGROUND OF THE INVENTION  
       [0001] 1. Field of the Invention  
       [0002] The present invention is directed to time varying finite impulse response (FIR) filters for communications systems, particularly to an area efficient FIR filter having programmable coefficients, and more particularly to an area efficient FIR filter having the multiplication and partial-sum-addition finctions mapped to a single adder/accumulator through time multiplexing.  
       [0003] 2. Description of the Prior Art  
       [0004] Time varying FIR filters are often used in communications systems, such as cordless telephones, telecommunications systems, digital devices, and the like, to implement sample rate conversions. Conventional FIR filters typically include one or more multipliers, multiple accumulators, data storage elements to store the system coefficients, and a delay circuit or memory to store previous input words.  
       [0005] A decimation filter is one type of FIR filter in which the sampling frequency associated with the digital signal is changed and the frequency spectrum of the original digital signals are adapted to this changed sampling frequency. The original sampling frequency is reduced by the decimation factor, q. The filter length, N, of the filter determines the number of coefficients considered. The filter length determines the amount to which unwanted frequency components are suppressed and the extent to which “aliasing” of the signal is prevented.  
       [0006] Often times, in FIR filters which have a multiple accumulator hardware architecture (MACs), such as a DSP core, the coefficients are restricted to powers of two so that a shifter can be used instead of the multiplier. However, MACs are extremely costly in terms of die area. This is due primarily to the fact that multipliers require a large number of cells. The conventional method of replacing the multiplier by a shifter will reduce the surface area required on the fabricated chip, but has the significant disadvantage that it limits the filter coefficients to powers of two.  
       [0007] Accordingly, a new FIR filter is needed that is area efficient, has no multiplier, and a minimum number of data storage elements; yet is flexible enough that the coefficients are programmable and not limited to powers of two.  
       Summary of the Invention  
       [0008] The present invention is directed to an FIR filter for filtering sample values, which may include an adder circuit storing a plurality of coefficient values to be used in the FIR filter and for combining the samples values and the coefficient value to produce a combination value; and a memory circuit connected to the adder circuit for storing the combination value and for inputting at least a portion of the combination value back into the adder circuit to be combined with the sample values and the coefficient value. The present invention may also include a coefficient input circuit for inputting and storing a plurality of coefficient values to be used in the FIR filter; an ADC converter input circuit for inputting the sample values from the ADC converter; and an output circuit for outputting at least a portion of said combination value from the FIR filter. In the FIR filter of the present invention the coefficient values may be the same or different.  
       [0009] The FIR filter of the present invention operates by storing a first combination value and a second combination value in a memory; inputting a sample value into an adder circuit; inputting the first combination value into the adder circuit; repeatedly adding the sample value and the first combination value the number of time represented by a first of a plurality of coefficients to obtain a first result; replacing the first combination value in the memory with the result; inputting a next sample value into the adder circuit; inputting the second combination value into the adder circuit; repeatedly adding the next sample value and the second combination value the number of time represented by a second of the plurality of coefficients to obtain a second result; replacing the second combination value in the memory with the second result; repeating these steps for each of the coefficients; outputting the first combination value; replacing the first combination value with the second combination value; and continuously repeating these steps for all of the sample values. 
     
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
     [0010]FIG. 1 is a schematic illustrating the components of an integrated chip FIR filter in accordance with aspect of the preferred embodiment of the invention. 
    
    
     DETAILED DESCRIPTION  
     [0011] The present invention will be understood more fully from the detailed description given below and from accompanying drawings of preferred embodiments of the invention, which, however, should not be taken to limit the invention to a specific embodiment, but are for explanation and understanding only.  
     [0012] In one preferred embodiment of the present invention, a FIR filter is implemented through the use of a series of MAC operations. In many applications of FIR filters, the achievable processing rates far exceed the data sampling rate. If the operation clock is made faster than the sampling clock, the multiply function can be mapped to an adder/accumulator by simply adding a given sample into the accumulated sum multiple times.  
     [0013] The present invention has the significant advantage that it removes area-hungry multipliers from the FIR filter, through the addition of some simple control circuitry. Moreover, for filters using decimation, partial sum calculations can also be mapped into available cycles on the adder/accumulator, thereby minimizing the number of storage elements required for performing the filter calculations. The number of required storage elements is T/D, where T is the number of taps in the filter and D is the decimation ratio. A preferred embodiment of an FIR filter in accordance with aspects of the present invention is illustrated in FIG. 1. The preferred embodiment, and each of the components thereof may utilize any number of computing technologies well known to those of ordinary skill in the art, such as integrated circuit chips or discrete logic elements.  
     [0014] As shown in FIG. 1, an FIR filter in accordance with the present invention may include Coefficient Register  1 , which contains coefficient parameters b 0 -b 7 . Each of coefficients b 0 -b 7  are fed sequentially to Coefficient Counter  2  in a manner well known to those in the art. Control Logic  3  is used to combine coefficients b 0 -b 7  with the samples values adc1, adc2, and adc3 received from the ADC converter (not shown) at ADC Register  4 .  
     [0015] This is accomplished by inputting the output values from SIO Ports  5  to Adder  6  in a conventional manner. The output values at Ports  5  are the samples values from ADC Register  4  and Accumulator Registers  7  and  8 . The values R 1  and R 2  in Accumulator Registers  7  and  8  are calculated as described in more detail below. The final output from Accumulator Register  8  is then outputted to the ADC Port Register (not shown), in a conventional manner.  
     [0016] The system of the present invention, as illustrated in FIG. 1, may operate in the following manner. The programmable FIR filter in accordance with the present invention takes the samples received from the appropriate ADC converter (not shown), which are stored in ADC Register  4  as for adc1, adc2, and adc3, and filters them to generate outputs to a first SIO Port  5 . The sampling can be conducted at any number of sampling rates, and is conducted at 64 kHz in the embodiment shown in FIG. 1. The outputs may also be produced at any number of accumulator rates, with a rate of 16 kHz being used in the embodiment shown in FIG. 1.  
     [0017] The transfer fimction of the filter shown in FIG. 1 is: 
       H ( z )= b   0    +b   1   z   −1   +b   2   z   −2   +b   3   z   −3   +b   4   z   −4   +b   5   z   −5    +b   6   z   −6   +b   7   z   −7   
     [0018] This can be transformed to the following difference equation, 
       y ( n )= b   0   x(   n )+ b   1   x ( n− 1)+b 2 x( n− 2)+ b   3 x( n− 3)+ b   4   x ( − 4)+ b   5   x ( n− 5)+ b   6   x ( n− 6 +   b   7   x(   n− 7) 
     [0019] In the embodiment shown in FIG. 1, x(n) and y(n) are 64 kHz samples. Since the SIO ports can output samples at a 16kHz rate, only every fourth y(n) is actually required. That is, in the embodiment shown, the y(n) are decimated. This can be represented by the following difference equation, where k =4n and n =0, 1, 2, 3 . . .  
       y ( k )= p ( k ) + q ( k− 1) where 
       p ( k )= b   o   x ( k /   4   )+b 1   x (k/4−1)+ b   2   x(   k /4−3) and  
       q ( k )= b   4   x(   k /4)+ b   5   x(   k /4−1)+ b   6   x ( k /4−2)+ b   7   x ( k/ 4−3) 
     [0020] By taking advantage of the fact that the CODEC clock is faster than the sample rate, an FIR filter in accordance with aspects of the present invention only requires a single adder to compute the filter for a given channel. This is accomplished by mapping the coefficients (b 0 -b 7 ) into multiple add cycles so that there is no need for a multiplier.  
     [0021] The equations described above show that decimation of the samples can be used advantageously in the present invention so that only two accumulator registers are required: one for the result to be output for a given frame (Accumulator Register  7 ), and a second to hold a partial result for use in the next frame (Accumulator Register  8 ).  
     [0022] In the embodiment shown in FIG. 1, the ADC Register  4  holds the samples outputted by the converter. Value R 2  in Accumulator Register  8  is used to accumulate q(k) for use in the next CODEC frame. Value R 1  in Accumulator Register  7  is initially loaded with q(k-l) and is used to accumulate y(k). Coefficient Counter  2  is used to control the number of times the sample value in ADC Register  4  is added to the appropriate value in Accumulator Register  7 .  
     [0023] At the beginning of the CODEC frame, R 1  is loaded with the value in R 2 , q(k-1), and R 2  is cleared. Then, coefficient b 3  is loaded into Coefficient Counter  2  and the instruction R 1 =R 1 +ADC is executed b 3  times. Following this, coefficient b 7  is loaded into Coefficient Counter  2  and the instruction R 2 =R 2 +ADC is executed b 7  times.  
     [0024] Both Accumulator Register  7  and  8  hold their values for the remaining cycles in the sample period. At the start of the second sample period, coefficient b 2  is loaded into Coefficient Counter  2  and the instruction R 2 =R 2 +ADC is executed b 2  times. Then, coefficient b 6  is loaded into Coefficient Counter  2  and the instruction R 2 =R 2 +ADC is executed b 6  times. The instruction R 1 =R 1 +0 is then executed for the remaining cycles in the sample period.  
     [0025] Similarly, R 1 =R 1 +ADC is executed b 1 , time in the third sample period and R 2 =R 2 +ADC is executed b5 times. Likewise, R 1 =R 1 +ADC is executed b 0  times in the fourth sample period, and R 2 =R 2 +ADC is executed b 4  times. At the end of the CODEC frame, the value in Ri, y(k), is outputted to the port register (not shown). A new CODEC frame then starts and the sequence is repeated, as shown in FIG. 1.  
     [0026] Several possible coefficient sets are shown in Table 1 below.  
                                               TABLE 1                       b 7     b 6     b 5     b 4     b 3     b 2     b 1     b 0     Comments                  0   0   1   1   2   2   1   1   This is the filter shown in FIG. 1.       0   0   0   0   2   2   2   2   This filter averages samples in the current CODEC frame.       1   1   1   1   1   1   1   1   This filter averages sample in the current and previous                                       CODEC frames.       0   0   0   0   0   0   0   1   This filter returns the fourth sample in the current CODEC                                       frame and is right shifts by three places (a divide by 8) as                                       compared to the sample output for adc4.                  
 
     [0027] While this invention has been described in conjunction with specific embodiments thereof, it is evident that many alternatives, modifications, and variations will be apparent to those skilled in the art. Accordingly, the preferred embodiments of the invention set forth herein are intended to be illustrative, not limiting. Various changes may be made without departing from the spirit and scope of the invention as defined in the appended claims.