Lec 02 - CMOS Inverter
Inverter
An inverter can be thought of as a NOT gate. It will negate whatever value from its input.
Ideal Inverter
An ideal inverter has the following Vin-Vout graph (also known as Voltage Transfer Characteristic, or VTC)

From this graph, we can see that
When 0 Vin VDD /2, Vout = VDD, this means [0, VDD/2] is Vin's input low range. Similarly, [VDD/2, VDD] is Vin's input high range.
NMH: VDD /2
NML: VDD /2
Switch threshold: VDD /2
The meaning of gain is just the change rate of Vout with respect to Vin, which is
Real Inverter
In the real world, the inverter cannot be that perfect. Its Vin-Vout graph is usually shown as follows

From this graph, we will see some very important conventions used in Electrical Engineering
In the Vin-Vout graph, we always treat x-axis as Vin and y-axis as Vout.
VOH: This is the nominal (expected) output voltage when the inverter output is logic HIGH. This is usually around VDD.
VOL: This is the nominal (expected) output voltage when the inverter output is logic LOW. This is around 0V.
VOH and VOL are nominal values, and they are different from the actual output, which we usually define to be just Vout.
Usually, VOH, VOL, together with VIL and VIH are specified by the manufacturer in the logic family’s datasheet.
VM: This is the switching threshold, where Vin = Vout.
Mapping between Analog and Digital Signals
As analog signals are continuous while digital signals are discrete, when we convert analog signals to digital signals, we need to define some "mappings". In this lecture, the following mapping is defined,

From this graph, we add on to the important conventions that will be used in Electrical Engineering
VIL: The highest input voltage that the gate will still recognize as a logic LOW.
Thus, in this graph, the input low range is [VOL, VIL]
VIH: The lowest input voltage that the gate will recognize as a logic HIGH.
Thus, in this graph, the input high range is [VIH, VOH]
By definition, VIH and VIL are the operational points of the inverter where .
Noise Margin
Noise margin is how much noise a signal can tolerate and still be read correctly as 0 or 1. So, in our notation, we can easily treat NMH as the length of input high range and NML as the length of the input low range.
NMH = VOH - VIH, or more precisely, VDD - VIH.
NML = VIL - VOL, or more precisely, just VIL.

Prof. Annie also introduces the following analogy for NMH and NML:
NMH defines how much the Vout can drop from the nominal high voltage (VOH) for it to be read correctly as logic HIGH by the following gate.
NML defines how much the Vout can go up from the nominal low voltage (VOL) for it to be read correctly as logic LOW by the following gate.
Fan-in and Fan-out

From the above image, we can clearly see that
Fan-out means how many inputs are driven by one output the number of gates that one output signal can drive.
Fan-in means how many inputs a gate has, it describes the number of signals feeding into one logic gate.
CMOS Inverter
An inverter can be built using one PMOS and one NMOS shown as follows,

Basic Operation
The basic operations of a CMOS inverter are the same as the inverter. Basically, it's just when input = 0, output = 1 and when input = 1, output = 0. But in this part, we will use the |VGS| thinking to decide the ON/OFF state of the PMOS and NMOS.

Input = 0 -> Output = 1: NMOS's |VGS| = 0 < |VTH|, NMOS is OFF. PMOS's |VGS| = VDD > |VTH|, PMOS is ON. Thus, Vout is connected to VDD, output is 1.
Input = 1 -> Output = 0: NMOS's |VGS| = VDD > |VTH|, NMOS is ON. PMOS's |VGS| = 0 < |VTH|, PMOS is OFF. Thus, Vout is connected to ground, output is 0.
Switching Characteristics
As Vin changes, the CMOS inverter goes through five different combinations of regions of operation. These combinations are indicated below:
0 Vin VTN: NMOS off, PMOS on.
VTN < Vin < Vinv: PMOS linear, NMOS saturation.
Vin = Vinv: Both PMOS and NMOS saturation
Vinv < Vin < VDD - |VTP|: NMOS linear, PMOS saturation
VDD - |VTP| < Vin VDD: PMOS OFF, NMOS ON
where,
Vinv is the switching voltage (same as the VM we have introduced above)
VTN is the threshold voltage of an NMOS.
VTP is the threshold voltage of an PMOS.
To understand it more clearly, let's use the following example,

