Skip to content
Electronic Devices

CMOS logic: inverter, logic gates, power and scaling

The CMOS inverter and its characteristic, NAND and NOR gates, dynamic power with proof, speed, Moore's law, FinFETs and integrated circuit fabrication.

Almost all digital electronics, from microcontrollers to the processors in phones and servers, is built with a single technology: CMOS (complementary MOS), which uses pairs of nMOS and pMOS transistors. Its decisive advantage is that at rest it consumes almost nothing. In this lesson we look at the CMOS inverter, how logic gates are built, where power consumption comes from and how integrated circuits have grown.

The CMOS inverter

A pMOS connected between the supply V_{DD} and the output, an nMOS between the output and ground, the two gates tied together to the input.

  • Low input (0 V): the nMOS is off (v_{GS} = 0 \lt V_t), the pMOS is on (its gate is V_{DD} volts below its source). The output is connected to V_{DD}: high.
  • High input (V_{DD}): the nMOS is on, the pMOS off. The output is connected to ground: low.

In both stable states one of the two transistors is off, so no current flows between supply and ground: static power is zero, apart from small leakage currents. And the outputs reach exactly 0 and V_{DD}, which makes the logic levels very robust.

Transfer characteristic and schematic of the CMOS inverter
On the left the output voltage as a function of the input voltage: high until just before half the supply, then a steep drop, then low. The logic threshold V_M is where the curve crosses the diagonal. On the right the schematic: pMOS to the supply, nMOS to ground, gates tied to the input and drains tied to the output.

The transfer characteristic

In the transition region both transistors conduct and are in saturation: there the circuit is an inverting amplifier with very high gain, and the output goes from high to low over a narrow range of input voltage. The logic threshold V_M is the point where v_{out} = v_{in}, with equal currents in the two transistors. To place it at V_{DD}/2, the pMOS is made wider than the nMOS, by roughly the mobility ratio, to compensate for the slowness of holes.

The high gain makes the logic regenerative: a slightly degraded signal at the input comes out clean, and disturbances do not build up along a chain of gates. The noise margins say how much a level can be disturbed without being misread.

Logic gates

Every CMOS gate has a pull-down network of nMOS transistors to ground and a pull-up network of pMOS transistors to the supply, complementary to each other:

  • NAND: nMOS in series (the output goes to ground only if all inputs are high), pMOS in parallel;
  • NOR: nMOS in parallel, pMOS in series.

Natural CMOS gates are inverting; AND and OR are obtained by adding an inverter. With NAND gates alone, or NOR gates alone, any logic function can be built: that is why they are called universal gates. A flip-flop is made of gates with feedback, and an SRAM memory cell of six transistors: two inverters in a loop and two access transistors.

Dynamic power

Power is consumed at every switching event. A gate’s output drives a capacitance C: the gates of the following stages and the wiring.

Theorem. A gate switching at frequency f dissipates an average power

    \[ P = \alpha\,C\,V_{DD}^2\,f \]

where \alpha is the fraction of cycles in which the output goes from low to high (the activity factor).

Proof. When the output rises, the pMOS charges C from 0 to V_{DD}: the supply delivers the charge Q = CV_{DD}, that is the energy QV_{DD} = CV_{DD}^2. Half of it, \frac12 CV_{DD}^2, stays in the capacitor; the other half is dissipated in the pMOS resistance, whatever its value. When the output falls, the nMOS discharges the capacitor and dissipates the stored energy. So a full cycle loses CV_{DD}^2, and with \alpha f cycles per second we get the formula. ∎

Example. A processor with 100 nF of total switched capacitance, V_{DD} = 1 V, 3 GHz and \alpha = 0.1: P = 0.1\cdot 10^{-7}\cdot 1\cdot 3\cdot 10^9 = 30 W. The dependence on the square of the voltage explains why supplies have dropped from 5 V to below 1 V, and why processors lower voltage and frequency when the workload is light.

On top of this there is the brief short-circuit current during the transition, when both transistors conduct together, and subthreshold leakage, which in modern processes is a significant part of total consumption.

Speed

A gate’s delay is the time needed to charge or discharge the output capacitance with the transistor current: t \approx CV_{DD}/I. Smaller transistors have smaller capacitances and hence faster gates; lower voltages reduce power but also current, and therefore speed. Designing a digital circuit is a constant trade-off between these two aspects.

Miniaturisation

For decades transistor dimensions shrank by about 0.7 times roughly every two years, doubling the number of transistors per area: this is Moore’s law, an observation from 1965 that became the industry’s roadmap. As long as dimensions and voltages shrank together (Dennard scaling), each generation was denser, faster and used less energy per operation.

Around 2005 the voltage stopped falling, because the threshold could not be lowered without increasing subthreshold leakage too much. Processor frequency levelled off at a few gigahertz, and the extra transistors were used for more cores. To control the channel better, the gate moved from the planar structure to the three-dimensional FinFET (the channel is a fin wrapped by the gate on three sides) and then to gate-all-around, with the channel completely surrounded.

How an integrated circuit is made

On a wafer of single-crystal silicon a sequence of steps is repeated many times:

  1. oxidation or deposition of a layer (insulator, polysilicon, metal);
  2. photolithography: a photosensitive resist is exposed through a mask, and after development it protects only some areas; the most advanced processes use extreme ultraviolet light at 13.5 nm;
  3. etching of the unprotected areas;
  4. ion implantation of dopants and annealing to activate them.

Transistors are built in the lowest layers; above them there are up to about fifteen levels of copper interconnect, separated by insulators. Finally the wafer is tested, diced into individual chips and packaged.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x