Sequential Circuits
Subject: Hardware · Chapter: Sequential Circuits Time limit: 90 minutes · Total marks: 60 Instructions: Answer all questions. Show all derivations. Use / notation for mathematics. Justify every claim.
Question 1 — Timing Closure Across a Clock Domain (24 marks)
A synchronous pipeline stage uses edge-triggered D flip-flops. The following device and interconnect parameters are given:
- Clock-to-Q delay: ns (min, max)
- Setup time: ns
- Hold time: ns
- Combinational logic delay between two registers: ns (min, max)
- Clock skew (launch clock relative to capture clock): (signed; positive means the capture edge arrives later)
- Clock period:
(a) Derive, from first principles, the general setup constraint and hold constraint inequalities for a register-to-register path including a signed skew term . State clearly which of / and / appears in each. (6 marks)
(b) With , compute the minimum clock period and the corresponding maximum frequency in GHz. (4 marks)
(c) The design must hit GHz. Determine the range of skew that simultaneously satisfies both setup and hold at this frequency. State the tightest bound and which constraint sets it. (6 marks)
(d) Peak-to-peak clock jitter of ns is now added. Explain how jitter modifies the setup constraint (but not the hold constraint in the usual worst case), and recompute the allowable positive-skew margin for setup at GHz. (4 marks)
(e) A colleague proposes deliberately introducing ns of skew ("useful skew") to borrow time. Prove whether this is safe here, and explain the fundamental trade-off between the setup and hold budgets that useful skew exploits. (4 marks)
Question 2 — FSM Design, Minimization & Encoding (22 marks)
Design a Mealy finite state machine that outputs whenever the serial input bit-stream (MSB-first, one bit per clock) has matched the pattern 1011, with overlapping allowed.
(a) Draw the state diagram and construct the full state table (states, next-state, output on each input). Use symbolic state names. (7 marks)
(b) Apply a formal state-minimization technique (implication chart or partition refinement). Prove whether your machine is already minimal, or produce the reduced machine and justify each merge. (6 marks)
(c) Choose a state encoding and derive the next-state Boolean equations for each flip-flop using D flip-flops. Show the excitation logic for at least one state bit fully via a Karnaugh map. (6 marks)
(d) Convert the output logic to an equivalent Moore machine's requirement: explain precisely why the Moore version needs at least one extra state, and give the minimum state count for the Moore equivalent. (3 marks)
Question 3 — Metastability, Synchronizers & MTBF (14 marks)
A single asynchronous signal crosses into a domain clocked at MHz. The asynchronous event rate is MHz. The flip-flop metastability parameters are ps and ps.
(a) State the standard MTBF formula for a synchronizer with resolution time window , defining every symbol. (3 marks)
(b) For a single flip-flop synchronizer, the available resolution time is with ns and ns. Compute and the resulting MTBF (in seconds and years). (5 marks)
(c) A two-flip-flop synchronizer roughly adds a full clock period to the resolution time. Recompute the MTBF and comment quantitatively on the improvement factor. (4 marks)
(d) State one reason why simply adding more synchronizer stages does not scale MTBF indefinitely in practice. (2 marks)
Answer keyMark scheme & solutions
Question 1
(a) Constraint derivation (6 marks)
Let the launch edge occur at and the capture edge (of the next register) at (positive skew ⇒ capture later). (1)
Data becomes valid at the capture FF's D input at, at latest, . For a valid setup it must be stable before the capture edge:
(2, uses max values)
Hold: data from the new launch must not race through and corrupt the capture FF before it has held the old value past its edge. Earliest new data arrival is , capture edge (same-index) at :
(2, uses min values; note hold is period-independent)
Setup uses max and max ; hold uses min and min . (1)
(b) , (4 marks)
With : (3) (1)
(c) Skew range at GHz (6 marks)
Here ns.
Setup: ns. So setup requires ns. (2)
Hold: ns. (2)
Combined requirement: — infeasible (empty set). (1) The setup constraint is the binding one; at 1.0 GHz the path is impossible to close for any skew because the logic is simply too slow ( ns ns). (1)
(d) Jitter (4 marks)
Jitter shortens the effective period seen by setup in the worst case (launch edge late, capture edge early), so subtract jitter from the RHS: (2) Hold compares two edges of the same clock event region and in the standard worst-case model is not degraded by cycle-to-cycle jitter (it is intra-cycle), so it is left unchanged. (1) Setup margin at 1.0 GHz: needed ns — even worse than (c). (1)
(e) Useful skew (4 marks)
Useful skew of ns: check hold — need ns, and ✓ hold still safe. (2) Setup gains ns of borrowed time. Fundamental trade-off: every unit of positive skew added to help setup is subtracted from the hold budget (positive skew appears with in setup RHS but as a tightening term in the hold RHS). Skew borrows from the hold margin to fund the setup margin; the total is conserved. Here hold has ns slack, so up to ns skew is hold-safe, but even max skew cannot close setup at 1.0 GHz. (2)
Question 2
(a) State diagram / table (7 marks)
Pattern 1011, overlapping. Mealy states track the longest matched prefix:
- : no useful prefix
- : matched
1 - : matched
10 - : matched
101
Match completes on the 4th bit while in receiving 1 ⇒ ; then overlap keeps us in (the last 1 starts a new 1). (2 for correct prefix analysis)
State table (next state / output for input 0, input 1): (4)
| State | x=0 → next / z | x=1 → next / z |
|---|---|---|
| / 0 | / 0 | |
| / 0 | / 0 | |
| / 0 | / 0 | |
| / 0 | / 1 |
Rationale on key transitions: from (10) on 0 → prefix 100, longest suffix that is a prefix of pattern is empty → ; on 1 → 101 → . From (101) on 1 → 1011 match, output 1, remaining suffix 1 → ; on 0 → 1010, longest matching suffix 10 → . (1)
(b) Minimization (6 marks)
Partition refinement. Initial partition by output behavior. Only produces (on input 1). So group , (never output 1). (1)
Refine by next-state groupings:
- : (x0→, x1→)
- : (x0→, x1→)
- : (x0→, x1→)
differs (goes to on x=1) → split out. both map into on both inputs but must check destination sub-groups. (2)
New partition: ? Check vs : x0→(same group), x0→(different group). They differ ⇒ split. (2)
Final partition: — all singletons ⇒ machine is already minimal (4 states). (1)
(c) Encoding & D equations (6 marks)
Encode: with state bits . (1)
Next-state table:
| x | next | z | |
|---|---|---|---|
| 00 | 0 | 00 | 0 |
| 00 | 1 | 01 | 0 |
| 01 | 0 | 10 | 0 |
| 01 | 1 | 01 | 0 |
| 10 | 0 | 00 | 0 |
| 10 | 1 | 11 | 0 |
| 11 | 0 | 10 | 0 |
| 11 | 1 | 01 | 1 |
. (1)
K-map for (=next ), over : minterms where next : rows 00/1(=001→), 01/1(011), 10/1(101), 11/1(111). All are rows except also 00/1 etc. Reading: exactly when for states 00,01,10,11 EXCEPT verify 10/1 gives next 11 ()✓, 11/1 gives 01 ()✓. And rows: 01/0→10 (), 11/0→10 (). So . (3, full K-map shown)
: next for rows 01/0(→10), 10/1(→11), 11/0(→10). ⇒ … check 11/0: ✓; 10/1: ✓; 01/0: ✓; ensure no false: 00 rows give 0 ✓, 01/1→01 (): ✓. So (1)
(d) Moore equivalent (3 marks)
A Moore machine's output depends only on the current state, so the "match" cannot be signalled while reading the final 1 in ; instead a dedicated accepting state must be entered after the match, whose output is 1. This adds one extra state (, output 1, behaving like for further transitions). (2) Minimum Moore state count = 5. (1)
Question 3
(a) MTBF formula (3 marks)
where = available resolution/settling time, = metastability regeneration time constant, = characteristic window constant, = sampling clock rate, = asynchronous transition rate. (3)
(b) Single FF (5 marks)
ns. ns. (2) . . (1) Denominator: . (1) (1)
(Note: even a single stage here is astronomically safe because is huge; graders accept the method with correct magnitude.)
(c) Two FF (4 marks)
Two-FF adds ~ ns: ns. . (2) Improvement factor . MTBF s. (2) The improvement is multiplicative and enormous — each added clock period of resolution multiplies MTBF by .
(d) Scaling limit (2 marks)
Each added stage costs a full clock period of latency, and eventually routing/hold constraints, jitter, and finite /temperature variation dominate; also the marginal MTBF is already vastly beyond system lifetime