1 Multi-Valued Logic Up to now…two-valued synthesis –Binary variables take only values {0, 1} Multi-Valued synthesis –Multi-valued variable X i can take.

Slides:



Advertisements
Similar presentations
Three Special Functions
Advertisements

FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover.
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Sum of Products.
Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.
ECE C03 Lecture 31 Lecture 3 Two-Level Logic Minimization Algorithms Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Quine-McCluskey (Tabular) Minimization  Two step process utilizing tabular listings to:  Identify prime implicants (implicant tables)  Identify minimal.
MVI Function Review Input X is p -valued variable. Each Input can have Value in Set {0, 1, 2,..., p i-1 } literal over X corresponds to subset of values.
Two-Level Logic Synthesis -- Heuristic Method (ESPRESSO)
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Logic Synthesis 2 Outline –Two-Level Logic Optimization –ESPRESSO Goal –Understand two-level optimization –Understand ESPRESSO operation.
1 Consensus Definition Let w, x, y, z be cubes, and a be a variable such that w = ax and y = a’z w = ax and y = a’z Then the cube xz is called the consensus.
Espresso Speedup ee219b project Yujia Jin. Presentation Overview Unate reduction for SCCC (reduce) –weakly unate –strongly unate –results Single sweep.
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
COE 561 Digital System Design & Synthesis Two-Level Logic Synthesis
COE 561 Digital System Design & Synthesis Two-Level Logic Synthesis Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum.
EDA (CS286.5b) Day 17 Sequential Logic Synthesis (FSM Optimization)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 4: February 25, 2009 Two-Level Logic-Synthesis.
Multi-Valued Input Two-Valued Output Functions. Multi-Valued Input Slide 2 Example Automobile features 0123 X1X1 TransManAuto X2Doors234 X3ColourSilverRedBlackBlue.
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.
1 Multi-Valued Logic Up to now…two-valued synthesis –Binary variables take only values {0, 1} Multi-Valued synthesis –Multi-valued variable X i can take.
Logic Synthesis n -Basic Concepts and Tools n Tao Lin n Ohio Universtiy n February 17, 1998.
ECE Synthesis & Verification - Lecture 9b 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Boolean.
Gate Logic: Two Level Canonical Forms
Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover.
1 Generalized Cofactor Definition 1 Let f, g be completely specified functions. The generalized cofactor of f with respect to g is the incompletely specified.
Winter 2014 S. Areibi School of Engineering University of Guelph
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
Simple Minimization Loop F = EXPAND(F,D); F = IRREDUNDANT(F,D); do { cost = F ; F = REDUCE(F,D); F = EXPAND(F,D); F = IRREDUNDANT(F,D); } while ( F < cost.
Propositional Calculus Math Foundations of Computer Science.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization I.
1 Binary Recursion Tree The recursive Shannon expansion corresponds to a binary recursion tree Example: Path  (v) to node v corresponds to cube c  (v)
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’,
Tautology. Tautology Decision May be able to use unateness to simplify process Unate Function – one that has either the uncomplemented or complemented.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization II.
BOOLEAN FUNCTION PROPERTIES
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
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.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique.
Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Multi-Valued Logic.
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Heuristic Two-level Logic Optimization Giovanni De Micheli Integrated Systems Centre EPF Lausanne This presentation can be used for non-commercial purposes.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
Boolean Minimizer FC-Min: Coverage Finding Process Petr Fišer, Hana Kubátová Czech Technical University Department of Computer Science and Engineering.
COE 561 Digital System Design & Synthesis Two-Level Logic Synthesis Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum.
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.
Copyright © 2004 by Miguel A. Marin Revised McGILL UNIVERSITY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING COURSE ECSE DIGITAL SYSTEMS.
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.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic.
1 Quine-McCluskey Method. 2 Motivation Karnaugh maps are very effective for the minimization of expressions with up to 5 or 6 inputs. However they are.
Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,
ECE Synthesis & Verification - Lecture 3/4 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Two-level.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 15: March 4, 2002 Two-Level Logic-Synthesis.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 6: January 26, 2004 Sequential Optimization (FSM Encoding)
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)
Heuristic Minimization of Two-Level Logic
CSE 370 – Winter 2002 – Logic minimization - 1
ECB2212-Digital Electronics
Heuristic Minimization of Two Level Circuits
Heuristic Minimization of Two Level Circuits
Tautology Decision May be able to use unateness to simplify process
Presentation transcript:

