290 likes | 547 Views
Chapter 4. Optimized Implementation of Logic Functions. Chapter Objectives. Synthesis of logic functions Analysis of logic circuits Techniques for deriving minimum-cost implementations of logic functions Graphical representation of logic functions in the form of Karnaugh maps
E N D
Chapter 4 Optimized Implementation of Logic Functions
Chapter Objectives • Synthesis of logic functions • Analysis of logic circuits • Techniques for deriving minimum-cost implementations of logic functions • Graphical representation of logic functions in the form of Karnaugh maps • Cubical representation of logic functions • Use of CAD tools and VHDL to implement logic functions
Karnaugh Map Simplification • Truth table representation of a function is unique. • Algebraic representation of a function is not unique. • Sometimes it is difficult to simplify an algebraic function. • A Karnaugh map is a pictorial arrangement of the truth table which allows an easy interpretation for choosing the minimum number of terms needed to express the function algebraically.
Karnaugh Map Simplification • Each combination of variables in a truth table is called a minterm. • A truth table of n variables has 2n minterms. • A Boolean function is equal to 1 for some minterms and 0 for others. • Another representation of the function is to list the decimal equivalent of those minterms that produce a 1 for the function.
x x 2 1 Location of Two-Variable Minterms x x 1 2 0 1 m 0 0 0 m m m 0 1 0 1 0 2 m 1 0 2 m m 1 1 3 m 1 1 3 (a) Truth table (b) Karnaugh map
1 The Function f(x1, x2) = x2 + x1’
Examples of Three-Variable Karnaugh Maps x x 1 2 x 3 00 01 11 10 0 0 0 1 1 f x x x x = + 3 2 1 3 1 1 0 0 1 (a) The function of Figure 2.18 x x 1 2 x 3 00 01 11 10 0 1 1 1 1 f x x x = + 3 2 1 1 0 0 0 1 (b) The function of Figure 4.1
A Literal is a Boolean variable appearing in either complemented or uncomplemented form. Minterm is a product term of all the literals in a function. Example: AB’CD, ABCD, ABC’D’ Maxterm is a sum term of all the literals in a function. Example: A’+B+C’+D’, A’+B’+C’+D’, A’+B’+C+D Karnaugh Map Simplification Definitions
Implicant is any product term of the variables. Example: AB’C, ABCD, and B’C are all implicants of a function of (A, B, C, D). Prime-Implicant (PI): The minimal implicant (maximal group size). Example: If an implicant ABC can be further simplified by adding more 1-cells (maximizing the group size) to get the implicant AB, then AB is the PI. ABC in this case is redundant because ABC is covered by AB. Karnaugh Map Simplification Definitions
Essential ‘1’ Cells are those ‘1’ cells which are covered by only one Prime Implicant. Essential Prime Implicants are the Prime Implicants corresponding to essential 1-cells. Karnaugh Map Simplification Definitions
Inspect the map and identify all Prime Implicants. Identify all essential 1-cells. Pick all esential Prime Implicants (PIs covering all essential 1-cells). Pick a minimum number of additional Pis to cover the remaining 1-cells (entire function) and form the Boolean function. Repeat for at least 25 K-maps to become a master. Karnaugh Map Minimization Procedure
A Three-Variable Function f(x1, x2, x3) • What are the minterms of this function?
A Three-Variable Function • Cover: A valid collection of implicants covering the function. • Cover 1 would be using all minterms. • Cover 2 would be using all 1-cells only in pairs. • Cover 3 (Best) would be using maximized groups together with all remaining essential groups. • Cost: Number of gates plus the total number of inputs to all gates.
Another Four-Variable Function f(x1, x2, x3, x4) x x 1 2 x x 3 4 00 01 11 10 x x x 00 1 1 1 3 4 x x x 01 1 1 3 2 4 x x x 11 1 1 1 3 4 10 1 1 x x x 2 4 3 x x x x x x 1 2 4 1 2 4 x x x x x x 1 3 2 2 1 3
Product of Sums Minimization • f(x1, x2, x3) = ΠM(4, 5, 6) • Applying DeMorgan’s Theorem • f‘ = x1x3’ + x1x2’ • f = (f’)’ = (x1’ + x3)(x1’ + x2)
Another Product of Sums Minimization • What are the Maxterms? x x 1 2 x x 3 4 00 01 11 10 ( ) x + x 00 0 0 0 0 3 4 01 0 1 1 0 ( ) x + x 2 3 11 1 1 0 1 10 1 1 1 1 ( ) x + x + x + x 1 2 3 4
Incompletely Specified Functions • These functions use Don’t Cares. • For example: In two interlocked switches, ’11’ may not occur at all, both switches cannot be ‘on’ at the same time. • Minterms that may produce either 0 or 1 for the function are don’t care conidtions. • Mark don’t cares with an x or d in the K-map. • When combining squares to simplify the expression, don’t cares can be taken to be either 1 or 0 – whichever gives the simplest expression.
x x 1 2 x x 3 4 00 01 11 10 00 0 1 d 0 x x x x 3 2 1 2 01 0 1 d 0 x x 3 4 00 01 11 10 ( ) x + x 11 0 0 d 0 2 3 00 0 1 d 0 x x 10 1 1 d 1 4 3 01 0 1 d 0 ( ) x + x 11 0 0 d 0 (a) SOP implementation 3 4 10 1 1 d 1 (b) POS implementation Two Implementations of a Function
x x 1 2 x x 3 4 00 01 11 10 00 1 1 x 2 01 1 1 1 x 3 11 1 1 x 4 f 1 10 1 1 x 1 x 3 (a) Function f 1 x 1 x x 1 2 x x x 3 3 4 00 01 11 10 f 2 x 2 00 1 1 x 3 01 1 1 x 4 11 1 1 1 f f (c) Combined circuit for and 1 2 10 1 1 (b) Function f 2 Optimal Multiple-Output Synthesis
Optimal Multiple-Output Synthesis x x x x 1 2 1 2 x x x x 3 4 3 4 00 01 11 10 00 01 11 10 00 00 01 1 1 1 01 1 1 1 11 1 1 1 11 1 1 1 10 1 10 1 (a) Optimal realization of (b) Optimal realization of f f 3 4 x x x x 1 2 1 2 x x x x 3 4 3 4 00 01 11 10 00 01 11 10 00 00 01 1 1 1 01 1 1 1 11 1 1 1 11 1 1 1 10 1 10 1 (c) Optimal realization of f and f together 3 4
Optimal Multiple-Output Synthesis x 1 x 4 x f 1 3 x 2 x 4 x 1 x 2 x 3 x f 4 4 x 2 x 4 f f (d) Combined circuit for and 3 4