Giovanni De Micheli. Integrated Systems Centre EPF Lausanne

Similar documents
ICS 252 Introduction to Computer Design

Unit 4: Formal Verification

Combinatorial Algorithms. Unate Covering Binate Covering Graph Coloring Maximum Clique

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

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

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

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

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

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

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

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

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

Chapter 2 Combinational Logic Circuits

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

Advanced Digital Logic Design EECS 303

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

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

Logic Synthesis and Verification

Specifying logic functions

Design of Framework for Logic Synthesis Engine

Gate-Level Minimization. section instructor: Ufuk Çelikcan

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

ECE 5745 Complex Digital ASIC Design Topic 12: Synthesis Algorithms

COPYRIGHTED MATERIAL INDEX

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Synthesis of 2-level Logic Heuristic Method. Two Approaches

CSE241 VLSI Digital Circuits UC San Diego

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

CprE 281: Digital Logic

Combinational Logic Circuits Part III -Theoretical Foundations

L3: Representations of functions

Chapter 2 Combinational

CS8803: Advanced Digital Design for Embedded Hardware

CSE 140: Logic Minimization Lecture

Chapter 3 Simplification of Boolean functions

Simplification of Boolean Functions

Module -7. Karnaugh Maps

ECE260B CSE241A Winter Logic Synthesis

2.6 BOOLEAN FUNCTIONS

Combinational Logic & Circuits

Combinational Logic Circuits

8.1 Polynomial-Time Reductions

Cofactoring-Based Upper Bound Computation for Covering Problems

IT 201 Digital System Design Module II Notes

Computer Organization

ECE260B CSE241A Winter Logic Synthesis

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

CMPE223/CMSE222 Digital Logic

Homework 3 Handout 19 February 18, 2016

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

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).

IEEE Transactions on computers

Chapter 6. Logic Design Optimization Chapter 6

UNIT II. Circuit minimization

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

DKT 122/3 DIGITAL SYSTEM 1

Standard Forms of Expression. Minterms and Maxterms

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 04. Boolean Expression Simplification and Implementation

Breakup Algorithm for Switching Circuit Simplifications

ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

ECE380 Digital Logic

Chapter 3. Gate-Level Minimization. Outlines

Advanced Digital Logic Design EECS 303

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

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 2. LECTURE: LOGIC NETWORK MINIMIZATION 2016/2017

1. Fill in the entries in the truth table below to specify the logic function described by the expression, AB AC A B C Z

Switching Theory And Logic Design UNIT-II GATE LEVEL MINIMIZATION

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

Chapter 2. Boolean Expressions:

Experiment 3: Logic Simplification

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

SEPP: a New Compact Three-Level Logic Form

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

Chapter 2 Combinational Logic Circuits

(Refer Slide Time 6:48)

Chapter 10 Part 1: Reduction

University of Technology

Digital logic fundamentals. Question Bank. Unit I

Contents. Chapter 3 Combinational Circuits Page 1 of 34

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

DIGITAL CIRCUIT LOGIC UNIT 5: KARNAUGH MAPS (K-MAPS)

A B AB CD Objectives:

Combinational Logic Circuits

1. Mark the correct statement(s)

Quine-McCluskey Algorithm

Switching Circuits & Logic Design

Retiming. Adapted from: Synthesis and Optimization of Digital Circuits, G. De Micheli Stanford. Outline. Structural optimization methods. Retiming.

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

UNIT I BOOLEAN ALGEBRA AND COMBINATIONAL CIRCUITS PART-A (2 MARKS)

CSEE 6861 CAD of Digital Systems Handout: Lecture #3

Experiment 4 Boolean Functions Implementation

R.M.D. ENGINEERING COLLEGE R.S.M. Nagar, Kavaraipettai

Definitions. 03 Logic networks Boolean algebra. Boolean set: B 0,

COMBINATIONAL LOGIC CIRCUITS

ON AN OPTIMIZATION TECHNIQUE USING BINARY DECISION DIAGRAM

POWR IP PZ1/17

NP and computational intractability. Kleinberg and Tardos, chapter 8

