📕 Week 4 — Finite State Machines & Synchronous Counters9Challenges
B1: Mealy vs Moore FSM Difference
In a Moore Finite State Machine, outputs depend on:
Moore FSM: Output Y = f(?)
Solution & Explanation: In a Moore FSM, outputs depend strictly on the current state $Q(t)$. In a Mealy FSM, outputs depend on both state $Q(t)$ and inputs $X(t)$.
B2: 2-Bit Modulo-4 Counter
How many distinct flip-flops are required to design a Modulo-4 synchronous binary counter?
States = 4 → Flip-Flops = ?
Solution & Explanation: 2 Flip-Flops. Number of states $N = 2^k$. For $N=4$ states (00, 01, 10, 11), $k = \log_2(4) = 2$ flip-flops.
B3: One-Hot State Encoding
For an FSM with 5 states, how many flip-flops are needed when using One-Hot encoding?
One-Hot: 1 FF per state
Solution & Explanation: 5 Flip-Flops. One-Hot encoding uses exactly one flip-flop per state ($N$ flip-flops for $N$ states), simplifying next-state logic decoding.
I1: Sequence Detector (101)
Designing an overlapping "101" sequence detector Moore FSM requires how many minimum states?
Why can a Mealy FSM exhibit asynchronous output glitches during input transitions?
Y = f(Q, X) → Input X changes asynchronously
Solution & Explanation: In a Mealy machine, outputs are combinational functions of input $X$. If $X$ changes asynchronously mid-clock cycle, output $Y$ instantly changes, producing glitches.
I3: Gray Code Counter Advantage
What is the main benefit of using a Gray Code sequence (00 -> 01 -> 11 -> 10) in asynchronous FIFOs?
Gray Code: Only 1 bit changes per state change
Solution & Explanation: Only 1 bit changes per state. When crossing clock domains in async FIFOs, multi-bit changes can cause metastable intermediate states; Gray code prevents this.
C1: Glitch Power Reduction in CMOS FSMs
What state encoding technique minimizes dynamic switching power ($P = C V^2 f$) in CMOS FSM state registers?
Min Hamming Distance between frequent state transitions
Solution & Explanation: Assigning state codes with minimum Hamming distance for frequent transitions reduces total node bit-flips, minimizing capacitive charge/discharge power.
C2: Asynchronous Ripple Counter Delay
In an 8-bit ripple counter constructed from T flip-flops with propagation delay $t_{pd}$, what is the total worst-case propagation delay?
N-bit Ripple Counter: t_total = N * t_pd
Solution & Explanation: 8 * $t_{pd}$. In a ripple counter, each flip-flop clock input is driven by the previous flip-flop output, accumulating delays in series ($N \times t_{pd}$).
C3: Metastability & Two-Flip-Flop Synchronizer
What is the Mean Time Between Failures (MTBF) formula trend when adding a second synchronizer flip-flop in CMOS clock domain crossing?
MTBF ∝ e^(Δt / τ)
Solution & Explanation: Allowing an extra clock cycle ($Delta t$) for metastable resolution increases MTBF exponentially: $\text{MTBF} \propto e^{\Delta t / \tau}$.
🔄
New challenges every week!
We add fresh digital logic and CMOS challenges every week. Come back for more!