Presentation is loading. Please wait.

Presentation is loading. Please wait.

Optimized Implementation of Logic Function

Similar presentations


Presentation on theme: "Optimized Implementation of Logic Function"— Presentation transcript:

1

2 Optimized Implementation of Logic Function
Digital Systems Section 6 Optimized Implementation of Logic Function

3 Circuit Minimization with Karnaugh Maps
Lecture Digital Systems Circuit Minimization with Karnaugh Maps It is our intension to simplify a Boolean expression into an optimal and minimum form. Algebraic manipulations can be used to simplify Boolean expression. We have done this before. This process is not always straightforward and easy. Karnaugh maps (K-maps) provide an easy and visual method for finding the minimum-cost SoP (or PoS) for a Boolean expression. A K-map is a pictorial arrangement of the truth table which allows easy interpretation for choosing the minimum number of terms needed to algebraically express a function. The minimization using K-map is simple. It is much faster and more time-efficient than the minimization techniques with Boolean Algebra. K-maps works well for Boolean expressions of up to 6 input variables/ literals.

4 Circuit Minimization with Karnaugh Maps
Lecture Digital Systems Circuit Minimization with Karnaugh Maps K-map is an approach to minimize Boolean Function. The representation in the form of sum-of-product can be easily converted from the truth table. The minimization using K-map is simple. It is much faster and more time-efficient than the minimization techniques with Boolean Algebra. credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

5 Lecture Digital Systems Karnaugh Maps Karnaugh map is an alternate way of representing Boolean Function. See the graphs below. All rows of the output column from the truth table is represented with a square in Karnaugh map. 2-Variable Function Truth Table A B 1 m0 m1 m3 m2 F Karnaugh Map A 1 m0 m1 m3 m2 B

6 Karnaugh Maps B C 1 m0 m1 m3 m2 m4 m5 m7 m6 A F BC A 00 01 11 10 1 m0
Lecture Digital Systems Karnaugh Maps 3-Variable Function Truth Table Karnaugh Map B C 1 m0 m1 m3 m2 m4 m5 m7 m6 A F BC A 00 01 11 10 1 m0 m4 m5 m1 m3 m7 m2 m6

7 Karnaugh Maps CD AB 00 01 11 10 m0 m4 m5 m1 m3 m7 m2 m6 m12 m8 m9 m13
Lecture Digital Systems Karnaugh Maps 4-Variable Function CD AB 00 01 11 10 m0 m4 m5 m1 m3 m7 m2 m6 m12 m8 m9 m13 m15 m11 m14 m10

8 Lecture Digital Systems Karnaugh Maps Every row in the output column of a truth table can be written in the form of minterms. Correspondingly, every square of a Karnaugh map can be written in the form of minterms, too. SoP can be obtained as the sum of all minterms. Truth Table Karnaugh Map A B 1 F A 1 B A 1 A’B’ A’B AB AB’ B F = m0 + m1 = A’B’ + A’B

9 ? A ? A Karnaugh Maps K-map of 3-variable function:
Lecture Digital Systems Karnaugh Maps K-map of 3-variable function: By writing SOP, what is F for this 3-variable K-map? ? A F(A,B,C) = Σm(1,2,4,5,6,7) F = AB’C’ +ABC +ABC ABC + A’B’C + A’BC’ F(A,B,C) = πM(0,3) F = (A+B+C)(A+ B’+C’) K-map of 4-variable function: By writing SOP, what is F for this 4-variable K-map? ? F(A,B,C,D) = Σm(2,3,4,6,7,8,14,15) F(A,B,C,D) = πM(0,1,5,9,10,11,12,13) F = … A