Transcription:

Two-level Logic Synthesis and Optimization Giovanni De Micheli Integrated Systems Centre EPF Lausanne This presentation can be used for non-commercial purposes as long as this note and the copyright footers are not removed Giovanni De Micheli All rights reserved

Objectives Module 1 Fundamentals of logic synthesis Mathematical formulation Definition of the problems (c) Giovanni De Micheli 2

Boolean Algebra Quintuple (B, +,., 0, 1) Combinational logic design Background Binary Boolean algebra B = { 0, 1 } Boolean function Single output f : B n B Multiple output f : B n B m Incompletely-specified: Don t care symbol: * f : B n { 0, 1, * } m (c) Giovanni De Micheli 3

The don t care conditions We do not care about the value of a function Related to the environment Input patterns that never occur Input patterns such that some output is never observed Very important for synthesis and optimization (c) Giovanni De Micheli 4

Definitions Scalar function: ON-set Subset of the domain such that f is true OFF-set Subset of the domain such that f is false DC-set Subset of the domain such that f is a don t care Multiple-output function: ON, OFF, DC-sets defined for each component (c) Giovanni De Micheli 5

Cubical representation (c) Giovanni De Micheli 6

Definitions Boolean variables Boolean literals: Variables and their complement Product or cube: Product of literals Implicant: Product implying a value of the function (usually 1) Hypercube in the Boolean space Minterm: Product of all input variables implying a value of the function (usually 1) Vertex in the Boolean space (c) Giovanni De Micheli 7

Truth table Tabular representations List of all minterms of a function Implicant table or cover List of implicants sufficient to define a function Note Implicant tables are smaller in size as compared to truth tables (c) Giovanni De Micheli 8

Example of truth table x = ab+a c; y = ab+bc+ac abc xy 000 00 001 10 010 00 011 11 100 00 101 01 110 11 111 11 (c) Giovanni De Micheli 9

Example of implicant table x = ab+a c; y = ab+bc+ac abc xy 001 10 *11 11 101 01 11* 11 (c) Giovanni De Micheli 10

Cubical representation of minterms and implicants f 1 = a b c + a b c + ab c + abc +abc f 2 = a b c + ab c 111 001 β 101 γ δ 001 β 101 c b α 110 a 000 f1 f2 (c) Giovanni De Micheli 11

Visual representations Cubical notation Karnaugh maps Representations Computer-oriented representations Matrices Sparse Various encoding Binary-decision diagrams Address sparsity and efficiency (c) Giovanni De Micheli 12

Objectives Module 2 Two-level logic optimization Motivation Models Exact algorithms for logic optimization (c) Giovanni De Micheli 13

Two-level logic optimization motivation Reduce size of the representation Direct implementation PLAs reduce size and delay Other implementation styles Reduce amount of information Simplify local functions and connections (c) Giovanni De Micheli 14

Programmable logic arrays Macro-cells with rectangular structure Implement any multi-output function Layout generated by module generators Fairly popular in the seventies/eighties Advantages Simple, predictable timing Disadvantages Less flexible than cell-based realization Dynamic operation Open issue Will PLA structures be useful with new nanotechnologies? (e.g., nanowires) (c) Giovanni De Micheli 15

Programmable logic array f 1 = a b + b c + ab; f 2 = b c (c) Giovanni De Micheli 16

Assumptions Two-level minimization Primary goal is to reduce the number of implicants All implicants have the same cost Secondary goal is to reduce the number of literals Rationale Implicants correspond to PLA rows Literals correspond to transistors (c) Giovanni De Micheli 17

Minimum cover Definitions Cover of a function with minimum number of implicants Global optimum Minimal cover or irredundant cover Cover of the function that is not a proper superset of another cover No implicant can be dropped Local optimum Minimal w.r.to 1-implicant containment No implicant contained by another one Weak local optimum (c) Giovanni De Micheli 18

Example f 1 = a b c + a b c + ab c + abc +abc ; f 2 = a b c + ab c β δ β Minimum cover α γ β Irredundant cover α δ Minimal cover w.r. to single α implicant containment β γ δ β f1 f2 (c) Giovanni De Micheli 19

