FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)

Slides:



Advertisements
Similar presentations
Techniques for Combinational Logic Optimization
Advertisements

Digital Logic Design Gate-Level Minimization
Three Special Functions
Quine-McCluskey Method
Glitches & Hazards.
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
K-Map Simplification COE 202 Digital Logic Design Dr. Aiman El-Maleh
ECE C03 Lecture 31 Lecture 3 Two-Level Logic Minimization Algorithms Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ELEC Digital Logic Circuits Fall 2008 Logic Minimization (Chapter 3) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.
Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table.
ECE 331 – Digital System Design
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
Chapter 3 Simplification of Switching Functions
Gate Logic: Two Level Canonical Forms

ECE Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Exact Two-level Minimization Quine-McCluskey Procedure.
ECE 667 Synthesis and Verification of Digital Systems
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization I.
Two Level Logic Optimization. Two-Level Logic Minimization PLA Implementation Ex: F 0 = A + B’C’ F 1 = AC’ + AB F 2 = B’C’ + AB product term AB, AC’,
2-Level Minimization Classic Problem in Switching Theory
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Synthesis of Two-Level Circuits
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique.
The covering procedure. Remove rows with essential PI’s and any columns with x’s in those rows.
Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI.
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
Karnaugh map covering Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA)
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
Two Level Networks. Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the.
Copyright © 2004 by Miguel A. Marin Revised McGILL UNIVERSITY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING COURSE ECSE DIGITAL SYSTEMS.
Simplification of incompletely specified functions using QM Tech.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table.
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Lecture # 5 University of Tehran
Boolean Functions 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Boolean Functions Basics Maciej Ciesielski Univ.
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.
©2010 Cengage Learning SLIDES FOR CHAPTER 6 QUINE-McCLUSKEY METHOD Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
Technical Seminar II Implementation of
CHAPTER 6 Quine-McCluskey Method
Lecture 6 Quine-McCluskey Method
Computer Organisation
Lecture #6 EGR 277 – Digital Logic
QUINE-McCLUSKEY METHOD
CS 352 Introduction to Logic Design
ECE 2110: Introduction to Digital Systems
Karnaugh Maps.
Digital Logic and Design
Synthesis of Two Level Circuits
Optimized Implementation of Logic Function
ECE 331 – Digital System Design
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
Optimization Algorithm
Karnaugh Maps Introduction Venn Diagrams 2-variable K-maps
Function Minimization Algorithms
ECB2212-Digital Electronics
Minimization of Switching Functions
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
CHAPTER 6 QUINE-McCLUSKEY METHOD
Laws & Rules of Boolean Algebra
ECE 331 – Digital System Design
Presentation transcript:

FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary) Operators EXAMPLES 1-Level 2-Level multi-level

k-Level functions 2 2 n Possible Switching Functions of n Variables (actually much fewer types obtained by permuting and/or complementing input variables) 1-Level Forms –Cannot Represent all Possible Functions 2-Level Forms –Can Represent all Possible Functions –With Additional Restrictions – CANONICAL k -Level Forms ( k  2 ) –Many Different Ways to Represent a Given Functions If a multi-input Gate Represents a (binary or greater) Boolean Operator –Expression can Represent a Netlist –k Indicates “depth” of Netlist EXAMPLES 1-Level 2-Level Multi-Level a c b c a c b c b a b e d a f b f f

k-Level function properties 1-Level Forms –Due to Restriction of Representable Functions, Not as Useful 2-Level Forms –Can be Canonical –Longest PI to PO Path is Always 2 Related to Delay –Minimization Usually Means 1.Minimum Number of “Terms” 2.Minimum Number of “Literals” in Expression k -Level Forms ( k  2 ) –Many More Possible Representations –Can be Optimized for Area –Delay is More Complicated False Path Problem Spatio-temporal Correlations Typically an Area versus Delay Tradeoff (e.g., Ripple versus CL Adder)

Common Terms for 2-Level Minimization Literal – A variable in complemented or uncomplemented form Product – The disjunction (AND) of a set of literals; also represents a cube Support Set – Set of all variables that define the domain of a switching function Minterm – A disjunction (AND) containing an instance of each literal corresponding to a variable in the support set that is in the on-set, f on,of a function Don’t Care – The absence of a supporting variable in a product term Implicant – A product term that covers one or more minterms in the on- set, f on, of a function Prime Implicant – An implicant in the on-set, f on, of a function such that it is not a subproduct of any other possible implicant in the set. Essential Prime Implicant – A prime implicant that covers at least one minterm NOT covered by any other implicant in the on-set, f on.

SOP Minimization – Terms Example Consider: Each Element of f on is an Implicant Prime Implicants are: abc is a Prime Implicant but NOT an Essential Prime Implicant bcd is an Implicant but NOT a Prime Implicant bd is an Essential Prime Implicant Product abc : – covers minterms: m 4 = abcd and m 5 = abcd – disjunction of literals a, b, c – variable d is a Don’t Care f Represented by f on has Support Set: {a, b, c, d}

Karnaugh Map Simplification Using Karnaugh Map a)Use as “few loops” as possible b)Use as “large loop” as possible Prime Implicant Corresponds to as “large loop” as Possible Karnaugh Map Simplification is Finding f on such that: a) f on contains as few prime implicants as possible b) f on must contain all essential prime implicants c) f on contains NO implicants that are NOT prime

Tabulation Method

Tabulation Method - Notation Consider Support Set of f : S={x 1, x 2, …, x n } x i ci denotes: x i if c i = ‘1’ x i if c i = ‘0’ 1 if c i = ‘-’ If NO c i = -, then we have a minterm –Can be Represented by Decimal Equivalent of c i EXAMPLE( S={x 1, x 2, x 3, x 4 } ) x 1 1 x 0 2 x 0 3 x 1 4 = m 9, a minterm  c 1 c 2 c 3 c 4 = 1001 = 9 x 0 1 x - 2 x - 3 x 0 4 = a 4-cube  0--0

