Dynamic, Short-Circuit and Leakage Power

Split the power of one gate into three parts, and measure each part with a simulation you can change.

You Will Be Able To

  • Measure the energy of one switching cycle from the supply current.
  • Separate the load, the gate's own capacitance and the short-circuit current.
  • Read leakage from a gate at rest, and compare it with switching power.
Lesson
W1.1
Time
25 min
Runs on
ngspice
Check
5 questions

A sensor tag runs from a coin cell, and the team budgeted its logic power as C·VDD²·f and nothing else. On the bench the chip drew more than the budget when its clock edges were slow. It also drew current with the clock stopped.

TransientOne Cycle of an Inverter: The Voltages and the Supply CurrentWN = 1 µm, WP = 2 µm, 20 fF load, 1.8 V, 100 MHz, 50 ps input edges. The lower panel is the current that leaves the supply.
  • v(in)
  • v(out)
  • supply current
-0.5 V00.5 V1.0 V1.5 V2.0 Vv(in), v(out)-100 µA0100 µA200 µA300 µA400 µAsupply current12 ns14 ns16 ns18 ns20 nsTime-0.5 V00.5 V1.0 V1.5 V2.0 Vv(in), v(out)-200 µA0200 µA400 µAsupply current15 ns20 nsTime
  1. Time 11.05 nsv(in) = 1.8 V · v(out) = 1.596 V · supply current = -32.31 µA

    The input rises. The NMOS turns on and empties the load into ground. That charge came from the supply half a cycle earlier. The supply current only twitches now.

    More context

    The short negative dip is charge that the fast input edge pushes back into the supply. It couples mostly through the PMOS gate capacitance to its source and body, which sit on the supply.

  2. Time 14 nsv(in) = 1.8 V · v(out) = 344.5 nV · supply current = -2.83 nA

    Nothing switches. The supply current is leakage only, far too small to see on this axis.

  3. Time 16.05 nsv(in) = 15 mV · v(out) = 144.1 mV · supply current = 360.3 µA

    The input falls. The PMOS turns on and the supply recharges the load. This pulse peaks near 372 µA and carries nearly all the charge of the cycle.

  4. Time 20 nsv(in) = 0 V · v(out) = 1.8 V · supply current = 120.9 pA

    The cycle ends. The charge that left the supply is q_cycle, and the energy is q_cycle × 1.8 V = 71.4 fJ.

Read the plot as a table
Timev(in)v(out)supply current
11.05 ns1.8 V1.596 V-32.31 µA
12 ns1.8 V365.3 nV31.66 nA
14 ns1.8 V344.5 nV-2.83 nA
16 ns1.8 V344.5 nV2.419 nA
16.05 ns15 mV144.1 mV360.3 µA
18 ns0 V1.8 V-116.2 pA
20 ns0 V1.8 V120.9 pA

Measured on ngspice 42 with the SKY130 tt models. The supply pays once per cycle, when the output rises.

The budget counted one part of the power, and a gate has three.

Three Paths for the Supply Current

Where the Current of the Supply GoesArrows show current that leaves the supply. All of it ends as heat. The three paths differ in what makes the current flow.
  • Power
  • Result
  • Power
Where the current of the supply goesArrows show current that leaves the supply. All of it ends as heat. The three paths differ in what makes the current flow. power Supply VDD = 1.8 V power Switching Charges capacitance power Short circuit Both transistors on power Leakage Through an offtransistor result Heat In the transistors each cycleeach input edgeall the time
  1. power SupplyVDD = 1.8 V
    • each cycle → Switching
    • each input edge → Short circuit
    • all the time → Leakage
  2. power SwitchingCharges capacitance
    • Heat
  3. result HeatIn the transistors
  4. power Short circuitBoth transistors on
    • Heat
  5. power LeakageThrough an off transistor
    • Heat
  1. Switching

    Every cycle the supply refills the load and the gate's own capacitance. The lab measures 71.4 fJ per cycle in total.

  2. Short circuit

    During an input edge both transistors conduct for a moment. With 2 ns edges the cycle costs 12.0 fJ more.

  3. Leakage

    A gate that does nothing still passes 246 fA or 423 pA, set by which transistor is off.

