filter_cic

Creation of a CIC filter, processing on vectors of type T, and computing internally with samples of type Ti.

Namespace: dsp::filter

Prototype

sptr<FilterGen<T>> filter_cic(const CICConfig &config, char mode='d')

Parameters

configMain parameters of the CIC filter (see CICConfig)
mode'd' for decimation or 'u' for upsampling.

Description

Warning
For the internal sample type, it is highly recommanded to choose an integer type, because the way the filter is implemented can make the filter diverge with floating point arithmetic.


Example for interpolation

Note the frequency aliasings.

Example for decimation

See also

design_cic(), design_cic_comp()