10 K-map: Sum-of-Product Minimization
Lecture Digital Systems K-map: Sum-of-Product Minimization If we take a closer look to a K-map, we can see that any 2 neighboring squares are only differ by a single literal. For example, m1 (A’B’C) and m5 (AB’C) m3 (A’BC) and m2 (A’BC’) m4 (AB’C’) and m6 (ABC’) We can simplify the neighboring squares as follows: m1 + m5 = A’B’C + AB’C = (A’ + A)B’C = B’C m3 + m7 = A’BC + ABC = (A’ + A)BC = BC BC A 00 01 11 10 1 m0 m4 m5 m1 m3 m7 m2 m6 BC A 00 01 11 10 1 m0 m4 m5 m1 m3 m7 m2 m6 Four neighboring squares are now becomes two rectangles.

11 K-map: Sum-of-Product Minimization
Lecture Digital Systems K-map: Sum-of-Product Minimization Now, the 2 neighboring rectangles can be further simplified as: m1 + m5 + m3 + m7 = B’C + BC = (B’ + B)C = C BC A 00 01 11 10 1 m0 m4 m5 m1 m3 m7 m2 m6 This is the way how we can use K-map to simplify Boolean functions. We try to cover all minters in the biggest possible squares/ rectangles, and simplify each of them. The Boolean property that we use is: x · y + x · y’ = x (Combining, see Lecture 2)

12 K-map: Sum-of-Product Minimization
Lecture Digital Systems K-map: Sum-of-Product Minimization Practically, any neighboring cells or rectangles will have one or more common literals and exactly one different literal. They can be grouped in squares or rectangles with the dimension of [2n × 2m]. 2 neighboring cells in a 3-variable function: AB’C + AB’C’ = AB’(C+C’) = AB’ 4 neighboring cells in a 4-variable function: A’B’CD’ + A’BCD’ + AB’CD’ + ABCD’ = A’(B’+B)CD’ + A(B’+B)CD’ = (A’+A)(B’+B)CD’ = CD’ BC A 00 01 11 10 1 m0 m4 m5 m1 m3 m7 m2 m6 CD AB 00 01 11 10 m0 m4 m5 m1 m3 m7 m2 m6 m12 m8 m9 m13 m15 m11 m14 m10

13 Rules for Karnaugh Maps
Lecture Digital Systems Rules for Karnaugh Maps We can simplify a Boolean expression by encircling 1’s in the Karnaugh map by using “power-of-2 rectangle”. This means, the dimension of the rectangle must be [2n×2n] The rectangles may contain 1, 2, 4, 8, … cells of 1’s. Only cells of 1’s may be encircled. All the 1’s must be enclosed in the smallest possible number of rectangles. All the 1’s must be encircled with rectangles with the biggest possible size. Encircling a 1 more than once is allowed. We can then deduced a minterm for each rectangle. Rectangles with dimension greater than [1×1] form minimized minterms.

14 Rules for Karnaugh Maps
Lecture Digital Systems Rules for Karnaugh Maps Encircled pair of adjacent 1s in K-map eliminates one variable that appears in true and complemented form. Encircled quad of adjacent 1s eliminates two variables that appear in both true and complemented form. Encircled octet of adjacent 1s eliminates three variables that appear in both true and complemented form. Variables that are the same for all encircled squares must appear in the final expression.

15 Lecture Digital Systems Some Terminologies An implicant is a rectangle that encircles 1, 2, 4, 8, … cells of 1’s and may not include any cells of 0’s. A prime implicant is an implicant that is not fully contained in any one other implicant. An essential prime implicant is a prime implicant that includes at least one 1 that is not included in any other implicant. Implicants Prime implicants Prime implicants, but not essential

16 Simplification Using K-maps
Lecture Digital Systems Simplification Using K-maps A’ F(A,B) = Σm(0,1) F = A’ B’C BC’ F(A,B,C) = Σm(1,2,4,5,6,7) F = A + B’C + BC’ A

17 Exercise: Simplification Using K-maps
Lecture Digital Systems Exercise: Simplification Using K-maps A’C’ B AB F = B F = A’C’ + AB BC AB AC F = AB + AC + BC

