Вы находитесь на странице: 1из 17

Digital Circuits and Logic Design

Lecture4-3:Optimized Implementation of
Logic Functions (Cont. & end)

112341 Digital Circuits and Logic Design 2010 (KTS)

Notes: Row and Column dominance


Row Pi dominates Pj if Pi has all the 1- entries in Pj and Pi costs (e.g., number of literals) no costs more than Pj.
Prime implicant p
1

Minterm 10 11 13

15

p2 p3 p4 Remove

Suppose all row have the same cost, then row P2 dominates P1, P3, and P4.
Row dominance

112341 Digital Circuits and Logic Design 2010 (KTS)

Notes: Row and Column dominance


Column mi dominates column mj if mi has all the 1-entries in mj. Column mi is dominating and column mj is dominated . Prime implicant p 1 p 2 p 3 p 4 Minterm 2 6 7 8 Dominating column can be removed because that whenever one of their dominated column is covered, they are covered as well.

Dominating column m6 is removed

Column dominance Column m6 dominates column m2 and m8


112341 Digital Circuits and Logic Design 2010 (KTS)

Cyclic Prime Implicant


When reduce prime implicant 1.No Essential PI 2.No Column Dominance 3.No Row Dominance and the PI chart :
Prime implicant p p p p p p 0 1 Minterm 2 5 6 7

1 2 3 4 5 6

We call cyclic prime implicant. How to solve it?

112341 Digital Circuits and Logic Design 2010 (KTS)

Cyclic Prime Implicant


1. Branching We can choose any prime implicant (PI) and first choose this PI in the final cover, then we can determine the rest of the final cover in the usual way and compute its cost . Next try the other PI and work in the same way. We compare the cost and choose the less expensive alternative. ( Trial and Error process) 2. Petrick's method - is a technique for determining all minimum sum-of-products solutions from a prime implicant chart. Petrick's method is very tedious for large charts, but it is easy to implement on a computer.
112341 Digital Circuits and Logic Design 2010 (KTS)

Cyclic Prime Implicant


P1-00x P2-0x0 P3-x01 P4-x10 P5-1x1 P6-11x Prime implicant p 1 p 2 p 3 p 4 p 5 p 6
112341 Digital Circuits and Logic Design 2010 (KTS)

Minterm 2 5 6

1.Choose P1, P4 ,and P5 for cover all

Cyclic Prime Implicant


Prime implicant 0 1 Minterm 2 5 6 7

2.Choose P2, P3 ,and P6 for cover all

p 1 p 2 p 3 p 4 p 5 p 6
112341 Digital Circuits and Logic Design 2010 (KTS)

Cyclic Prime Implicant


Prime implicant 0 1 Minterm 2 5 6 7

3.Choose P1, P2,P5 ,and P6 for cover all

p 1 p 2 p 3 p 4 p 5 p 6
112341 Digital Circuits and Logic Design 2010 (KTS)

Cyclic Prime Implicant


C1={P1,P4,P5} => f(a, b, c)= ab+bc+ac =>cost=13 C2={P2,P3,P6} => f(a, b, c)= ac+bc+ab =>cost=13 C3= {P1,P2,P5,P6} => f(a, b, c,)= ab+ac+ac+ab =>cost=17
Note: Cost not include NOT gate P1-00x P2-0x0 P3-x01 P4-x10 P5-1x1 P6-11x

So choose C1 or C2

112341 Digital Circuits and Logic Design 2010 (KTS)

Petrick's method
Prime implicant p p p p p p 1 2 3 4 5 6 0 1 Minterm 2 5 6 7

All minterm cover:

P1 and P2 Cover minterm m0 so: (P1+P2) cover m0 (P1+P3) cover m1 (P2+P4) cover m2 (P3+P5) cover m5 (P4+P6) cover m6 (P5+P6) cover m7

(P1+P2) (P1+P3) (P2+P4) (P3+P5) (P4+P6)(P5+P6)


112341 Digital Circuits and Logic Design 2010 (KTS)

Petrick's method
Use the distributive law to turn that expression into a sum of products. [ also use expression :X + XY = X and XX = X and X+X=X ]

=(P1+P2) (P1+P3) (P2+P4) (P3+P5) (P4+P6)(P5+P6) =(P1+P2P3)(P4+ P2P6)(P5+P3P6) =(P1P4+P1P2P6+P2P3P4+P2P3P6)(P5+P3P6) =P1P4P5+P1P4P3P6+P1P2P6P5+P1P2P3P6+ P2P3P4P5+P2P3P6P4+P2P3P6P5+P2P3P6 =P1P4P5+P1P4P3P6+P1P2P5P6+P2P3P4P5+P2P3P6
112341 Digital Circuits and Logic Design 2010 (KTS)

Petrick's method
Choose term or terms with fewest total literals. In our example, the two products both expand to 6 literals total each:

P1P4P5 =>C1 ={P1,P4,P5} f(a,b,c) = ab+bc+ac P2P3P6 =>C2 ={P2,P3,P6} f(a, b, c)= ac+bc+ab
So the answer from Petricks method same as Branching Method
112341 Digital Circuits and Logic Design 2010 (KTS)

Using Quine-McCluskey and Petrick's Method: Find all minimum sum-of-products solutions for

f (x1,.., x4) = m(2, 5, 6, 11,12, 14, 15) + D(0,3,4)

112341 Digital Circuits and Logic Design 2010 (KTS)

H/W :How to solve problem multiple output by QM method

112341 Digital Circuits and Logic Design 2010 (KTS)

QM-Conclusion
There are 4 main steps in the Quine-McCluskey algorithm: 1.Generate Prime Implicants 2.Construct Prime Implicant Table 3.Reduce Prime Implicant Table Remove Essential Prime Implicants Column Dominance Row Dominance 4.Solve Prime Implicant Table Branching or Petricks method

112341 Digital Circuits and Logic Design 2010 (KTS)

LIBRARY ieee ; USE ieee.stdlogic_1164.all; ENTITY func1 IS PORT(xl,x2, x3 : IN STD_LOGIC ; f : OUT STD_LOGIC ); END func1 ;

(0,1,z,-) for Boolean operator

ARCHITECTURE LogicFunc OF func1 IS BEGIN f <= (NOT x1 AND NOT x2 AND NOT x3) OR (NOT x1 AND x2 AND NOT x3) OR (x1 AND NOT x2 AND NOT x3) OR (x1 AND NOT x2 AND x3) OR (x1 AND x2 AND NOT x3); END LogicFunc ;

Circuits Synthesized from VHDL Code


112341 Digital Circuits and Logic Design 2010 (KTS)

H/W: 1.Exercise 4.46,4.49 Chap.4, p.245-246 2.Simulate 7-Segments (Last H/W) by Proteus Program

112341 Digital Circuits and Logic Design 2010 (KTS)

Вам также может понравиться