6.4.2 · D2Power, Thermal & Reliability

Visual walkthrough — Dynamic voltage and frequency scaling (DVFS)

2,015 words9 min readBack to topic

Step 1 — What a "gate switching" actually is

WHAT. The smallest event inside a chip is a single logic gate flipping from off to on. Physically, flipping means filling or emptying a tiny bucket of electric charge. That bucket is called a capacitor, and how much charge it holds per volt is its capacitance .

WHY start here. Everything else — power, heat, battery life — is just this one event repeated billions of times per second. If we understand the cost of one flip, we understand the chip.

PICTURE. Below, the switch (a MOSFET transistor) connects the supply rail at voltage to a capacitor . When the switch closes, charge flows in until the capacitor reaches voltage .

Figure — Dynamic voltage and frequency scaling (DVFS)

The relation just says: bigger bucket () or higher pressure () → more charge stored.


Step 2 — The energy cost of one flip

WHAT. We compute the energy the supply spends to fill the bucket from empty to voltage .

WHY an integral, and not just "charge times voltage"? Here is the subtle point most people miss. If you naively said "energy ", you would be wrong, because the voltage across the bucket is not the whole time — it climbs from up to as charge trickles in. We need to add up over each tiny sliver of charge , and each sliver enters at whatever voltage the bucket currently holds. That "add up many tiny pieces" is exactly what an integral does — that is why the integral tool appears here and nothing simpler will do.

  • — "sweep the bucket voltage from up to the final ."
  • — the instantaneous voltage (lower-case), changing as we fill.
  • — the sliver of charge added when voltage rises by (since ).

PICTURE. The energy is the area under the line. Because voltage rises linearly with charge, that area is a triangle — and a triangle is half of the rectangle . That is where the factor is born.

Figure — Dynamic voltage and frequency scaling (DVFS)

Step 3 — From one flip to power (flips per second)

WHAT. A chip does not flip once; it flips on every clock tick. The clock frequency is how many ticks happen per second (see Clock generation and PLs for how that clock is made). Not every gate flips every tick, so we introduce the ==activity factor == — the fraction of gates that actually switch on an average tick.

WHY. Power means energy per second. So we multiply the cost of one flip by how many flips happen per second.

  • — activity factor, between (nothing switching) and (everything switching).
  • — clock ticks per second.
  • — a bundle of constants, the "effective capacitance."

PICTURE. Think of a bucket brigade: each flip empties one bucket of energy, and sets how fast the line moves. Faster clock = more buckets per second = more power.

Figure — Dynamic voltage and frequency scaling (DVFS)

Step 4 — Why you can't just drop the voltage (the constraint)

WHAT. You might think: " is so powerful — just crash the voltage to almost zero and keep high!" Physics says no. Lowering voltage makes each flip slower, and if a flip isn't finished before the next clock tick, the chip computes garbage.

WHY tie delay to voltage? The switch's drive current — how fast it can shovel charge into the bucket — depends on how far the supply voltage sits above the transistor's ==threshold voltage == (the voltage below which the transistor barely conducts). The delay to fill the bucket is:

  • — the supply voltage (same as above; just marks "drain supply rail").
  • — threshold voltage, a fixed property of the transistor.
  • — the "headroom" that actually drives current. As approaches , this shrinks, current collapses, and delay explodes.

Since the clock period must be longer than the delay (), a slower switch forces a lower maximum frequency:

PICTURE. As slides down toward , the max frequency curve bends toward zero — a wall you cannot cross. The Voltage regulators set ; the clock must respect this wall.

Figure — Dynamic voltage and frequency scaling (DVFS)

Step 5 — Proportional scaling: the energy result

WHAT. Now we chain them by the same factor and see what happens to the energy of a whole task. Say a task needs a fixed number of clock cycles (fixed because the work is fixed, no matter how fast you clock it).

WHY count energy per task, not power? Power alone is misleading — running slower means running longer. Energy (power × time) is the honest measure of battery drain. Watch the frequency cancel:

  • The in power and the in time cancel. Astonishing: task energy does not depend on frequency at all — only on !

Now scale both down: and (with ):

PICTURE. Below, energy per task falls as the square of the scaling factor while time rises only linearly (). At : energy (save ), time (25% longer).

Figure — Dynamic voltage and frequency scaling (DVFS)

Step 6 — The edge case: static leakage breaks the fairy tale

WHAT. Everything above was dynamic power (from flipping). But even when a gate does nothing, transistors leak a trickle of current just by being powered on. This static leakage power is:

WHY it matters — the degenerate limit. Push very small (crawl very slowly): dynamic power vanishes like , but the task now takes a very long time (), and leakage keeps bleeding energy the entire time. Below some sweet-spot frequency, going slower actually costs more total energy. This is the whole Race-to-idle vs race-to-dark debate: sometimes "run fast, then sleep" (and use Power gating to cut leakage) beats crawling.

PICTURE. The total-energy-vs-frequency curve is a valley: crawl too slow and leakage dominates (left wall rises), sprint too fast and dominates (right wall rises). The bottom is the true optimum.

Figure — Dynamic voltage and frequency scaling (DVFS)

The one-picture summary

Everything on this page, compressed: one flip costs (a triangle of area) → billions of flips per second give → voltage and frequency are chained by the wall → scaling both by shrinks task energy by → until leakage bends the curve back up into a valley.

Figure — Dynamic voltage and frequency scaling (DVFS)
Recall Feynman retelling — say it back in plain words

Inside a chip, doing anything means filling and emptying tiny buckets of electric charge. Filling one bucket costs energy equal to half the capacitance times the voltage squared — the squared part comes from the fact that the bucket voltage rises gradually while filling, so the energy is a triangle, half a rectangle.

The chip fills buckets on every clock tick, so power is the cost of one fill times the ticks per second: power grows straight-line with the clock but squared with the voltage. That lopsidedness is the whole point.

You'd love to just crush the voltage because of the squaring — but lower voltage makes each bucket fill slowly, and if a bucket isn't full before the next tick, the answer is garbage. So voltage and clock are handcuffed: lower one, you must lower the other.

When you lower both by the same fraction to run a task, the clock cancels out (slower means longer, and the two effects trade off), leaving energy . Drop everything to 80% and you keep only 64% of the energy — a 36% saving for a 25% longer wait.

The catch: transistors leak power just sitting there. Crawl too slowly and you leak for so long that you lose. So the smartest move is to find the valley — not the slowest speed, but the sweet spot — or run fast and then switch the whole block off.

Recall

Why is energy per task independent of frequency (in the dynamic-only model)? ::: Power , but time , and energy = power × time, so the cancels — leaving energy . Why must voltage and frequency scale together? ::: Lower voltage slows each transistor switch ( rises), so drops — you can't keep a high clock at low voltage or logic won't finish in time. Where does the factor in come from? ::: The bucket voltage climbs from 0 to V while filling, so the energy is the triangular area under the line, which is half the full rectangle. What breaks the "slower is always greener" rule? ::: Static leakage power keeps draining energy for the whole (longer) runtime, so below a sweet-spot frequency total energy rises again.