Top Banner
1 Logic Synthesis 3 Logic Synthesis Logic Synthesis Part III Part III Maciej Ciesielski Maciej Ciesielski [email protected] [email protected] Univ. of Massachusetts Univ. of Massachusetts Amherst, MA Amherst, MA
34

Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski [email protected] Univ. of Massachusetts Amherst, MA.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

1Logic Synthesis 3

Logic SynthesisLogic SynthesisPart IIIPart III

Maciej CiesielskiMaciej Ciesielski

[email protected]@ecs.umass.edu

Univ. of MassachusettsUniv. of Massachusetts

Amherst, MAAmherst, MA

Page 2: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 2

Non-Disjoint Bi-DecompositionNon-Disjoint Bi-Decomposition

• A systematic method to perform non-disjoint decomposition• Bi-decomposition: F = D Q

– uses BDD cut , but there is no concept of bound set / free set– The top set defines a divisor D– The bottom set defines the quotient Q (sort of …)

FD

Q

Boolean operator

(AND, OR, XOR)

F

D

F/DBDD

cut

Page 3: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 3

OutlineOutline

• Review of current decomposition methods– Algebraic – Boolean

• Theory of BDD decomposition [Yang, Ciesielski 1999, 2000]

– Bi-decomposition F = D Q– Boolean AND/OR Decomposition– Boolean XOR Decomposition– MUX Decomposition

• Logic optimization based on BDD decomposition

Page 4: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 4

Functional Decomposition – previous workFunctional Decomposition – previous work

• Ashenhurst [1959], Curtis [1962]– Tabular method based on cut: bound/free variables– BDD implementation:

• Lai et al. [1993, 1996], Chang et al. [1996]

• Stanion et al. [1995]

• Roth, Karp [1962]– Similar to Ashenhurst, but using cubes, covers

– Also used by SIS

• Factorization based– SIS, algebraic factorization using cube notation

– Bertacco et al. [1997], BDD-based recursive bidecomp.

Page 5: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 5

Drawbacks of Traditional Synthesis MethodsDrawbacks of Traditional Synthesis Methods

• Weak Boolean factorization capability.• Difficult to identify XOR and MUX decomposition.• Separate platforms for Boolean operations and

factorization.

• Our goal: use a common platform to carry out both Boolean operations and factorization: BDD’s

Page 6: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 6

First work, Karplus [1988]: 1-dominatorFirst work, Karplus [1988]: 1-dominator

d

10

ca

b

1 0

*

a + b c + d

• Definition: 1-dominator is a node that belongs to every path from root to terminal 1.

• 1-dominator defines algebraic conjunctive (AND) decomposition: F = (a+b)(c+d).

F

a

bc

d

10

1-dominator

Page 7: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 7

Karplus: 0-dominatorKarplus: 0-dominator

a

b

0 1

d

10

c

a b c d

• Definition: 0-dominator is a node that belongs to every path from root to terminal 0.

• 0-dominator defines algebraic disjunctive (OR) decomposition: F = ab + cd.

a

bc

d

10

F

0-dominator

Page 8: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 8

Bi-decomposition based on DominatorsBi-decomposition based on Dominators

• Generalize the concept of algebraic decomposition and dominators to:• Generalized dominators• Boolean bi-decomposition: F = D Q,

where = AND, OR, XOR

• First, let’s review fundamental theorems for Boolean division and factoring.

Page 9: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 9

Boolean DivisionBoolean Division

Definitions

• G is a Boolean divisor of F if there exist H and R such that F = G H + R, and G H 0.

• G is said to be a factor of F if, in addition, R=0, that is:F = G H.

where H is the quotient, R is the remainder.Note: H and R may not be unique.

Page 10: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 10

Boolean Factor - Boolean Factor - TheoremTheorem

Theorem:

Boolean function G is a Boolean factor of Boolean function F iff F G , (i.e. FG’ = 0, or G’ F’).

FF

GGExample:

F = a + bc; G = (a+c)F=(a+b)(a+c); R=0

Proof:: G is a Boolean factor of F. Then H s.t. F = GH;

Hence, F G (as well as F H).

: F G F = GF = G(F + R) = GH. (Here R is any function R G’)

Page 11: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 11

Boolean Division - Boolean Division - TheoremTheorem

Theorem: G is a Boolean divisor of F if and only if F G 0.

GGFF

Proof:

: F = GH + R, GH 0 FG = GH + GR. Since GH 0, FG 0.

: Assume that FG 0. F = FG + FG’ = G(F + K) + FG’. (Here K G’.)

Then F = GH + R, with H = F + K, R = FG’. Since GH = FG 0, then GH 0.

Note: F has many divisors. We are looking for a G such that F = GH + R, where G, H, R are simple functions (simplify F with DC = G’)

Example:

F = ab+ac+bc; G = b+c

F= a(b+c)+bc; R=bc

Page 12: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 12

Boolean DivisionBoolean Division

Goal : for a given F, find D and Q such that F = Q · D.

Boolean Space

FFD

FQ

F = e + bd, D = e + d, Q = e + b

Page 13: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 13

Conjunctive (AND) DecompositionConjunctive (AND) Decomposition

• Conjunctive (AND) decomposition: F = D Q.

• Theorem:

Boolean function F has conjunctive decomposition iff F D. For a given choice of D, the quotient Q must satisfy: F Q F + D’.

DDQQ F

• For a given pair (F,D), this provides a recipe for Q .

Page 14: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 14

Boolean Division Boolean Division AND decompositionAND decomposition

FFD

FQ

F = e + bd, Q = e + b F + D’

Boolean Space

D = e + d,

Given function F and divisor D F, find Q such that:

F Q F + D’.

D’

Page 15: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 15

AND DecompositionAND Decomposition ( (F = D Q): Example Example

• Recall: given (F,D), quotient Q must satisfy: F Q F + D’.

d

e

b

0 1

F = e + bde

b

0 11

De

b

0 1

D = e + b,

d

e

b

0 1

DC

Q

d

e

0 1

Q = e + d

DC

DC

ebd

00 01 11 10

0

1

1 1

111

Q

Page 16: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 16

Disjunctive (OR) DecompositionDisjunctive (OR) Decomposition

• Disjunctive (OR) decomposition: F = G + H.

• Theorem:

Boolean function F has disjunctive decomposition iff F G. For a given choice of G, the term H must satisfy: F’ H’ F’ + G.

• For a given (F,G), this provides a recipe for H .

GGHH

F

Dual to conjunctive

decomposition.

Page 17: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 17

Boolean AND/OR Bi-decompositionsBoolean AND/OR Bi-decompositions

• Conjunctive (AND) decomposition

If D F, F = F D = Q D.

• Disjunctive (Disjunctive (OROR) decomposition) decomposition

If If G F, F = F + G = H + G.

• D, G = generalized dominators

Page 18: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 18

Generalized DominatorGeneralized Dominator D D

af

bb

c c

0 0

D

g

d

e

a

f

bb

c c

F

1 00

1

Boolean divisor

F = D Q

Page 19: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 19

Generalized DominatorGeneralized Dominator G G

af

bb

c c

0 0

G

g

d

e

a

f

bb

c c

F

1 00

0

Boolean “subtractor”

F = G + H

Page 20: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 20

Boolean Division Based on Boolean Division Based on Generalized DominatorGeneralized Dominator

a

f

bb

c c

0 0

D

g

d

e

a

f

bb

c c

F

1 00

g

d

e

a

f

bb

c c

Q

1

DC

0

DC

minimizeg

d

e

a

Q

10

Q = ag + d + e

1

reduce

a

f

b

c

0

D

D = af + b + c

1

Page 21: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 21

Special Case: Special Case: 1-dominator1-dominator

a

b

1 0

a + b

d

10

c

*

c + dFa

b

c

d

10

1-dominator

F = (a+b)(c+d)

Page 22: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 22

Special Case: Special Case: 0-dominators0-dominators

a

b

0 1

d

10

c

a b c da

b

c

d

10

F

0-dominator

F = ab + cd

Page 23: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 23

Algebraic Algebraic XOR XOR DecompositionDecomposition

h

F

f

h

F

f’f

+= h

f

0

hf

h

f’

0

h’f’

= complement edge

= 1-edge edge = 0-edge edge

Page 24: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 24

AlgebraicAlgebraic XOR XOR Decomposition: Decomposition: x-dominatorsx-dominators

F

1

a

d

b

c

x-dominator a+b

1

a

b

c+d

1

d

c

Page 25: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 25

Boolean Boolean XORXOR Decomposition: Decomposition: Generalized x-dominatorsGeneralized x-dominators

Given F and G, there exists H : F = G H; H = F G.

F

1

a

d

b

c c

Generalized x-dominator

c

d

1

G

1

H

a

d

b

c

Page 26: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 26

MUX MUX DecompositionDecomposition

f g

F

v 0 1

f g

F

v

f g

h

F

0 1

f gh

F

• Simple MUX decomposition

• Complex MUX

decomposition

Page 27: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 27

FunctionalFunctional MUX MUX Decomposition - example Decomposition - example

F

h

f g

F

h

f g

0 1

1

0 1

b

a

0

F

dc

F

1

d

b

a

c

0

Page 28: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 28

Synthesis FlowSynthesis FlowBoolean Network

Construct Global BDDs

Variable Reorder

Decompose BDD

Factoring Tree Processing

Technology Mapping

Construct Factoring Trees

Page 29: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 29

Factoring Tree Processing: Factoring Tree Processing:

Page 30: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 30

A Complete Synthesis ExampleA Complete Synthesis Example

Page 31: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 31

A Complete Synthesis Example (Decompose function A Complete Synthesis Example (Decompose function gg))

Page 32: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 32

A Complete Synthesis Example (Decompose function A Complete Synthesis Example (Decompose function hh))

Page 33: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 33

A Complete Synthesis Example (Sharing Extraction)A Complete Synthesis Example (Sharing Extraction)

Page 34: Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski ciesiel@ecs.umass.edu Univ. of Massachusetts Amherst, MA.

Logic Synthesis 3 34

ConclusionsConclusions

• BDD-based bi-decomposition is a good alternative to traditional, algebraic logic optimization– Produces Boolean decomposition– Several types: AND, OR, XOR, MUX

• BDD decomposition-based logic optimization is fast.

• Stand-alone BDD decomposition scheme is not amenable to large circuits– Global BDD too large– Must partition into network of BDDs (local BDDs)