The Ripple Counter
Digital counters perform timing, frequency division, memory address sequencing, and execution control across computing systems.
The simplest binary counter is the asynchronous ripple counter. While the circuit requires minimal silicon area, cumulative propagation delays limit its use in high-speed synchronous designs.
Circuit Architecture
In a standard binary count sequence:
- Bit 0 toggles on every clock cycle.
- Bit 1 toggles every second cycle.
- Bit 2 toggles every fourth cycle.
- Bit $n$ toggles every $2^n$ cycles.
A Toggle (T) flip-flop with input $T = 1$ inverts its output on each active clock edge.
By clocking each subsequent flip-flop with the output of the preceding stage, each stage divides frequency by 2 (Figure 1).
When using negative-edge triggered flip-flops:
- Stage $Q_1$ toggles on the falling edge of $Q_0$.
- Stage $Q_2$ toggles on the falling edge of $Q_1$.
- Stage $Q_3$ toggles on the falling edge of $Q_2$.
The 4-bit output vector ($Q_3 Q_2 Q_1 Q_0$) counts from binary 0000 (0) to 1111 (15) and rolls over.
Cumulative Ripple Delay and Glitch Hazards
In a ripple counter, flip-flops do not share a common clock. Each stage waits for the preceding stage to transition.
Let $t_{\text{cq}}$ represent the clock-to-Q propagation delay of each flip-flop.
- Output $Q_0$ settles after delay $t_{\text{cq}}$.
- Output $Q_1$ settles after delay $2 t_{\text{cq}}$.
- Output $Q_n$ settles after delay $(n + 1) t_{\text{cq}}$.
For an $N$-bit ripple counter, the most significant bit settles after $N \cdot t_{\text{cq}}$ (Figure 2).
During carry propagation, the counter outputs traverse transient intermediate states. Consider the transition from count 7 (0111) to count 8 (1000):
| Elapsed Time | State ($Q_3 Q_2 Q_1 Q_0$) | Decimal Equivalent | Status |
|---|---|---|---|
| $t = 0$ | 0 1 1 1 | 7 | Initial state |
| $t = t_{\text{cq}}$ | 0 1 1 0 | 6 | Transient intermediate state |
| $t = 2 t_{\text{cq}}$ | 0 1 0 0 | 4 | Transient intermediate state |
| $t = 3 t_{\text{cq}}$ | 0 0 0 0 | 0 | Transient intermediate state |
| $t = 4 t_{\text{cq}}$ | 1 0 0 0 | 8 | Final settled state |
During this single transition, the outputs temporarily present values 6, 4, and 0.
If combinational decoders or comparators connect to these outputs, the decoders generate false output glitches. Therefore, designers must never connect ripple counter outputs directly to unclocked combinational decoders.
Maximum Operating Frequency
To ensure that count bits settle before the subsequent clock edge arrives, the clock period must exceed total ripple delay plus downstream setup time:
$$T_{\text{clk}} > N \cdot t_{\text{cq}} + t_{\text{su}}$$
The maximum operating frequency satisfies:
$$f_{\text{max}} = \frac{1}{N \cdot t_{\text{cq}} + t_{\text{su}}}$$
Maximum operating frequency decreases inversely with word width ($1/N$). For flip-flops with $t_{\text{cq}} = 1\text{ ns}$:
- A 4-bit ripple counter operates up to approximately 250 MHz.
- An 8-bit ripple counter operates up to approximately 125 MHz.
- A 32-bit ripple counter operates up to only 31 MHz.
Suitable Applications
Asynchronous ripple counters remain useful in specific engineering applications:
- Frequency Dividers: When an output drives only a clock net without intermediate bit decoding, ripple delay does not cause functional errors.
- Low-Power Timers: Ripple counters consume minimal dynamic power because higher stages toggle at geometrically reduced frequencies ($f / 2^n$).
- Real-Time Clocks (RTC): Dividing a 32.768 kHz watch crystal down to 1 Hz requires 15 cascaded flip-flops without external logic gates.
Practice Exercises
Problem 1
A 4-bit ripple counter constructed with flip-flops having $t_{\text{cq}} = 2.0\text{ ns}$ drives a 4-to-16 line decoder. Calculate the total settling time and identify the false decoder outputs that pulse during the transition from count 7 to count 8.
Solution
Calculate total settling time:
$$t_{\text{settle}} = 4 \times t_{\text{cq}} = 4 \times 2.0\text{ ns} = 8.0\text{ ns}$$
During carry propagation, the outputs sequence through 0110 (6), 0100 (4), and 0000 (0).
Decoder outputs 6, 4, and 0 each pulse high for approximately $2.0\text{ ns}$ before output 8 settles.
Problem 2
Design a frequency divider that generates a 1.0 Hz signal from a 32.768 kHz reference crystal. How many flip-flop stages are required, and is a ripple counter suitable?
Solution
Calculate required frequency division:
$$\frac{32{,}768\text{ Hz}}{1.0\text{ Hz}} = 32{,}768 = 2^{15}$$
The circuit requires 15 cascaded flip-flop stages ($N = 15$).
A ripple counter is suitable because the reference clock period ($T_{\text{clk}} \approx 30.5,\mu\text{s}$) is far larger than the total ripple delay ($\approx 30\text{ ns}$). Furthermore, the output requires no intermediate bit decoding.
Problem 3
A 3-bit ripple counter starts in state 5 (101) and receives four clock pulses. Determine the final state.
Solution
Calculate modulo-8 progression:
$$(5 + 4) \bmod 8 = 9 \bmod 8 = 1$$
The counter sequences: $5 \to 6 \to 7 \to 0 \to 1$. The final binary state is 3'b001 (1).
The next article examines synchronous counters, where all flip-flops share a common clock to eliminate ripple delays.