Read the diagram as text
  • Supply: VDD = 1.8 V
  • Switching: Charges capacitance
  • Short circuit: Both transistors on
  • Leakage: Through an off transistor
  • Heat: In the transistors
  • Supply → Switching: each cycle
  • Supply → Short circuit: each input edge
  • Supply → Leakage: all the time
  • Switching → Heat
  • Short circuit → Heat
  • Leakage → Heat

Switching and short-circuit current need activity. Leakage does not.

The first two paths are called dynamic power, because they exist only while signals change. Leakage is static power. The next three sections measure one path each on the same inverter.

Switching Energy: The Supply Pays C·VDD² per Cycle

The Inverter and Its LoadMP pulls the output up to VDD. MN pulls it down to ground. CL stands for the wire and the gates that the output drives.
The inverter and its load+−VDD1.8 VMPW/L = 2/0.15MNW/L = 1/0.15VIN100 MHzCL​20 fFinout
  1. VDD · supply1.8 Vvdd → VDD
  2. MP · PMOS transistorW/L = 2/0.15gate → in · source → VDD · drain → out
  3. MN · NMOS transistorW/L = 1/0.15gate → in · drain → out · source → 0
  4. gnd · groundgnd → 0
  5. VIN · voltage source100 MHz+ → in · − → 0
  6. C_L · capacitor20 fFpin 1 → out · pin 2 → 0
  1. Output rises: the supply charges the load

    The input is low and MP is on. A charge Q = CL·VDD flows from the supply into the load. The supply gives energy Q·VDD = CL·VDD². Half ends up stored on CL. MP burns the other half as heat.

    Q = CL·VDD

  2. Output falls: the load empties into ground

    The input is high and MN is on. The stored half flows to ground and MN burns it as heat. The supply gives nothing in this half of the cycle.

    to ground

  3. During an input edge: both are on

    While the input passes the middle, MP and MN conduct together. Current flows straight from VDD to ground and charges nothing. This is the short-circuit current.

    short circuit

  4. At rest: one transistor is off, and it leaks

    With the input still, one transistor is off. A tiny current still passes through it. This is leakage.

Read the circuit as text
  • MP PMOS transistor (W/L = 2/0.15): gate → in, source → VDD, drain → out
  • MN NMOS transistor (W/L = 1/0.15): gate → in, drain → out, source → 0
  • VIN voltage source (100 MHz): + → in, − → 0
  • C_L capacitor (20 fF): pin 1 → out, pin 2 → 0

The four moments of a cycle. The lab measures each one.

The lab integrates the supply current over one cycle. It reports e_cycle = 71.4 fJ. The formula CL·VDD² gives 20 fF × (1.8 V)² = 64.8 fJ.

The run spends 6.56 fJ more than the formula. The table shows where it goes.

RunEnergy per cycleCL·VDD²What it shows
20 fF load (the lab)71.4 fJ64.8 fJ6.56 fJ above the formula
40 fF load137 fJ130 fJDoubling the load adds 65.2 fJ
Almost no load (1 aF)3.76 fJ0The gate's own capacitance and its edges

The lab netlist with cl changed. 50 ps input edges, 1.8 V, tt, 27 °C.

Doubling the load adds 65.2 fJ, close to one more CL·VDD². So the load term follows the formula. The rest is the gate itself: its drain and gate capacitance must also charge and discharge.

Power is energy per cycle times frequency. At 100 MHz the lab prints p_avg = 7.14 µW. At 50 MHz the energy per cycle stays the same and the power halves.

Short-Circuit Current: A Slow Edge Costs More

Hold the input still at each voltage from 0 V to 1.8 V and read the supply current. The lab does this with a DC sweep after the transient.

