Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.

Similar presentations


Presentation on theme: "1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub."— Presentation transcript:

1 1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub

2 2 Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization requires a cost criterion to measure the simplicity of a circuit Distinct cost criteria we will use: –Minimum number of gates –Minimum number of inputs per gate Optimization is a more formal approach to simplification that is performed using a specific procedure or algorithm Because: less gates => cheaper, less power, lower delay

3 3 Gate Delay In actual physical gates, if one or more input changes causes the output to change, the output change does not occur instantaneously. The delay between an input change(s) and the resulting output change is the gate delay denoted by t G : tGtG tGtG Input Output Time (ns) 0 0 1 1 0 0.5 1 1.5 t G = 0.3 ns

4 4Terminology Fan-In: refers to the number of inputs a gate has. The higher number of inputs the more transistors needed to design the gate. As Fan-In increase => bigger gates => more area, higher power consumption, longer delay. Fan-Out: refers to the number of gate that can be driven by a gate (number of gates connect to an output), same cost criteria as Fan-In A gate can drive limited number of inputs, due to limited driving power (supply current) by gate. Increase Fan-Out => Larger/more transistors are needed => larger area, power, and lower speed.

5 5 Karnaugh Maps (K-map) A K-map is a collection of squares – Each square represents a minterm – The collection of squares is a graphical representation of a Boolean function – Adjacent squares differ in the value of one variable – Alternative algebraic expressions for the same function are derived by recognizing patterns of squares The K-map can be viewed as –A reorganized version of the truth table –A topologically-warped Venn diagram as used to visualize sets in algebra of sets

6 6 Two Variable Maps A 2-variable Karnaugh Map: – Note that minterm m0 and minterm m1 are “adjacent” and differ in the value of the variable y – Similarly, minterm m0 and minterm m2 differ in the x variable. – Also, m1 and m3 differ in the x variable as well. – Finally, m2 and m3 differ in the value of the variable y y = 0 y = 1 x = 0 m 0 = m 1 = x = 1 m 2 = m 3 = y’x’ y y’ x yx

7 7 K-Map and Truth Tables The K-Map is just a different form of the truth table. Example – Two variable function: – We choose a,b,c and d from the set {0,1} to implement a particular function, F(x,y). K-Map y = 0 y = 1 x = 0 a b x = 1 c d

8 8 K-Map Function Representation Example: F(x,y) = x For function F(x,y), the two adjacent cells containing 1’s can be combined using the Minimization Theorem: F(x,y) = x.y’ + x.y = x F = x y = 0 y = 1 x = 0 0 0 x = 1 1 1

9 9 Duplicate and Combine Example: G(x,y) = x + y For G(x,y), two pairs of adjacent cells containing 1’s can be combined using the Minimization Theorem: G(x,y) = (x.y’+x.y)+(x.y+x’.y) = x + y G = x+y y = 0 y = 1 x = 0 0 1 x = 1 1 1 Duplicate x y

10 10 Three Variable Maps A three-variable K-map: Where each minterm corresponds to the product terms: Note that if the binary value for an index differs in one bit position, the minterms are adjacent on the K-Map yz=00 yz=01 yz=11 yz=10 x=0 m0m0 m1m1 m3m3 m2m2 x=1 m4m4 m5m5 m7m7 m6m6 yz=00 yz=01 yz=11 yz=10 x=0 x=1 x’y’z’ x’ y’ z zx’ yx’ y z’ x y’ z’ x y’ z zyx y z’x

11 11 Alternative Map Labeling Map use largely involves: –Entering values into the map, and –Reading off product terms from the map. Alternate labeling are useful: y z x 1 0 2 4 3 5 6 7 x y z z y y z z 1 0 2 4 3 5 6 7 x 0 1 00011110 x

12 12 Example Functions By convention, we represent the minterms of F by a "1" in the map and leave the minterms of F’ blank Example: Learn the locations of the 8 indices based on the variable order shown (x, most significant and z, least significant) on the map boundaries y x 1 0 2 4 3 5 6 7 1 z x y 1 0 2 4 3 5 6 7 z 1 1 1 1 1 1 1

13 13 Four Variable Maps Example: 1 1 1

14 14 Four Variable Maps Example: 1 1 1 1

15 15 Four Variable Maps Example: 1 1 1 1

