SPUC
3.0
|
class for CIC digital filter More...
#include <cic.h>
Public Member Functions | |
cic (char n=3) | |
Number of stages. More... | |
void | reset () |
Reset. More... | |
void | num_stages (char n) |
To change the number of stages dynamically. More... | |
Numeric | interpolate (Numeric in=0, signed char dump=0) |
For CIC interpolation, non-zero dump implies new input. More... | |
Numeric | decimate (Numeric in, signed char dump) |
For CIC decimation, non-zero dump implies output required. More... | |
Protected Attributes | |
std::vector< Numeric > | diff |
std::vector< Numeric > | nacc |
Differentiators. More... | |
std::vector< Numeric > | prev |
Accumulators. More... | |
char | stages |
Previous values. More... | |
class for CIC digital filter
Implementation for cascaded integrator comb filters This implementation provides for both decimation and interpolation filtering. Registers are signed long and the default number of stages is 3.
|
inline |
For CIC decimation, non-zero dump implies output required.
References SPUC::cic< Numeric >::stages.
Referenced by SPUC::cascaded_cic< Numeric >::clock(), and SPUC::scic< Numeric >::decimate().
|
inline |
For CIC interpolation, non-zero dump implies new input.
References SPUC::cic< Numeric >::stages.
Referenced by SPUC::cascaded_cic< Numeric >::clock(), and main().
|
inline |
To change the number of stages dynamically.
References SPUC_ASSERT, and SPUC::cic< Numeric >::stages.
Referenced by SPUC::cascaded_cic< Numeric >::cascaded_cic(), SPUC::cascaded_cic< Numeric >::num_stages(), and SPUC::scic< Numeric >::num_stages().
|
inline |
Reset.
References SPUC::cic< Numeric >::stages.
Referenced by SPUC::cascaded_cic< Numeric >::reset().
|
protected |
|
protected |
Differentiators.
|
protected |
Accumulators.
|
protected |
Previous values.
Referenced by SPUC::cic< Numeric >::cic(), SPUC::cic< Numeric >::decimate(), SPUC::cic< Numeric >::interpolate(), SPUC::cic< Numeric >::num_stages(), and SPUC::cic< Numeric >::reset().