1 Multi-Valued Logic Up to now…two-valued synthesis –Binary variables take only values {0, 1} Multi-Valued synthesis –Multi-valued variable X i can take on values P i = {0,…,|P i |-1} (integers - but no ordering implied) –Symbolic variables take values from symbolic set, e.g. state: {s 0,s 1,…,s n } or X: {a,b,c}.

2 Multi-Valued Logic Formally: (sometimes called an mv-function).Formally: (sometimes called an mv-function). Problem: find the minimum (SOP) form for an incompletely-specified function of this kindProblem: find the minimum (SOP) form for an incompletely-specified function of this kind Big News: Nothing (much) changesBig News: Nothing (much) changes

3 Example “Truth Table” P 1 ={0,1,2}, P 2 ={0,1}P 1 ={0,1,2}, P 2 ={0,1} Here “2” means the value 2 and not {0,1}Here “2” means the value 2 and not {0,1} f(0,0) = 1f(2,1) = 1 f(1,0) = 0f(2,0) = * unspecified (don’t cares)

4 MV Function off on Don’t care

5 Terminology Vertex:Vertex: Cube:Cube: Containment:Containment: Implicant:Implicant:

6 Terminology Onset minterm:Onset minterm: Prime Implicant:Prime Implicant: Cover of F :Cover of F :

7 Terminology Prime Cover of F :Prime Cover of F : Distance of cubes c,d :Distance of cubes c,d : Supercube of c,d :Supercube of c,d : Note: All these definitions are exactly as they were in the binary case.

8 Notation-MV Literals Definition - A multi-valued literal is a binary logic function of the form where where Definition - A cube can be written as the product of MV-literals:

9 Notation-MV Literals If c i =P i we may omit from the expression (since =1)If c i =P i we may omit from the expression (since =1) Note analogy to two-valued case:Note analogy to two-valued case: Actually, multi-valued notation is superior to old (binary).Actually, multi-valued notation is superior to old (binary).

10 Example Can form rows marked a (b) as a single mv-cube implicant The following are cube covers of F. F 2 is a prime cover

11 Positional Notation Example: cube P 1 ={A,B,C,D}, P 2 ={R,S} (Symbolic) A B C D R S Cube: A cube does not depend on variable X i if it has all 1’s in the set of columns associated with X i.A cube does not depend on variable X i if it has all 1’s in the set of columns associated with X i. Each of the columns of a variable is called a part of that variable. There is one part for each value a variable can take.Each of the columns of a variable is called a part of that variable. There is one part for each value a variable can take. Extension of Espresso notationExtension of Espresso notation

12 Positional Notation (value=0) (value=1) 0 1     2 Extension of Espresso notation Example: X 1 X 2 X 3 c c c c c X 1 X 2 X 3 c c c c c

13 Positional Notation X 1 X 2 X 3 c c c c c

14 Minimization Problem for Multi-Valued Logic Given: a cover F of  and a cover D of the don’t-care set d, Find: A minimum sum-of-products form for  Same problem as for two-valued Generate primes of (f+d)Generate primes of (f+d) Generate covering tableGenerate covering table Solve the covering table (unate covering problem)Solve the covering table (unate covering problem) Same algorithms as for two-valued (except for small details).

15 Applications of Multi-Valued Logic Theorem (Hong): minimizing a two-valued (n input)  (m output) logic function g is equivalent to minimizing a single binary-output MV-logic function: f : {0,1}  {0,1} ...  {0,…,m-1}  {0,1} Proof( sketch): Let g = {f 0,…,f m-1 } be the multiple output function. Consider the characteristic function f of the multiple output function, (defined on (n+1) variables with the last one, y, being multi-valued on {0,1,…,m-1} ) :

16 Applications of Multi-Valued Logic Note: an implicant of g (the multi-output function) is a cube c in the x-space where each output is turned on only if f i (c)=1. Any output not turned on means no information (not offset), since the each output is the OR of all of its input cubes. X f 1 f 2 f 3 f 4 f 5 f 6 X f 1 f 2 f 3 f 4 f 5 f 6 x-cube x-cube g