16 16 Four Variable Maps Example: 1 1 1 1 1 1 1

17 17 Four Variable Maps Example: 1 1 1 1 1 1 1 1 1

18 18 Four Variable Maps Example: 1 1 1 1 1 1 1 1 1

19 19 Four Variable Maps Example: 1 11 1 1 1 1 1 1 1

20 20 Four Variable Maps Example: 1 1 1 1 1 1 1 1 1 11 1

21 21 Four Variable Maps Example: 1 1 1 1 1 1 1 1

22 22Summary 2 i 1-cells should be grouped => product term Case: 3 variable K-Map 2 0 = 1 : 1-cell3 variable product term 2 1 = 2 : 1-cells2 variable product term 2 2 = 4 : 1-cells1 variable product term 2 3 = 8 : 1-cellsφ variable product term (F=1) Case: 4 variable K-Map 2 0 = 1 : 1-cell4 variable product term 2 1 = 2 : 1-cells3 variable product term 2 2 = 4 : 1-cells2 variable product term 2 3 = 8 : 1-cells1 variable product term 2 4 =16: 1-cellsφ variable product term (F=1)

23 23 Prime Implicant Theorem A Prime Implicant is a product term obtained by combining the maximum possible number of adjacent squares in the map into a rectangle with the number of squares a power of 2. A prime implicant is called an Essential Prime Implicant if it is the only prime implicant that covers one or more minterms. Prime Implicants and Essential Prime Implicants can be determined by inspection of a K-Map. A set of prime implicants "covers all minterms" if, for each minterm of the function, at least one prime implicant in the set of prime implicants includes the minterm.

24 24 Prime Implicant Example Example: 1 1 1 1 1 1 1 1 1

25 25 Prime Implicant Example Example: 1 1 1 1 1 1

26 26Examples

27 27Examples

28 28Examples

29 29Examples

30 30Examples

31 31Examples

32 32 Don’t Cares in K-Maps Sometimes a function table or map contains entries for which it is known: –the input values for the minterm will never occur, or –The output value for the minterm is not used In these cases, the output value need not be defined Instead, the output value is defined as a “don't care” By placing “don't cares” ( an “x” entry) in the function table or map, the cost of the logic circuit may be lowered.

33 33 Don’t Cares, Example A logic function having the binary codes for the BCD digits as its inputs. This function produces 1 for even BCD digit and 0 for odd BCD digit. Only the codes for 0 through 9 are used. The six codes, 1010 through 1111 never occur, so the output values for these codes are “x” to represent “don’t cares.”

34 34 Don’t Cares, Example A B C D F 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 F = A’D’+B’C’D’

35 35 Don’t Cares, Example A B C D F 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 x x x x x x 1 1 1 1 1 x x x x x x F = D’

36 36Example Example: design a NAND-NAND logic 1 1 1 1 1 1 1 1 1 x x x x

37 37Examples

38 38Example Example: design a NOR-NOR logic 0 x x 0 0 0 0 x x x 0

39 39 Minimization Using Tabular Method Tabular Method is useful when functions have large number of variables, e.g. 6 or 5 variables. Can be programmed easily (write a C program to implement TM?) The method reduces a SOP to a set of prime implicants from which variables are eliminated as much as possible. Redundant PI are removed. Like K-Maps uses A+A’=1 A variable is denoted as (1), A’ variable is denoted (0), eliminated variable is denoted (-).

40 40 Tabular Method Example Example: Then the variables can be written as: A’B’C’D’+A’B’CD’ = A’B’(C+C’)D’ = A’B’D’ which is equivalent to: 0000 0010 00–0 which is A’B’D’

41 41 Tabular Method Example Example: Then the variables can be written as: 0000, 0010,0100,0110,1000 Sort those with one flip: 0000 and 0010,0100,1000 => 00–0, 0–00, –000 0010 and 0110 => 0–10 0100 and 0110 => 01–0 0110 and 0100,0010 => 01–0, 0–10 1000 and 0000 => –000

42 42 Tabular Method Example Sort the result again 00–0, 0–00, –000, 0–10, 01–0, then: –000 00–0, and 01–0, => 0––0 0–00, and 0–10, => 0––0 The result is: –000, and 0––0 or B’C’D’ and A’D’

43 43Examples Solve using Tabular Method:


Download ppt "1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub."

Similar presentations


Ads by Google