Voltage Scaling: DVFS and AVS
Trade speed for energy with the supply voltage, and change voltage and frequency in a safe order.
You Will Be Able To
- Measure how the speed and the energy of logic change with the supply voltage.
- Order the voltage and frequency changes of an operating-point switch.
- Explain how a closed loop finds the lowest safe voltage for one chip.
- Lesson
- W1.4
- Time
- 30 min
- Runs on
- ngspice
- Check
- 5 questions
A phone processor decodes video at a quarter of its top speed. One design keeps the supply at full voltage and simply slows the clock. The battery lasts no longer per film, because every operation still costs the same energy.
- 1.8 V
- 1.5 V
- 1.2 V
- 1.0 V
Read the plot as a table
| Time | 1.8 V | 1.5 V | 1.2 V | 1.0 V |
|---|---|---|---|---|
| 3 ns | 1.574 V | 439.7 mV | 3.82 mV | 983.3 mV |
| 4 ns | 1.451 V | 7.951 mV | 228.1 mV | 31.33 mV |
| 5 ns | -9.372 mV | 1.505 V | 1.271 V | 129.3 mV |
| 6 ns | 1.78 V | 792.6 mV | 1.198 V | 1.02 V |
| 7 ns | 25.54 mV | 7.607 mV | 1.195 V | 1.124 mV |
| 8 ns | 604.5 mV | 1.536 V | 1.148 V | 987.1 mV |
Measured on ngspice 42, tt corner. At 1.8 V the ring runs at 2.38 GHz. At 1.0 V it runs at 402 MHz.
Lowering the voltage makes the logic slower, and it makes every operation cheaper.
Speed and Energy Against the Supply Voltage
A ring oscillator is an odd number of inverters in a loop. It toggles as fast as its gates allow. So its frequency tells you how fast logic runs at that voltage.
Each period charges and discharges every stage once. The charge that the supply delivers in one period, times the voltage, is the energy of one operation.
| Supply | Frequency | Power | Energy per period |
|---|---|---|---|
| 1.8 V | 2.38 GHz | 406 µW | 170 fJ |
| 1.5 V | 1.68 GHz | 196 µW | 117 fJ |
| 1.2 V | 896 MHz | 65.6 µW | 73.2 fJ |
| 1.0 V | 402 MHz | 20.0 µW | 49.6 fJ |
The four rings of the plot, measured over ten periods. Frequency is one over the period. Energy is the charge of the ten periods times the supply, divided by ten.
Go from 1.8 V to 1.0 V. The ring becomes 5.92 times slower. Its power falls 20.3 times. Its energy per period falls 3.43 times.
The energy follows C·VDD² closely: (1.8/1.0)² is 3.24. The speed falls faster than the voltage, because the gate drive above the threshold shrinks. Near the threshold the logic almost stops.
Power falls most of all. It is energy per period times frequency, and both fall. But power alone misleads: a slow clock stretches the same work over more time.
DVFS: Change Voltage and Frequency in a Safe Order
Dynamic voltage and frequency scaling (DVFS) changes the supply voltage and the clock frequency while the chip runs. Each pair of values is an operating point. Software picks a fast point for heavy work and a slow point for light work.
The order of the two changes matters. The logic must never see a clock that is faster than its present voltage allows.
- Cycle 1
Slow point: 1.2 V and a 0.8 GHz clock. The logic can reach 896 MHz here, so the clock is safe.
- Cycle 2
To speed up, the controller first asks the regulator for 1.8 V. The clock stays slow while the voltage rises.
- Cycle 3
The voltage has settled at 1.8 V. Only now may the clock change.
- Cycle 4
The clock goes to 2.0 GHz. The logic can reach 2.38 GHz at 1.8 V, so it is safe.
- Cycle 6
To slow down, the clock drops first. The logic has time to spare at once.
- Cycle 7
Then the voltage falls. The slow clock is safe at every voltage on the way down.
Speed up: voltage, wait, frequency. Slow down: frequency, then voltage.
A regulator needs time to move its output. The controller must wait for the new voltage before it raises the clock. That wait is part of the cost of every switch.
A block whose supply moves also needs level shifters where its signals meet a block on another supply. Lesson W3.4 measures why.
AVS: A Loop That Measures the Chip
Chips from one design are not equally fast. The run below repeats the four rings at the slow process corner.
.lib sky130 ss. Compare the 1.2 V ring with the typical chip of the first plot.- 1.8 V, slow corner
- 1.2 V, slow corner
Read the plot as a table
| Time | 1.8 V, slow corner | 1.2 V, slow corner |
|---|---|---|
| 3 ns | 1.628 V | 822.9 mV |
| 4 ns | 1.726 V | 1.846 mV |
| 5 ns | 1.768 V | 1.277 V |
| 6 ns | 1.788 V | 1.149 V |
| 7 ns | 1.793 V | 1.316 mV |
| 8 ns | 1.811 V | 622.3 mV |
Measured on ngspice 42, ss corner. At 1.2 V the slow chip reaches 694 MHz; the typical chip reached 896 MHz.
| Supply | Typical chip (tt) | Slow chip (ss) | Slow chip is slower by |
|---|---|---|---|
| 1.8 V | 2.38 GHz | 2.05 GHz | 14 % |
| 1.5 V | 1.68 GHz | 1.40 GHz | 17 % |
| 1.2 V | 896 MHz | 694 MHz | 23 % |
| 1.0 V | 402 MHz | 272 MHz | 32 % |
Ring frequency at two process corners. The gap widens as the voltage falls.
A DVFS table is fixed when the product is designed. It must be safe for the slowest chip at its worst temperature. So every typical chip gets more voltage than it needs, and wastes the difference.
Adaptive voltage scaling (AVS) gives each chip its own voltage. In its simplest form each chip is measured once at test, and its voltage is stored on the chip.
Closed-loop AVS goes further. A small circuit on the chip measures its speed while it runs, continuously or at intervals. A ring oscillator like this one is a common choice.
- Measure
- Control / FSM
- Power
- Design
- Data
- Control
- Power
- Measure
The monitor runs on the same supply and the same silicon as the logic. Its frequency follows the speed of this chip, at this temperature.
- Compare
A counter compares that frequency with the target for the present clock.
- Adjust
Too fast means voltage to spare: the regulator steps down. Too slow means danger: it steps up.
Read the diagram as text
- Speed monitor: A ring oscillator on the chip
- Compare: Measured speed against the target
- Regulator: Steps the supply up or down
- Logic: Shares the supply with the monitor
- Speed monitor → Compare: frequency
- Compare → Regulator: raise or lower
- Regulator → Logic: VDD
- Logic → Speed monitor: same VDD
DVFS reads a table. AVS reads the chip.
Take a target of 1.4 GHz. The slow chip needs 1.5 V for it. The typical chip reaches 1.68 GHz at 1.5 V, so the loop can lower its supply and save energy on that chip.
The monitor is not the critical path itself. It tracks the real paths only roughly, so the loop keeps some margin. AVS recovers most of the wasted margin, not all of it.
The monitor also feels temperature, and at low voltage heat does not always slow logic down. At 1.0 V this ring runs at 181 MHz at −40 °C and 402 MHz at 27 °C. This is temperature inversion: the threshold rises as the chip cools, and at a low supply that matters more than mobility.
Asked in interviews
What is DVFS, and why does it save energy?
It changes the supply voltage and the clock frequency together while the chip runs. Energy per operation follows C·VDD², so a lower voltage makes each operation cheaper. Measured here: 3.43 times less energy per period at 1.0 V than at 1.8 V.
In which order do you change voltage and frequency?
To speed up: raise the voltage, wait for it to settle, then raise the frequency. To slow down: lower the frequency, then lower the voltage. The clock must never be faster than the present voltage allows.
How does AVS differ from DVFS?
DVFS picks the voltage from a table that is sized for the slowest chip. AVS sets each chip its own voltage. Static AVS measures the chip once at test. Closed-loop AVS uses an on-chip monitor, continuously or at intervals, and adjusts the regulator. A fast chip then runs at a lower voltage, with some margin kept because the monitor only approximates the critical path.
Try It
Run the netlist. t5 and t15 are the fifth and the fifteenth rising edge of node n1, so they are ten periods apart. q10 is the charge that left the supply between them.
Work out the numbers: the period is (t15 − t5) / 10, and the frequency is one over that. The energy per period is q10 × vs / 10. At 1.8 V you should get about 2.38 GHz and 170 fJ.
Change vs to 1.5, 1.2 and 1.0 and fill in your own table. At 0.9 V the ring is too slow to make fifteen edges in 60 ns, and the measurement fails. Lengthen the tran time to see it.
Run the netlist to draw its plots here.
t5 = 1.693235e-09 t15 = 5.895464e-09 q10 = -9.46935e-13 from= 1.69324e-09 to= 5.89546e-09Check Yourself
Common Mistakes
Wrong Assume a chip is always slowest when it is hot.
At 1.0 V this ring runs at 181 MHz at −40 °C and 572 MHz at 100 °C. Cold is the slow case. At 1.8 V heat slows it: 2.41 GHz against 2.33 GHz.
Fix Check both temperature extremes at every operating point. At a low voltage, cold can be the worst case.
Wrong Add one fixed margin to the voltage of the typical chip at every operating point.
The slow chip is 14 % slower than the typical one at 1.8 V, and 32 % slower at 1.0 V. The gap grows as the voltage falls.
Fix Characterise the slow corner at each operating point, and set each voltage from that.
Wrong Set the voltage of every chip from one table.
A slow chip needs more voltage than a typical one: 694 MHz against 896 MHz at 1.2 V here.
Fix Size the table for the slowest chip, or give each chip its own voltage: set at test, or by a closed loop.
Wrong Connect a scaled block straight to a block on a fixed supply.
A 1 from the lower supply leaves the PMOS of the receiving gate partly on. That gate, on the higher supply, then burns static current.
Fix Put a level shifter on every signal from the lower supply into the higher one (lesson W3.4). Follow the library rules for the other direction.
Remember
- Energy per operation follows C·VDD². Lower the voltage and every operation gets cheaper.
- Speed falls faster than the voltage: 5.92 times slower at 1.0 V than at 1.8 V here.
- A slower clock at full voltage lowers power, not the energy of a task.
- Speed up: voltage first, then frequency. Slow down: frequency first, then voltage.
- DVFS reads a table sized for the slowest chip. AVS measures each chip and trims most of the margin.