Title: Lecture 5 Combination Logic Design
1Lecture 5 Combination Logic Design
- Pradondet Nilagupta
- pom_at_ku.ac.th
- Department of Computer Engineering
- Kasetsart University
2Acknowledgement
- This lecture note has been summarized from
lecture note on Introduction to VLSI Design, VLSI
Circuit Design all over the world. I cant
remember where those slide come from. However,
Id like to thank all professors who create such
a good work on those lecture notes. Without those
lectures, this slide cant be finished.
3Topics
- Combinational logic functions.
- Static complementary logic gate structures.
4Combinational logic expressions
- Combinational logic function value is a
combination of function arguments. - A logic gate implements a particular logic
function. - Both specification (logic equations) and
implementation (logic gate networks) are written
in Boolean logic.
5Gate design
- Why designing gates for logic functions is
non-trivial - may not have logic gates in the libray for all
logic expressions - a logic expression may map into gates that
consume a lot of area, delay, or power.
6Boolean algebra terminology
- Function
- f ab ab
- a is a variable a and a are literals.
- ab is a term.
- A function is irredundant if no literal can be
removed without changing its truth value.
7Irredundancy
- A logical expression is irredundant if no literal
can be removed from the expression without
changings its value - Redundant expressions
- ab a
- ab ab'
- Irredundant expressions
- ab' a'b
- a cd'
8Completeness
- A set of logical functions is complete iif we can
generate every possible Boolean function using
that set - The set AND, OR, NOT is complete
- The set NAND is complete
- The set AND, OR is not complete
- Transmission gates are not complete.
- If your set of logic gates is not complete, you
cant design arbitrary logic.
9Minimality
- A logic expression is minimal if no equivalent
form has a higher cost (i.e., literal count) - Minimality ? Irredundancy
- CAD tools are available to find the minimal (or
near-minimal) form for - Two level logic (AND/OR Sum of Products)
- Multilevel Logic (Arbitrary network of gates)
10Static complementary gates
- Complementary have complementary pullup (p-type)
and pulldown (n-type) networks. - Static do not rely on stored charge.
- Simple, effective, reliable hence ubiquitous.
11Static complementary gate structure
- Pullup Network - drives output to VDD
- Pulldown Network - drives output to GND
VDD
VDD
Pullup
Network
(p-transistors)
Inputs
Out
In
Out
Pulldown
Network
(n-transistors)
Gnd
Inverter
Gnd
12Inverter layout
(tubs not shown)
out
a
a
out
13Complementary CMOS Notes
- Pullup, pulldown networks should NEVER conduct at
same time! - Pullup, pulldown networks are duals
- Parallel in pulldown implies serial in pullup
- Serial in pulldown implies parallel in pullup
- Gate Types
- Simple NAND, NOR, inverter
- And-Or-Invert (AOI)
- Or-And-Invert (OAI)
14Layout Considerations
- Metal lines required for Vdd!, Gnd!
- ndiff, pdiff must be separated by 10 lambda
- Transistor options
- horizontal or vertical diffusion lines
- Start with minimum-size transistors
- Increased width implies increased driving
capabilitiy, but - Do the analysis first to see if its necessary
15Layout Considerations (cont'd)
- Interconnect layers (use vias when necessary)
- Metal 1
- Metal 2
- Poly
- Diffusion
- Specify a well depending on process type
- Use substrate contacts to prevent latchup
16NAND gate
out
b
a
17NAND layout
VDD
out
out
tub ties
b
a
b
a
GND
18Layout Example - NAND
- Compare to Fig 3-10, p. 122
- Differences from Magic
- Explicit contact cuts
- P-tub as well as N-tub
- Larger N-well
- Note transistor sizes
- Note substrate contacts
19NOR gate
b
a
out
20NOR layout
VDD
b
a
tub ties
b
out
out
a
GND
21Layout Example - NOR
- Compare to Fig 3-12, p. 123
- Differences from Magic
- Explicit contact cuts
- P-tub as well as N-tub
- Larger N-well
- Note transistor sizes
- Note substrate contacts
22Layout - Creating Wide Transistors
- Divide into multiple transistors
- Tie together sources, drains
- Compare to Fig 3-9, p. 121
- Missing but still needed substrate contacts
23AOI/OAI gates
- AOI and/or/invert OAI or/and/invert.
- Implement larger functions.
- Pullup and pulldown networks are compact smaller
area, higher speed than NAND/NOR network
equivalents. - AOI312 and 3 inputs, and 1 input (dummy), and 2
inputs or together these terms then invert.
24AOI example
invert
symbol
circuit
or
and
25Pullup/pulldown network design
- Pullup and pulldown networks are duals.
- To design one gate, first design one network,
then compute dual to get other network. - Example design network which pulls down when
output should be 0, then find dual to get pullup
network.
26Dual network construction
27Inverter - DC Analysis
in
out
28Inverter DC Analysis - Continued
Note dependence on bn/bp Recall
Source N. Weste K. Eshraghian, Principles of
CMOS VLSI Design Addison Wesley, 1992
29Logic Levels Output
- Logic values are represented by a range of
voltages - Logic 1 between VOH and VDD (5V)
- Logic 0 between VOL and VSS (0V)
- Static CMOS Output levels
- VOH VDD (5V)
- VOL VSS Gnd (0V)
30Logic Levels Input
- Examine DC Input/Output Curve (Fig 3-15, p. 120)
- Pick points where slope -1 as VIL , VIH
- Rationale compare change in VIN , VOUT
- VIN lt VIL - small change in VIN causes small
change in VOUT - VIN gt VOUT - small change in VIN causes small
change in VOUT - VIN lt VIL lt VIH - small change in VIN causes
large change in VOUT
31Logic Levels - Summary
32Noise Margin
- A measure of noise immunity
- Logic 1 NMH VOH - VIH
- Logic 0 NML VOL - VIL
- Important when noise is present
- Definition small random variations in voltage
- Dont want noise to affect circuit output
33Transistor Sizing and Noise Margin
- Changing beta (size) ratio changes VIH, VIL
- To balance noise margin
- Make bnbp gt Wp3.5Wn
- Actually, Wp2Wn is often good enough
34Gate Delay
- Consider an inverter with "step function" input
- Delay related to time to discharge / charge CL
35Simplifying Assumptions
- Assume transistors turn on/off instantaneously
- Model transistor as a switch, resistor in series
- Resistor approximates Vds/Id at different values
of Vds - (See Fig. 2-6, p. 45 Fig 3-17, p. 123, Fig. 3-18,
p. 123) - Use average of Vds/Id at
- middle of linear region Vlin 0.5(Vds - Vss -
Vt) - maximum of saturation region Vsat (Vds - Vss)
36Delay Calculation - Finding Rn
37Delay Calculation - Finding Rn
Table 3-1, p. 125 (0.5µm process, VDD5V) Rn
3.9k? Rp 14k?
38Gate Delay (cont'd)
- Equivalent Network - see p. 125
- Eq. 3-6 voltage vs. time
- Eq. 3-7 solve for 90-10 time
- Delay calculation - assuming loading of a single
inverter p. 106
39Fall Time Approximation
- Capacitor initially charged at VDD
- Transistor approx. Rn
- Fall time (90-10) tf 2.2 Rn CL
40Rise Time Approximation
- Capacitor initially discharged (at Vss)
- Transistor approx. Rp
- Fall time (90-10) tp 2.2 Rp CL
41Gate Delay Accuracy
- Comparison to Spice simulation Fig 3-19, p. 127
- Estimate seems overly conservative, BUT
- Step functions don't occur in "real life"
- Spice simulation of cascaded inverters Fig.
3-20, p. 128 - First inverter output a more realistic waveform
- Second inverter delay comparable to estimate
42Gate Delay of NAND Gate
- Pulldown series n-transistors tf 2.2 (2
Rn) CL - Pullup parallel p-transistors (worst case when
one on) tr 2.2 Rp CL
43Gate Delay of NOR Gate
- Pulldown parallel n-transistors (worst case
when one on) tf 2.2 Rn CL - Pullup series p-transistors tr 2.2 (2
Rp) CL - NOR slower than NAND (why?)
44Gate Delay
- Consider an inverter with a rising input
- Delay related to time to discharge / charge CL
45Gate Delay - Definitions
Delay time to reach 50 of final value tpHL
(book calls this td) tpLH Transition Time time
between 10 and 90 tf - fall time tr -
rise time
46Simplifying Assumptions
- Assume Step Function input
- Model transistor as switch and resistor
- Resistor approximates Vds/Id at different values
of Vds - Use average of Vds/Id at
- middle of linear region Vlin 0.5(Vds - Vss -
Vt) - maximum of saturation region Vsat (Vds - Vss)
- Book calls this the t model
47Delay Calculation - Finding Rn
48Delay Calculation - Finding Rn
49Delay Calculation - Finding Rp
50Delay Calculation - Finding Rp
51Summary Calculating Rn and Rp
52Example Calculating Rn
53Example Calculating Rp
54Summary Rn and Rp for Minimum-Sized Transistors
55Inverter Delay with the t model
Rising Input / Falling Output
56Inverter Delay with the t model
Falling Input / Rising Output
57NAND Gate Delay with the t Model
- Fall time n-transistors in series
- tf 22.2(RnRL)CL
- Rise time 1 p-transistor on (for worst case)
- tf 22.2(RnRL)CL
58NOR Gate Delay with the t Model
- Fall time one n-transistor on(worst case)
- tf 2.2(RnRL)CL
- Rise time p-transistor in series
- tf 22.2(RnRL)CL
59AOI Gate Delay with the t Model
- Fall time 2 n-transistors in series(worst case)
- tf 22.2(RnRL)CL
- Rise time 3 p-transistors in series(worst case)
- tf 32.2(RnRL)CL
60Delay Estimation - Other Approaches
- Current source model - treat transistor as
current source in saturation - Fitted model
- Measure several circuit characteristics fit to
formula - Used in CAD tools
- Circuit Simulation - Most accurate approach
61Accuracy of methods
- Comparison to Spice simulation Fig 3-20, p. 133
- t Model
- Current Source Model
- What to do
- Use simple models for
- Quick prediction of delay
- Insight into circuit operation
- Comparison of different circuits
- Use Spice for accurate simulation
62Example - Inverter Delay
- Estimate tr and tf for a minimum-size inverter
driving the inputs of four minimum-size
inverters(assume loading only from transistor
gates)
63Example - Inverter Delay (1/2)
- Estimate loading from a single inverter
64Example - Inverter Delay (2/2)
- Now use Rn, Rp, CL to calculate tr, tf
65Example - Gate Delay of an AOI Gate
- Use values in book for VDD5V
- Rise time tr
- Worst case 2 transistors in series
- Fall time tf
- Worst case series connection
66Effect of Increased Transistor Width
- Increase width of transistor to
- Increase current
- Reduce effective resistance (Rn or Rp)
- Side-effect increased input capacitance(more
about this later)
67Example Gate Delay of a NOR (VDD5V)
68Transistor Sizing Example
- Size the transistors in an inverter so that trtf
- Rp / Rn 13K? / 3.9K? 3.47
- Make Wp approximately 3.5Wn
W10 L2
W3 L2
69Transistor Sizing Example
- Size the transistors in an AOI gateso that trtf
- Rp / Rn 13K? / 3.9K? 3.47(round down to 3)
- Size each worst case path for equal delay
- Assume L2 in all transistors
36
18
36
18
6
3
6
6
70Result of Body Effect Increased Delay
- Consider n-transistors in series
- T1 has higher Vt while C1 charged
- T1 turns on more slowly
- CL discharges more slowly
- Delay (fall time) increases!
- What to do?
- Attempt to reduce parasitic C1-internal node
capacitance - Place earliest-arriving gate inputs near Gnd
(VDD, for p-transistors) - Place latest-arriving gate inputsnear output
71Body Effect
- Weve used fixed values for Vtp, Vtn, BUT
- This is true only if source/substrate voltage
Vsb0 - Not always the case when transistors are in
series - Increasing Vsb
- increases width of depletion layer
- raises the threshold voltage Vt
- Example (p. 56) if Vsb5V, ?Vt0.16V (24 of Vt)
72Power Consumption
- Static power consumption - due to leakage current
- Diode leakage - reverse-biased diode junction
- Subthreshold current - in deep submicron
devices - Total static consumption
- Dynamic power consumption
- Power consumed as outputs switch to
- Charge load capacitances
- Discharge load capacitance
73Dynamic Power Consumption
- Charging Capacitor
- Current, voltage Eq. 3-8, 3-9 (p. 130)
- Energy Eq. 3-10
- Discharging Capacitor
- Current, voltage Eq. 3-11, 3-12 (p. 131)
- Energy Eq. 3-13
74Power Consumption (cont'd)
- Power Energy per unit time
- P fCL(VDD-VSS)2 fCLVDD2
- Where
- f rate of change of gate output
- Worst case ffclock (more likely f lt fclock but
f a fclock ) - P depends only on f, CL, and VDD!
- For overall chip
- P fCL(VDD-VSS)2 fCLVDD2
75Power Consumption and VDD
- Reducing VDD creates large reduction in P
- If we reduce VDD to VDD,
76Delay and VDD
- Tradeoff reducing VDD increases delay
- If we reduce VDD to VDD,
- Tradeoff reducing VDD decreases noise immunity
(more careful design necessary!)
77Design Strategies for Power Reduction
- Use lower VDD to reduce power
- Compensate for higher delays by
- Using newer, smaller, faster IC technology
- Trading off more slower logic for less faster
logic - this is called voltage scaling - Examples (from Tom Burds General Processor
Information) - Intel P5 Pentium VDD5.0V / fclk66MHz / P16W
- Intel P54C VDD3.3V / fclk100MHz / P5.0W
- Intel P55VRT VDD3.3 / fclk200Mhz / P3.4W
- Intel P6 VDD3.3V/ fclk166MHz / P23.4W
- Compaq Alpha 21264 VDD2.0V / fclk667MHz /
P72W
78Speed-Power Product
- A way of characterizing the quality of a logic
family - For static complementary CMOS
- Bottom line easiest way to reduce power is to
reduce VDD