BitFlow
← Academy·CMOS at Transistor Level
⊸GATE~40 min

CMOS at Transistor Level

Open up a gate: how a MOSFET's current sets where a gate switches, how fast it drives a load and how much energy each switch costs, and how to size NAND and NOR transistors.

A transistor is a switch with a current limit

Chapter 5 treated transistors as switches: on or off. That's enough to get the logic right, but not to say how fast a gate is or where exactly it switches. For that you need to know how much current a transistor passes, and that depends on three things: the gate voltage, the drain voltage and the transistor's shape.

An NMOS turns on once its gate is more than a threshold voltage V_T above its source. The amount above, V_GS − V_T, is the overdrive. With a small drain voltage the transistor acts like a resistor (the linear region). Once the drain is more than the overdrive above the source, the channel pinches off and the current stops growing: the transistor is saturated.

I_D = (k′/2) · (W/L) · (V_GS − V_T)²
The square law for a saturated transistor. k′ is the process's strength (µ·Cox), W the channel's width and L its length.

Loading the animation…

Loading the animation…

Loading the animation…

Two of those letters are the designer's to choose: W and L. L is almost always the shortest the process allows (0.15 µm in sky130), because a short channel is fast. So width is the knob: twice the width, twice the current, and twice the capacitance.

Worked example: A saturated NMOS

An NMOS is 0.42 µm wide and 0.15 µm long, with k′ = 200 µA/V², V_T = 0.45 V and its gate at 1.8 V. How much current does it pass when saturated?

  1. W/L = 0.42 ÷ 0.15 = 2.8.
  2. Overdrive = 1.8 − 0.45 = 1.35 V, squared is 1.8225 V².
  3. I_D = 100 µA/V² × 2.8 × 1.8225 V².

Answer:About 0.51 mA.

A PMOS works the same way, upside down: it turns on when its gate is more than |V_T| below its source, which sits at VDD. Its carriers are holes, which move about 2.5 times more slowly than electrons here, so a PMOS of the same size passes about 2.5 times less current.

Sizing an inverter

An inverter is one PMOS pulling up and one NMOS pulling down. At its switching threshold V_M the output equals the input, both transistors are saturated, and they carry the same current. Setting the two square-law currents equal gives V_M.

V_M = (V_Tn + r·(VDD − |V_Tp|)) ÷ (1 + r), r = √(k′p·Wp ÷ k′n·Wn)
r compares the two transistors' strengths. When r = 1 they're equally strong and V_M is half the supply.

With equal widths the PMOS is weaker, r = √(1 ÷ 2.5) ≈ 0.63, and the inverter switches at about 0.80 V instead of 0.9 V. Making the PMOS 2.5 times wider makes r = 1 and centres the threshold. A centred threshold gives equal noise margins on both sides and equal rising and falling delays.

Loading the animation…

Practice

Electrons are 2.5 times as mobile as holes. An inverter's NMOS is 0.5 µm wide. How wide should the PMOS be for V_M = VDD/2?

NoteReal standard cells often use a smaller ratio, around 1.5 to 2. The next sections show why: a wider PMOS also costs area and input capacitance.

Stacks: why NAND beats NOR

In a 2-input NAND the two NMOS are in series: current to ground has to pass through both. Two transistors in series behave like one twice as long, so the pull-down is half as strong. The two PMOS are in parallel, and only one needs to turn on to pull up, so the pull-up is as strong as an inverter's.

To make a NAND drive as hard as an inverter, each series NMOS must be twice as wide. A NOR is the other way round: its two PMOS are in series, so they must be twice as wide, and PMOS are already the wide ones.

GateNMOS widthPMOS widthInput capacitancevs. inverter
Inverter12.51 + 2.5 = 3.51
2-input NAND22.52 + 2.5 = 4.5≈ 1.29
2-input NOR151 + 5 = 6≈ 1.71
Widths for equal drive, in units of the inverter's NMOS. The last column is the gate's logical effort: how much more input capacitance it needs to drive as well as an inverter.