17 Other Applications: Encoding Problems Other Applications: Input Encoding problemInput Encoding problem –bit-grouped PLA structure Output encoding problem?Output encoding problem? –output phase optimization? State encoding problemState encoding problem –Minimize symbolically to get constraints on a posssible binary encoding –solve constraints to derive binary code –Re-minimize binary problem –Implement in binary

18 Multi-Valued Minimization Example

19 Prime and irredundant SOP of f: (five cubes ) Equivalent to: Example - after minimization

20 Example - after minimization Note: is not a prime of f 0, but is a prime of f. Similarly for. f 0 f 1 f 2

21 Shannon Cofactor Note: this agrees with “standard” cofactor in the case of two-valued Hint: check cases on d i, c i, e.g. if d i =c i =1 (i.e. x i in d and c), then (c d ) i = c i  d i = 2 = {0,1} Rationale: Only care about value of c on subspace given by d. ( d is don’t care) Cofactor of cube c with respect to cube d (c d ) Note:

22 Shannon Cofactor - Example Example: space is {0,1}  {0,1,2} Cofactor of cover with respect to cube d is Note: Cofactor of a cover with respect to another cover is not defined.

23 Shannon Cofactor-Example F = (f,r) and cube d = X 1 {0,2} Consider the generalized cofactor: Co(F,d) = (fd,  d, rd) Note: We keep all the onset (not in  d ) and project the care onset fd to  d. Also, as in the binary case, but F Co(F,d) fdfdfdfd d

24 Shannon Cofactor Expansion Theorem (General Case) Theorem: Let f be any function and {c 1, …, c t } any set of cubes which partition the input space: Then Then

25 We immediately have: Shannon Cofactor Expansion Theorem (General Case) i.e. most Shannon cofactor results continue to hold. However, note, but

26 Recursive Paradigm: Multi-Valued Version

27 Still Open: Unate leaves (what does unateness mean?)Unate leaves (what does unateness mean?) Splitting choice (i.e. which { c i })Splitting choice (i.e. which { c i }) Unate ReductionUnate Reduction Recursive Paradigm: MV version

28 Definition 1: f is said to be weakly unate in X i if there exists some value j, such that changing X i from value = j to something else, does not cause f to decrease. Analog to unateness in two-valued case set j=0 and get monotone increasing; set j=1 and get monotone decreasingAnalog to unateness in two-valued case set j=0 and get monotone increasing; set j=1 and get monotone decreasing In general: detecting unateness is hard (obviously) Special case: unate cover Unateness: Multi-Valued

29 Definition 2: A cover F= c 1 +…+ c t is said to be weakly unate in X i iff there is some j such that, for each cube c k, either: (monotone increasing from value j in variable X i ) Weakly-Unate Cover j (X i ) j (X i ) c c c t c t 11111

30 Analogy to two-value: Rewrite (binary to MV)Rewrite (binary to MV)Example Weakly-Unate Cover Here j=1 i.e. monotone increasing from j=1 (monotone decreasing in X i ) Here j=0 i.e. monotone increasing from j=0 (monotone increasing in X i )

31 Easy to detect: Unate variables are those for which (Just looking for a column with all 0’s, except for rows of all 1’s) Weakly-Unate Cover

32 1. throw out rows of all 1’s 2. Look for column of all 0’s Weakly-Unate Cover j (X i ) c c c t c t j (X i ) c c c t c t 11111

33 F is weakly-unate in every variable. Example X 1 X 2 X 3 c c c c c X 1 X 2 X 3 c c c c c

34 Theorem 1: Let {c 1, …, c t } be a cube partition as in Shannon expansion theorem. Then: Proof: follows two-valued case exactly. Application to Tautology (1)

35 Theorem 2: Let f be weakly unate in variable x i from value j. Then: Analogous to for monotone increasing (from 0). Monotone Theorem Proof: (2)

36 Monotone Theorem

37 Theorem 3: (unate reduction) f is weakly-unate in X i, and the “unate value” is j. Then f = 1 iff Weakly Unate Reduction Theorem Proof:

38 Weakly Unate Reduction Theorem

39 Definition 3: Cover c 1 + … + c t is weakly-unate iff it is weakly-unate in all variables. Theorem 4 : c 1 + …+c t weakly-unate then c 1 + …+c t =1 iff c j =1 for some cube j. Proof. Follows from reduction theorem. Thus for weakly unate cover, can tell immediately. Tautology for Weakly Unate Cover Vertex not covered.

