Professional Documents
Culture Documents
Montek Singh
1
Transistors as switches
At an abstract level, transistors are merely switches
3-ported voltage-controlled switch
n-type: conduct when control input is 1
p-type: conduct when control input is 0
g=0 g=1
d d d
nMOS g OFF
ON
s s s
s s s
pMOS g OFF
ON
d d d
2
Silicon as a semiconductor
Transistors are built from silicon
Pure Si itself does not conduct well
Impurities are added to make it conducting
As provides free electrons n-type
B provides free “holes” p-type
Summary:
g=0 g=1
d d d
nMOS g OFF
ON
s s s
s s s
pMOS g OFF
ON
d d d
6
CMOS Topologies
There is actually more to it than connect/disconnect
nMOS: pass good 0’s, but bad 1’s
so connect source to GND
pMOS: pass good 1’s, but bad 0’s
so connect source to VDD pMOS
pull-up
Typically use them in network
inputs
complementary fashion: output
nMOS network at bottom
nMOS
pulls output value down to 0 pull-down
network
pMOS network at top
pulls output value up to 1
only one of the two networks must conduct at a time!
or output is undefined (or smoke may be produced!)
if neither network conducts output will be floating
7
CMOS Gate Recipe
Use complementary networks of p- and n-transistors
called CMOS (“complementary metal-oxide semiconductor”)
at any time: either “pullup” active, or “pulldown” active
never both!
pMOS
pull-up pullup: make this connection
network when some combination of inputs
inputs is near 0 so that output = VDD
output
nMOS
pull-down
pulldown: make this connection
network when some combination of inputs
is near VDD so that output = 0 (Gnd)
Use n-type
here
Gnd
CMOS Inverter
“0” “1”
Vout
Valid “1”
Vin Vout
Invalid
“1” “0”
Valid “0”
Vin
Only a narrow
range of input
A Y voltages result in
“invalid” output
inverter values. (This
diagram is greatly
exaggerated)
CMOS Complements
A A
A
Series N connections: A B
B Parallel P connections:
A
A B
B
Parallel N connections: Series P connections:
NOT VDD
A Y
P1
Y=A A Y
N1
A Y
0 1
GND
1 0
A P1 N1 Y
0 ON OFF 1
1 OFF ON 0
11
NAND
NAND
A
Y
B P2 P1
Y
Y = AB
A N1
A B Y
0 0 1 B N2
0 1 1
1 0 1
1 1 0
A B P1 P2 N1 N2 Y
0 0 ON ON OFF OFF 1
0 1 ON OFF OFF ON 1
1 0 OFF ON ON OFF 1
1 1 OFF OFF ON ON 0
12
3-Input NAND
NOR
3-input NOR
A
B
C
Y
15
2-input AND Gate?
A
Y
B
16
A More Complex CMOS Gate
Design a single gate that computes Y =(A + B)×C
B
this one is actually called
Y
OR-AND-INVERT (OAI)
C
symbol: A
B
One More Exercise
Lets construct a gate to compute:
F = A+BC = NOT(OR(A,AND(B,C)))
Vdd
A
Vdd
Step 1: Draw the pull-down network A
Step 2: The complementary pull-up
B C
network F
Step 3: Combine and Verify A B C F A B
0 0 0 1
C
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
Transmission Gates
Transmission gate is a switch:
En
nMOS pass 1’s poorly
pMOS pass 0’s poorly
Transmission gate is a better switch A B
passes both 0 and 1 well
When EN = 1, the switch is ON:
A is connected to B
When EN = 0, the switch is OFF: En
A is not connected to B
En
Symbol:
A B
En
Transmission Gate
IMPORTANT: Transmission
gates are not drivers
will NOT remove input noise to
En
produce clean(er) output
simply connect A and B together
current could even flow backward! A B
use very carefully!
immediately follow it up with a
normal CMOS gate
En
Logic using Transmission Gates
Typically combine two (or more) transmission gates
Together form an actual logic gate whose output is always
driven 0 or 1
Exactly one transmission gate drives the output;
all remaining transmission gates float their outputs
Example: XOR
when C = 0, TG0 conducts
F = A
when C = 1, TG1 conducts
TG0
F = A’
therefore:
F = A xor C
TG1
23
Tristate buffer and tristate inverter
When enabled: sends input to output
When disabled: output is floating (‘Z’)
Implementation: E
Tristate inverter
Top half and bottom half are not fully
complementary
Either both conduct: output NOT(input)
– will act as a driver!
Or both off: output is floating
24
Power and Energy Consumption
25
Power Consumption
Power = Energy consumed per unit time
Dynamic power consumption
Static power consumption
Dynamic Power Consumption
Energy consumed due to switching activity:
All wires and transistor gates have capacitance
Energy required to charge a capacitance, C, to VDD is CVDD2
Circuit running at frequency f: transistors switch (from 1 to 0
or vice versa) at that frequency
Capacitor is charged f/2 times per second
assume 50% chance switching from 0 to 1
– additional energy drawn from battery CVDD2
assume 50% chance switching from 1 to 0
– no additional energy taken from battery stored energy is discharged
Pdynamic = ½CVDD2f
C is the total capacitance of circuit (“capacitive load”)
VDD is the supply voltage
f is the switching frequency
Static Power Consumption
Power consumed when no gates are switching
Caused by the quiescent supply current, IDD (also called the
leakage current)
Pstatic or Pleakage = IDDVDD
P = ½CVDD2f + IDDVDD
= ½(20 nF)(1.2 V)2(1 GHz) + (20 mA)(1.2 V)
= 14.4 W + 24 mW
= 14.424 W