DC sweepSupply Current with the Input Held at Each VoltageThe same inverter, with no switching. The axis is logarithmic: each grid line up is ten times more current.
100 fA10 pA1 nA100 nA10 µASupply current00.2 V0.4 V0.6 V0.8 V1.0 V1.2 V1.4 V1.6 V1.8 VInput voltage100 fA10 pA1 nA100 nA10 µASupply current00.5 V1.0 V1.5 VInput voltage
  1. Input voltage 0 Vsupply current = 246.2 fA

    Input low: MN is off and leaks. The supply current is i_low = 246 fA.

  2. Input voltage 930 mVsupply current = 28.49 µA

    Near 0.93 V both transistors are on. The current peaks at i_peak = 28.5 µA. Nothing is charged: it flows from VDD to ground.

  3. Input voltage 1.8 Vsupply current = 422.8 pA

    Input high: MP is off and leaks. The supply current is i_high = 423 pA.

Read the plot as a table
Input voltagesupply current
0 V246.2 fA
200 mV38.18 pA
400 mV5.998 nA
600 mV696.1 nA
800 mV17.48 µA
930 mV28.49 µA
1 V20.79 µA
1.2 V3.118 µA
1.4 V170.5 nA
1.6 V10.19 nA
1.8 V422.8 pA

Measured on ngspice 42. The peak is 67,400 times the larger leakage current.

A real input does not jump. It ramps through the middle, and while it is there the gate conducts from VDD to ground. A slower edge keeps the gate in that region for longer.

TransientThe Same Cycle with 2 Ns Input EdgesOnly tr changed, from 50 ps to 2 ns. The load is still 20 fF.
  • v(in)
  • v(out)
  • supply current
-0.5 V00.5 V1.0 V1.5 V2.0 Vv(in), v(out)-20 µA020 µA40 µA60 µA80 µA100 µAsupply current12 ns14 ns16 ns18 ns20 nsTime-0.5 V00.5 V1.0 V1.5 V2.0 Vv(in), v(out)-50 µA050 µA100 µAsupply current15 ns20 nsTime
  1. Time 12 nsv(in) = 900 mV · v(out) = 1.651 V · supply current = 7.762 µA

    The input is halfway up. The output has started to fall, and yet the supply delivers about 7.7 µA. That current is the short circuit through both transistors.

  2. Time 17.2 nsv(in) = 720 mV · v(out) = 518.8 mV · supply current = 68.23 µA

    The input is on its way down. The supply charges the load, and part of its current again goes straight to ground.

Read the plot as a table
Timev(in)v(out)supply current
12 ns900 mV1.651 V7.762 µA
14 ns1.8 V344.7 nV1.578 nA
16 ns1.8 V344.5 nV280.1 pA
17.2 ns720 mV518.8 mV68.23 µA
18 ns375 µV1.797 V1.677 µA
20 ns0 V1.8 V-193.6 pA

Measured: e_cycle = 83.4 fJ with 2 ns edges, against 71.4 fJ with 50 ps edges.

Input edge timeEnergy per cycleAbove the 50 ps run
50 ps71.4 fJ—
1 ns74.1 fJ3.9 %
2 ns83.4 fJ17 %

The lab netlist with tr changed. The load did not change, so the extra energy is short-circuit current.

Leakage: The Current of a Gate That Does Nothing

Look at the two ends of the DC sweep again. With the input low, MN is off and 246 fA flows. With the input high, MP is off and 423 pA flows. The second number is 1,720 times the first, because this PMOS leaks far more than this NMOS (W1.3).

Leakage power is the current times VDD. The worse state burns 761 pW. Switching at 100 MHz burns 7.14 µW, which is 9,380 times more.

Now slow the clock. Switching power falls with frequency and leakage does not. The two are equal near 11 kHz: below that, a gate that toggles this slowly burns more by leaking.

