8.1 8.2 Outcomes • I can use Karnaugh maps to synthesize combinational functions with several outputs • I can determine the appropriate size and contents of a memory Unit 8 to implement any logic function (i.e. truth table) Implementing Combinational Functions with Karnaugh Maps 8.3 8.4 Covering Combinations Covering Combinations F = WX'YZ F = WX'Z F = X'Z F = X' • A minterm corresponds to = m11 = m9+m11 = m1+m3+m9+m11 = m0+m1+m2+m3+m8+m9+m10+m11 • The more variables we can W X Y Z F W X Y Z F W X Y Z F W X Y Z F ("covers") 1 combination remove the more 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 _______________ a single of a logic function 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 product term covers 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 • As we _________ variables 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 – Said differently, a small term will 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 from a product term, more cover (or expand to) more 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 combinations combinations are covered 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 • The smaller the term, the – The product term will 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 smaller the __________ evaluate to true 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 0 – We need fewer _________ to 1 0 1 0 0 1 0 1 0 1 ___________ of the 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 check for multiple combinations 1 0 1 1 1 removed variables value 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 • For a given function, how can (i.e. the term is 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 we find these smaller terms? 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 independent of that 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 variable)
8.5 8.6 Logic Function Synthesis • Given a function description as a T.T. or canonical form, how can we arrive at a circuit implementation or equation (i.e. perform logic synthesis)? • Methods – Minterms / maxterms • Use _________________ to find minimal 2-level implementation – Karnaugh Maps [we will learn this one now] A new way to synthesize your logic functions • Graphical method amenable to human ___________ inspection and can KARNAUGH MAPS be used for functions of _____________ variables • Yields minimal 2-level implementation / covering (though not necessarily minimal 3-, 4-, … level implementation) – Quine-McCluskey Algorithm (amenable to computer implementations – Others: Espresso algorithm, Binary Decision Diagrams, etc. 8.7 8.8 Karnaugh Maps Gray Code • Different than normal binary ordering • If used correctly, will always yield a minimal, • Reflective code __________ implementation – When you add the (n+1) th bit, reflect all the previous n-bit combinations – There may be a more minimal 3-level, 4-level, 5- • Consecutive code words differ by only 1-bit level… implementation but K-maps produce the minimal two-level (SOP or POS) implementation 0 0 0 0 0 differ by 0 1 0 0 1 when you move to • Represent the truth table graphically as a only 1-bit differ by the next bit, reflect 1 1 0 1 1 only 1-bit the previous series of adjacent ________ that allows a 1 0 combinations 0 1 0 human to see where variables will cancel 2-bit Gray code differ by only 1-bit 3-bit Gray code
8.9 8.10 Karnaugh Map Construction Karnaugh Maps W X Y Z F • Every square represents 1 input combination 0 0 0 0 0 0 0 0 1 1 • Must label axes in Gray code order 0 0 1 0 1 0 0 1 1 1 • Fill in squares with given function values 0 1 0 0 0 WX 00 01 11 10 YZ F= Σ XYZ (1,4,5,6) G= Σ WXYZ (1,2,3,5,6,7,9,10,11,14,15) 0 1 0 1 1 0 4 12 8 0 0 0 0 00 0 1 1 0 1 XY WX 00 01 11 10 00 01 11 10 1 5 13 9 Z YZ 0 1 1 1 1 1 1 0 1 01 0 2 6 4 0 4 12 8 1 0 0 0 0 0 0 1 1 0 0 0 0 0 00 3 7 15 11 1 0 0 1 1 1 1 1 1 11 1 3 7 5 1 5 13 9 1 0 0 1 1 1 0 1 1 01 1 0 1 0 1 2 6 14 10 1 1 1 1 1 0 1 1 1 10 3 7 15 11 1 1 1 1 3 Variable Karnaugh Map 11 1 1 0 0 0 2 6 14 10 1 1 0 1 0 1 1 1 1 10 1 1 1 0 1 1 1 1 1 1 4 Variable Karnaugh Map 8.11 8.12 Karnaugh Maps Karnaugh Maps • Squares with a '1' represent minterms that must be • Groups (of 2, 4, 8, etc.) of adjacent 1’s will always included in the SOP solution simplify to smaller product term than just individual • Squares with a '0' represent maxterms that must be minterms included in the POS solution Maxterm: F= Σ XYZ (0,2,4,5,6) w’ + x’ + y + z Maxterm: WX XY 00 01 11 10 w’ + x + y + z 00 01 11 10 YZ Z 0 4 12 8 0 2 6 4 0 0 0 0 1 1 1 1 00 0 1 5 13 9 1 3 7 5 1 1 0 1 0 0 0 1 01 1 Minterm: w•x’•y•z 3 7 15 11 1 1 1 1 11 3 Variable Karnaugh Map Minterm: 2 6 14 10 1 1 1 1 10 w•x’•y•z’
8.13 8.14 Karnaugh Maps Karnaugh Maps • 2 adjacent 1’s (or 0’s) differ by only one variable • Adjacent squares differ by 1-variable • 4 adjacent 1’s (or 0’s) differ by two variables – This will allow us to use T10 = AB + AB’= A or • 8, 16, … adjacent 1’s (or 0’s) differ by 3, 4, … variables T10’ = (A+B’)(A+B) = A • By grouping adjacent squares with 1’s (or 0’s) in them, we can come up with a simplified expression using T10 (or T10’ for 0’s) 3 Variable Karnaugh Map 4 Variable Karnaugh Map Difference in X: 010 & 110 x’yz’ + xyz’ WX XY WX 00 01 11 10 00 01 11 10 00 01 11 10 YZ Z = yz’ YZ (w’+x’+y+z)•(w’+x’+y+z’) = 0 4 12 8 0 2 6 4 0 4 12 8 0 0 0 0 00 (w’+x’+y) 0 00 1 = 0001 w’•x’•y’•z + w’•x’•y•z + 4 = 0100 1 5 13 9 w’•x•y’•z + w’•x•y•z 1 3 7 5 1 5 13 9 1 1 0 1 01 5 = 0101 1 01 7 = 0111 = w’•z 3 7 15 11 w•x•y•z + w•x’•y•z = 3 7 15 11 13 = 1101 1 1 1 1 Difference in Y: 010 & 000 Difference in Z: 010 & 011 11 11 w•y•z w’z are constant while all x’yz’ + x’y’z’ x’yz’ + x’yz Adjacent squares 0 = 000 combos of x and y are present 2 6 14 10 2 6 14 10 = x’z’ = x’y differ by 1-bit 1 1 1 1 10 2 = 010 (x’y’, x’y, xy’, xy) Adjacent squares 10 differ by 1-bit 3 = 011 6 = 110 8.15 8.16 K-Map Grouping Rules Group These K-Maps • Cover the 1's [=on-set] or 0's [=off-set] with ______ groups as possible, but make those groups ________ XY 00 01 11 10 Z 0 2 6 4 as possible 0 1 0 0 0 WX 00 01 11 10 YZ – Make them as large as possible even if it means "covering" 1 3 7 5 0 4 12 8 1 0 0 0 0 0 1 1 1 00 a 1 (or 0) that's already a member of another group 1 5 13 9 1 1 1 0 01 Make groups of ____________, ... and they must be • XY 00 01 11 10 Z 3 7 15 11 0 2 6 4 1 1 1 0 rectangular or square in shape. 11 1 1 0 0 0 2 6 14 10 • Wrapping is legal 1 3 7 5 0 0 0 1 10 1 0 0 0 1
8.17 8.18 Karnaugh Maps Karnaugh Maps WX • Groups can wrap around from: 00 01 11 10 YZ 0 4 12 8 – Right to left 0 1 1 1 00 – Top to bottom 1 5 13 9 0 1 1 1 01 – Corners 3 7 15 11 0 1 1 1 11 WX WX 00 01 11 10 00 01 11 10 YZ YZ 2 6 14 10 0 0 1 1 0 4 12 8 0 4 12 8 10 0 0 1 0 1 0 0 1 00 00 1 5 13 9 1 5 13 9 1 0 0 1 0 0 0 0 01 01 • Cover the remaining ‘1’ with the largest 3 7 15 11 3 7 15 11 1 0 0 1 0 0 0 0 11 11 group possible even if it “reuses” already 2 6 14 10 2 6 14 10 0 0 1 0 1 0 0 1 10 10 covered 1’s F = X’Z + WXZ’ F = X’Z’ 8.19 8.20 Group This K-Map Translation Rules • When translating a group of 1’s, find the variable values that are constant for each square in the group and translate only those variables values to a WX 00 01 11 10 product term YZ 0 4 12 8 0 0 0 0 00 • Grouping 1’s yields SOP 1 5 13 9 1 1 0 1 01 • When translating a group of 0’s, again find the 3 7 15 11 1 1 1 1 variable values that are constant for each square in 11 2 6 14 10 the group and translate only those variable values 1 1 1 1 10 to a sum term • Grouping 0’s yields POS
Recommend
More recommend