18 Exercise: Simplification Using K-Maps
Lecture Digital Systems Exercise: Simplification Using K-Maps B’D’ BC’D A F = C +A’BD + B’D’ What is the minimized F? ? BC’D’ ABD’ AC’ F = AC’ + BC’D’ + ABD’

19 Exercise: Simplification Using K-Maps
Lecture Digital Systems Exercise: Simplification Using K-Maps Simplify the following function by using K-map: F(A,B,C,D) = Σm(0,2,3,5,6,7,8,10,11,14,15). F = C + B’D’ + A’BD A

20 Summary: Karnaugh Maps
Lecture Digital Systems Summary: Karnaugh Maps Karnaugh map is an alternate approach to represent Boolean expressions. Karnaugh map representation can be used to minimize Boolean expressions through some easy steps/rules. Nevertheless, not all functions can be reduced, and still have to be represented in their canonical minterms. Note: a canonical minterm is a minterm with all possible literal present. For example, in a 4-variable function, AB’ can be a minterm, but its canonical minterms are AB’CD, AB’CD’, AB’C’D, and AB’C’D’.

21 Lecture Digital Systems Don’t Care Conditions In some situations, we don’t care about the value of a function for certain combinations of the variables. These combinations may be impossible to occur in a certain contexts or the value of the function may not matter when they occur. In such situations mentioned above, we say the function is incompletely specified. There are multiple (completely specified) logic functions that can be used in the design. So, we can utilize the don’t cares to create the simplest possible circuit. When constructing the rectangles in the simplification procedure, we can choose either to cover or not to cover the don’t cares. Don’t cares can be treated as 1’s or 0’s, depending on which is more advantageous. It may be covered or not. It is denoted with X’s. credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

22 Covering 1’s without utilizing X Covering 1’s utilizing X
Lecture Digital Systems Don’t Care Conditions Here is an example of a Karnaugh map with don’t cares (X). Covering 1’s without utilizing X Covering 1’s utilizing X Instead of using 2-cell implicants, we can use 4-cell implicants, and the Boolean function can be better simplified. Instead of F = A’BD’ + BC’D we can use F = BC’ + A’B

23 Exercise: Don’t Care Conditions
Lecture Digital Systems Exercise: Don’t Care Conditions F(A,B,C,D) = πM(0,2,3,9) + d(4,5,7,8,14) F = B + AC + A’C’D F(A,B,C,D) = Σm(0,2,4,5,6,12,13,15) + d(1,7,8,11,14) F = B + A’D’

24 Exercise: Don’t Care Conditions
Lecture Digital Systems Exercise: Don’t Care Conditions 5-Variable Function YZ WX 00 01 11 10 X 1 V = 0 YZ WX 00 01 11 10 1 X V = 1 F = WY’ + VY + W’XY

25 Exercise: Don’t Care Conditions
Lecture Digital Systems Exercise: Don’t Care Conditions Simplify the following function by using K-map: F(A,B,C,D) = Σm(1,3,5,7,9) + d(6,12,13). F = A’D + B’C’D (without don’t cares) F = A’D + C’D (with don’t cares) A

26 Lecture Digital Systems Homework 5 (1/2) CD AB 00 01 11 10 1 Two K-maps are presented below, each for different function. Using SoP minimization, find the minimum realizations and calculate the cost of the circuit. See next slide. AB CD 00 01 11 10 1

27 Lecture Digital Systems Homework 5 (2/2) For the following K-maps, find the minimum realization using SoP minimization, by using and not using don’t cares (X). Calculate the costs. Which one is cheaper? YZ WX 00 01 11 10 1 X Please write your Class number after your Student ID. Deadline: 1 day before class. Monday, 9 October 2017 (Class 2). Tuesday, 10 October 2017 (Class 1).


Download ppt "Optimized Implementation of Logic Function"

Similar presentations


Ads by Google