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

Similar documents
Giovanni De Micheli. Integrated Systems Centre EPF Lausanne

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

Unit 4: Formal Verification

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

ECE260B CSE241A Winter Logic Synthesis

CSE241 VLSI Digital Circuits UC San Diego

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

ECE 5745 Complex Digital ASIC Design Topic 12: Synthesis Algorithms

ESE535: Electronic Design Automation. Today. LUT Mapping. Simplifying Structure. Preclass: Cover in 4-LUT? Preclass: Cover in 4-LUT?

ICS 252 Introduction to Computer Design

Advanced Digital Logic Design EECS 303

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

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN

Quine-McCluskey Algorithm

ece5745-pla-notes.txt

ECE260B CSE241A Winter Logic Synthesis

Preclass Warmup. ESE535: Electronic Design Automation. Motivation (1) Today. Bisection Width. Motivation (2)

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

Design of Framework for Logic Synthesis Engine

Specifying logic functions

Simplification of Boolean Functions

ESE535: Electronic Design Automation. Today. Example: Same Semantics. Task. Problem. Other Goals. Retiming. Day 23: April 13, 2011 Retiming

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

Slide Set 5. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

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

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

Contents. Chapter 3 Combinational Circuits Page 1 of 34

COPYRIGHTED MATERIAL INDEX

CS8803: Advanced Digital Design for Embedded Hardware

Programmable Logic Devices

UNIT II. Circuit minimization

Synthesis of 2-level Logic Heuristic Method. Two Approaches

Combinational Logic Circuits

University of Technology

Chapter 3. Gate-Level Minimization. Outlines

CMPE223/CMSE222 Digital Logic

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

Combinational Logic Circuits Part III -Theoretical Foundations

L3: Representations of functions

IT 201 Digital System Design Module II Notes

ESE535: Electronic Design Automation. Today. Question. Question. Intuition. Gate Array Evaluation Model

Gate Level Minimization

ECE380 Digital Logic

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

Digital Design. Chapter 4. Principles Of. Simplification of Boolean Functions

PROGRAMMABLE LOGIC DEVICES

Switching Circuits & Logic Design

CSE 140: Logic Minimization Lecture

Optimized Implementation of Logic Functions

ESE535: Electronic Design Automation CNF. Today CNF. 3-SAT Universal. Problem (A+B+/C)*(/B+D)*(C+/A+/E)

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

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Digital Logic Design. Outline

Programmable Logic Devices. Programmable Read Only Memory (PROM) Example

Experiment 4 Boolean Functions Implementation

(Refer Slide Time 6:48)

CSE 140 Homework Three

CprE 281: Digital Logic

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

Introduction to Programmable Logic Devices (Class 7.2 2/28/2013)

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

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

IMPLEMENTATION DESIGN FLOW

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

Programmable Logic Devices (PLDs)

Homework 3 Handout 19 February 18, 2016

Gate Level Minimization Map Method

4 KARNAUGH MAP MINIMIZATION

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

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

Chapter 2 Combinational

Advanced Digital Logic Design EECS 303

Presentation 4: Programmable Combinational Devices

Introduction to synthesis. Logic Synthesis

Slides for Lecture 15

COE 561 Digital System Design & Synthesis Introduction

Combinational Logic & Circuits

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

VLSI CAD Flow: Logic Synthesis, Placement and Routing Lecture 5. Guest Lecture by Srini Devadas

A B AB CD Objectives:

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

TWO-LEVEL COMBINATIONAL LOGIC

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

Literal Cost F = BD + A B C + A C D F = BD + A B C + A BD + AB C F = (A + B)(A + D)(B + C + D )( B + C + D) L = 10

(Refer Slide Time 3:31)

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

Representations of Terms Representations of Boolean Networks

state encoding with fewer bits has fewer equations to implement state encoding with more bits (e.g., one-hot) has simpler equations

Simplification of two-level combinational logic

Boolean Representations and Combinatorial Equivalence

Chapter 3 Simplification of Boolean functions

Lecture 20: CAMs, ROMs, PLAs

Module -7. Karnaugh Maps

2.1 Binary Logic and Gates

Combinational Devices and Boolean Algebra

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

Heuristic Minimization of Boolean Relations Using Testing Techniques

Gate-Level Minimization

Transcription:

ESE535: Electronic Design Automation Day 18: March 25, 2013 Two-Level Logic-Synthesis Today Two-Level Logic Optimization Problem Behavioral (C, MATLAB, ) Arch. Select Schedule RTL FSM assign Definitions Gate Netlist Basic Algorithm: Quine-McCluskey Improvements Layout Two-level Multilevel opt. Covering Retiming Placement Routing Masks 1 2 Problem Given: Expression in combinational logic Find: Minimum (cost) sum-of-products expression Ex. Y=a*b*c + a*b*/c + a*/b*c Y=a*b + a*c EDA Use Minimum size PLA, PAL, Programmable Logic Array Programmable Array Logic Minimum number of gates for two-level implementation Starting point for multi-level optimization 3 4 PLA Programmable Logic Arrays (PLAs) Directly implement flat (two-level) logic O=a*b*c*d +!a*b*!d + b*!c*d Exploit substrate properties allow wired-or 5 6 1

