Two-Level Logic Optimization ( Introduction to Computer-Aided Design) School of EECS Seoul National University

Similar documents
Giovanni De Micheli. Integrated Systems Centre EPF Lausanne

ICS 252 Introduction to Computer Design

Advanced Digital Logic Design EECS 303

Synthesis 1. 1 Figures in this chapter taken from S. H. Gerez, Algorithms for VLSI Design Automation, Wiley, Typeset by FoilTEX 1

Synthesis of 2-level Logic Heuristic Method. Two Approaches

VLSI System Design Part II : Logic Synthesis (1) Oct Feb.2007

Binary recursion. Unate functions. If a cover C(f) is unate in xj, x, then f is unate in xj. x

Unit 4: Formal Verification

Heuristic Minimization of Boolean Relations Using Testing Techniques

Design of Framework for Logic Synthesis Engine

ESE535: Electronic Design Automation. Today. EDA Use. Problem PLA. Programmable Logic Arrays (PLAs) Two-Level Logic Optimization

Introduction. The Quine-McCluskey Method Handout 5 January 24, CSEE E6861y Prof. Steven Nowick

1/28/2013. Synthesis. The Y-diagram Revisited. Structural Behavioral. More abstract designs Physical. CAD for VLSI 2

Combinatorial Algorithms. Unate Covering Binate Covering Graph Coloring Maximum Clique

Logic Synthesis and Verification

Minimization of Two-Level Functions

SEPP: a New Compact Three-Level Logic Form

ECE 5745 Complex Digital ASIC Design Topic 12: Synthesis Algorithms

A New Algorithm to Create Prime Irredundant Boolean Expressions

User s Manual. Ronwaldo A. Collado Diosdado Y. Tejoso Jr. CMSC 130 Logistic Design and Digital Computer Circuits Second Semester, A. Y.

University of Technology

ESOP CIRCUIT MINIMIZATION BASED ON THE FUNCTION ON-SET. Likai Chai

COPYRIGHTED MATERIAL INDEX

CSEE 6861 CAD of Digital Systems Handout: Lecture #3

Combinational Logic & Circuits

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

CSE241 VLSI Digital Circuits UC San Diego

ECE260B CSE241A Winter Logic Synthesis

Homework 3 Handout 19 February 18, 2016

CSE 140: Logic Minimization Lecture

ECE260B CSE241A Winter Logic Synthesis

ICS 252 Introduction to Computer Design

SOFTWARE FOR THE MINIMIZATION OF THE COMBINATIONAL LOGIC FUNCTIONS

Software for The Minimization of The Combinational Logic Functions

Quine-McCluskey Algorithm

L3: Representations of functions

File Formats. Appendix A. A.1 Benchmarks. A.2 ESPRESSO Format

LOGIC SYNTHESIS AND VERIFICATION ALGORITHMS. Gary D. Hachtel University of Colorado. Fabio Somenzi University of Colorado.

CprE 281: Digital Logic

A Fast Two-level Logic Minimizer

Assign auniquecodeto each state to produce a. Given jsj states, needed at least dlog jsje state bits. (minimum width encoding), at most jsj state bits

Flexible Two-Level Boolean Minimizer BOOM-II and Its Applications

CSCI 220: Computer Architecture I Instructor: Pranava K. Jha. Simplification of Boolean Functions using a Karnaugh Map

Specifying logic functions

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Karnaugh Map (K-Map) Karnaugh Map. Karnaugh Map Examples. Ch. 2.4 Ch. 2.5 Simplification using K-map

9/10/2016. ECE 120: Introduction to Computing. The Domain of a Boolean Function is a Hypercube. List All Implicants for One Variable A

Software Implementation of Break-Up Algorithm for Logic Minimization

Local Search for CSPs

Simplification of two-level combinational logic

9 Conclusions. References [1] V. Akella and G. Gopalakrishnan. Shilpa: a high-level synthesis system for self-timed circuits. In ICCAD-1992.

Boolean Reasoning. The Logic of Boolean Equations. Frank Markham Brown Air Force Institute of Technology

ece5745-pla-notes.txt

ECE 3060 VLSI and Advanced Digital Design

A New Heuristic for DSOP Minimization

Larger K-maps. So far we have only discussed 2 and 3-variable K-maps. We can now create a 4-variable map in the