Asked in interviews
  1. What are the components of power in a CMOS gate?

    Switching power charges and discharges capacitance: C·VDD² per cycle. Short-circuit power flows from VDD to ground while both transistors conduct during an input edge. Leakage flows through a transistor that is off. The first two need activity. Leakage does not.

  2. Why is the switching energy C·VDD² and not ½·C·VDD²?

    The supply delivers the charge C·VDD at the voltage VDD, so it gives C·VDD². Half is stored on the load and the PMOS burns half. On the falling edge the NMOS burns the stored half.

  3. How does input slew affect power?

    A slow edge keeps both transistors on for longer, so the short-circuit energy grows. Measured here: a 2 ns edge costs 17 % more per cycle than a 50 ps edge, with the same load.

Try It

Run the netlist. .meas ... integ i(Vdd) adds up the charge that leaves the supply in one cycle. SPICE counts current into the + terminal as positive, so q_cycle is negative. e_cycle is that charge times 1.8 V.

Change cl to 40f and run again. Predict e_cycle first. Then set cl=20f and tr=2n, and watch the supply current in Plots while the output falls.

The dc sweep holds the input still. i_low and i_high are the leakage currents of the two rest states, and i_peak is the largest short-circuit current.

SPICEngspice 42 · simulator service
Edit the netlist, then run it
Expected measurements: q_cycle = -3.96451e-14 from= 1.10000e-08 to= 2.10000e-08 e_cycle = 7.13612e-14 e_load = 6.48000e-14 p_avg = 7.13612e-06 i_low = 2.462457e-13 i_high = 4.228245e-10 i_peak = 2.848954e-05 at= 9.300000e-01

Check Yourself

Predict the outputThis deck prints one line: the load term of one cycle. The load is 40 fF and the supply is 1.2 V. Type the line (format: e_load = 6.48000e-14).
* the load term of one cycle: C times VDD squared
.param vdd=1.2 cl=40f
Vdd vdd 0 {vdd}
R1 vdd out 1k
CL out 0 {cl}
.tran 10p 1n
.meas tran e_load param='cl*vdd*vdd'
.end
ConceptThe lab inverter spends 71.4 fJ per cycle at 100 MHz. The clock drops to 50 MHz and nothing else changes. What happens?
ConceptWith a 1 aF load the lab still reports 3.76 fJ per cycle. What spends it?
ConceptRead the plot of the supply current with 50 ps edges. When does the supply deliver its large pulse?
ConceptA gate leaks 761 pW and spends 71.4 fJ per cycle. A designer says leakage can be ignored at any clock rate. Which reply is right?

Common Mistakes

Wrong Integrate the supply current over part of a cycle and call it the energy of a cycle.

From 11 ns to 16 ns the lab's supply delivers -3.37 fJ: it gets a little charge back. From 16 ns to 21 ns it delivers 74.7 fJ. Neither half is the 71.4 fJ of the whole cycle.

Fix Integrate over a whole number of cycles, from one edge to the same edge of a later cycle.

Wrong Charge C·VDD² to every edge.

The supply delivers C·VDD² once per cycle, on the rising output edge only.

Fix Count one C·VDD² for each full cycle: one rise and one fall.

Wrong Read the power of a gate from the peak of its supply current.

The pulse peaks near 372 µA, but the average supply current is q_cycle ÷ 10 ns = 3.96 µA. The peak matters for supply droop, not for battery life.

Fix Integrate the current over whole cycles for energy and average power. Use the peak for supply droop.

Wrong Read a leakage current without lowering gmin.

The simulator's default gmin adds about 1.8 pA at 1.8 V, and the reading becomes 2.05 pA.

Fix Set .options gmin=1e-18 in every leakage netlist.

Before
.lib sky130 tt
Vdd vdd 0 1.8
After
.lib sky130 tt
.options gmin=1e-18
Vdd vdd 0 1.8

Remember

  • The supply delivers C·VDD² per cycle, all of it when the output rises. Power is that energy times frequency.
  • The gate's own capacitance adds to the load: 3.76 fJ per cycle here with no load at all.
  • A slow input edge adds short-circuit energy: 17 % more with 2 ns edges than with 50 ps edges.
  • Leakage flows with no activity: 246 fA or 423 pA here, set by which transistor is off.
  • Lower gmin before you trust a leakage reading. SKY130 leaks little, so learn the ratios.

Practice

Report a problem with this page