That ratio is called logical effort, and it's why chip designers prefer NAND to NOR. A NOR with the same drive presents a bigger load to whatever drives it, and takes more area. Synthesis tools know this and pick NANDs when they can.

Practice

Unsized, with every transistor the same width, which gate has the slower falling output?

Delay: charging a capacitor

A gate's output drives the gates of the next stage, plus wires. All of it is capacitance C. Switching the output means moving charge C·ΔV with the current the transistors can deliver. So delay is simply charge divided by current.

t_p ≈ C · (VDD/2) ÷ I_D
The time to move the output halfway, at the transistor's saturation current. A rough estimate, but it shows every trend.
Worked example: How fast is an inverter?

The NMOS from the first example (0.51 mA when saturated) discharges a 20 fF load from 1.8 V. Estimate the falling delay.

  1. The output has to fall by half the supply: 0.9 V.
  2. Charge to remove: 20 fF × 0.9 V = 18 fC.
  3. Time: 18 fC ÷ 0.51 mA.

Answer:About 35 ps. The transistor lab's simulator gets 35.1 ps for the same inverter.

  • More load, more delay: delay grows in proportion to C. That's why fan-out costs time.
  • Wider transistors, less delay, but only up to a point. A wider transistor also has more drain capacitance on its own output (self-load), and more gate capacitance for the stage before it to charge.
  • Higher supply, much less delay: current grows with the square of the overdrive. Lowering VDD to save power slows every gate.

A fair way to compare designs is the FO4 delay: an inverter driving four copies of itself. Because the load grows with the inverter's own size, the FO4 delay hardly depends on how big it is. It does depend on the PMOS-to-NMOS ratio, and the best ratio isn't the 2.5 that centres V_M. It's about √2.5 ≈ 1.58: a narrower PMOS rises a little slower but loads the stage before it less. In the transistor lab that takes the FO4 delay from 15.4 ps down to 14.7 ps.

Practice · GATE-style

Doubling both transistor widths of an inverter that drives a large fixed load roughly…

Energy per switch

Each time the output rises, the PMOS charges the load from VDD: the supply delivers C·VDD² of energy. Half of it is stored in the capacitor, half is burned in the PMOS. When the output falls, the NMOS dumps the stored half to ground. So one full up-and-down cycle costs C·VDD², whatever the transistor sizes.

E = C · VDD² per cycle, P = α · C · VDD² · f
α is the activity factor: the fraction of clock cycles in which the node switches.
Worked example: Energy of one node

A 20 fF node at 1.8 V switches in 10% of the cycles of a 1 GHz clock. What does it cost per cycle, and on average?

  1. Per up-and-down cycle: 20 fF × 1.8² = 64.8 fJ.
  2. Average power: 0.1 × 64.8 fJ × 1 GHz.

Answer:64.8 fJ per cycle and 6.48 µW on average.

Two more costs ride on top. While the input is half way, both transistors conduct for a moment and current flows straight from VDD to ground: short-circuit current. It grows with slow input edges, which is one reason timing tools limit slew. And the transistors' own drain capacitance is part of C, so oversized transistors waste energy on every switch.

Practice

A chip's supply drops from 1.8 V to 1.2 V, with the same capacitance, activity and clock. Its dynamic power becomes about…

From sizing to standard cells

You won't size transistors gate by gate in a digital design. The foundry's standard cell library has done it for you, in several drive strengths: in sky130, sky130_fd_sc_hd__inv_1, inv_2, inv_4 and so on are the same inverter with wider and wider transistors. Synthesis and placement pick the strength each net needs: big cells for long wires and heavy fan-out, small ones elsewhere to save area and power.

Every number in this chapter appears in the cell's timing file: delay as a function of input slew and output load, input capacitance, and energy per switch. That's what static timing analysis (chapter 17) reads, and what the place-and-route flow (chapter 21) optimises.

Transistor lab →Size an inverter, NAND and NOR yourself, against five challenges graded by simulation.
TipAfter a layout run in the Sandbox, open the Interactive view and point at a cell: the names tell you which drive strength the tools chose where.
Was this chapter helpful?