C746 of 57
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

C7 · Lesson 46 · Low-power digital design

Clock gating, voltage scaling and power gating

A phone's battery and a server's electricity bill are both set by the same formula, αCV2f, plus leakage. Each term is a lever. Stop clocking registers that have nothing to do, and their activity falls to zero. Lower the supply when the work allows a slower clock, and the energy per operation falls as the square of the voltage. Cut the power to blocks that are asleep, and their leakage disappears. Modern chips pull all three levers constantly.

Play

  • The curves show, against supply voltage, how fast the logic can run, how much power it draws at that speed, and how much energy each operation costs, all relative to 1 V.
  • Lower the voltage: the speed falls, the power falls faster, and the energy per operation falls as V2.
  • Raise the threshold voltage: the speed collapses sooner as the supply approaches it.

Predict

A processor halves its clock frequency without changing its supply. What happens to the energy it uses for each operation?

Name it

Where the power goes

P=αCV2f+IleakV.

The clock network and the registers it feeds switch every cycle (α = 1 for the clock itself), so they often take a third or more of the dynamic power.

Clock gating

A register that doesn't need to change can simply not be clocked. A clock gate (a latch and an AND gate, so the gated clock never glitches) stops the clock to a group of registers while their enable is off. Their switching, and the clock wiring behind the gate, drops to zero. Synthesis tools insert gates automatically wherever a register has a load enable.

Dynamic voltage and frequency scaling (DVFS)

Gate delay grows as the supply falls toward the threshold; roughly,

f∝(V−Vt)2V.

When the workload allows a lower frequency, the supply can drop too. Power then falls roughly as V2f, faster than the frequency, and the energy per operation falls as V2.

Power gating

Leakage flows whenever a block is powered, even idle. A sleep transistor in its supply disconnects it entirely, at the cost of losing its state (unless retention registers save it) and of an energy and time cost to wake. It pays only when the block sleeps longer than the break-even time, the wake-up energy divided by the leakage power saved.

Worked example

In a 1 W block, the clock network and registers draw 30% of the power. Clock gating stops them 70% of the time. What does the block draw now?

Show the solution
  1. The gated share. It's 0.3 W, off 70% of the time: 0.3×0.7=0.21W saved.
  2. The new total. 1−0.21=0.79W 21% less, for the price of a few gates per register group.
  3. What's left. The logic between the registers still switches when its inputs change, so gating the clock alone doesn't remove all the dynamic power.

Answer 0.79 W.

Worked example

A processor runs at 1 GHz on 1.0 V, with Vt = 0.3 V. Its workload allows 0.7 V. What frequency, power and energy per operation result?

Show the solution
  1. Frequency. With f∝(V−Vt)2V, at 0.7 V: 0.16/0.70.49/1=0.466 of 1 GHz, so 466 MHz.
  2. Power. Power goes as V2f: 0.49×0.466=0.23 23% of before.
  3. Energy per operation. It goes as V2: 49% of before.
  4. Compare. Running slower and lower does the same work on half the energy, which is why phones race to finish only when they must.

Answer 466 MHz, 23% of the power and 49% of the energy per operation.

Worked example

An idle block leaks 50 mW. A sleep transistor cuts that to 0.5 mW, but waking it costs 5 µJ. How long must it sleep to save energy?

Show the solution
  1. Power saved. 50−0.5=49.5mW
  2. Break-even time. The wake-up costs 5 µJ: 5μJ49.5mW=101μs
  3. Choosing. Shorter idle periods are better spent with only the clock gated; longer ones, powered off.
  4. Predicting. A power manager predicts which it's likely to be.

Answer longer than 101 µs.

Check

A block draws 2 W; 20% of it goes to the clock and registers, which clock gating stops 90% of the time.

(a)

How much does gating save?

Write units the way you normally would: 1.5 W, 1500 mW and 0.0015 kW are the same answer.

(b)

What does the block draw now?

Check

Logic designed for 1.0 V runs at 0.8 V, with Vt = 0.25 V.

(a)

What fraction of its speed remains?

(b)

What fraction of the energy per operation does it use?

Check

Waking a block costs 5 µJ; asleep it leaks 2 mW instead of 10 mW. What's the break-even sleep time?

Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.

Check

A battery-powered sensor does a fixed amount of work every second and then idles. To minimize energy, it should:

Check

Logic with switched capacitance aC runs at frequency F on supply W, with threshold T. The supply is scaled to V.

Step 1

What frequency does it reach at V?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

Write dvfs(V, V0, f0, Vt) returning (f, power_ratio, energy_ratio) when logic that runs at f0 on V0 is moved to V: the new frequency from f∝(V−Vt)2/V, and the dynamic power and the energy per operation relative to their values at V0.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why does lowering the supply voltage save energy per operation, while lowering only the clock frequency doesn't?

Practice

Keep practicing

4 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.