Switching power follows P = alpha x C x V^2 x f. Alpha is the mean toggles per cycle, C the switched capacitance, V the supply, and f the clock rate.
Every number here is a stated EXAMPLE parameter. Real values vary with the library, the workload, and the operating point.
Symbol | Meaning | EXAMPLE value |
|---|---|---|
| Switched capacitance of the gated domain | 100 pF |
| Supply voltage | 0.8 V |
| Clock rate | 500 MHz |
| Clock toggles every cycle | 1.00 |
| Enable active 1 cycle in 4, then 1 in 10 | 0.25, then 0.10 |
Substitute the EXAMPLE parameters for the ungated clock first. Then scale by the gated activity factors.
EXAMPLE parameters (not silicon data): C = 100 pF, V = 0.8 V, f = 500 MHz
ungated clock, alpha = 1.00:
P = 1.00 x 100e-12 F x (0.8 V)^2 x 500e6 Hz
= 100e-12 x 0.64 x 500e6 = 64e-12 x 500e6 = 32000e-6 W = 32.0 mW
gated, enable active 1 cycle in 4, alpha = 0.25:
P = 0.25 x 32.0 mW = 8.0 mW
saving = 32.0 - 8.0 = 24.0 mW = 75.0%
gated harder, enable active 1 cycle in 10, alpha = 0.10:
P = 0.10 x 32.0 mW = 3.2 mW
saving = 32.0 - 3.2 = 28.8 mW = 90.0%The program below replays the hand arithmetic and checks all five results. It proves the code agrees with the worked comparison.
import sys
C = 100e-12
V = 0.8
F = 500e6
def dyn_power(alpha):
return alpha * C * V * V * F
p_ungated = dyn_power(1.0)
p_gate25 = dyn_power(0.25)
p_gate10 = dyn_power(0.10)
def close(got, want):
return abs(got - want) < 1e-12
checks = [
(p_ungated, 0.032),
(p_gate25, 0.008),
(p_gate10, 0.0032),
((p_ungated - p_gate25) / p_ungated, 0.75),
((p_ungated - p_gate10) / p_ungated, 0.90),
]
for i in range(len(checks)):
got, want = checks[i]
if not close(got, want):
print("FAIL: check " + str(i + 1) + " got " + str(got) + " want " + str(want))
sys.exit(1)
print("PASS: gated model gives 8.0 mW at 25 percent enable and 3.2 mW at 10 percent")The arithmetic is exact for the stated alpha, but the formula is only the switching term: real power adds short-circuit, glitch and leakage terms, so alpha is not the only uncertainty. Measure or bound the enable rate before quoting the saving.
By (0.7 / 0.8)^2 = 0.7656, about 0.77x. Voltage enters squared while the rest enter linearly.
It proves the code agrees with the hand-worked totals. It leaves open the EXAMPLE activity factors, and the short-circuit, glitch and leakage terms the switching-only formula omits.