Lecture 4 Table of Content 1. Combinational circuit design 2. Elementary combinatorial circuits for data transmission 3. Memory structures 4. Programmable logic devices 5. Algorithmic minimization approaches 5.1.2 Petricks Method 5.2 State machine minimization 6. Sequential circuit design 7. Testing digital circuits Slid 1
5. Algorithmic minimization approaches Canonical forms Literals: A literal is either a variable or the complement of a variable. Minterm: A minterm is a logical product (conjunction) of exactly n literals with no repeated variables. Maxterm: A Maxterm is a logical sum (disjunction) of exactly n literals with no repeated variables. SOP: The sum-of-products is a regular form consisting of a sum of m terms, where every term is a product POS: The product-of-sums is a regular form consisting of a product of m terms, where every term is a sum Slid 5. Algorithmic minimization approaches Canonical forms DNF: The Disjunctive Normal Form is a sum of products (SOP) consisting only of Minterms. CNF: The Conjunctive Normal Form is the product of sums (POS) only containing Maxterms. Slide 4 2
5. Algorithmic minimization approaches Graphical Minimization with KV-Maps In a KV-Map: 1 field represents 1 minterm (n Variables) 2 fields lying next to each other represent n-1 variables 3 fields lying next to each other represent n-2 variables. n fields represent th-function (e.g. ) Slide 5 Successive procedure: (algorithmic description) 1.1 Determination of the DNF and a list of minterms 1.2 As far as possible: pairwise combination of (min)terms and set up of a list of products 1.3 Repetition of 1.2 with an updated list after every repetition until: 14no 1.4 further minimization is possible any more. Result on termination: prime implicants of the function f Slide 6 3
Definition: A product term p of a logic function f is called a prime implicant of f if it cannot be combined with any product term of f that differs from p. => The first task: find pairs of minterms that differ in only one variable, starting from the DNF. Slide 7 Successive procedure: (algorithmic description) 1.1 Determination of the DNF and a list of minterms Starting Point (DNF): Minterms Don t cares Slide 8 4
Successive procedure: (algorithmic description) 1.1 Determination of the DNF and a list of minterms Starting Point (DNF): f1( A, B, C, D) = ABCD+ ABCD+ ABCD+ ABCD+ ABCD+ ABCD m = ABCD m m m 1 2 3 4 5 6 = ABCD m = ABCD = ABCD m = ABCD = ABCD Weight = 1 Weight = 1 Weight = 3 Weight = 2 Weight = 3 Weight = 3 Slide 9 Successive procedure: (algorithmic description) 1.1 Determination of the DNF and a list of minterms Starting Point (DNF): f1( A, B, C, D) = ABCD+ ABCD+ ABCD+ ABCD+ ABCD+ ABCD m1 = ABCD Weight = 1 Weight Nr A B C D Minterm 1 1 0 0 0 I m1 m2 = ABCD Weight = 1 2 0 0 I 0 m2 m3 = ABCD Weight = 3 2 3 0 I I 0 m4 m4 = ABCD Weight = 2 4 0 I I I m3 3 5 I I 0 I m5 m5 = ABCD Weight = 3 6 I I I 0 m6 m = ABCD Weight = 3 6 Slid0 5
Successive procedure: (algorithmic description) 1.1 Determination of the DNF and a list of minterms 1.2 As far as possible: pairwise combination of (min)terms and set up of a list of product terms Weight Nr A B C D Minterm 1 1 0 0 0 I m1 2 0 0 I 0 m2 2 3 0 I I 0 m4 4 0 I I I m3 3 5 I I 0 I m5 6 I I I 0 m6 origin A B C D m1 0 0 0 I m2,m4 0 - I 0 m3,m4 0 I I - m5 I I 0 I m4,m6 - I I 0 Slid1 Successive procedure: (algorithmic description) 1.1 Determination of the DNF and a list of minterms 1.2 As far as possible: pairwise combination of (min)terms and set up of a list of products 1.3 Repetition of 1.2 with an updated list after every repetition until: 1.4 no further minimization is possible any more. Result on termination: prime implicants of the function f Slid2 6
repetition until: 1.4 no further minimization is possible any more. Result on termination: prime implicants of the function f origin A B C D Prime implicants m1 0 0 0 I p1 m2,m4 0 - I 0 p2 m3,m4 0 I I - p3 m5 I I 0 I p4 m4,m6 - I I 0 p5 f1 = p1 + p2 + p3 + p4 + p5 = ABCD + ACD + ABC+ ABCD+ BCD Slid3 2 nd Step: Determine the minimum number of prime implicants (minimum cover) 2.1 Construction of a prime-implicant chart 2.2 Determination of essential prime implicants 2.3 Reduction of prime implicant chart a.) Cancellation of all columns with x in essential row. b.) Cancellation of arisen empty rows Algorithm can terminate here! 2.4 Search for identical rows 2.5 Search for dominant rows 2.6 Search for dominant columns Slid4 7
2 nd Step: Determine the minimum number of prime implicants (minimum cover) 2.1 Construction of a prime-implicant chart Starting Point: origin A B C D Prime implicants m1 0 0 0 I p1 m2,m4 0 - I 0 p2 m3,m4 0 I I - p3 m5 I I 0 I p4 m4,m6 - I I 0 p5 Minterm m 1 m 2 m 3 m 4 m 5 m 6 p1 x Prime- p2 x x implicants p3 x x p4 x p5 x x Slid5 2 nd Step: Determine the minimum number of prime implicants (minimum cover) 2.1 Construction of a prime-implicant chart 2.2 Determination of essential prime implicants m1 m2 m3 m4 m5 m6 p1 x x p2 x x p3 x x p4 x x p5 x x x x p6 x Slid6 8
2 nd Step: Determine the minimum number of prime implicants (minimum cover) 2.1 Construction of a prime-implicant chart 2.2 Determination of essential prime implicants 2.3 Reduction of prime implicant chart a.) Cancellation of all columns with x in essential row. b.) Cancellation of arisen empty rows Algorithm can terminate here! m1 m5 m6 p1 x p4 x x p5 x x x p6 x Slid7 2 nd Step: Determine the minimum number of prime implicants (minimum cover) 2.1 Construction of a prime-implicant chart 2.2 Determination of essential prime implicants 2.3 Reduction of prime implicant chart a.) Cancellation of all columns with x in essential row. b.) Cancellation of arisen empty rows Algorithm can terminate here! 2.4 Search for identical rows 2.5 Search for dominant rows 2.6 Search for dominant columns Slid8 9
2.4 Search for identical rows 2.5 Search for dominant rows 2.6 Search for dominant columns m1 m5 m6 p1 x p4 x x p5 x x x p6 x Slid9 Solution: pi: Disjunction of all essential primeterms and one or more choice (from 2.4-2.6) Slid0 10
5.1.2 Petrick s method For every prime implicant p i Petrick defines a Boolean variable e i, for which holds: e i := I if p i covers a minterm m j 0 if p i doesn t cover a minterm m j Example: Given is the following result of the Quine/McCluskey Algorithm PE m1 = PE m2 = + PE m3 = + Slid1 5.1.2 Petrick s method PE = ( ) ( + ) ( + ) =( ) ( + ) = + = + + + + + + + = (1) (2) (1) (3) (3) (2) (4) (4) = + + + PE = p 1 p 2 +p 1 p 3 +p 2 p 3 +p 1 p 2 p 3 f 1 = p 1 + p 2 f 1 = p 1 + p 3 Now we know, 4 different solutions do exist f 1 = p 2 + p 3 f 1 = p 1 + p 2 + p 3 Slid2 11
5.1.2 Petrick s method! PE = (p5 + p6) (p2 + p6) (p5 + p7) p4 (p1+ p2) (p3+ p7) (p1+ p3) = I! PE = p1p4p6p7 + p2p3p4p5+ p1p3p4p5p6 + p2p3p4p5p7 + p1p2p4p5p7= I 5 Solutions do exist Slid3 5.1.2 Petrick s method! PE = p1p4p6p7 + p2p3p4p5 + p1p3p4p5p6 + p2p3p4p5p7 + p1p2p4p5p7= I L 1 : p 1 + p4 + p6 + p7 K L1 =Σc k =11 K G1 =4 L 2 : p 2 + p3 + p4 + p5 K L2 =11 K G2 =4 L 3 : p 1 + p3 + p4 + p5 + p6 K L3 =14 K G3 =5 L 4 : p 2 + p3 + p4 + p5 + p7 K L4 =14 K G4 =5 L 5 : p 1 + p2 + p4 + p5 + p7 K L5 =13 K G5 =5 Slid4 12