Cube Merging Basic Operation in Tabulation Method 2 Cubes that Differ in a SINGLE c i can be Merged into a Single Cube EXAMPLE  = 1-01  = 0-01 Merge  and  into   = --01 Merging is also called star operator and is a special case of consensus

Tabulation Method Input: f on as a set of minterms Output: f on as a set of 1.All Essential Prime Implicants 2.As Few Prime Implicants as Possible Finding as few Prime Implicants as Possible is an NP -Hard Problem!!!!! Reduces to the “Set Covering” Problem for Unate Functions Unate function – a constant or is represented by a SOP using either uncomplemented or complemented literals for each variable Reduces to the “Minimum Cost Assignment” Problem for Binate Functions (ex. EXOR) This is 2-Level (SOP) Optimization (Minimization)

Tabulation Method STEP 1: –Convert Minterm List (specifying f on ) to Prime Implicant List STEP 2: –Choose All Essential Prime Implicants –If all minterms are covered HALT Else GO To STEP 3 STEP 3: –Formulate the Reduced Cover Table Omitting the rows/cols of EPI –If Cover Table can be Reduced using Dominance Properties, Go To Step 2 –Else Must Solve the “Cyclic Cover” Problem 1) Use Exact Method (exponentially complex) 2) Use Heuristic Method (possibly non-optimal result) NOTE: “Quine-McCluskey” Refers to Using a “Branch and Bound” Heuristic NOTE: “Petrick’s Method” is Exact Technique – Generates all Solutions Allowing the Best to be Used

STEP 1 Tabulation Method – STEP 1 1.Partition Prime Implicants (or minterms) According to Number of 1’s 2.Check Adjacent Classes for Cube Merging Building a New List 3.If Entry in New List Covers Entry in Current List – Disregard Current List Entry 4.If Current List = New List HALT Else Current List  New List New List  NULL Go To Step 1

STEP 1 - EXAMPLE f on = {m 0, m 1, m 2, m 3, m 5, m 8, m 10, m 11, m 13, m 15 } =  (0, 1, 2, 3, 5, 8, 10, 11, 13, 15)

STEP 1 - EXAMPLE f on = {m 0, m 1, m 2, m 3, m 5, m 8, m 10, m 11, m 13, m 15 } =  (0, 1, 2, 3, 5, 8, 10, 11, 13, 15)

STEP 1 - EXAMPLE f on = {m 0, m 1, m 2, m 3, m 5, m 8, m 10, m 11, m 13, m 15 } =  (0, 1, 2, 3, 5, 8, 10, 11, 13, 15)

STEP 1 - EXAMPLE f on = {m 0, m 1, m 2, m 3, m 5, m 8, m 10, m 11, m 13, m 15 } =  (0, 1, 2, 3, 5, 8, 10, 11, 13, 15) f on = {A,B,C,D,E,F,G} = {00--, -01-, -0-0, 0-01, -101, 1-11, 11-1} Question: Can this be done on a CCM? How modified?

STEP 2 – Construct Cover Table PIs Along Vertical Axis (in order of # of literals) Minterms Along Horizontal Axis NOTE: Table 4.2 in book is incomplete

STEP 2 – Finding the Minimum Cover Extract All Essential Prime Implicants, EPI EPIs are the PI for which a Single x Appears in a Column C is an EPI so: f on ={C,...} Row C and Columns 0, 2, 8, and 10 can be Eliminated Giving Reduced Cover Table Examine Reduced Table for New EPIs

STEP 2 – Reduced Table Essential row Distinguished Column The Row of an EPI is an Essential row The Column of the Single x in the Essential Row is a Distinguished Column

Row and Column Dominance If Row P has x ’s Everywhere Row Q Does Then Q Dominates P if P has fewer x ’s If Column i has x ’s Everywhere j Does Then j Dominates i if i has fewer x ’s If Row P is equal to Row Q and Row Q does not cost more than Row P, eliminate Row P, or if Row P is dominated by Row Q and Row Q Does not cost more than Row P, eliminate Row P If Column i is equal to Column j, eliminate Column i or if Column i dominates Column j, eliminate Column i

STEP 3 – The Reduced Cover Table Initially, Columns 0, 2, 8 and 10 Removed No EPIs are Present No Row Dominance Exists No Column Dominance Exists This is Cyclic Cover Table Must Solve Exactly OR Use a Heuristic

The Cyclic Cover Table

For now, we Arbitrarily Choose a PI Later we will Study Exact and Heuristic Methods Arbitrarily Choose F so: f on ={C, F,...} This Choice May Lead to a Non-Optimal Result!!!! Form Reduced Cover and Go To Step 2

STEP 3 – Dominance Initially, Reduced Table has Columns 11 and 15 Removed G is Dominated by E B is Dominated by A Form Reduced Cover Table and Go To Step 2

STEP 2 – The Reduced Cover Initially, Table has Rows G and B Removed Secondary EPIs – A and E All Columns Covered Eliminate D f on ={C, F, A, E}

Result Check Initial Minterm List f on = {m 0, m 1, m 2, m 3, m 5, m 8, m 10, m 11, m 13, m 15 } =  (0, 1, 2, 3, 5, 8, 10, 11, 13, 15) Final Result f on ={A, C, E, F} ab cd ab cd

Questions 1.Explain Quine-McCluskey Method. 2.How to program QM Method in CCM? 3.Methods to solve Covering Problem. 4.Possible Applications of Covering. 5.Reduction of Covering to Petrick Function. 6.Merging Operator.