C5 · Lesson 50 · The CMOS inverter as a circuit
Transfer curve, noise margins, delay and power from the square law
Digital logic treats an inverter as a box that turns 1 into 0. Underneath it's two transistors, an NMOS pulling down and a PMOS pulling up, and the square law says exactly how it behaves: at what input voltage it switches, how much noise it can reject, how long it takes to charge the next gate's capacitance, and how much power that costs. Those numbers decide how fast and how cool a processor can run. C7 builds logic from the inverter; this lesson analyzes it as a circuit.
- The voltage transfer curve of a matched inverter (equal , equal thresholds): output against input. It's flat at , falls steeply around , and is flat at 0.
- The markers are and , where the slope is −1: inputs below read as low, above as high.
- Raise the threshold: the transition gets steeper and the noise margins grow, at the cost of less drive current.
Predict
An inverter's NMOS and PMOS have the same size, but holes are three times less mobile than electrons. Where does it switch, on a 3.3 V supply with 0.5 V thresholds?
About 1.34 V. With the NMOS three times stronger, the input doesn't need to rise as far before the pull-down overpowers the pull-up. To center the switching point, the PMOS is made about three times wider, which is why CMOS layouts have wide PMOS transistors.
Name it
The switching threshold
At the switching threshold both transistors are saturated and carry the same current:
For a matched inverter (, ), . Matching needs , two to three.
The transfer curve and noise margins
Between the threshold and the NMOS is saturated and the PMOS in triode, and above the reverse; solving each pair of equations gives the curve in the sim. The points of slope −1 mark where small input noise starts being amplified. For a matched inverter,
since the outputs reach the full rails, 0 and .
Propagation delay
The output drives a capacitance C: the next gates' inputs and the wiring. Falling from to , the NMOS starts saturated and ends in triode. Averaging its current over that interval gives
and the same with the PMOS's values. Stronger transistors, a higher supply and less load make a faster gate.
Power
Each time the output charges C to and discharges it again, the supply delivers and all of it becomes heat. At a switching rate f,
plus a short burst of current through both transistors during each transition, peaking at , and leakage. Lowering is the strongest lever on power, which is why logic supplies fell from 5 V to below 1 V.
Worked example
For the inverter in the predict (, = 3.3 V, thresholds 0.5 V), find .
Show the solution
- Ratio.
- Switching threshold.
Answer = 1.34 V.
Worked example
A matched inverter on 5 V has 1 V thresholds and = 1 mA/V², and drives 1 nF at 100 kHz. Find its noise margins, and power.
Show the solution
- Input thresholds.
- Noise margins. Both margins are 2.125 V.
- Delay factor.
- Fall delay.
- Power.
Answer both noise margins are 2.125 V, = 336 ns, and the inverter takes 2.5 mW.
Worked example
The matched inverter of the second example ( = 1 mA/V², 1 V thresholds, 1 nF load) runs from 2.5 V instead of 5 V. How do its delay and its power at 100 kHz change?
Show the solution
- At 5 V. = 1.68 and = 336 ns.
- Delay factor at 2.5 V. = 0.4, so
- Delay at 2.5 V.
- Power. falls from 2.5 mW to 0.625 mW.
- The trade. Halving the supply saves four times the energy but costs 3.4 times the delay, because the threshold takes a larger share of a smaller supply. That trade is why chips scale their supply with their clock.
Answer the delay grows 3.4 times, from 336 ns to 1127 ns, and the power falls four times, from 2.5 mW to 0.625 mW.
Check
An inverter on 3.3 V has both thresholds at 0.4 V and = 0.5. Where is its switching threshold?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
What are the noise margins of a matched inverter on 3.3 V with 0.3 V thresholds?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
What is for a matched inverter on 1.8 V with 0.4 V thresholds?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
An inverter's NMOS ( = 0.2 mA/V², = 0.7 V) discharges 0.01 nF on a 5 V supply. What is ?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
A gate switches 0.01 nF at 1 MHz on a 3.3 V supply. What dynamic power does it take?
Write units the way you normally would: 1.5 mW, 1500 µW and 0.0015 W are the same answer.
Check
A matched inverter ( = 0.5 mA/V², 3.3 V, 1 V thresholds) passes through . What current flows through both transistors at that moment?
Write units the way you normally would: 1.5 mA, 1500 µA and 0.0015 A are the same answer.
Check
Electrons have mobility 400 and holes 150 cm²/V·s. How many times wider must the PMOS be to match the NMOS (same length)?
Check
A CMOS inverter switches 100 pF at 1 MHz from 3.3 V.
(a)
What dynamic power does it draw?
Write units the way you normally would: 1.5 mW, 1500 µW and 0.0015 W are the same answer.
(b)
How much energy does each full cycle take from the supply?
Check
A CMOS inverter with thresholds t and = k drives C from a supply V.
Step 1
What's its noise margin?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What's ?
Step 3
What's ?
Explain why
Why does a CMOS inverter draw almost no current when its input is steady, yet consume power when it switches?
With the input steady at either rail, one transistor is fully off, so there's no path from the supply to ground and only leakage flows. Power is spent only when the output changes: charging the load capacitance draws of charge from the supply at , half of the energy ending up stored in the capacitor and half lost in the PMOS; discharging dumps the stored half through the NMOS. So every full cycle costs , plus a brief current through both transistors while the input passes the middle. The power is proportional to how often the gate switches.
Practice
Keep practicing
11 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.