Visual walkthrough — RTL (register transfer level) design
We will build up a two-register pipe: one register that sends a number, a block of logic that changes it, and one register that catches it. Everything below is a picture of that one story.
Step 1 — What a register even is
WHAT we set up: a box with D in, Q out, clock underneath. WHY it matters: everything in RTL is these boxes plus wires between them (see Sequential logic and flip-flops). If you understand one box's timing, you understand the whole chip. PICTURE: below, the flat blue line is Q staying frozen; it only jumps at the orange whistle marks — never in between.
- ::: the number waiting at the input pin
- ::: the number the box currently remembers and shows at its output
- clock edge ::: the single instant when is allowed to become
Step 2 — Two registers with logic in between
WHAT: R1 → logic lump → R2, all sharing one clock. WHY: this is the smallest circuit that can transfer data (the "T" in RTL). The parent's is literally this drawing: is the logic lump, lives in the registers. PICTURE: follow the number leaving R1 (blue), getting reshaped in the orange logic cloud, arriving at R2's door.
- R1 ::: the register that sends — its Q is the starting number
- logic cloud ::: combinational logic , pure math with no clock of its own
- R2 ::: the register that catches — its D pin receives the reshaped number
Step 3 — The output is not instant: meet
WHAT: we mark the gap between the edge and Q actually being ready. WHY this tool: we need a number for "how late is the data?" — because later we compare it against the whistle spacing. is the first slice of the time budget. PICTURE: the orange dashed edge is the whistle at time 0; the blue Q signal only reaches its new level a little later (green bracket).
Term-by-term:
- The subscript ::: "clock-to-Q" — from the clock edge to Q being valid
- ::: how long after the whistle before R1's new output is trustworthy
Step 4 — The logic takes time too: meet
WHAT: add a second time slice, stacked after . WHY: the number cannot arrive at R2 before it has both left R1 and finished the math. Delays in series add:
- here ::: waiting for R1 to speak
- here ::: waiting for the adder/multiplier cloud to settle
- the "+" ::: two delays one after another simply sum
PICTURE: a timeline bar — first the blue block, then the orange block laid end to end. The right edge of orange = the earliest the answer is fully ready at R2.
Step 5 — R2 is fussy: meet and the deadline
WHAT: the next whistle sits at time (one clock period later). R2 demands the data be quiet by . WHY this tool: turns "arrive before the edge" into a precise deadline. It's the last slice of the budget. PICTURE: the timeline now runs whistle-to-whistle (length ). A red "no-go" zone of width sits just before the second whistle — the data ramp (blue+orange) must finish left of that red zone.
- ::: one clock period — the spacing between two whistles
- ::: the quiet time R2 needs before the edge to latch reliably
- ::: the actual deadline the arriving data must beat
Step 6 — Snap the pieces together: the setup constraint
Move to the left and you have the parent's law:
WHAT: three slices stacked; they must not overflow the box of width . WHY: if they overflow, the number is still moving when R2 latches → it grabs garbage (a setup violation). PICTURE: the three coloured slices packed inside a box labelled , with slack (green) if it fits, or an overflow (red) if it doesn't.
The slowest cloud (largest ) is the critical path — it decides the smallest legal , hence the top speed:
Step 7 — The opposite danger: arriving too early (hold)
WHAT: consider the shortest (fastest) path, , on the same edge. WHY a separate rule: this has nothing to do with — it's about one single edge. New data must arrive later than the hold window:
- ::: delay through the fastest path in the cloud
- ::: how long R2 needs its input frozen after the edge
- no anywhere ::: slowing the clock does not help hold
PICTURE: on one whistle, a red hold-window just after the edge; the fast new data (orange) must land to the right of it. If it lands inside the red window → hold violation.
Step 8 — Degenerate & edge cases (never leave a gap)
- Zero logic (, register straight to register). Setup becomes — still positive, so there's still a top speed. Hold becomes ; if the flop fails on its own — vendors design so this never happens.
- Only combinational, no second register. Then there is no "catch" edge and no term at all — pure Combinational logic design, timed by propagation delay alone.
- Critical path longer than . Setup violation → the fix is Pipelining: chop the long cloud with an extra register so each piece fits.
- Two different clocks feeding R1 and R2. The single- picture breaks — this is a clock-domain crossing, needing synchronizers, not this formula.
WHAT: four degenerate branches, each with its behaviour. WHY: the reader must never meet a scenario we hid. PICTURE: a 2×2 panel, one mini-timeline per case, showing whether the budget still closes.
The one-picture summary
Everything above compressed into a single annotated timeline: two whistles a period apart, the three stacked setup slices under the arrow, and the tiny red hold window under the first whistle. If the blue+orange stack fits left of the setup deadline and the fast data lands right of the hold window — the circuit is correct at that speed.
Recall Feynman: tell the whole story to a 12-year-old
Two kids stand a few metres apart. The one on the left holds a card with a number. A whistle blows every few seconds. On each whistle, the left kid reads his card out loud — but he's slow, so it takes him a beat () to actually say it. A messenger then runs the number over to the right kid, changing it on the way (adding, multiplying) — that run takes a while (). The right kid is careful: he needs the number sitting in front of him a little before the next whistle so he can copy it down cleanly (). So the whole thing — the left kid speaking, the messenger running, and the number resting — has to finish inside one whistle-gap (). Blow whistles too fast and the messenger is still running when the right kid copies → he writes garbage. That's the setup law. But there's a sneaky opposite problem: if the messenger is lightning fast, he might shove the new number at the right kid while the kid is still writing the old one down — that's the hold problem, and running whistles slower doesn't fix it; you have to make the fast messenger dawdle a bit. Two rules, one race.