Suppose VTN = 0.3V, VTP = -0.3V, VDD = 1V and Vinv = 0.5V
0 Vin VTN -> 0 Vin 0.3: Let's take Vin = 0.2V and assume Vout = 1V.
NMOS: |VGS| < |VTN|, NMOS is OFF.
PMOS: |VGS| 0.7V > |VTP|, PMOS is ON. VGD = -0.8V < VTP, PMOS in linear region.
VTN < Vin < Vinv -> 0.4 < Vin < 0.5: Let's take Vin = 0.45V and assume Vout drops a bit but is still high, is 0.9V.
NMOS: |VGS| > |VTN|, NMOS is ON. VGD = -0.45V < VTN, NMOS operates in saturation region.
PMOS: |VGS| > |VTP|, PMOS is ON. VGD = -0.45V < VTP, PMOS operates in linear region.
Vin = Vinv: Let's say Vin = 0.5V and Vout = 0.5V
NMOS: |VGS| > |VTN|, NMOS is still on. VGD = 0 < VTN, NMOS operates in saturation region.
PMOS: |VGS| > |VTP|, PMOS is still on. VGD = 0 > VTP, PMOS operates in saturation region.
Vinv < Vin < VDD - |VTP| -> 0.5 < Vin < 0.6V. Let's take Vin = 0.55V and assume Vout is 0.2V.
NMOS: |VGS| > |VTN|, NMOS is ON. VGD = 0.35V > VTN, NMOS operates in linear region.
PMOS: |VGS| > |VTP|, PMOS is ON. VGD = 0.35V > VTP, PMOS operates in saturation region.
VDD - |VTP| < Vin < VDD -> 0.6 < Vin < 1. Let's take Vin = 0.75V and assum Vout is 0V.
NMOS: |VGS| > |VTN|, NMOS is ON. VGD = 0.75V > VTN, NMOS operates in linear region.
PMOS: |VGS| < |VTP|, PMOS is OFF.
Vin is the gate voltage VG here.
The above calculation is based on the following table we have introduced in Lec 01. As for the CMOS inverter case,
For NMOS: Vgsn = Vin, Vdsn = Vout.
For PMOS: Vgsp = Vin - VDD, Vdsn = Vin - VDD.

To summarize the five regions of operations together into one image, we have the following VTC of CMOS inverter

Now, we can draw the short-circuit current (Iinv) vs. Vin graph, and it looks like as follows,

From the graph above, we can see that the CMOS seems to only consume power when switching.
However, as I use "seems to" above, means that in reality, due to sub-threshold currents, etc, there is still some power consumption when the CMOS inverter is in OFF state.
Inverter with a Load
Normally, CMOS inverter will have parastic resistances and capacitances attached to the output node. Hence principle of operation of inverter alters a bit. This reflects in the appearnce of rise time (tr), fall time (tf), ..., we have introduced in Lec 01.

These time delays appear because charging and discharging the capacitor attached to the output node takes time! (CG1111A again!)
Discharging the load

After the capacitor is fully charged, it has the polarity shown as above. Now, if Vin = 1, our PMOS will be turned off and NMOS will be turned ON, forming a circuit so that the current can flow from the capacitor, through the NMOS device, and lastly to the ground until the capacitor is finally discharged.
That's why NMOS device is called pull-down device.
Transient Response
As it takes time to charge and discharge the capacitor, we can do the transient analysis to get a formula for calculating tpLH (when charging) and tpHL (when discharging).