Logic Synthesis & Optimization Lectures 4, 5 Boolean Algebra - Basics

ON AN OPTIMIZATION TECHNIQUE USING BINARY DECISION DIAGRAM

3.4 QUINE MCCLUSKEY METHOD 73. f(a, B, C, D, E)¼AC ĒþB CD þ BCDþĀBD.

Solutions to Problem Set 1

Incompletely Specified Functions with Don t Cares 2-Level Transformation Review Boolean Cube Karnaugh-Map Representation and Methods Examples

Switching Circuits Simplifications Using Binary Coded Octal Minterms

A New Decomposition of Boolean Functions

VLSI Test Technology and Reliability (ET4076)

Implicant Expansion Methods Used in The Boom Minimizer

Redacted for privacy

Working with Combinational Logic

Chapter 10 Part 1: Reduction

Definitions Homework. Quine McCluskey Optimal solutions are possible for some large functions Espresso heuristic. Definitions Homework

3 No-Wait Job Shops with Variable Processing Times

1 Introduction Asynchronous design has been the focus of much recent research activity. In fact, asynchronous designs have been applied to several lar

Simplification of Boolean Functions

Breakup Algorithm for Switching Circuit Simplifications

Advanced Digital Logic Design EECS 303

Combinational Logic Circuits Part III -Theoretical Foundations

A B AB CD Objectives:

CS8803: Advanced Digital Design for Embedded Hardware

3 INTEGER LINEAR PROGRAMMING

Switching Circuits & Logic Design

Don't Cares in Multi-Level Network Optimization. Hamid Savoj. Abstract

1 Construct implication chart, one square for each combination of states. 2 Square labeled S i, S j, if outputs differ than square gets X (0).

Minimization of Multiple-Valued Functions in Post Algebra

Supplement to. Logic and Computer Design Fundamentals 4th Edition 1

Chapter 3 Simplification of Boolean functions

Symbolic Hazard-Free Minimization and Encoding of Asynchronous Finite State Machines

An Introduction to Zero-Suppressed Binary Decision Diagrams

Very Large Scale Integration (VLSI)

Outcomes. Unit 9. Logic Function Synthesis KARNAUGH MAPS. Implementing Combinational Functions with Karnaugh Maps

8.1 Polynomial-Time Reductions

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

IEEE Transactions on computers

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

Partitioning. Course contents: Readings. Kernighang-Lin partitioning heuristic Fiduccia-Mattheyses heuristic. Chapter 7.5.

An Algorithm for Multi-output Boolean Logic Minimization. Roh it H. Vora. Thesis submitted to the Faculty of the

CMPE223/CMSE222 Digital Logic

Read-Once Functions (Revisited) and the Readability Number of a Boolean Function. Martin Charles Golumbic

Improving Area Efficiency of Residue Number System based Implementation of DSP Algorithms

Gate Level Minimization Map Method

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

Binary Decision Diagrams (BDD)

Transcription:

Two-Level Logic Optimization (4541.554 Introduction to Computer-Aided Design) School of EECS Seoul National University

Minimization of Two-Level Functions Goals: Minimize cover cardinality Minimize number of literals PLA implementation: Minimize number of rows Minimize number of transistors --> Minimize area and time Karnaugh map: manual minimization f=σm(0,2,3,6,7,8,9,10,13) ab cd 00 Minimization of Two-Level Functions 00 01 11 10 1 0 0 1 01 11 0 1 0 1 1 0 1 0 f=b d +a c+ac d 10 1 1 0 1

Quine-McCluskey Method Exact minimization (global minimum) Generate all prime implicants Start from 0-dimensional cubes (minterms) Minimization of Two-Level Functions Find k-dimensional cubes from (k-1)-dimensional cubes (find cubes that are different in only one position) Find a minimum prime cover Minimum set of prime implicants covering all the minterms 1 s Minterms 0 1 2 3 m 0 m 2 m 8 m 3 m 6 m 9 m 10 m 7 m 13 0000 0010 1000 0011 0110 1001 1010 0111 1101 0,2 0,8 2,3 2,6 2,10 8,9 8,10 3,7 6,7 9,13 1-Cubes 00x0 x000 001x 0x10 x010 100x * 10x0 0x11 011x 1x01* 0,2,8,10 2,3,6,7 2-Cubes x0x0 * 0x1x *

