Draft preview. Lessons are being written and reviewed.

Digital Design / Module 1: Numbers and logic

5. What a gate is made of: CMOS

See the transistors and the delay behind every symbol.

Lecture coming soon

See it move

The idea

A gate symbol hides a pair of switch networks. A transistor acts as a voltage-controlled switch. An NMOS conducts when its gate is high and is good at pulling a node down to 0. A PMOS conducts when its gate is low and is good at pulling a node up to 1.

Complementary networks

Every static CMOS gate has a PMOS network between the supply and the output, plus an NMOS network between the output and ground. They are built so that exactly one conducts for any stable input.

In a 2-input NAND, the NMOS devices are in series, so the output falls only if both inputs are high. The PMOS devices are in parallel, so either low input pulls the output high. A NOR swaps these: series PMOS and parallel NMOS. Notice that a single CMOS stage always inverts. That is why NAND is more basic than AND, which needs an extra inverter.

Where delay comes from

The output drives a load capacitance, made up of the next gates' inputs and the wires. Switching means charging or discharging that capacitance through transistors, which behave like resistors. More load means more delay, and a wider transistor gives more drive at the cost of area and input capacitance.

Where power goes

Dynamic power is P = α · C · V² · f, where α is how often the node switches. Voltage has the strongest effect because it is squared. Leakage still flows when nothing switches, and it matters a great deal in modern processes.

Why NAND is usually preferred to NOR

Series transistors are slow, and PMOS carries less current than NMOS of the same size. A NOR places its PMOS devices in series, the worst combination, so they must be made wider to compensate. A NAND places the faster NMOS devices in series instead, so it is normally the better choice.

Common mistake

Believing CMOS uses no power when idle. Ideally, one network is off in each steady state. In practice leakage flows through devices that are "off", and it can take up a large share of a chip's total power.

Key ideas

  • PMOS pulls up and NMOS pulls down, in complementary networks.
  • Delay comes from charging and discharging load capacitance.
  • Dynamic power follows activity x C x V^2 x f.

Your exercise

Draw the transistor network of a 2-input NAND.

Interview questions

coreWhy is static CMOS low in static power?

basicHow many transistors are in a static CMOS inverter, a 2-input NAND and a 2-input AND?

basicIn a 2-input CMOS NAND with A = 1 and B = 0, which transistors conduct, and what is the output?

coreSupply voltage drops from 1.0 V to 0.8 V with frequency and activity unchanged. By how much does dynamic power fall?

coreA block switches a total of 1 nF of capacitance with activity factor 0.1, at 0.9 V and 500 MHz. Estimate its dynamic power with P = α·C·V²·f.

coreWhy can't a single static CMOS stage implement a non-inverting function such as AND?

coreDescribe the transistor networks of a 3-input NOR, and explain why it is a poor choice compared with a 3-input NAND.

advancedDesign a single static CMOS stage for F = (AB + C)'. How many transistors does it need?

advancedIf you halve the clock frequency of a block, does the dynamic energy per operation go down?

Practise these 9 questions with animations