ECE 465 Petrick’s Algorithm for 2-level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan.

Slides:



Advertisements
Similar presentations
Algorithmic Time Complexity Basics
Advertisements

Minimization of Circuits
FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
Prof. Sin-Min Lee Department of Computer Science
IKI b-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from Prof. Daniel Gajski’s.
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.
The Fundamental Property of Rational Expressions
Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan.
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
Chapter 3 Simplification of Switching Functions
ENEE 6441 On Quine-McCluskey Method > Goal: find a minimum SOP form > Why We Need to Find all PIs? f(w,x,y,z) = x’y’ +wxy+x’yz’+wy’z = x’y’+x’z’+wxy+wy’z.
MAE 552 – Heuristic Optimization Lecture 26 April 1, 2002 Topic:Branch and Bound.
SYEN 3330 Digital Systems Jung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 – Part 6.
DAST 2005 Week 4 – Some Helpful Material Randomized Quick Sort & Lower bound & General remarks…

ECE 667 Synthesis and Verification of Digital Systems
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
EEE324 Digital Electronics Ian McCrumRoom 5B18, Lecture 4: Boolean Algebra.
2-Level Minimization Classic Problem in Switching Theory
EECS 465: Digital Systems Lecture Notes # 2
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Department of Computer Engineering
PLA/PALs and PLA Design Optimization
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.
Analysis of Algorithms These slides are a modified version of the slides used by Prof. Eltabakh in his offering of CS2223 in D term 2013.
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
Algorithm Analysis (Algorithm Complexity). Correctness is Not Enough It isn’t sufficient that our algorithms perform the required tasks. We want them.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
Combinational Logic Part 2: Karnaugh maps (quick).
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.
Chapter 6 Quine-McCluskey Method Mei Yang ECG Logic Design 1.
2-1 Introduction Gate Logic: Two-Level Simplification Design Example: Two Bit Comparator Block Diagram and Truth Table A 4-Variable K-map for each of the.
ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering.
1 ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of ECE Georgia Institute of Technology.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Chapter3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Prof. Hsien-Hsin Sean Lee
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Technical Seminar II Implementation of
Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan.
PLA/PALs and PLA Design Optimization
CHAPTER 6 Quine-McCluskey Method
Lecture 6 Quine-McCluskey Method
CHAPTER 3 Simplification of Boolean Functions
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
QUINE-McCLUSKEY METHOD
EECS 465: Digital Systems Design Lecture Notes #3
CS 352 Introduction to Logic Design
Chapter 6 Quine-McCluskey Method
Multi Function Quine-McCluskey 2-Level Minimization
EECS 465: Digital Systems Lecture Notes # 2
EECS 465: Digital Systems Lecture Notes # 2
ECE 465 PLA Optimization Using Modified Multi-Function QM
Multi Function Quine-McCluskey 2-Level Minimization
Function Minimization Algorithms
ECE 465 Petrick’s Algorithm for 2-level Minimization
Minimization of Switching Functions
Single Function Quine-McCluskey 2-Level Minimization
Overview Part 2 – Circuit Optimization
CHAPTER 6 QUINE-McCLUSKEY METHOD
ECE 352 Digital System Fundamentals
PLA/PALs and PLA Design Optimization
Presentation transcript:

ECE 465 Petrick’s Algorithm for 2-level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan Ren from Prof. Shantanu Dutt’s handwritten notes

Petrick’s Algorithm for Choosing Minimal Cost cover The PIT portion of Q-M can get optimal in most cases and near-optimal cost coverings, but will not be optimal in all cases. Can use an algebraic method called Petrick’s algorithm.

Petrick’s Algorithm 1. Obtain all PIs using Q-M. 2. Create a PIT and remove all EPIs and corresponding columns (MTs). 3. Write a POS expr. representing all possible covers of remaining MTs  a) For each MT m i write an expr. C(m i ) that is the sum/OR of all PIs that cover it --- the PIs are the variables in this expression.  b) Form a POS expression C that is the product/AND of all C(m i )’s --- this indicates that all MTs need to be covered. 4. Convert the POS expr. to SOP using the distr. law. Use involution and absorption to simplify ((a*a=a, a+a=a) (a+ab=a))—note that these minimization rules come about in this problem from concepts of non- replication and lower cost soln. than strictly from Boolean algebra. Each product term in the SOP expr. represents one possible cover (Note: correct functional expression = sum of the PIs in the product term). 5. Select the cover with the lowest cost. total # of literals + # of PIs