Minimization of Two-Level Functions 0 2 3 6 7 8 9 10 13 * 0,2,8,10 essential * 2,3,6,7 8,9 * 9,13 f=m 0,2,8,10 +m 2,3,6,7 +m 9,13 =b d +a c+ac d

Petrick s method Minimization of Two-Level Functions 6 7 15 38 46 47 a 00011x b x01111 c 00x111 d 10111x e 10x110 f x00110 covering proposition CP=(a+f)(a+c)(b+c)(e+f)(d+e)(b+d) m 6 m 7 m 15 m 38 m 46 m 47 =abe+abdf+acde+bcef+cdf (exponential) select terms with fewest product terms (abe, cdf) ---> then select the term with fewest literals

Branching method Minimization of Two-Level Functions select a no yes select b select b no yes... select c... select c If worse, prune the branch

Complexity: Number of minterms: ~ 2 n Number of prime implicants: ~ 3 n /n Very large table Minimization of Two-Level Functions Covering problem is NP-complete --> Branch and bound technique Use heuristic minimization Find a minimal cover using iterative improvement Example: MINI, PRESTO, ESPRESSO

MINI S.J.Hong, R.G. Cain, and D.L.Ostapco, "MINI: a heuristic approach for logic minimization," IBM J. of Res. and Dev., Sep. 1974. Three processes Expansion: Expand implicants and remove those that are covered Reduction: Reduce implicants to minimal size Reshape: Modify implicants MINI

Expansion Iterate on implicants Make implicants as large as possible Remove covered implicants Goal: Minimal prime cover w.r.t. single cube containment Most minimizers use this technique Algorithm: For each implicant { For each care literal { Replace literal by * If (implicant not valid) restore } Remove all implicants covered by expanded implicants } Validity check: Check intersection of expanded implicant with X OFF MINI

Example 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 1 0 * Take 0 0 0 Expand * 0 0 ok Expand * * 0 ok Expand * * * not ok Restore * * 0 Remove covered implicants * * 0 0 0 1 Take 0 0 1 Expand * 0 1 not ok Restore 0 0 1 Expand 0 * 1 not ok Restore 0 0 1 Expand 0 0 * ok Remove covered implicants * * 0 0 0 * MINI

Reduce Iterate on implicants Reduce implicant size while preserving cover cardinality Goal: Escape from local minima Alternate with expansion Algorithm: For each implicant { } For each don't care literal { } Replace literal by 1 or 0 If (implicant not valid) restore Heuristics: ordering Example: * * 0 can't be reduced 0 0 * can be reduced to 0 0 1 MINI

Reshape Modify implicants while preserving cover cardinality Goal: Escape from local minima MINI A, B : disjoint A and B are different in exactly two parts One different part of A covers the corresponding part of B A=π 1 π 2 π i π j π p B=π 1 π 2 μ i μ j π p π j covers μ j A =π 1 π 2 π i (π j μ j ) π p B =π 1 π 2 (π i μ i ) μ j π p A=1x1 A =111 B=001 B =X01

MINI Alternate with expansion and reduce. Example: 1x1 a b c 0 0 1 1 x 1 1 1 0 001 110 reshape 111 a b c x 0 1 1 1 1 1 1 0 x01 110 expand a b c x 0 1 1 1 x x01 11x

R.K.Brayton, G.D.Hachtel, C.T.McMullen, and A.L.Sangiovanni-Vincentelli, Logic Minimization Algorithms for VLSI Synthesis, Kluwer Academic Publishers, 1984. Results are often global minimum. Very fast

Sequence of operations 1. Complement Compute the off-set (complement of X ON U X DC ) 2. Expand Expand each implicant into a prime and remove covered implicants 3. Essential primes Extract essential primes and put them in the don't care set 4. Irredundant cover Find a minimal irredundant cover 5. Reduce Reduce each implicant to a minimum essential implicant 6. Iterate 2, 4, and 5 until no improvement 7. Lastgasp Try reduce, expand, and irredundant cover using a different strategy If successful, continue the iteration 8. Makesparse Include the essential primes back into the cover and make the PLA structure as sparse as possible

