Optimization Algorithm

Slides:



Advertisements
Similar presentations
Overview Part 1 – Gate Circuits and Boolean Equations
Advertisements

K-Map Simplification COE 202 Digital Logic Design Dr. Aiman El-Maleh
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 8 – Systematic Simplification.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering.
Chapter 3 Simplification of Switching Functions
Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization is a more formal approach to simplification that is.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 2 – Combinational.
Give qualifications of instructors: DAP
Computer Engineering (Logic Circuits) (Karnaugh Map)
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
KU College of Engineering Elec 204: Digital Systems Design
B-1 Appendix B - Reduction of Digital Logic Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 9 – Multilevel Optimization.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
1 Chapter 5 Karnaugh Maps Mei Yang ECG Logic Design 1.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Department of Computer Engineering
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Optimization Algorithm
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
Combinational Logic Part 2: Karnaugh maps (quick).
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Chapter3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
Chapter 3 The Karnaugh Map
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Conversion from one number base to another Binary arithmetic Equation simplification DeMorgan’s Laws Conversion to/from SOP/POS Reading equations from.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
THE K-MAP.
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral.
Karnaugh Maps (K maps).
Lecture 4: Four Input K-Maps CSE 140: Components and Design Techniques for Digital Systems CK Cheng Dept. of Computer Science and Engineering University.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
1 EENG 2710 Chapter 3 Simplification of Switching Functions.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Lecture 7 Multi-Level Gate Networks
CHAPTER 3 Simplification of Boolean Functions
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
Computer Organisation
Lecture 5 Topics Canonical or Standard Forms of Functions
Lecture #6 EGR 277 – Digital Logic
CS 352 Introduction to Logic Design
Optimized Implementation of Logic Function
CSE 140 : Components and Design Techniques for Digital Systems
ECE 331 – Digital System Design
Digital Logic and Design
Optimized Implementation of Logic Function
BASIC & COMBINATIONAL LOGIC CIRCUIT
ECE 331 – Digital System Design
Digital Logic & Design Dr. Waseem Ikram Lecture 12.
EECS 465: Digital Systems Lecture Notes # 2
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
CH7 Multilevel Gate Network
SYEN 3330 Digital Systems Chapter 2 – Part 5 SYEN 3330 Digital Systems.
Chapter 3 Gate-level Minimization.
Optimized Implementation of Logic Function
COE 202: Digital Logic Design Combinational Logic Part 3
Minimization of Switching Functions
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Laws & Rules of Boolean Algebra
ECE 331 – Digital System Design
Presentation transcript:

Optimization Algorithm Find all prime implicants. Include all essential prime implicants in the solution Select a minimum cost set of non-essential prime implicants to cover all minterms not yet covered: Obtaining a good simplified solution Minimize the overlap among prime implicants as much as possible. In particular, in the final solution, make sure that each prime implicant selected includes at least one minterm not included in any other prime implicant selected. Digital Systems Design

Selection Rule Example Simplify F(A, B, C, D) given on the K-map. Selected Essential 1 B D A C 1 B D A C Minterms covered by essential prime implicants Digital Systems Design

Four-Variable Map Simplification = S F(W, X, Y, Z) (0, 2,4,5,6,7, 8,10,13,15 ) m F = XZ + X'Z' Digital Systems Design

Four-Variable Map Simplification = S F(W, X, Y, Z) (3,4,5,7,9,1 3,14,15 ) m F = W' X Y' + W' Y Z + WXY + WY'Z Digital Systems Design

Prime-number detector (again) Digital Systems Design

Digital Systems Design When we solved algebraically, we missed one simplification -- the circuit below has three less gate inputs. Digital Systems Design

KU College of Engineering Elec 204: Digital Systems Design Another example KU College of Engineering Elec 204: Digital Systems Design

Digital Systems Design Yet another example Distinguished 1 cells Essential prime implicants Digital Systems Design

Product-of-Sums Simplification F(A,B,C,D) = F’ = CD+AB+BD’ F = (C’+D’)(A’+B’)(B’+D) Digital Systems Design

