Combinational Logic Fan-in/ Fan-out Timing Copyright (c) 2012 Sean Key
Fan-in & Fan-out Fan-in The number of inputs to a logic gate Higher fan-in can lead to longer gate delays because of the higher input capacitance ʺ 퉆 ظمظم of the complex inputs. Fan-out The number of different gates that a gate output can drive. Fan-out is determined by Current sink of gate inputs Current source capability of the gate output.
Delay In real circuits, signals do not propagate through a gate instantaneously Transistors cannot switch instantaneously Transistors of different types and sizes will switch at different speeds Parasitic capacitances must be drained ʦ 䭆 Propagation Delay (tp) The amount of time that it takes for a change at an input to cause a change at the output. Each input can have a different propagation delay, so we generally look at the worst case propagation delay along the critical path The critical path is the path through the circuit with the longest delay. Rising and falling transitions can have different delays!
Delay Example 1 Determine the critical path of the given circuit assuming the following gate propagation delays: t pd,wire = 0 ns t pd,inv = 0.5 ns t pd,and = t pd,or = 1 ns ظمظم ʺ A NOT OR AND F B
Delay Example 2 Determine the critical path of the given circuit assuming the following gate propagation delays: t pd,wire = 0 ns t pd,inv = 0.5 ns t pdlh,and = 1 ns t pdhl,and = 1.5ns t pdlh,or = 1 ns t pdhl,or = 0.9 ns A B ʦ 坆 NOT OR AND F Note: HL means the output of the gate is going from HIGH to LOW, LH means the output is going from LOW to HIGH. Process All inputs evaluated individually Choose an input to evaluate Set all other inputs to 1 Evaluate delays as chosen input changes from 0 to 1 and from 1 to 0. Repeat for other inputs
Timing diagrams Timing diagrams show how inputs and outputs change over time. Ideal timing No delays shown Note: Real timing diagrams would look more analog Transistors don t switch instantaneously. ʺ ϡ Ideal Timing for an Inverter A F Increasing time Timing with Delays for an Inverter A F t pd
Timing Diagram Process Process for drawing timing diagrams Draw inputs over the desired time. Evaluate and graph the value of the intermediate ʦ 捆 nodes closest to the inputs over the desired time. Repeat, going right across the circuit, until output values have been graphed.
Timing Example Draw a timing diagram for the critical path of the circuit in delay example 2. A NOT Ϙظم ʺ OR AND F B
Combinational Logic ʦ 潆 Boolean Algebra, Standard Forms
Boolean Algebra A form of algebra that is specific to binary numbers. We use Boolean algebra to describe the functions implemented by combinational logic. This description can be converted to a circuit. ʺɆ Boolean Algebra is built upon a set of axioms and theorems. Axioms are a minimal set of definitions, assumed to be true, from which all other information about a mathematical system can be derived. Theorems are statements, known to be always true, that allow us to manipulate algebraic expressions.
Boolean Axioms The first set of axioms affirm that we only have two values (A1) X = 0 if X!= 1 (A1 ) X = 1 if X!= 0 (A2) If X = 0, then X = 1 (A2 ) If X = 1, then X = 0 The last three are formal definitions of AND and OR ʦ 祆 (A3) 0 * 0 = 0 (A3 ) 1 + 1 = 1 (A4) 1 * 1 = 1 (A4 ) 0 + 0 = 0 (A5) 0 * 1 = 1 * 0 = 0 (A5 ) 1 + 0 = 0 + 1 = 1
Boolean Operators Boolean operators Priority Operator Function ʺๆ Highest () Parenthesis, grouping NOT * AND Lowest + OR
Terms used in Boolean Algebra Variable A term that represents a value (0 or 1) i.e.: A, F, light_switch Literal The usage of a variable in a formula Product Term A product of literals A B Sum Term A sum of literals A + B Ϙظمʦ荆 Sum of Products A product of sum terms (aka. SoP) A B + A B Product of Sums A sum of product terms (aka. PoS) (A + B + C) (A + B + C) Function mapping of each possible combination of input values to an output F = A B + A B
Single Variable Boolean Theorems Identities X + 0 = X X * 1 = X Null Elements X + 1 = 1 X * 0 = 0 Idempotency X + X = X X * X = X Involution (X')' = X Compliments X + X' = 1 X * X' = 0 (T1) (T1 ) (T2) (T2 ) (T3) (T3 ) (T4) (T5) (T5 ) ظمʺ
Two Variable Boolean Theorems Commutativity X+Y = Y+X X*Y = Y*X Associativity (X+Y) + Z = X + (Y + Z) (X*Y)*Z = X*(Y*Z) Distributivity X*Y+X*Z = X*(Y+Z) (X+Y)*(X+Z) = X*(Y+X) Covering X+X*Y = X X*(X+Y) = X Combining X*Y+X*Y' = X (X+Y)*(X+Y') = X (T6) (T6 ) (T7) (T7) ʦ轆 ϡ (T8) (T8 ) (T9) (T9 ) (T10) (T10 )
Three Variable Boolean Theorems Consensus X*Y+X'*Z+Y*Z = X*Y+X'*Z (X+Y)*(X'+Z)*(Y+Z) = (X+Y)*(X'+Z) ʺ (T11) (T11 )
N-Variable Boolean Theorems Generalized Idempotency X+X+...+X = X X*X*...*X = X DeMorgan s Law Ϙظمʦ魆 (A*B*C*...*Z)' = A'+B'+C'+...+Z' (A+B+C+...+Z)' = A'*B'*C'*...*Z' (T12) (T12 ) (T13) (T13 )
Principle of Duality Any theorem or identity in boolean algebra remains true if 0 and 1 are swapped and the AND and OR operations are swapped ظمʺ throughout
Bad Joke of the Day Digital Shakespeare: ʦ Ϙ To be or not to be that is the question What is the answer? 2b or not 2b = FF
Proving Theorems Two methods to prove that these theorems (or any function) is true Induction ʺ 㭆 Use a truth table to prove Use other theorems
Proof by Induction Example Prove the distributivity theorem using induction XYZ Y*Z X+Y*Z X+Y X+Z (X+Y)*(X+Z) 000 0 0 0 0 0 ኰϚ 001 0 0 0 1 0 010 0 0 1 0 0 011 1 1 1 1 1 100 0 1 1 1 1 101 0 1 1 1 1 110 0 1 1 1 1 111 1 1 1 1 1
Proof via Theorems Prove the distributivity theorem using theorems (X+Y)*(X+Z) X*(X+Z) + Y*(X+Z) X*X + X*Z + Y*X + Y*Z X + X*Z + Y*X + Y*Z X + X + X*Z + X*Y + Y*Z X + X*Z + X + X*Y + Y*Z X + X + Y*Z X + Y*Z 繰 Ј T8 T8 T3' T3 & T6' T6 T9(2) T3
Boolean Algebra Examples Simplify the following functions to only have two levels (AND-OR or OR-AND) Example 1: F = (x+y) y + x 繰 Ј Example 2: F = (a b + a b ) c
Standard Representation Truth Tables A function can be represented by many equations, but only one truth table. Makes for easy comparisons to see if functions match Not very effective for functions with a large number of variables ʺ 兆 We also need a standard equation form to simplify direct comparisons between functions
Canonical Forms A canonical function is a function completely made up of normal terms Normal Term A product or sum term in which no variable appears more than once. Non-normal terms can be simplified to a normal form. There are two types of normal terms ĐϦ Minterm A product term that contains each input variable once. Maxterm A sum term that contains each input variable once. Functions of only minterms (Canonical Sum of Products) or maxterms (Canonical Product of Sums) are standard forms related to the truth table Every location in the truth table with a 1 specifies a minterm of the function. Every location in the truth table with a 0 specifies a maxterm
Minterms and Maxterms in Truth Tables Inputs Output Product (Positions) Sum (Positions) A B C Z TERM SYMBOL TERM SYMBOL 0 0 0 Z(0,0,0) A'*B'*C' m0 A+B+C M0 0 0 1 Z(0,0,1) A'*B'*C m1 ĐϦ A+B+C' M1 0 1 0 Z(0,1,0) A'*B*C' m2 A+B'+C M2 0 1 1 Z(0,1,1) A'*B*C m3 A+B'+C M3 1 0 0 Z(1,0,0) A*B'*C' m4 A'+B+C M4 1 0 1 Z(1,0,1) A*B'*C m5 A'+B+C M5 1 1 0 Z(1,1,0) A*B*C' m6 A'+B'+C M6 1 1 1 Z(1,1,1) A*B*C m7 A'+B'+C' M7
Example: Minterm & Maxterm What are the minterms and maxterms of the given truth table? ʦ푆 ϡ A B C F 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1
Canonical Sum of Products To find the Canonical SoP: Find all 1 s in the output of the truth table to determine the minterms. OR all of the minterms together Canonical Sums are often shown in a shorthand that lists the minterm numbers: i.e. F = Σ(1, 5, 7) Example: Find the SoP of the given truth table ĐϦ A B C F 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1
Canonical Product of Sums To find the Canonical SoP: Find all 0 s in the output of the truth table to determine the maxterms. AND all of the maxterms together Canonical Products are often shown in a shorthand that lists the minterm numbers: i.e. F = π(0, 2, 3, 4, 6) Example: Find the PoS of the given truth table ĐϦ A B C F 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1
SoP and PoS Equivalence SoP and PoS are both representations of the truth table and are equal to each other. Example: Use Boolean Algebra to prove that the SoP ĐϦ and PoS of the given truth table are equivalent. A B C Z 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 SOP: Z = A B C + A B C + A BC + AB C + AB C + ABC + ABC POS: Z = (A + B + C)
SoP and PoS Equivalence Example Starting with the SOP: (T3) Z = A'B'C' + ( A'B'C + A'B'C) + A'BC + ( AB'C' + AB'C') + ( AB'C + AB'C + AB'C) + ABC' + (ABC + ABC) (T6) Z = A'B'C' + A'B'C + AB'C + AB'C' + AB'C + AB'C' + ABC' + ABC + ABC + A'BC + AB'C + A'B'C ᑠϒ (T8) Z = A'B'(C' + C) + AB'(C + C') + AB'(C + C') + AB(C + C') + BC(A + A') + B'C(A + A') (T5) Z = A'B' + AB' + AB' + AB + BC + B'C (T8) Z = B'(A+A') + A(B+B') + C(B+B') (T5) Z = A + B + C Which is the POS.