G9.9.1 Energy per Toggle

MediumImplementngspice 42 + SKY130 · serverReview the topic

Choose the supply of an inverter so that it meets a delay limit with little energy, and predict that energy.

Circuit context: An inverter in a battery-powered block that must meet a delay limit on a small energy budget. Choose a supply voltage for a block from its delay limit and its energy budget.

An inverter drives 20 fF on a path that must switch within 140 ps. At 1.8 V it is fast, but each input cycle costs 71.8 fJ, measured with this problem's bench. The budget is 36 fJ.

This is an Implement problem. Set the supply vsup between 0.9 V and 1.8 V, and size the block inv if you want. A unit inverter at the same supply drives it.

Then predict the energy of one input cycle at your supply, in femtojoules, as e_pred_fj. The prediction must be within 10 % of what the check measures.

What the Grader Measures

Your subcircuit inv (ports in, out, vdd) under the grader's own bench, one run per corner (tt):

CheckCornerRule
Supply voltagett900 mV to 1.8 V
Mean delay into 20 fFtt≤ 140 ps
Energy of one input cyclett≤ 36 fJ
Error of your energy predictiontt≤ 0.1
Full specification
What is checked (keep the names and the ports)
.param vsup = 1.8
.param e_pred_fj = 71.8
.subckt inv in out vdd
* one sky130_fd_pr__nfet_01v8 and one sky130_fd_pr__pfet_01v8
.ends
CheckRuleHow it is measured
Supply voltage0.9 V to 1.8 Vthe value of vsup
Mean delay≤ 140 psinput of inv to its output at half the supply, the mean of both edges
Energy of one input cycle≤ 36 fJvsup times the charge inv draws while its input rises and falls once
Error of your prediction≤ 10 %|e_pred_fj − measured| / measured

The input edges of the source take 50 ps. The check runs once at tt and 27 °C. Your own bench prints the delay and the prediction error, but not the energy.

Examples

Example 1

The Starter: 1.8 V, a Double-Size Inverter
Design
.param vsup = 1.8
.param e_pred_fj = 71.8
.subckt inv in out vdd
XN out in 0 0 sky130_fd_pr__nfet_01v8 W=2 L=0.15
XP out in vdd vdd sky130_fd_pr__pfet_01v8 W=4 L=0.15
.ends
Measured by the grader
Supply voltage: 1.8 V (needs 900 mV to 1.8 V)
Mean delay into 20 fF: 42.27 ps (needs ≤ 140 ps)
Energy of one input cycle: 77.04 fJ (needs ≤ 36 fJ)
Error of your energy prediction: 0.06801 (needs ≤ 0.1)

Fast, at 42.3 ps, but 77.0 fJ per cycle: more than twice the budget.

Example 2

1.0 V
Design
.param vsup = 1
.param e_pred_fj = 22.2
.subckt inv in out vdd
XN out in 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
XP out in vdd vdd sky130_fd_pr__pfet_01v8 W=2 L=0.15
.ends
Measured by the grader
Supply voltage: 1 V (needs 900 mV to 1.8 V)
Mean delay into 20 fF: 318 ps (needs ≤ 140 ps)
Energy of one input cycle: 22 fJ (needs ≤ 36 fJ)
Error of your energy prediction: 0.009283 (needs ≤ 0.1)

The energy is low, 22.0 fJ, but the gate takes 318.0 ps.

Example 3

1.3 V
Design
.param vsup = 1.3
.param e_pred_fj = 37.5
.subckt inv in out vdd
XN out in 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
XP out in vdd vdd sky130_fd_pr__pfet_01v8 W=2 L=0.15
.ends
Measured by the grader
Supply voltage: 1.3 V (needs 900 mV to 1.8 V)
Mean delay into 20 fF: 118.8 ps (needs ≤ 140 ps)
Energy of one input cycle: 37.42 fJ (needs ≤ 36 fJ)
Error of your energy prediction: 0.002039 (needs ≤ 0.1)

Fast enough at 118.8 ps, but 37.4 fJ is just over the budget.

Constraints and Contract

  • The netlist has the lines .param vsup and .param e_pred_fj, and defines .subckt inv in out vdd ... .ends exactly once.
  • Inside inv: X instances of sky130_fd_pr__nfet_01v8 or sky130_fd_pr__pfet_01v8, with comments and .param lines. No sources, resistors or capacitors. Use m= for parallel copies; mult= is refused.
  • The check writes the .lib line itself. Everything else is replaced by its own bench.

Hints

Hint 1

Run the starter. It is fast, but its energy is more than twice the budget. Its inverter is twice the unit size, too.

Hint 2

Energy per cycle goes with the square of the supply. Find the supply where 71.8 fJ shrinks to under 36 fJ.

Hint 3

A lower supply also slows the gate. Try a few supplies and read the delay before you fix the prediction.

What the grader checks: The check places inv after a fixed unit inverter, both at vsup, with a 20 fF load, at tt and 27 °C. It reads both delays at half the supply and the charge inv draws in one cycle. The tool is ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, through tools/spice-judge.mjs. Other corners and temperatures are outside this problem.

Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit inv and makes 1 ngspice run. The numbers come from ngspice and the SKY130 models the site pins; they prove the measured cases, not every condition a chip meets.

See all 1 steps and the final capstone

Report a problem with this page

Your netlist SPICESaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs
Not run yet
Run your netlist to see its measurements and the ngspice log here.
ngspice 42 + SKY130 · server