Exercises — Power gating and clock gating
These problems climb from recognising what each gating technique does to synthesising a full power-management strategy. Work each one on paper first, then open the solution. Every number here is machine-checked.
Before you start, make sure you have the parent note fresh: Power gating and clock gating (parent topic), plus the two power laws we lean on:
where is the activity factor (fraction of nodes that toggle each cycle), the switched capacitance, the supply voltage, the clock frequency, and the leakage current (see Dynamic and Static Power and Subthreshold Leakage).
Level 1 — Recognition
L1.1 — Which power does each technique kill?
For each row, state whether the technique removes dynamic power, static (leakage) power, or both.
| Technique | Removes… |
|---|---|
| Clock gating | ? |
| Power gating | ? |
Recall Solution
Clock gating freezes the clock so flip-flops stop toggling, so for that block. But is still connected, so leakage keeps flowing.
- Clock gating → removes dynamic power only.
Power gating physically disconnects through a header/footer switch. No supply → no toggling and no leakage path.
- Power gating → removes both dynamic and static power.
L1.2 — Read the formula
In , which single variable does clock gating drive toward zero, and why does that zero the whole term?
Recall Solution
Clock gating drives (the activity factor) toward . A held-low clock means the flip-flop's internal nodes never charge or discharge — zero transitions is exactly . Because multiplies every other factor, for that block, regardless of how big , , or are.
Level 2 — Application
L2.1 — Clock-gating savings on a register file
A register file toggles with when active. Its enable signal (register_access) is high only of cycles. All other factors () are unchanged.
Find the effective activity factor and the percentage dynamic-power saving from clock gating.
Recall Solution
Step 1 — effective activity. When the block is gated off it contributes ; when active it contributes . Averaged over time: Step 2 — saving. Since only changed, the power ratio is the ratio: Clock gating saves 75 % of the register file's dynamic power. Note it equals — a handy shortcut.
L2.2 — Power-gating a shader array
A GPU has shader cores; each idle core leaks . A workload uses cores and power-gates the other . After gating, each gated core leaks only (switch leakage).
Find the leakage before and after, and the power saved.
Recall Solution
Before: all idle cores leak fully: After: the gated cores leak the residual switch leakage: Saving: That is a leakage reduction on the idle cores.
Level 3 — Analysis
L3.1 — Break-even idle time (energy)
A block dissipates of leakage while idle-but-powered. Power-gating it costs a fixed wake-up energy of (switch inrush + state restore) and drops leakage to during sleep.
For what idle duration does power gating start to save energy?
Recall Solution
Model. Staying powered for time wastes . Power gating instead pays once (and ~zero during sleep). Break-even is where the two are equal: Solve. Interpretation. Idle longer than → power gating wins. Shorter → the wake-up energy exceeds the leakage you'd have saved, so you should clock-gate (zero wake-up cost) instead. See the break-even figure below.

L3.2 — Latency budget check
A CPU driver knows a functional unit will be idle for , then needed instantly. Power-gate wake-up latency is ; the deadline after wake-up request is . Should it power-gate?
Recall Solution
Energy-wise, , so power gating would save energy. But latency is a hard constraint. Wake-up takes and the deadline is only : So the unit cannot be power-gated here. Fallback: clock gate it (wake-up = cycles), accepting the leakage. This is exactly the two-axis trade-off — energy alone says "yes," latency says "no," and latency wins.
Level 4 — Synthesis
L4.1 — Combined clock + power gating over a duty cycle
A block runs a repeating pattern each period:
- Active of the time: dynamic , leakage .
- Idle of the time. Strategy: clock-gate (kills dynamic, leaves leakage ) and power-gate whenever legal.
Assume the idle window is one contiguous block, wake-up latency fits the deadline, and (from L3.1, so ). Compute the average power (a) with clock gating only, (b) with clock + power gating.
Recall Solution
Per-period energy, clock-gating only.
- Active phase (): dynamic + leakage .
- Idle phase (): clock-gated, so dynamic , leakage stays :
- Total per period over :
Now add power gating for the idle window. Idle , so gating wins. Idle leakage energy ; pay once:
- New total per : Result: clock-gate only ; clock + power gate , a further cut on top of clock gating. A real Power Management IC (PMIC) orchestrates exactly this hand-off.
L4.2 — DVFS vs. gating
The block in L4.1 is active at . Instead of gating, an engineer proposes DVFS: drop to (and to match). Estimate the new active dynamic power (ignore leakage change) and comment on whether DVFS replaces gating.
Recall Solution
Dynamic power . If frequency scales linearly with voltage (a common first-order model, ), then : Comment: DVFS nearly halves active dynamic power but the block is still running and still leaking. DVFS optimises the active phase; gating optimises the idle phase. They are complementary, not substitutes — a good design does DVFS while working and gates when idle.
Level 5 — Mastery
L5.1 — Design the full policy
You manage a memory controller: active of a period; the idle window is contiguous. Active power (dynamic) (leakage). Idle leakage (if powered) . Power-gate wake-up , latency ; response deadline after a request . Choose the policy and compute the resulting average power.
Recall Solution
Step 1 — timings. Period , active , idle .
Step 2 — is power gating legal? Break-even idle: Idle ✓ (energy says gate). Latency deadline ✓ (timing says gate). Both gates pass → power-gate the idle window, and clock-gate is redundant there since power is fully removed.
Step 3 — energy per period.
- Active:
- Idle (power-gated): leakage , pay wake-up once:
- Total per .
Step 4 — average power. Compare to "always powered, clock-gate idle": active + idle leakage , total . Power gating cuts this to — a reduction. Save critical state with Retention Flip-Flops before shutdown; a Hierarchical Clock Distribution tree hosts the clock gates for the active phase.
L5.2 — Why not gate everything all the time?
State two independent reasons a designer would not power-gate a block despite long idle windows.
Recall Solution
Any two of:
- Latency / deadline — wake-up may exceed the required response time (as in L3.2), even when energy math favours gating.
- State loss cost — without Retention Flip-Flops the block must save/restore large state (register maps, caches), and the restore energy/time can exceed the leakage saved.
- Inrush / rail noise — turning a large header switch on injects a current surge that can droop for neighbours; the Power Management IC (PMIC) must stagger wake-ups, adding latency.
- Area / verification overhead — power switches, isolation cells, and an extra power domain cost silicon area and design/verification effort not justified for a block that's rarely idle long enough.
Recall Quick self-check
Break-even idle time formula ::: Effective activity factor under clock gating ::: Dynamic power scaling with voltage (with ) ::: Which axis can veto a power-gating decision even when energy favours it ::: wake-up latency vs. deadline