Petrick’s Algorithm (Contd.) CostPIs PI 1 3+1PI 2 3+1PI 3 3+1PI 4 3+1PI 5 3+1PI 6 PI 1 + PI 6 PI 2 + PI 3 PI 1 + PI 2 PI 4 + PI 5 PI 5 + PI 6 PI 3 + PI 4 C=(PI 1 +PI 2 PI 6 )(PI 5 +PI 4 PI 6 )(PI 3 +PI 2 PI 4 ) Absorb Cost=8 +3Cost=9 +3 Minimal solution X’s Example 1 =(PI 1 PI 5 +PI 1 PI 4 PI 6 +PI 2 PI 5 PI 6 +PI 2 PI 4 PI 6 )(PI 3 +PI 2 PI 4 ) PI 1 PI 3 PI 5 +PI 2 PI 4 PI 6 +PI 1 PI 3 PI 4 PI 6 +PI 2 PI 3 PI 5 PI 6 +PI 1 PI 2 PI 4 PI 5 + PI 2 PI 3 PI 4 PI 6 +PI 1 PI 2 PI 4 PI 6 + PI 2 PI 4 PI 5 PI 6 Note: Actual Soln. = sum of Pis in the chosen min-cost product term in C = PI1 + PI3 + PI5

Petrick’s Algorithm (Contd.) Exercise: Use this algorithm to obtain the least cost cover for the example in which we used the max. MT covering heuristic to get the minimal solution.

Petrick’s Algorithm (Contd.) Computational complexity of Petrick’s algorithm is very high If m =# of MTs n = # of vars, p i = # of PIs covering MT i, p av = avg # of PIs covering a MT Since MT i =a n-1 …..a 0, a PI covering MT i will have X s ome positions j. Can choose, say, n/2 X’s with in ways, w/ each way n ot covering any other way, i.e., each way is a PI covering MT i The time complexity T for generating product terms in C =  i=1 m p i 1 trillion=2 40 T= trillion trillion trillion trillion operations (in the worst case) If each oper takes 1 ns, time taken can be ~ 1 k trillion trillion trillion secs ~ 317k trillion trillion centuries! (in the worst case) Or T = O((p av ) m ) = O((p av ) 2**n ))T = O(2 nm = O(2 n*2**n )) For n=8, pav = 2 n-3, m=2 n-3, T = O((p av ) 2**n )) = O(2 160 ) worst-case # of basic operations to gen. the reqd. product terms in C

QM PIT (Covering Stage) Complexity If m =# of MTs n = # of vars, p i = # of PIs covering MT i, p av = avg # of PIs covering a MT, p = total # of PIs The time taken to determine row covering is O(mp 2 ) (look at all PI pairs—naïve method, and each pair takes O(m) time to determine if there is covering betw. them) Similarly, O(m 2 p) for determining column covering relations If after every row covering, we detect an EPI, or if we detect a col. covering, we reduce # of MTs by at least 1; so we would require m iterations, and thus O(max(m 2 p 2, m 3 p) time until all MTs are covered. Or, we do not get any EPIs or col. covering until we do lots of row coverings until finally 1 PI is left that covers all MTs (worst case). This will take p iterations, and thus a total time of O(max(mp 3, m 2 p 2 )). So overall complexity (using no appropriate data structures) is O(max(p 3 m, mp 3 )) (m 2 p 2 < p 3 m or m 2 p 2 < m 3 p). Compare this to O((p av ) m ) ~ O((p/m) m ) for Petrick’s, and we see that QM is much less complex (m appears as an exponent in Petrick’s as opposed to as the base of a low- order polynomial in QM).

Graphical comparison of Petrick’s and QM’s time complexities As can be seen, Petrick’s run-time quickly becomes huge and impractical for n > 7, while QM’s is much more reasonable and thus could potentially be used in a CAD tool. Further, as we have seen, besides the cyclic PIT scenario, QM’s non-optimality stems from the infrequent case of “bad” row covering (cost(covering PI) > cost(covered PI), which is partly alleviated by QM+ (has same complexity as QM) Thus on the average, QM/QM+ produces good (near-optimal) solutions. Thus overall, QM /QM+ is a very good and practical algorithm to use for, say, n > 5.