Lite / Engineering Complex Systems / Week 26
How fast can the clock tick?
Why can't a processor designer just set the clock to 100 GHz and make everything 25 times faster?
Why should I care?
Every chip's top speed is set by its slowest path between two registers. Finding and shortening that path is a core skill of digital designers, and it explains why faster adders, pipelines and multi-cycle designs exist.
- State the timing constraint T_clk ≥ t_clk→Q + t_logic + t_setup.
- Find the critical path and the maximum clock frequency of a register-to-register path.
- Explain how designs trade more cycles for a faster clock.
Predict
A path has clock-to-Q 0.2 ns, logic 1.0 ns and setup 0.1 ns. What is the shortest safe clock period?
- 1.0 ns
- 1.2 ns
- 1.3 ns
- 0.3 ns
Guess first, then reveal
0.2 + 1.0 + 0.1 = 1.3 ns, so f_max ≈ 769 MHz. The register needs time to launch its value, the logic to settle, and the next register a moment to capture it.
Discover
Open the Virtual Computer at Level 3. Find a pair of 4-bit numbers whose carry ripples through all four columns and count the gate delays on the settle clock. If each gate takes 0.1 ns, how long is the adder's longest path?
What the interactive shows (text version)
In the build's ripple adder, 0111 + 1001 makes a carry in column 0 that ripples through every column: the carry out settles after 9 gate delays (1 for the first XOR, then 2 per bit). At 0.1 ns per gate that is 0.9 ns of logic.
Understand
The critical path
Every path from a register output through gates to a register input must settle within one clock period. The longest one sets the clock. In a ripple-carry adder it is the carry rippling through every column: about 2 gate delays per bit, so a 32-bit ripple adder is roughly eight times slower than a 4-bit one.
Shortening it
Designers attack the critical path with faster circuits (carry-lookahead adders compute carries in parallel at the cost of more gates), or by pipelining: putting registers in the middle of a long path so each piece fits a shorter period. The clock speeds up; each operation now takes more cycles, but a new one can start every cycle.
More cycles or faster cycles?
Run time = cycles × T_clk. A single-cycle design does everything in one long cycle; a multi-cycle design (like the 3-step model in the stepper) uses several short ones. Which wins depends on how evenly the work splits: the iron law T = IC × CPI × T_clk keeps every trade-off honest.
Explain it another way
Intuitive
A relay race where each runner must finish their leg before the next whistle. The whistle can only blow as often as the slowest leg allows.
Technical
Hold time is the other constraint: the input must not change too soon after the edge, which limits the shortest paths. Clock skew between registers adds to or subtracts from the available time.
Mathematical
f_max = 1/(t_cq + Σ t_gate + t_su). For a 4-bit ripple adder with 9 gate delays of 0.1 ns plus 0.2 ns and 0.1 ns: T = 1.2 ns, f_max ≈ 833 MHz.
Applied
Chip design tools run static timing analysis on every path in a design, millions of them, and report 'slack': how much time is left over. Negative slack means the chip won't work at the target clock.
Derivation: The register-to-register timing constraint
At a clock edge the launching register's output changes after t_clk→Q.
The new value travels through combinational logic; the slowest route, the critical path, takes t_logic.
The capturing register needs its input stable for t_setup before the next edge.
So the next edge must come no sooner than T_clk ≥ t_clk→Q + t_logic + t_setup, and f_max = 1/T_clk.
Example: 0.2 + 10 × 0.1 + 0.1 = 1.3 ns, so f_max = 1/1.3 ns ≈ 769 MHz.
Worked example 1
A 16-bit ripple adder has 2 gate delays per bit plus 1, at 0.08 ns each, between registers with t_cq = 0.15 ns and t_su = 0.1 ns. Find f_max.
Gate delays = 2 × 16 + 1 = 33; t_logic = 2.64 ns. T = 0.15 + 2.64 + 0.1 = 2.89 ns. f_max ≈ 346 MHz.
Common mix-ups
A faster clock always means a faster program.
✓ If faster clocks need more cycles per operation, run time = cycles × period may not improve.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Using the Level 3 data, compare a 4-bit and a 16-bit ripple adder's longest path. Propose one change from this lesson that would let the 16-bit adder run at the 4-bit adder's clock, and state its cost.
Reflect
Why do you think clock frequencies of desktop processors stopped rising quickly after the mid-2000s? (Hint: last week's power formula.)
Write your answer on paper or in your own notes. Lite never stores what you write.