Wired-or Connect series of inputs to wire Any of the inputs can drive the wire high Wired-or Obvious Implementation with Transistors 7 8 Programmable Wired-or Programmable Wired-or Use some memory function to programmable connect (disconnect) wires to OR Fuse: Memory configurable PLA model 9 10 Diagram Wired-or Wired-or array Build into array Compute many different or functions from set of inputs 11 12 2

Combined or-arrays to PLA PLA Combine two or (nor) arrays to produce PLA (or-and / and-or array) 13 Can implement each and on single line in first array Can implement each or on single line in second array Strictly speaking: or in first term and in second, but with both polarities of inputs, can invert so is and-or. 14 Nanowire PLA PLA and PAL PAL = Programmable Array Logic 15 PAL has fixed OR plane. 16 EDA Use for 2-level Logic Min. back to optimization Minimum size PAL, PLA, Programmable Logic Array Programmable Array Logic Minimum number of gates for two-level implementation Starting point for multi-level optimization 17 18 3

Complexity Terminology (1) Set covering problem NP-hard Literals -- a, /a, b, /b,. Qualified, single inputs Minterms -- full set of literals covering one input case in y=a*b+a*c a*b*c a*/b*c 19 20 Cost Terminology (2) PLA/PAL to first order costs is: number of product terms Abstract (mis, sis) {multilevel,sequential} interactive synthesis number of literals cost(y=a*b+a*/c )=4 General (simple, multi-level) cost(product-term) e.g. nand2=4, nand3=5,nand4=6 21 Cube: product covering one or more minterms Y=a*b+a*c cubes: a*b*c abc a*b ab a*c ac 22 Terminology (3) Truth Table Cover: set of cubes sum products {abc, a/bc, ab/c} {ab,ac} 23 Also represent function a b c y 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Specify on-set only a b c y 1 0 1 1 1 1 0 1 1 1 1 1 24 4

Cube/Logic Specification In General Canonical order for variables Use {0,1,-} to indicate input appearance in cube 0 inverted abc 111 1 not inverted a/bc 101 a b c y 1 0 1 1 1 1 0 1 1 1 1 1 - not present ac 1-1 1 0 1 1 1 1 0 1 1 1 1 1 1-1 1 1 1-1 1-1 1 1-25 Three sets: on-set (must be set to one by cover) off-set (must be set to zero by cover) don t care set (can be zero or one) Don t Cares allow freedom in covering (reduce cost) arise from cases where value doesn t matter e.g. outputs in non-existent FSM state data bus value when not driving bus 26 Truth Table: a b y x 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 Multiple Outputs Convert to single-output problem a b y x o 0 0 1-1 0 0-1 1 0 1 0-1 0 1-0 1 1 0 0-1 1 0-0 1 1 1 0-1 1 1-1 1 On-set for result 001-00-1 010-01- 0 100-10- 0 110-11- 1 27 Multiple Outputs Can reduce to single output case write equations on inputs and each output with onset for relation being true after cover remove literals associated with outputs 28 Multiple Outputs Multiple Outputs Could Optimize separately By optimizing together Maximize sharing of cubes/product-terms Consider: X=/a/b+ab+ac Y=/bc Trivial solution has 4 product terms 000 10 001 11 010 00 011 00 100 00 101 11 110 10 111 10 000 10-01 11 01-00 100 00 11-10 29 30 5

Multiple Outputs Prime Implicants Consider: X=/a/b+ab+ac Y=/bc Now read off cover: Y=/bc A=/a/b/c+/bc+ab =/a/b+/bc+ab 000 10 001 11 010 00 011 00 100 00 101 11 110 10 111 10 000 10-01 11 01-00 100 00 11-10 Only need 3 product terms (versus 4 w/ no sharing) 31 Implicant -- cube in on-set (not entirely in don t-care set) Prime Implicant -- implicant, not contained in any other cube for y=a*b+a*c a*b is a prime implicant a*b*c is not a prime implicant (contained in ab, ac) I.e. largest cube still in on-set (on+dc-sets) 32 Prime Implicants Minimum cover will be made up of primes fewer products if cover more fewer literals in prime than contained cubes Necessary but not sufficient that minimum cover contain only primes y=ab+ac+b/c y=ac+b/c Number of PI s can be exponential in input size more than minterms, even! Not all PI s will be in optimum cover Restate Goal Goal in terms of PIs Find minimum size set of PIs that cover the on-set. 33 34 Essential Prime Implicants Computing Primes Prime Implicant which contains a minterm not covered by any other PI Essential PI must occur in any cover y=ab+ac+b/c ab 11-110 111 ac 1-1 101 111 b/c -10 110 010 * essential (only 101) * essential (only 010) Start with minterms for on-set and dc-set merge pairs (distance one apart) for each pair merged, mark source cubes as covered repeat merging for resulting cube set until no more merging possible retain all unmarked cubes which aren t entirely in dc-set 35 36 6