40 Reduction in One Step c exactly as in two-valued algorithm c is cube of unate variables, e.g. then A c =0. Hence f c =(T B).

41 Revised Tautology Left open: how to split? i.e. how to choose c 1, …, c t where c i  c j = , and  c i =1.

42 “Split by value” –Gets rid of variable X i in a single step. Methods of Splitting

43 “Split by parts” q, s partition P i (e.g. q={0,1}, s={2,3} –May get to unate leaves (somewhat) more quickly –More freedom to choose good partitions -don’t need to entirely eliminate variable X i at a node before splitting on X k. In practice, “split by parts” is used Methods of Splitting

44 Cover F =  1 +…+  |F| Goal: get to weakly unate leaves as fast as possible Definition 4: Active value of variable X i : (Any value k of X i with all 1’s in column is not active) Choose variable with most active values (Note: all inactive values can be equivalently grouped into one value.) Choice of Splitting Variable

45 Tie breaks (|F| is number of cubes) –Variables i maximizing (“Smallest” variable = most 0’s in columns) –Variables minimizing (least “2’s”) Choice of Splitting Variable

46 Cover F=c 1 +…+ c t, variable X i Goal: Like to find partition q, s of P i such that: is minimized.Goal: Like to find partition q, s of P i such that: is minimized. Hard problem! Use heuristicHard problem! Use heuristic “Fast to compute” more important than quality...“Fast to compute” more important than quality... Choice of Partition s not active q not active Heuristic: m active values in X im active values in X i q gets first m/2 active values, s the restq gets first m/2 active values, s the rest This reduces the number of active values on each side by half

47 Weakly-unate good enough for tautology based algorithms, but… F weakly-unate   F c weakly-unate Example: F is weakly unate cover.F weakly-unate   F c weakly-unate Example: F is weakly unate cover. Strongly Unate Functions X 1 X 2 X 3 X F = c = F c = X 1 X 2 X 3 X F = c = F c = F c is not weakly unate in X 3. (But in this example, f c is!) (However, this also holds for f and f c as well i.e. f can be weakly unate i.e. f can be weakly unate in a variable but f c may not be). in a variable but f c may not be).

48 F weakly-unate does not imply every prime of f essential. Example: f = { p1,p2,p3,p4,p5 } p1,…, p5 are all primes. –P1 essential –p2 nonessential –p3 essential –p4 nonessential –p5 essential Strongly Unate Functions p p p p p p p p p p Weakly unate in all variables A column of all 1’s indicates a value that is not active.

49 f weakly-unate does not imply  f weakly-unate. All these are primes. Need stronger condition... Strongly Unate Functions  f =

50 Stongly Unate functions Definition 5: f is strongly-unate in X i iff there is some total order < on P i such that, for j<k in P i Thus “increasing” X i (from value j to value k, if j<k) doesn’t decrease f. Example: strongly unate cover (order is from left to right i.e. 1<2<3 on all variables) Can detect strongly unate cover by the existence of a value order for each P i, where the 0’s are on the left for all cubes f =

51 f strongly-unate  f weakly-unatef strongly-unate  f weakly-unate f strongly-unate  f strongly-unatef strongly-unate  f strongly-unate f strongly-unate  f c strongly-unatef strongly-unate  f c strongly-unate f strongly-unate  every prime of f essential..f strongly-unate  every prime of f essential..But: Weakly-unate applies to a cover more oftenWeakly-unate applies to a cover more often –easier to compute –good enough for tautology based algorithms Strongly unate not used in two-level logic minimization algorithms (so far). Strongly Unate Functions: Propositions

52 Use basic logic synthesis algorithm 1.Generate all primes 2.Form covering table 3.Solve covering table Steps (2)-(3) are same as in binary case Exact Minimization

53 Use Espresso-II Irredundant, Reduce, Lastgasp (Unchanged because tautology based)Irredundant, Reduce, Lastgasp (Unchanged because tautology based) Essential Primes essentially unchanged (minor technical differences in expression)Essential Primes essentially unchanged (minor technical differences in expression) Expand Minor difference from Espresso-II Can’t use blocking matrix B c when expanding cube c.Expand Minor difference from Espresso-II Can’t use blocking matrix B c when expanding cube c. –May be able to expand c i even if column j is in a minimal column cover of B c. Heuristic Minimization