Skip to content
Tactiverge

School/□ Systems Engineer/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?

About 35 min · 3 goals · Checked by automated tests

1.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.

2.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?

Guess first. Being wrong here is how the surprise works.

3.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?

Can't use the interactive? Read a description instead

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.

4.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1

t_clk→Q = 0.2 ns, logic = 1.0 ns, t_setup = 0.1 ns. What is f_max, in MHz (nearest whole number)?

MHz

Practice 2

What sets the maximum clock frequency of a synchronous design?

5.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

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.

Derivation: The register-to-register timing constraint
  1. At a clock edge the launching register's output changes after t_clk→Q.

  2. The new value travels through combinational logic; the slowest route, the critical path, takes t_logic.

  3. The capturing register needs its input stable for t_setup before the next edge.

  4. So the next edge must come no sooner than T_clk ≥ t_clk→Q + t_logic + t_setup, and f_max = 1/T_clk.

  5. 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.

6.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 3 · a fresh version every time

A register-to-register path has clock-to-Q delay 0.15 ns, 12 gates of 0.1 ns each on its longest path, and setup time 0.1 ns. What is the maximum clock frequency, in MHz (to 1 decimal place)?

MHz

Practice 4

Adding a pipeline register halfway along the critical path usually…

Practice 5 · a fresh version every time

A register-to-register path has clock-to-Q delay 0.3 ns, 11 gates of 0.05 ns each on its longest path, and setup time 0.1 ns. What is the maximum clock frequency, in MHz (to 1 decimal place)?

MHz

7.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.

Open BUILD 008: Create a Virtual Computer →

8.Reflect

Concepts: Register-transfer-level design · Binary, hexadecimal and digital signals