Prime implicant Definitions Implicant not contained by any other implicant Prime cover Cover of prime implicants Essential prime implicant There exist some minterm covered only by that prime implicant Needs to be included in the cover (c) Giovanni De Micheli 20

Exact methods Two-level logic minimization Compute minimum cover Often difficult/impossible for large functions Based on Quine-McCluskey method Heuristic methods Compute minimal covers (possibly minimum) Large variety of methods and programs MINI, PRESTO, ESPRESSO (c) Giovanni De Micheli 21

Quine s theorem: Exact logic minimization There is a minimum cover that is prime Consequence Search for minimum cover can be restricted to prime implicants Quine-McCluskey method Compute prime implicants Determine minimum cover (c) Giovanni De Micheli 22

Prime implicant table Rows: minterms Columns: prime implicants Exponential size 2 n minterms Up to 3 n / n prime implicants Remarks Some functions have much fewer primes Minterms can be grouped together Implicit methods for implicant enumeration (c) Giovanni De Micheli 23

Example f = a b c + a b c + ab c +abc +abc Primes: β γ δ α Table: Prime implicants of f α β δ Minimum cover of f (c) Giovanni De Micheli 24

Reduce table Iteratively identify essentials, save them in the cover. Remove covered minterms Petrick s method Minimum cover early methods Write covering clauses in pos form Multiply out pos form into sop form Select cube of minimum size Remark Multiplying out clauses has exponential cost (c) Giovanni De Micheli 25

Example pos clauses (α) (α + β) (β + γ) (γ + δ) (δ) = 1 sop form: αβδ + αγδ = 1 α β γ δ Solutions: { α β δ } { α γ δ } (c) Giovanni De Micheli 26

Matrix representation View table as Boolean matrix: A Selection Boolean vector for primes: x Determine X such that A x 1 Select enough columns to cover all rows Minimize cardinality of x (c) Giovanni De Micheli 27

Example (c) Giovanni De Micheli 28

Set covering problem: Covering problem A set S -- minterm set A collection C of subsets (implicant set) Select fewest elements of C to cover S Computationally intractable problem Exact solution method Branch and bound algorithm Several heuristic approximation methods (c) Giovanni De Micheli 29

Example Edge-cover of a hypergraph (c) Giovanni De Micheli 30

Branch and bound algorithm Tree search in the solution space Potentially exponential Use bounding function: If the lower bound on the solution cost that can be derived from a set of future choices exceeds the cost of the best solution seen so far, then kill the search Bounding function should be fast to evaluate and accurate Good pruning may expedite the search (c) Giovanni De Micheli 31

Example r a x y w z b Bound = 6 Kill sub-tree 5 4 9 8 (c) Giovanni De Micheli 32

Branch and bound for logic minimization Reduction strategies Use matrix formulation of the problem Partitioning: If A is block diagonal: Solve covering problems for the corresponding blocks Essentials Column incident to one (or more) rows with single 1 Select column Remove covered row(s) from table (c) Giovanni De Micheli 33

Branch and bound for logic minimization Reduction strategies Column (implicant) dominance: If a ki a kj for all k Remove column j (dominated) Dominated implicant ( j ) has its minterms already covered by dominant implicant ( i ) Row (minterm) dominance: If a ik a jk for all k Remove row i (dominant) When an implicant covers the dominated minterm, it also covers the dominant one (c) Giovanni De Micheli 34

Example (c) Giovanni De Micheli 35

Fourth column is essential Fifth column is dominated Fifth row is dominant Matrix after reductions: Example (c) Giovanni De Micheli 36

Branch and bound covering algorithm EXACT_COVER(A,x,b) { Reduce matrix A and update corresponding x; if (current_estimate b ) return (b); if (A has no rows) return(x); select a branching column c; x c = 1; Ã = A after deleting c and rows incident to it; x ~ = EXACT_COVER(Ã,x,b); if ( x ~ < b ) b = x ~ ; x c = 0; Ã = A after deleting c; x ~ = EXACT_COVER(Ã,x,b); if ( x ~ < b ) b = x ~ ; return(b); } (c) Giovanni De Micheli 37

