Learning · Step 7
CIC filters
A CIC (cascaded integrator–comb) filter is the cheapest way to decimate or interpolate by a large factor. It is built entirely from adders and delays — no multipliers — so its fixed-point story is not about Q-formats or rounding. It is about one thing: register width.
A CIC decimator is N integrator stages running at the
high rate, a rate change by R, then N comb
stages at the low rate. The integrators each have a pole at
z = 1 — they accumulate without bound. The whole
filter's gain is (R·M)^N, where M is the
comb's differential delay (1 or 2). To carry that gain without
losing the top bits, every register must grow by
⌈N·log₂(R·M)⌉ bits over the input width. That is the
Hogenauer bit-growth rule — the single most
important number when you size a CIC.
Now the counterintuitive part: let the integrators
overflow. They will wrap constantly — and that is correct.
As long as every register is the full
B_in + ⌈N·log₂(R·M)⌉ bits wide, two's-complement
wraparound in the integrators is exactly undone by the comb
subtractions downstream. So you must never saturate
a CIC integrator — saturation clips the wrap and permanently
corrupts the output. This is the opposite of the rule for an
ordinary accumulator.
After the combs you have a full-width result with the
(R·M)^N gain baked in. Scale it back down (a shift),
then truncate to the output word — that final truncation is the
filter's only quantization step. The explorer below sizes the
registers for you.
Try it
Set the stage count, rate change, differential delay and input width — the register bit budget and the verdict update live.
What to notice
- Raise
N— growth climbs bylog₂(R·M)bits per stage. A fifth stage on a decimate-by-32 CIC adds another 5 bits. - Push
Rup — growth followslog₂R, so doubling the rate change addsNbits. - Switch
Mfrom 1 to 2 — that is one extralog₂2 = 1bit per stage, i.e.Nmore bits. - Change the input width — the growth figure doesn't move. Input
width just shifts the whole register width up; growth depends only
on
N,RandM. - No combination makes saturation safe. The width only decides how wide the registers are — the integrators must wrap either way.
Key fixed-point rules
- Size every register to
B_in + ⌈N·log₂(R·M)⌉bits — integrators and combs alike. The widest stage sets the width for all of them. - Let the integrators wrap. Two's-complement overflow in the integrators is exactly cancelled by the comb subtractions downstream — provided the registers are full width. Saturating an integrator clips that wrap and corrupts the output for good.
- No multipliers, no mid-filter rounding. A CIC is only adders and delays; the only quantization is the final truncation of the output word.
- Compensate the
(R·M)^Ngain. The output carries the full filter gain — shift it back down (or fold it into a following gain stage) before truncating to the output width. - Prune only by the numbers. You may discard LSBs stage by stage (Hogenauer pruning) to shrink the hardware, but size each discard from the noise-variance bound — never by eye.
Step exam
Answer all 3 questions correctly to complete this step.
-
A CIC filter's register bit growth is:
-
The integrator stages of a CIC filter should be:
-
A CIC filter is built from: