Download presentation

Presentation is loading. Please wait.

Published byJeffry Anthony Modified about 1 year ago

1
1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Heuristic Logic Optimization (Espresso)

2
ECE 667- Espresso logic minimizer 2 Outline Two-level logic minimization –Heuristic logic optimizer Espresso Unate recursive paradigm –Unateness –Recursive optimization Single output optimization –Application of containment check Multiple output optimization –Generalization from single-output optimization –Concept of a characteristic function

3
ECE 667- Espresso logic minimizer 3 ESPRESSO – two-level logic optimizer

4
ECE 667- Espresso logic minimizer 4 Shannon Expansion f : B n B Shannon Expansion: Theorem: F is a cover of f. Then F = x F x + x’ i F x ‘ We say that f (F) is expanded about x i. x i is called the splitting variable.

5
ECE 667- Espresso logic minimizer 5 List of Cubes (Cover Matrix) We often use matrix notation to represent a cover: Example: F = ac + c’d + bcd’ a b c d a b c d a c 1 2 1 2 1 - 1 - c’d 2 2 0 1 or - - 0 1 bcd’ 2 1 1 0 - 1 1 0 Each row represents a cube 1 means that the positive literal appears in the cube 0 means that the negative literal appears in the cube The 2 (or -, don’t care) means that the variable does not appear in the cube. Finding factors from matrix representation is easy.

6
ECE 667- Espresso logic minimizer 6 Cover Matrix

7
ECE 667- Espresso logic minimizer 7 Fundamental Theorem Theorem: Let c be a cube and f a function. Then c f f c 1. Proof. We use the fact that x f x = x f, and f x is independent of x. If : Suppose f c 1. Then cf =f c c = c. Thus, c f. f c

8
ECE 667- Espresso logic minimizer 8 Definition: A function f : B n B is symmetric with respect to variables x i and x j iff f(x 1,…,x i,…,x j,…,x n ) = f(x 1,…,x j,…,x i,…,x n ) Definition: A function f : B n B is totally symmetric iff any permutation of the variables in f does not change the function Some Special Functions Symmetry can be exploited in searching the binary decision tree because: - That means we can skip one of four sub-cases - used in automatic variable ordering for BDDs

9
ECE 667- Espresso logic minimizer 9 Definition: A function f : B n B is positive unate in variable x i iff This is equivalent to monotone increasing in x i : for all minterm pairs (m -, m + ) where For example, m - 3 =1001, m + 3 =1011 (where i =3) Unate Functions

10
ECE 667- Espresso logic minimizer 10 Similarly for negative unate monotone decreasing: A function is unate in x i if it is either positive unate or negative unate in x i. Definition: A function is unate if it is unate in each variable. Definition: A cover F is positive unate in x i iff x i c j for all cubes c j F Unate Functions

11
ECE 667- Espresso logic minimizer 11 c b a mc+mc+ mc-mc- f is positive unate in a,b : f(m a + ) f(m a - ) f(m b + ) f(m b - ) and negative unate in c: f(m c - ) = 1 f(m c + ) = 0 Example - unateness off on Minterms associated with c m c - = (010) = 1 m c + = (011) = 0

12
ECE 667- Espresso logic minimizer 12 The Unate Recursive Paradigm Key pruning technique based on exploiting the properties of unate functions –based on the fact that unate leaf cases can be solved efficiently New case splitting heuristic –splitting variable is chosen so that the functions at lower nodes of the recursion tree become unate

13
ECE 667- Espresso logic minimizer 13 Unate covers F have many extraordinary properties: –If a cover F is minimal with respect to single-cube containment, all of its cubes are essential primes. –In this case F is the unique minimum cube representation of its logic function. –A unate cover represents the tautology iff it contains a cube with no literals (constant 1). –Positive unate: f = x f x + f x’ –Negative unate: f = f x + x’f x’ This type of implicit enumeration applies to many sub-problems (prime generation, reduction, complementation, etc.). The Unate Recursive Paradigm

14
ECE 667- Espresso logic minimizer 14 Unate Recursive Paradigm Create cofactoring tree stopping at unate covers –choose, at each node, the “most binate” variable for splitting –recurse until no binate variable left (unate leaf) “Operate” on the unate cover at each leaf to obtain the result for that leaf. Return the result At each non-leaf node, merge (appropriately) the results of the two children. Main idea: Operation on unate leaf is computationally less complex Operations: complement, simplify, tautology, generate-primes,...etc. a c b merge

15
ECE 667- Espresso logic minimizer 15 Two Useful Theorems - Tautology Theorem 1: Checking for tautology is simplified for unate functions –Positive unate (f = x f x + f x’ ) f 1 f x’ = 1 –Negative unate (f = f x + x’f x’ ) f 1 f x = 1 Theorem 2: Let A be a unate cover matrix. Then A 1 if and only if A has a row of all “-”s. Proof: If. A row of all “-”s is the tautology cube. Only if. Assume no row of all “-”s. Without loss of generality, suppose function is positive unate. Then each row has at least one “1” in it. Consider the point (0,0,…,0). This is not contained in any row of A. Hence A 1.

