FS1. Flip-flop and latch timing: the exam way
This is the exam way of FS1: each part as you would write it on the paper, with what to recognize, the lines to write, the trap to watch and the answer. Every part keeps the anchor it has on FS1, so the switch at the top of the page takes you to the same part’s full solution. The methods are two cards of the playbook: flip-flop timing for FN17-5, FN12-7b and FN10-6c–d, and latch loops for PS5-Q1. FS1’s five harder variations stay on FS1; work them there, against the budgets their titles give.
The clock. The past finals gave 180 minutes for 200–250 points. FN17 had 250 points, about 0.72 min a point, so a 10-point part has about 7 minutes; FN10 and FN12 had 200, 0.9 min a point, so a 15-point part has about 14 minutes. PS5 is a problem set and has no points: each of its parts gets the budget of a final part with the same amount of work (5 to 12 points) at 0.9 min a point.
Two conventions run through every line below: latches are transparent high, and skew is signed, = (capture edge) − (launch edge), so is a late capture clock.
FN17-5: four latches, two flip-flops, 50 ps of skew (40 points)
FN17-5, p11. Consider the path through the two flip-flops shown below. Assume that the and clocks are skewed to arrive 50 psec earlier than the corresponding and clocks. Let each latch be characterized by psec, psec, and psec. Let the cycle time of the clock be 500 psec.
FN17-5’s path (p11, redrawn): latches on φ1 and φ2, the logic, latches on φ1′ and φ2′. Read in pairs, it is two master–slave flip-flops.
Reading the figure
Write this once. The question draws no clocks; the key’s sketch confirms and the primes the same waveforms 50 ps early. With φ1 rising at 0 in a 500 ps cycle:
| Edge | Time (ps) | Role |
|---|---|---|
| φ2 rises (first pair’s slave opens) | 250 | launch; Q moves at 260 |
| φ1′ falls (second pair’s master closes) | 200, then 700 | capture: this cycle’s, then the next |
So ps. No hold time is given: .
Part (a): does it work with no logic? (10 points)
FN17-5a, p11. If psec, will this circuit function correctly? Explain. (10 points)
Hint
Recognize. Flip-flop timing, moves 1–3: read the pairs, sign the skew, check hold first. About 7 minutes.
On the paper.
- Pairs: (φ1, φ2) launches as φ2 opens; (φ1′, φ2′) captures as φ1′ closes
- Primes early: ps; (not given)
- Hold:
- ✓, margin 60 ps
- In time: Q moves at 260 ps; φ1′ shut at 200 ps
- Setup at : ✓
Watch out. “Earlier” makes negative, and an early capture clock only helps hold. Writing as if skew always hurt hold gives a failure (by 40 ps) that belongs to the late case.
Answer: yes. The receiving master closes 50 ps before the new data is launched: no hold (early-mode) problem, 60 ps of margin, and the long path at is easily met.
Part (b): the largest logic delay (10 points)
FN17-5b, p11. What is the largest value of for which the circuit will work? Explain. (10 points)
Hint
Recognize. Flip-flop timing, move 4: “largest ” is the long path. About 7 minutes.
On the paper.
- Long path:
- ps
- In time: start ; deadline ; ✓
- unused: the slave is shut while the master’s output moves
Watch out. Two tempting wrong numbers: adding (425 ps), and for the early clock (535 ps). An early capture edge comes sooner, so it can only take time away.
Answer: ps, 50 ps less than with no skew (485 ps).
Part (c): repairing the clocks (10 points)
FN17-5c, p12. If the circuit is not functional in (a), how can the and clocks be modified such that the circuit will function correctly. (10 points)
Hint
Recognize. Flip-flop timing, move 5 (repairs), but conditional on (a). About 7 minutes; the answer itself is short.
On the paper.
- Condition: (a) works, hold margin 60 ps
- So no change to φ1 and φ2 is needed
- Had it failed (late primes): open a window, φ1 falling before φ2 rising
- ; the long path loses
Watch out. Read the condition literally. Do not “fix” the 50 ps by delaying the primed clocks: the circuit works, and the question asks about φ1 and φ2.
Answer: the circuit in (a) works, so no modification of φ1 and φ2 is required.
Part (d): the largest logic delay now (10 points)
FN17-5d, p12. What is the largest value of now for which the circuit will work? Explain. (10 points)
Hint
Recognize. Flip-flop timing, move 4 after move 5: the long path after the repair. About 7 minutes; the answer itself is short.
On the paper.
- (c) changed nothing: , ps
- ps
Watch out. Subtract a window only if (c) opened one. With a window it would be .
Answer: 435 ps, the same as (b).
FN12-7b: two clock generators, 1.5 ns apart (15 points)
FN12-7, p8. Consider the “local clock generator” circuit shown below, used to generate two clock phases locally from a single-wire global clock. The delay blocks (labelled with and ) could be implemented with an even number of inverters (for example).
FN12-7’s local clock generator (p8, redrawn): , .
Part (b): adjusting Δ1 and Δ2 (15 points)
FN12-7b, p9. Consider two latches driven by two different clock generators as shown below: Let CLK1 and CLK2 each have 10nsec periods, but let there be skew between CLK1 and CLK2 such that CLK2 arrives 1.5nsec later than CLK1. Ignoring latch overhead and skew introduced by the clock generators and assuming that the combinational logic represented a fixed delay of 0.5nsec, how must and in the clock generators be adjusted (from zero) to ensure correct functionality? Please assume that both clock generators must be adjusted in the same way and carefully explain your answer. (15 points)
On the paper, “latches” is crossed out by hand and replaced by “flip-flops”.
FN12-7b’s system (p9, redrawn): in each flip-flop the first latch (the master) is on φ2, the second (the slave) on φ1; 0.5 ns of logic between them.
Hint
Recognize. Flip-flop timing, move 5: a late capture clock, a short path, and a repair by a local non-overlap window. About 14 minutes.
On the paper.
- NOR: φ falls → φ2 falls at once, φ1 rises later
- φ rises → φ1 falls at once, φ2 rises later
- p9: master on φ2, slave on φ1
- Capture: φ2 falls = CLK falling; launch: φ1 rises = CLK1 falling
- ns, ns, overheads 0
- As drawn: data at ns, CG2’s master open until 6.5 ns ✗
- Hold: , so ns
- only delays the master’s opening: leave 0
- Ceiling: ns (or φ1 never rises)
Watch out. Find the master’s phase on p9 first. Chapter 14’s board flip-flop has its master on φ1, whose slave opens after the master closes, so its knob is ; here the master is on φ2, so the knob is .
Answer: raise to at least 1.0 ns (and below 5 ns) in both generators; leave . The launch then waits until the 0.5 ns path can no longer beat CLK2’s 1.5 ns late capture.
FN10-6c–d: jitter from a noisy supply (15 points)
FN10-6, p9. One of the issues in using inverters as delay elements (or in distributing clocks) is that they have a high sensitivity to power-supply variations. Let’s try to calculate this (back-of-the-envelope).
Part (a), solved on FN1, gives the sensitivity for a velocity-saturated inverter at V, V.
FN10-6c–d’s setting, drawn from the words (the paper prints no figure): a 2 ns inverter tree on a 2.0–2.5 V supply, and two flip-flops on different leaves.
Part (c): the jitter (8 points)
FN10-6c, p10. Assume that I am distributing a clock through a fan-out tree of inverters, where the delay from root to leaf is . If my power supply is varying between 2.5 V and 2.0 V (power supply noise), what jitter can I expect on the clock? Use the sensitivity you calculated in (a). (8 points)
Hint
Recognize. Flip-flop timing, move 6: jitter from a sensitivity and a latency. About 7 minutes.
On the paper.
- (part a)
- Whole tree slows 5%: ps
Watch out. Scale the whole 2 ns latency, not one inverter. Use (a)‘s ; the square-law of part (b) would give 600 ps. The first-order answer is low: the exact model gives 133 ps.
Answer: about 100 ps of jitter.
Part (d): a failure the clock cannot fix (7 points)
FN10-6d, p10. Assume that I have a flop-based design with and . Could this jitter result in functional failure of the design, functional failure that could not be eliminated by slowing down the clock? If functional failure is possible, what steps would I have to take as a designer to avoid it (assuming that I cannot change the jitter characteristics of the clock)? (7 points)
Hint
Recognize. Flip-flop timing, moves 3 and 6: “cannot be eliminated by slowing down the clock” is the short path, and jitter enters it as skew. About 6 minutes.
On the paper.
- Jitter as skew: the capture edge up to ps late
- Hold:
- , so ps
- Back-to-back flip-flops (): ✗
- No in it: a slower clock cannot help
- Fix: pad every short path to ≥ 50 ps (fast corner)
Watch out. Jitter’s long-path effect (a shorter cycle) is the one a slower clock fixes. The question asks about the other check.
Answer: yes. Hold needs ps, so back-to-back flip-flops fail, at any clock speed. Pad every short path to at least 50 ps.
PS5-Q1: five latch loops
PS5-Q1, p1–p2. In each of the following examples, indicate if the circuit is functional (i. e., it is a valid FSM). If the circuit is not functional, indicate how the circuit, delays, or clocks could be modified to ensure functionality. Try to explore more than one possibility. Even if the circuit is functional, indicate any issues with the design that you might see. “Primed” clocks indicate clock skew with respect to the “unprimed” clocks; you cannot change this skew time. All of the latches are active high. For simplicity, you may assume that the setup and hold times to the closing edge of the latch are zero. You may also assume that the latch adds no delay.
PS5-Q1’s clocks (p2, redrawn): φ1 and φ2 complementary, 5 ns high and 5 ns low; φ1′ and φ2′ the same, 1.5 ns late. Parts (d) and (e) use the same clocks.
The windows
Write them once, with φ1 rising at 0 in each 10 ns cycle: φ1 open on [0, 5), φ2 on [5, 10), φ1′ on [1.5, 6.5), φ2′ on [6.5, 11.5). Setup, hold and the latches’ delays are zero.
Part (a): one latch in a 7 ns loop
PS5-Q1a, p1. (a) [One latch on φ1, 5 nsec high and 5 nsec low, fed back to itself through comb logic, delay = 7nsec.]
PS5-Q1a (p1, redrawn): one φ1 latch fed back through 7 ns.
Hint
Recognize. Latch loops: a single latch fed back on itself, checked on both sides. About 5 minutes.
On the paper.
- One latch: a one-cycle loop, open 5 ns of every 10
- Race: leaves at 0, back at 7; latch shut at 5 ✓ (2 ns)
- Rule 2: ✓; waits 3 ns, leaves again at 10
- One state change per cycle: functional
- Needs the shortest path ≥ 5 ns; at 50% duty, ns
- 3 ns of every cycle is dead time
Watch out. The loop has a lower bound as well as an upper one: it must be slower than the open time. A faster logic corner, a longer high phase or a much slower 50% clock breaks it.
Answer: functional: ns, 2 ns of race margin. Issues: it relies on a minimum delay of 5 ns (at 50% duty, ns), and 3 ns a cycle is dead time; a pulse or a flip-flop is safer.
Part (b): a φ1–φ2 pair in a 12 ns loop
PS5-Q1b, p1. (b) [φ1 and φ2, each 5 nsec high and 5 nsec low; a latch on φ1, then a latch on φ2, fed back through comb logic, delay = 12 nsec.]
PS5-Q1b (p1, redrawn): a φ1 latch, a φ2 latch, and 12 ns back.
Hint
Recognize. Latch loops, rule 2: a flip-flop fed back on itself. About 5 minutes.
On the paper.
- φ1 then φ2 directly = a flip-flop: one cycle in the loop
- Rule 2: ✗
- Walk: leaves φ2 at 5, reaches φ1 at 17; φ1 shut at 15 (−2 ns)
- Not functional
- Fix 1: ns (83.3 MHz)
- Fix 2: logic ≤ 10 ns
- Moving logic between the latches: still 12 ns in one cycle ✗
Watch out. No borrowing in a one-cycle loop: there is no second cycle to borrow from, and no launch point rescues a loop that fails rule 2.
Answer: not functional (12 ns of logic in a one-cycle, 10 ns loop). Fixes: ns, or logic ≤ 10 ns.
Part (c): two flip-flops, 1 ns forward and 11 ns back
PS5-Q1c, p2. (c) [Latches φ1, φ2, comb logic delay = 1nsec, latches φ1′, φ2′, and comb logic delay = 11 nsec back to the first latch; φ1′ and φ2′ 1.5 nsec late.]
PS5-Q1c (p2, redrawn): flip-flop A (φ1, φ2), 1 ns, flip-flop B (φ1′, φ2′), 11 ns back.
Hint
Recognize. Latch loops, read as two flip-flops: the flip-flop timing checks, one per direction. About 11 minutes.
On the paper.
- Rule 2: four latches, two cycles: ✓
- A → B, hold, : ✗ (data at 6, φ1′ open until 6.5)
- B → A, setup, : ✗ ()
- Not functional, for two reasons
- Fix 1: pad the 1 ns path to ≥ 1.5 ns and ns
- Fix 2: pad, and the return logic ≤ 8.5 ns
- Fix 3: a 0.5 ns non-overlap window, ns
- Fix 4, at 10 ns: pad to 2 ns, move φ2′ 5 ns (at least 2.5 ns) into the 11 ns block
Watch out. A slower clock does not cure the race: with 50% phases φ1′ still closes 0.5 ns after the data arrives, at any period. The race needs padding or a window.
Answer: not functional: a hold race A → B (0.5 ns too fast) and a long path B → A (11 > 8.5 ns). Pad the 1 ns path to ≥ 1.5 ns and run at ns or speed the return to ≤ 8.5 ns; or a 0.5 ns window with ns; or, at 10 ns, pad to 2 ns and move φ2′ 5 ns into the 11 ns block.
Part (d): 2 ns, 11 ns and 4 ns
PS5-Q1d, p2. (d) [Latches φ1, φ2, comb logic delay = 2 nsec, latch φ1′, comb logic delay = 11 nsec, latch φ2′, and comb logic delay = 4 nsec back to the first latch.]
PS5-Q1d (top) and Q1e (bottom) (p2, redrawn), both on part (c)‘s clocks.
Hint
Recognize. Latch loops, move 5: rule 2 holds, but a wait restarts the clock at φ1′. About 8 minutes.
On the paper.
- Rule 2: ✓
- Race into φ1′: ✓ (0.5 ns)
- Data waits at φ1′ until it opens at 11.5
- φ2′‘s close at 21.5 ✗ (1 ns): not functional
- Chain from 11.5: to φ2′, block ≤ 10; to φ1 (closes 25), block + 4 ≤ 13.5
- Fix 1: block ≤ 9.5 ns
- Fix 2: move φ1′ ≥ 1.5 ns into the block (4.5–6.5 ns: 3 ns margin)
- Fix 3: and : ns
Watch out. A 10 ns block meets φ2′ exactly but reaches φ1 at 25.5 ns, after it closes. Check every closing edge after the wait, not only the next one.
Answer: not functional: from φ1′‘s opening (11.5 ns) the 11 ns block reaches φ2′ 1 ns after it closes. Fixes: the block ≤ 9.5 ns; or move φ1′ at least 1.5 ns into it; or ns. Issue: the 2 ns path has only 0.5 ns of hold margin.
Part (e): a 21 ns loop in two cycles
PS5-Q1e, p2. (e) [Latch φ1, comb logic delay = 6 nsec, latch φ2, delay = 5 nsec, latch φ1′, delay = 6 nsec, latch φ2′, and delay = 4 nsec back to the first latch.]
Hint
Recognize. Latch loops, rule 2 first: every block is short, so only the sum shows the failure. About 8 minutes.
On the paper.
- Rule 2: ✗
- Lap 1: φ2 at 6, φ1′ at 11 (waits to 11.5), φ2′ 17.5, φ1 21.5: all met
- Then every lap takes 21 ns: φ1 left 1.5, 2.5, 3.5, 4.5 ns into its window
- φ2’s margin: 4, 2.5, 1.5, 0.5, −0.5 ns
- Lap 5: φ2 reached at 90.5, shut at 90 ✗: not functional
- Fix 1: : ns (95.2 MHz)
- Fix 2: cut ≥ 1 ns of logic anywhere in the loop
Watch out. One good lap proves nothing. If you only walk lap 1, you call it functional.
Answer: not functional: 21 ns of logic in a two-cycle (20 ns) loop; each lap ends 1 ns later, and lap 5 misses φ2 (90.5 against 90 ns). Fixes: ns, or at least 1 ns less logic.