Bounding function Estimate lower bound on covers that can be derived from current solution vector x The sum of the 1s in x, plus bound of cover for local A Independent set of rows No 1 in the same column Require independent implicants to cover Construct graph to show pairwise independence Find clique number Size of the largest clique Approximation (lower) is acceptable (c) Giovanni De Micheli 38

Row 4 independent from 1,2,3 Clique number and bound is 2 Example (c) Giovanni De Micheli 39

Example There are no independent rows Clique number is 1 (one vertex) Bound is 1+1= 2 Because of the essential already selected A = 1 0 1 1 1 0 0 1 1 (c) Giovanni De Micheli 40

Select first column Example Branching on the cyclic core Recur with à = [11] Delete one dominated column Take other column (essential) New cost is 3 Exclude first column Find another solution with cost equal to 3. Discard A = 1 0 1 1 1 0 0 1 1 (c) Giovanni De Micheli 41

Exact 2-level logic minimizer Espresso-exact Exploits iterative reduction and branch and bound algorithm on cyclic core Compact implicant table Rows represent groups of minterms covered by the same implicants Very efficient Solves most benchmarks (c) Giovanni De Micheli 42

Example After removing the essentials 0111 α 0 * * 0 1 0000,0010 1101 α β ε ζ 1 1 0 0 0 0 1 1 0010 0000 0100 0101 1011 0110 1010 1101 β * 0 * 0 1 γ 0 1 * * 1 δ 1 0 * * 1 ε 1 * 0 1 1 ζ * 1 0 1 1 d c b a 1001 (c) Giovanni De Micheli 43

Exact two-level minimization There are two main difficulties: Storage of the implicant table Solving the cyclic core Implicit representation of prime implicants Methods based on binary decision diagrams Avoid explicit tabulation Recent methods make 2-level optimization solve exactly almost all benchmarks Heuristic optimization is just used to achieve solutions faster (c) Giovanni De Micheli 44

Boolean Relations Module 3 Motivation of using relations Optimization of realization of Boolean relation Comparisons to two-level optimization (c) Giovanni De Micheli 45

Boolean relations Generalization of Boolean functions More than one output pattern may correspond to an input pattern Multiple-choice specifications Model inner blocks of multi-level circuits Degrees of freedom in finding an implementation More general than don t care conditions Problem: Given a Boolean relation, find a minimum cover of a compatible Boolean function that can implement the relation (c) Giovanni De Micheli 46

Example Compare: a + b > 4? a + b < 3? (c) Giovanni De Micheli 47

Example (c) Giovanni De Micheli 48

Example Circuit is no longer an adder (c) Giovanni De Micheli 49

Minimization of Boolean relations Since there are many possible output values (for any input), there are many logic functions implementing the relation Compatible functions Problem Find a minimum compatible function Do not enumerate all compatible functions Compute the primes of the compatible functions C-primes Derive a logic cover from the c-primes (c) Giovanni De Micheli 50

Binate covering Covering problem is more complex As compared to minimizing logic functions. In classic Boolean minimization we just need enough implicants to cover the minterm Covering clause is unate in all variables Any additional implicant does not hurt In Boolean relation optimization, we need to pick implicants to realize a compatible function Some implicants cannot be taken together Covering clause is binate (implicant mutual exclusion) Non-compact Boolean space (c) Giovanni De Micheli 51

Solving binate covering Binate cover can be solved with branch and bound In practice much more difficult to solve, because it is harder to bound effectively Binate cover can be reduced to min-cost SAT SAT solvers can be used Binate cover can be also modeled by BDDs Several approximation algorithms for binate cover (c) Giovanni De Micheli 52

Boolean relations Generalization of Boolean functions More degrees of freedom than don t care sets Useful to represent multiple choice Useful to model internals of logic networks Elegant formalism, but computationally-intensive solution method (c) Giovanni De Micheli 53