16
ECE 667- Espresso logic minimizer 16 Recursive Tautology – termination rules

17
ECE 667- Espresso logic minimizer 17 Recursive Tautology - example

18
ECE 667- Espresso logic minimizer 18 Recursive Complement Operation Theorem: Proof :

19
ECE 667- Espresso logic minimizer 19 COMPLEMENT Operation Algorithm COMPLEMENT(List_of_Cubes C) { if(C contains single cube c) { C res = complement_cube(c) // generate one cube per return C res // literal l in c with ^l } else { x i = SELECT_VARIABLE(C) C 0 = COMPLEMENT(COFACTOR(C,^x i )) Ù ^x i C 1 = COMPLEMENT(COFACTOR(C,x i )) Ù x i return OR(C 0,C 1 ) }

20
ECE 667- Espresso logic minimizer 20 Recursive Complement – termination rules

21
ECE 667- Espresso logic minimizer 21 Recursive Complement – example (split)

22
ECE 667- Espresso logic minimizer 22 Recursive Complement – example (merge)

23
ECE 667- Espresso logic minimizer 23 Incompletely Specified Boolean Functions F = (f, d, r) : B n {0, 1, *} where * represents a don’t care. f = onset function - f(x)=1 F(x)=1 r = offset function - r(x)=1 F(x)=0 d = don’t care function - d(x)=1 F(x)=* (f,d,r) forms a partition of B n, i.e. f + d + r = B n fd = fr = dr = (pairwise disjoint)

24
ECE 667- Espresso logic minimizer 24 A completely specified Boolean function g is a cover for F = (f,d,r) if f g f+d Note: g r = if x d, then g(x) = 0 or 1 (don’t care) if x f, then g(x)=1 if x r, then g(x)=0. Also: r = f’d’ g’ f’ Incompletely Specified Boolean Functions f d r

25
ECE 667- Espresso logic minimizer 25 ESPRESSO – 2-level logic optimizer

26
ECE 667- Espresso logic minimizer 26 Example: Logic Minimization (single output) Consider F(a,b,c)=(f,d,r), where f={abc, abc, abc} and d ={abc, abc}, and the sequence of covers illustrated below: abc is redundant a is prime F 3 = a+abc Expand abc bc Expand abc a F 2 = a+abc + abc F 4 = a+bc off on Don’t care F 1 = abc + abc+ abc c b a

27
ECE 667- Espresso logic minimizer 27 Two-level minimization (multiple-outputs) Initial representation: a b c 0 – 0 0 1 – – 1 1 1 – 1 f 1 f 2 0 1 1 0 000100 110 010 111011 001 000100 110 010 111011 001 f1f1 f2f2 101 f1f1 f2f2 000100 110 010 111011 001 000100 110 010 111 011 001 101 a b c 0 – 0 0 1 1 1 – 1 f 1 f 2 0 1 1 1 0 Minimized cover: c b a

28
ECE 667- Espresso logic minimizer 28 ESPRESSO Illustrated minimum Local minimum Local

29
ECE 667- Espresso logic minimizer 29 REDUCE Problem: Given a cover F and c F, find the smallest cube c c such that F\{ c } + { c } is still a cover. Cube c is called the maximally reduced cube of c. off on Don’t care REDUCE is order dependent

30
ECE 667- Espresso logic minimizer 30 Expand and Reduce Fundamental procedures of Espresso

31
ECE 667- Espresso logic minimizer 31 Validity of expansion Containment check: is the expanded cube contained in F ?

32
ECE 667- Espresso logic minimizer 32 Expand - example Validity of expansion

33
ECE 667- Espresso logic minimizer 33 Reduce Transform a cover of prime implicants: Replace each prime implicant p, wherever possible, with a smaller, non-prime implicant contained by p. Purpose of Reduce: iterative improvement Moves function away from local minimum –The subsequent Expand may be able to find a better set of primes Similar to Expand, uses the same containment check

34
ECE 667- Espresso logic minimizer 34 Single output function 1.Expand input part: (0 0 0 | 1) (0 - 0 | 1) Check if (f – a’b’c’) a'’bc’ = 1 2. Reduce output part: (0 1 - | 1) (0 1 - | 0) (remove the cube) Check if (f – a’b) a'’b = 1

35
ECE 667- Espresso logic minimizer 35 Multiple output function - expand Expand output part: (0 - 1 | 1 0) (0 - 1 | 1 1) C = 0-1| 10, C ~ = 0-1|01 Check if (f – {0-1|10}) 0-1|01 = 1

36
ECE 667- Espresso logic minimizer 36 Multiple output function – remove redundancy Remove redundant cube: (0 0 - | 0 1) (0 0 - | 0 0) C = 00-|01, C ~ = 00-|00 Check if (f – {00-|01}) 00-|01 = 1

37
ECE 667- Espresso logic minimizer 37 Multiple output function – summary

38
ECE 667- Espresso logic minimizer 38 How to Expand and Reduce

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google