G9.2.1 Size the NOR to Match the NAND

HardOptimizengspice 42 + SKY130 · serverReview the topic

Size a SKY130 NOR gate to be as fast as the NAND gate of lesson G9.2, inside a gate-area budget.

Circuit context: A SKY130 two-input NOR gate that must match the timing of the NAND gate beside it. Size the two series PMOS and the two parallel NMOS of a NOR gate inside an area budget.

A cell library needs a NOR gate that can stand next to its NAND gate in a timing table. In lesson G9.2 the NAND, with every transistor 1 µm wide, rises in 78.8 ps and falls in 50.8 ps. The NOR of the same size rises in 149.3 ps and 159.6 ps on its two inputs.

This is an Optimize problem. Size the four transistors of the block nor2. The output drives a 10 fF load. On each input it must rise in 80 ps or less and fall in 51 ps or less.

Wide transistors cost area. The gate area, the sum of width times length over the four transistors, must stay at 1.06 µm² or less. The NOR with both PMOS at 4 µm has 1.5 µm².

What the Grader Measures

Your subcircuit nor2 (ports a, b, y, vdd) under the grader's own bench, one run per corner (tt):

CheckCornerRule
Rise delay, input att≤ 80 ps
Rise delay, input btt≤ 80 ps
Fall delay, input att≤ 51 ps
Fall delay, input btt≤ 51 ps
Budget: Gate areatt≤ 1.06 µm², the lower the better
Full specification
The block that is checked (keep the name and the ports)
.subckt nor2 a b y vdd
* two sky130_fd_pr__pfet_01v8 in series from vdd to y
* two sky130_fd_pr__nfet_01v8 in parallel from y to ground
.ends
CheckRuleHow it is measured
Rise delay, input a≤ 80 psb held at 0 V; a falling through 0.9 V to y rising through 0.9 V
Rise delay, input b≤ 80 psa held at 0 V; b falling through 0.9 V to y rising through 0.9 V
Fall delay, input a≤ 51 psb held at 0 V; a rising through 0.9 V to y falling through 0.9 V
Fall delay, input b≤ 51 psa held at 0 V; b rising through 0.9 V to y falling through 0.9 V
Gate area (budget)≤ 1.06 µm²the sum of W · L over the transistors of nor2, read from the netlist

The check runs once, at the SKY130 typical corner (tt), 27 °C and a 1.8 V supply. The input edges take 50 ps and each output drives a 10 fF load. A result equal to the budget passes.

Examples

Example 1

The Starter: All Widths 1 µm
Design
.subckt nor2 a b y vdd
XPA mid a vdd vdd sky130_fd_pr__pfet_01v8 W=1 L=0.15
XPB y b mid vdd sky130_fd_pr__pfet_01v8 W=1 L=0.15
XNA y a 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
XNB y b 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
.ends
Measured by the grader
Rise delay, input a: 159.6 ps (needs ≤ 80 ps)
Rise delay, input b: 149.3 ps (needs ≤ 80 ps)
Fall delay, input a: 39.13 ps (needs ≤ 51 ps)
Fall delay, input b: 36.9 ps (needs ≤ 51 ps)
Gate area: 600 mµm² (budget ≤ 1.06 µm²)

The area is small and the fall is fast. Both rises take about twice the 80 ps limit, because two weak PMOS in series charge the output.

Example 2

Both PMOS at 2.6 µm
Design
.subckt nor2 a b y vdd
XPA mid a vdd vdd sky130_fd_pr__pfet_01v8 W=2.6 L=0.15
XPB y b mid vdd sky130_fd_pr__pfet_01v8 W=2.6 L=0.15
XNA y a 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
XNB y b 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
.ends
Measured by the grader
Rise delay, input a: 76.56 ps (needs ≤ 80 ps)
Rise delay, input b: 66.53 ps (needs ≤ 80 ps)
Fall delay, input a: 46.33 ps (needs ≤ 51 ps)
Fall delay, input b: 39.94 ps (needs ≤ 51 ps)
Gate area: 1.08 µm² (budget ≤ 1.06 µm²)

Every delay passes. The area of 1.08 µm² is just over the budget, so equal PMOS widths are not the cheapest answer.

Example 3

PMOS 2 µm at the Supply, 3 µm at the Output
Design
.subckt nor2 a b y vdd
XPA mid a vdd vdd sky130_fd_pr__pfet_01v8 W=2 L=0.15
XPB y b mid vdd sky130_fd_pr__pfet_01v8 W=3 L=0.15
XNA y a 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
XNB y b 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15
.ends
Measured by the grader
Rise delay, input a: 84.41 ps (needs ≤ 80 ps)
Rise delay, input b: 72.84 ps (needs ≤ 80 ps)
Fall delay, input a: 47 ps (needs ≤ 51 ps)
Fall delay, input b: 40.98 ps (needs ≤ 51 ps)
Gate area: 1.05 µm² (budget ≤ 1.06 µm²)

The area fits, but the rise on input a takes 84.4 ps. The wide PMOS sits at the output and adds its capacitance there. The other order, 3 µm and 2 µm, gives 78.0 ps.

Constraints and Contract

  • The netlist defines .subckt nor2 a b y vdd ... .ends exactly once, with these ports in this order.
  • Inside nor2: 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 outside nor2 is replaced by its own bench.

Hints

Hint 1

First reach the timing with any area. Widen both PMOS by the same amount until the slower rise passes, and write down the area.

Hint 2

The two PMOS do not do the same job. One of them touches the output and loads it with its own capacitance. Move width from one PMOS to the other, each way, and compare the slower rise.

Hint 3

The fall has spare time. Slightly narrower NMOS save area and also unload the output, which helps the rise. Stop before the slower fall reaches 51 ps.

What the grader checks: The check places two copies of nor2 under its own bench: 1.8 V, tt, 27 °C, 10 fF and 50 ps edges. Hidden .meas lines measure the rise and fall delay of each input. The gate area is read from the netlist. The tool is ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, measured 2026-11-12 with tools/spice-judge.mjs. The result holds for this load and corner. Other loads and corners, and both inputs switching together, 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 nor2 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