Compute Prime Example Compute Prime Example 0 0000 5 0101 7 0111 8 1000 9 1001 10 1010 11 1011 14 1110 15 1111 Note this is preclass 3. (in-class assignments, back of preclass sheet; record solutions on board.) 0 0000 5 0101 7 0111 8 1000 9 1001 10 1010 11 1011 14 1110 15 1111 0, 8-000 5, 7 01-1 7,15-111 8, 9 100-8,10 10-0 9,11 10-1 10,11 101-10,14 1-10 11,15 1-11 14,15 111-37 38 Compute Prime Example Covering Matrix 0 0000 5 0101 7 0111 8 1000 9 1001 10 1010 11 1011 14 1110 15 1111 0, 8-000 5, 7 01-1 7,15-111 8, 9 100-8,10 10-0 9,11 10-1 10,11 101-10,14 1-10 11,15 1-11 14,15 111-0, 8-000 5, 7 01-1 7,15-111 8, 9 100-8,10 10-0 9,11 10-1 10,11 101-10,14 1-10 11,15 1-11 14,15 111-8, 9,10,11 10-- 10,11,14,15 1-1- /b/c/d /abd bcd a/b ac 39 Minterms Prime Implicants /b/c/d /abd bcd a/b ac 0000 X 0101 X 1001 X 1011 X X 1110 X Goal: minimum cover 40 Essential Reduction Essential Reduction Must pick essential PI pick and eliminate row and column /b/c/d /abd bcd a/b ac 0000 X 0101 X 1001 X 1011 X X 1110 X Which essential? 41 This case: Cover determined by essentials Preclass 3: ac+a/b+/abd+/b/c/d General case: Reduces size of problem 42 7

Dominators: Column Dominators: Column If a column (PI) covers the same or strictly more than another column can remove dominated column B C D E F G H C dominates B Any others? G dominates H 43 If a column (PI) covers the same or strictly more than another column can remove dominated column B C D E F G H C D E F G 0101 X 1000 X 44 New Essentials Dominance reduction may yield new Essential PIs C D E F G 0101 X 1000 X C,G now essential What s essential? C D E F G What now? E dominates D and F Cover = {C,E,G} 45 Dominators: Row If a row has the same (or strictly more) PIs than another row, the larger row dominantes we can remove the dominating row (NOTE OPPOSITE OF COLUMN CASE) C D E F G 0101 X 1000 X 0111 dominates 0101 remove 0111 Others? 1010 dominates 1000 remove 1010 46 Cyclic Core After applying reductions essential column dominators row dominators May still have a non-trivial covering matrix How do we move forward from here? Example A B C D E F G H 0000 X X 0001 X X 47 48 8

Cyclic Core Example Cannot select (e.g. essential) or exclude (e.g. dominated) a PI definitively. Make a guess A in cover A not in cover Proceed from there A B C D E F G H 0000 X X 0001 X X A in Cover: What now? B C D E F G H 49 50 Example A B C D E F G H 0000 X X 0001 X X A in Cover: B C D E F G H C dominates B G dominates H 51 A B C D E F G H 0000 X X 0001 X X Example What now? A not in Cover: B C D E F G H 0000 X 0001 X 52 Basic Two-Level Minimization (espresso-exact) Generate Prime Implicants Reduce (essential, dominators) If not done, pick a cube branch (back to reduce) on selected/not i.e. search tree branch and bound Save smallest Branching Search A in cover A not in cover {A,B} {A,/B} A and B not in cover {A,B,C} {/A,/B,/C} 53 54 9

Branching Search w/ Implications Covering Technique? A in cover A not in cover /B B {A,/B, C} {/A,B,/C} Implications Prune Tree (like BCP in SAT) Only exponential in decision 55 where must branch Possibly useful for dataflow subgraph selection? (Day 15) Treat application components as rows (minterms) Treat patterns as columns (PIs) But, more general (complicated) cost model 56 Optimization Heuristic Variant Summarize Minterms (signature cubes) rows represent collection of minterms with same primes Avoid generating full set of PIs pre-combining dominators during generation Branch-and-bound pruning get lower bound on remaining cost of a cover by computing independent set of primes (not necessarily maximal, that would be NP-hard) Don t backtrack when select prime for inclusion/exclusion pick cover large set of minterms/signatures weight to select hard to cover signatures Generate reduced set of PIs Iterative improvement 57 58 Canonical Form Can start with any form of logical expression Get unique truth-table/minterms Problem not sensitive to input statement compare covering (decomposition) compare sequential programming languages Cost: potentially exponential explosion in minterms/pis 59 Summary Formulate as covering problem Solution space restricted to PIs Essentials must be in solution Use dominators to further reduce space Then branching/pruning to explore rest of PIs Ways to reduce work group minterms/pis together early mostly fall into this general scheme 60 10

Big Ideas Canonical Form eliminate bias of input specification Technique: branch-and-bound pruning search exploit structure Dominators 61 Admin Assign5b due today Reading for Wednesday online (web) Withdraw date is Friday Probably won t get anything further graded Assign 6 & 7 out today No office hours on Tuesday Makeup office hours Wed. 5pm or send email, make appointment 62 11