For an RC circuit, the capacitor voltage at time is given by
Recall that when we are doing the tpLH and tpHL calculation, we are only interested in the 50% point. So
When charging, tpLH is the time taken for Voltage across the capacitor to go from 0 -> VDD/2.
When discharging, tpHL is the time taken for Voltage across the capacitor to go from VDD/2 -> 0.
Thus, we can plug V(t) = VDD/2 into our formula and solve for
where is the on resistance of the PMOS/NMOS device, and is the capacitance of the capacitor.
Hence, a fast gate is built either by keeping the output capacitance small or by decreasing the on-resistance of the transistor.
There is also a second approach to know the propagation delay if we don't know the on-resistance, it is introduced later.
Power Dissipation
As we have seen above, when the CMOS is switching, the short circuit current will consume some power. Also, we have mentioned about the leakage current, which will also consume some power. Lastly, as we have introduced the capacitors above, charging and discharging the capacitors will also consume some power, this is called dynamic power consumption.
Dynamic Power Consumption
We have already seen the image when we are charging the capacitor,

The total energy/transition is , and it can be calculated by integrating the following
Since is constant, move it outside the integral:
For a capacitive load , use (during charging, where is the output voltage):
Move outside and change variable to (substitute ):
Evaluate the integral (limits from 0 to as charges fully):
Its power is energy/transition times frequency f, which is . However, we can see the in this circuit, the capacitor will also take some power consumption, and it can be calculated by integrating the follwoing, which will give us ,
Similarly as above, for a capacitive load , use (during charging, where is the output voltage):
Move outside the integral:
Substitute , so , and change the limits of integration from to (as charges from 0 to ):
Evaluate the integral:
Thus, the final result is:
But this is only half of the total energy consumption. Where does the rest half go? If you think about it, it won't be hard to find out that the other half is dissipated as heat on the PMOS's resistor.
The above analysis is based on the PMOS! In other words, when we are charging! When we are discharging, the energy consumption from the power supply is 0J! And all the energy stored in the capacitor () will dissipate as heat on the NMOS's resistor.
Modification for Circuits with Reduced Swing
As we have seen above, we can exploit reduced swing to lower the power. And the circuit after modification is shown below,

And now the energy per transition will be and the energy for the capacitor will be .
We can just change the upper limit from to to get the above result. The integration processes are exactly the same.
Node Transition Activity and Power
Now, let's consider switching a CMOS gate for clock cycles
where is the energy consumed for clock cycles and is the number of transitions in clock cycles. Thus, we can have the average power as follows,
We can further define the activity factor as follows,
And now, we can rewrite our average power as follows,
CMOS Inverter Propagation Delay
In the Transient Response analysis, we have already seen how to calculate the propagation delay of a CMOS inverter when we know the NMOS/PMOS on-resistance as well as the capacitance . Now, we introduce the second method to know the propagation delay if we don't know the on-resistance, but know the average current Iav in the circuit.
Starting with , move to the L.H.S and integrate both sides:
Integrate from initial to final conditions, where goes from to and time is the propagation delay:
Since is constant, factor it out:
The right-hand side integrates to the voltage difference:
The left-hand side represents the charge transferred, and since , substitute :
Solve for :
For the high-to-low propagation delay , (full swing from to 0, but noting is 50% of full swing), so we have:
Load Capacitance / Resistance
Load Capacitance
When a CMOS gate drives another CMOS gate, the driver "sees" a capacitive load. The load capacitance consists of
gate capacitance of the load from two MOSFETS on the right (Cg)
junction capacitance from common drain of the driver inverter on the left (Cj), and
the parastic routing capacitance from the metal line used for connection (Cw)

In other words, the load capacitcance is
Transistor
Load Resistance
To calculate the resistance, we can use the following formula
where we treat as a whole and name it as sheet resistance with the unit ( ) and has the unit of and they must be converted to the same unit before the division!
Last updated