Complementation Recursive computation F = (xjf xj +xj F xj ) = (xjf xj ) (xj F xj ) = (xj +(F xj ) )(xj+(f xj ) ) = xj (F xj ) +xj(f xj ) +(F xj ) (F xj ) = xj (F xj ) +xj(f xj ) +xj (F xj ) (F xj ) +xj(f xj ) (F xj ) = xj (F xj ) +xj(f xj ) Computation of (F xj ) and (F xj ) : F xj =< F (cubes with xj are removed) F xj =< F (cubes with xj are removed) One less variable (xj is removed) If the cubes have variables xj only for j=1,...,k, then F x1x2 xk is tautology and the complement is empty. Choice of variables: Choose variables of the largest cube (with least # of literals) --> terminate the recursion fast In the cube, choose first the variable that appears most often in the other cubes of F --> remove as many literals as possible

Sequence of operations 1. Complement Compute the off-set (complement of X ON U X DC ) 2. Expand Expand each implicant into a prime and remove covered implicants 3. Essential primes Extract essential primes and put them in the don't care set 4. Irredundant cover Find a minimal irredundant cover 5. Reduce Reduce each implicant to a minimum essential implicant 6. Iterate 2, 4, and 5 until no improvement 7. Lastgasp Try reduce, expand, and irredundant cover using a different strategy If successful, continue the iteration 8. Makesparse Include the essential primes back into the cover and make the PLA structure as sparse as possible

Expand Ordering cubes in the cover: Arrange cubes in the order of decreasing size. --> Larger cubes are more likely to cover other cubes and less likely to be covered by other cubes. Selecting columns in a cube (c): 1. If a cube (d) in the off-set has only one column (j) that satisfies the following condition, (c j =1 and d j =0) or (c j =0 and d j =1) column j cannot be expanded. ex) c=01*, d=111 --> Column 1 of c cannot be expanded. Reduce problem size by eliminating the excluded column, d, and cubes that cannot be covered.

2. Select columns that can be expanded to cover as many cubes in the on-set as possible. If there are no more covered cubes, select a column with maximum conflicts between c and other cubes in the on-set. The corresponding columns and covered cubes are eliminated. 3. If all cubes in the off-set have no conflict on column j, select the column for expansion. The corresponding column and covered cubes are eliminated. 4. Repeat step 1, 2, and 3 until (1) all columns are eliminated --> done (2) all cubes in the off-set are eliminated --> select all remaining columns for expansion (3) all cubes in the on-set are covered --> select for expansion as many columns as possible, to reduce # of literals --> find the minimum column cover of the Blocking Matrix --> NP-complete --> use heuristics

Blocking Matrix on-set: c=10101 off-set: r1=11*00 r2=10111 r3=01101 r4=11000 r1 01001 r2 00010 r3 11000 r4 01101 1 when c j ri j If c is not expanded for these columns --> {c} R=

Sequence of operations 1. Complement Compute the off-set (complement of X ON U X DC ) 2. Expand Expand each implicant into a prime and remove covered implicants 3. Essential primes Extract essential primes and put them in the don't care set 4. Irredundant cover Find a minimal irredundant cover 5. Reduce Reduce each implicant to a minimum essential implicant 6. Iterate 2, 4, and 5 until no improvement 7. Lastgasp Try reduce, expand, and irredundant cover using a different strategy If successful, continue the iteration 8. Makesparse Include the essential primes back into the cover and make the PLA structure as sparse as possible

Essential primes Consensus e of two cubes c and d is a cube such that: If d(c, d) = 0, then e = c d if d(c, d) = 1, then e i = c i d i, c i d i *, otherwise if d(c, d) 2, then e = c=*01 d=1*1 d=1*1 d=1*1 e=10* c=0*0 c=*00

For a prime p, iff the consensus of ((on-set dc-set)-{p}) with p completely covers p, p is not essential. p p essential not essential Why take consensus? p ((on-set dc-set)-{p}) does not cover p even though p is not essential

Sequence of operations 1. Complement Compute the off-set (complement of X ON U X DC ) 2. Expand Expand each implicant into a prime and remove covered implicants 3. Essential primes Extract essential primes and put them in the don't care set 4. Irredundant cover Find a minimal irredundant cover 5. Reduce Reduce each implicant to a minimum essential implicant 6. Iterate 2, 4, and 5 until no improvement 7. Lastgasp Try reduce, expand, and irredundant cover using a different strategy If successful, continue the iteration 8. Makesparse Include the essential primes back into the cover and make the PLA structure as sparse as possible

