CIC Intel® FPGA IP: User Guide

ID 683246
Date 9/30/2019
Document Table of Contents
Give Feedback

3.4. FIR Filter Compensation Coefficients

CIC filters have a low-pass filter characteristic. Three parameters (the rate change factor R, the number of stages N, and the differential delay M) allow you to change the passband characteristics and aliasing or imaging rejection.

Typically, decimation or interpolation filtering applications require flat passband and narrow transition region filter performance. However, the CIC filter has drooping passband gains and wide transition regions. To overcome these problems connect the decimation or interpolation CIC filter to a compensation FIR filter, which narrows the output bandwidth and flattens the passband gain.

Figure 10. Using a CIC Compensation FIR Filter

You can use a frequency sampling method to determine the coefficients of a FIR filter that equalizes the undesirable passband droop of the CIC and construct an ideal frequency response.

Determine the ideal frequency response by sampling the normalized magnitude response of the CIC filter before inverting the response.

Generally, only equalize the response in the passband, but you can sample further than the passband to fine tune the cascaded response of the filter chain.

The CIC IP generates a MATLAB script <variation_name>_fir_comp_coeff.m in the project directory. You can run this script in MATLAB to generate FIR coefficients that provide appropriate passband equalization. The generated coefficients are saved in a text file, for use by the FIR IP.

The MATLAB script requires the following parameters for the compensation FIR filter:

  • L: FIR filter length, which is same as the number of taps or the number of coefficients
  • F S : FIR filter sample rate in Hz before decimation/interpolation
  • F C: FIR filter cutoff frequency in Hz
  • B: Coefficient bit width if coefficients are written in fixed-point numbers
    Figure 11. CIC and Compensation Filter Responses