Five Variable or More K-Maps For five variable problems, we use two adjacent K-maps. It becomes harder to visualize adjacent minterms for selecting PIs. You can extend the problem to six variables by using four K-Maps. X Y Z W V = 0 X Z W V = 1 Y Digital Systems Design

Digital Systems Design 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. Example 1: A logic function having the binary codes for the BCD digits as its inputs. 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.” Digital Systems Design

Selection Rule Example with Don't Cares Simplify F(A, B, C, D) given on the K-map. Selected Essential 1 x B D A C 1 x B D A C Minterms covered by essential prime implicants Digital Systems Design

Digital Systems Design Don’t Care Conditions F(A,B,C,D) = d(A,B,C,D) = Digital Systems Design

Digital Systems Design Examples: F(A,B,C,D) = m(4,5,8,12,13); d=m(3,7,10,11,14,15); F(A,B,C,D) = m(0,2,5,8,10,13); d=m(7,15); Digital Systems Design

Multiple-Level Optimization Multiple-level circuits - circuits that are not two-level (with or without input and/or output inverters) Multiple-level circuits can have reduced gate input cost compared to two-level (SOP and POS) circuits Multiple-level optimization is performed by applying transformations to circuits represented by equations while evaluating cost Digital Systems Design

Digital Systems Design Transformations Factoring - finding a factored form from SOP or POS expression Algebraic – Without using of axioms specific to Boolean algebra such as complements or idempotence Boolean - Uses axioms unique to Boolean algebra Decomposition - expression of a function as a set of new functions Digital Systems Design

Transformations (continued) Substitution of G into F - expression function F as a function of G and some or all of its original variables Elimination - Inverse of substitution Extraction - decomposition applied to multiple functions simultaneously Digital Systems Design

Transformation Examples Algebraic Factoring F = A’C’D’ + A’BC’ + ABC + ACD’ G = 16 Factoring: F = A’(C’D’ + BC’) + A (BC + CD’) G = 16 Factoring again: F = A’C’( B +D’) + AC (B +D’) G = 12 F = (A’C’+ AC) (B +D’) G = 10 Digital Systems Design

Transformation Examples Decomposition The terms B +D’ and A’C’+ AC can be defined as new functions E and H respectively, decomposing F: F = E H, E = B +D’ , and H = A’C’+ AC G = 10 This series of transformations has reduced G from 16 to 10, a substantial savings. The resulting circuit has three levels plus input inverters. Digital Systems Design

Transformation Examples Substitution of E into F Returning to F just before the final factoring step: F = A’C’( B +D’) + AC (B +D’) G = 12 Defining E = B + D’, and substituting in F: F = A’C’E + ACE G = 10 This substitution has resulted in the same cost as the decomposition Digital Systems Design

Transformation Examples Elimination Beginning with a new set of functions: X = B + C Y = A + B Z = A’X + C Y G = 10 Eliminating X and Y from Z: Z = A’(B + C) + C (A + B) G = 10 “Flattening” (Converting to SOP expression): Z = A’B + A’C + AC + BC G = 12 This has increased the cost, but has provided an new SOP expression for two-level optimization. Digital Systems Design

Transformation Examples Two-level Optimization The result of 2-level optimization is: Z = A’B + C G = 4 This example illustrates that: Optimization can begin with any set of equations, not just with minterms or a truth table Increasing gate input count G temporarily during a series of transformations can result in a final solution with a smaller G Digital Systems Design

Transformation Examples Extraction Beginning with two functions: E = A’B’D’+ A’BD H = B’CD’ + BCD G = 16 Finding a common factor and defining it as a function: F = B’D’+ BD We perform extraction by expressing E and H as the three functions: F = B’D’+ BD, E = A’F, H = CF G = 10 The reduced cost G results from the sharing of logic between the two output functions Digital Systems Design

Digital Systems Design Example: Multiple Output Minimization: F(A,B,C) = m(3,6,7) and G(A,B,C) = m(0,1,3) Implement F and G using minimum number of gates. Digital Systems Design