Irredundant cover Partition the prime cover into two sets: set E of relatively essential cubes set R of redundant cubes. For a cube c in the (on-set), if ((on-set dc-set) - {c}) covers c, then c is a redundant cube (c R), else c is a relatively essential cube (c E). A redundant cube r is partially redundant if (dc-set E) does not cover r. Remaining cubes in R are totally redundant. Totally redundant cubes are removed. From the set R p of partially redundant cubes, extract a minimal set R c such that E R c is still a cover. --> minimum column cover

d d c c b p b p a a, d : relatively essential b, c : partially redundant a a, c : relatively essential b : totally redundant

Sequence of operations 1. Complement Compute the off-set (complement of X ON U X DC ) 2. Expand Expand each implicant into a prime and remove covered implicants 3. Essential primes Extract essential primes and put them in the don't care set 4. Irredundant cover Find a minimal irredundant cover 5. Reduce Reduce each implicant to a minimum essential implicant 6. Iterate 2, 4, and 5 until no improvement 7. Lastgasp Try reduce, expand, and irredundant cover using a different strategy If successful, continue the iteration 8. Makesparse Include the essential primes back into the cover and make the PLA structure as sparse as possible

Reduction Ordering cubes for reduction: Select the largest cube --> Largest cubes can be reduced most easily. Order the remaining cubes in increasing pseudo-distance (number of mismatches) ex) pd(01*1, 0*11) = 2 --> Later expansion easily covers its neighbors. For a cube c in the cover, compute the smallest cube s containing c ((on-set - {c}) dc-set) = c (F(c)) on-{c} {c} dc

Example AB A CD 00 01 11 10 00 1 1 0 0 AB A CD 00 01 11 10 00 1 1 0 0 C 01 11 10 1 1 1 1 0 0 1 1 1 1 1 1 D C 01 11 10 1 1 1 1 0 0 1 1 1 1 1 1 D B AB A CD 00 01 11 10 00 1 1 0 0 B AB A CD 00 01 11 10 00 1 1 0 0 C 01 11 10 1 1 1 1 0 0 1 1 1 1 1 1 D C 01 11 10 1 1 1 1 0 0 1 1 1 1 1 1 D B B

Sequence of operations 1. Complement Compute the off-set (complement of X ON U X DC ) 2. Expand Expand each implicant into a prime and remove covered implicants 3. Essential primes Extract essential primes and put them in the don't care set 4. Irredundant cover Find a minimal irredundant cover 5. Reduce Reduce each implicant to a minimum essential implicant 6. Iterate 2, 4, and 5 until no improvement 7. Lastgasp Try reduce, expand, and irredundant cover using a different strategy If successful, continue the iteration 8. Makesparse Include the essential primes back into the cover and make the PLA structure as sparse as possible

Lastgasp Reduce cubes independently (order independent) The set of reduced cubes {c1, c2,... cp} is not necessarily a cover. Expand the reduced cubes to generate a set of new primes (NEW_PR) Run IRREDUNDANT_COVER with NEW_PR OLD_PR, where OLD_PR is the set of old primes

Sequence of operations 1. Complement Compute the off-set (complement of X ON U X DC ) 2. Expand Expand each implicant into a prime and remove covered implicants 3. Essential primes Extract essential primes and put them in the don't care set 4. Irredundant cover Find a minimal irredundant cover 5. Reduce Reduce each implicant to a minimum essential implicant 6. Iterate 2, 4, and 5 until no improvement 7. Lastgasp Try reduce, expand, and irredundant cover using a different strategy If successful, continue the iteration 8. Makesparse Include the essential primes back into the cover and make the PLA structure as sparse as possible

Makesparse Reduce number of literals in each cube --> Make PLA matrix as sparse as possible --> Enhance ability to be folded and improve electrical properties Irredundant cover for multiple output can have redundant cubes for single output. (ex) input output 01* 010 011 110 001 101 --> 2nd cube is redundant for 2nd output. Lower output part: make output plane sparse compute irredundant cover for single output (ex) input output 01* 010 011 110 100 001 101

Raise input part Make input plane sparse For each cube that has been changed, perform expand operation on input part (ex) input output 01* 010 011 100 001 101 01* 010 0*1 100 001 101 01* 010 0*1 100 001 001