1 node minimization problem:problem: –given a boolean network, optimize it by minimizing each node...

57
1 Node Minimization Node Minimization Problem: Problem: Given a Boolean network, optimize it by Given a Boolean network, optimize it by minimizing each node minimizing each node as much as possible as much as possible . . Note: Note: The initial network structure is given. The initial network structure is given. Typically applied after the global Typically applied after the global optimization, i.e. division and optimization, i.e. division and resubstitution. resubstitution. We minimize the function associated with We minimize the function associated with each node. each node. What do we mean by minimizing the node “as What do we mean by minimizing the node “as much as possible”? much as possible”?

Post on 19-Dec-2015

227 views

Category:

Documents


1 download

TRANSCRIPT

1

Node Minimization Node Minimization

• Problem:Problem: – Given a Boolean network, optimize it by Given a Boolean network, optimize it by

minimizing each node minimizing each node as much as possibleas much as possible. .

• Note:Note: – The initial network structure is given. Typically The initial network structure is given. Typically

applied after the global optimization, i.e. division applied after the global optimization, i.e. division and resubstitution.and resubstitution.

– We minimize the function associated with each We minimize the function associated with each node. node.

– What do we mean by minimizing the node “as What do we mean by minimizing the node “as much as possible”?much as possible”?

2

Functions Implementable at a NodeFunctions Implementable at a Node

In a Boolean network, we may represent a In a Boolean network, we may represent a node using the primary inputs {xnode using the primary inputs {x11,.. x,.. xnn} } plusplus the intermediate variables {ythe intermediate variables {y11,.. y,.. ymm}, as long }, as long as the network is as the network is acyclicacyclic. .

DEFINITION 1:DEFINITION 1: A function g A function gjj , whose variables are , whose variables are a subset of {xa subset of {x11,.. x,.. xnn, yy11,.. y,.. ym}m}, is , is implementable at a node j if implementable at a node j if – the variables of gthe variables of gjj do not intersect with TFO do not intersect with TFOjj

– the replacement of the function associated with j the replacement of the function associated with j by gby gjj does not change the does not change the functionalityfunctionality of the of the network. network.

3

Functions Implementable at a NodeFunctions Implementable at a Node

• The set of The set of implementableimplementable functions at j provides the functions at j provides the solution space of the local optimization at node j. solution space of the local optimization at node j.

• TFOTFOj j = {node i s.t. i = j or = {node i s.t. i = j or path from j to i} path from j to i}

4

Prime and Irredundant Boolean Prime and Irredundant Boolean Network Network

Consider a sum of products expression FConsider a sum of products expression Fjj associated with a node j. associated with a node j.

Definition 2:Definition 2: F Fjj is is primeprime (in multi level sense) if (in multi level sense) if for all cubes c for all cubes c FFjj, no , no literalliteral of c can be of c can be removed without changing the functionality removed without changing the functionality of the network. of the network.

Definition 3:Definition 3: F Fjj is is irredundantirredundant if for all cubes c if for all cubes c F Fjj, the removal of c from F, the removal of c from Fjj changes the changes the functionality of the network. functionality of the network.

5

Prime and Irredundant Boolean Prime and Irredundant Boolean Network Network

Definition 4:Definition 4: A Boolean A Booleannetwork is prime and network is prime and irredundant if Firredundant if Fjj is prime is prime and irredundant for all j. and irredundant for all j.

Theorem 1:Theorem 1: A network is 100% testable for A network is 100% testable for single stuck at faults (s a 0 or s a 1) iff it is single stuck at faults (s a 0 or s a 1) iff it is prime and irredundant. prime and irredundant.

6

Local Optimization Local Optimization

Goals:Goals:

Given a Boolean network, Given a Boolean network, 1.1. make the network prime and irredundant. make the network prime and irredundant.

2.2. for a given node of the network, find a for a given node of the network, find a least-costleast-cost sum of sum of products expression among the implementable functions products expression among the implementable functions at the node. at the node.

Note:Note: – Goal 2 implies the goal 1, Goal 2 implies the goal 1, – But we want more than just 100% testability. There are But we want more than just 100% testability. There are

many expressions that are prime and irredundant, just many expressions that are prime and irredundant, just like in two-level minimization. We seek the like in two-level minimization. We seek the bestbest. .

7

Local Optimization Local Optimization

Key IngredientKey Ingredient Network Don't Cares: Network Don't Cares:

1)1) External don't caresExternal don't cares XDC XDCkk , k=1,…,p, - set , k=1,…,p, - set of minterms of the primary inputs given for of minterms of the primary inputs given for each primary output each primary output

2)2) Internal don't cares derived from the Internal don't cares derived from the network structurenetwork structure• Satisfiability Satisfiability SDCSDC • Observability Observability ODCODC

8

SDC SDC

Recall:Recall:

• We may represent a node using the primary We may represent a node using the primary inputs inputs plusplus the intermediate variables. the intermediate variables. – The Boolean space is The Boolean space is BBn+mn+m . .

• However, the intermediate variables are However, the intermediate variables are dependent on the primary inputs. dependent on the primary inputs.

• Thus Thus notnot all the minterms of B all the minterms of Bn+m n+m can occur. can occur.

9

SDC SDC

Example:Example:

yy11 = F = F11 = = xx11

yyjj = F = Fjj = y = y11xx22

– Since ySince y11 = = xx11, y, y1 1 xx11 never occurs. never occurs. – Thus we may include these points to represent FThus we may include these points to represent Fjj

Don't Cares Don't Cares – SDCSDC = (y = (y1 1 xx11)+(y)+(yjj yy11xx22)

In general,

Note: SDC Bn+m

)(1

jj

m

jjj FyFySDC

10

ODC ODC

yyjj = = xx11 x x22 + x + x11xx33

zzkk = x = x11 x x22 + y + yjjxx22 + (y + (yjj x x33)

• Any minterm of xAny minterm of x11 x x22 + x + x22 x x33 + x + x22 x x33 determines z determines zkk independent of y independent of yjj ..

• The ODC of yThe ODC of yjj for z for zkk is the set of minterms of the primary inputs for is the set of minterms of the primary inputs for which the value of ywhich the value of yjj is is not observablenot observable at z at zkk

This means that the two Boolean networks,This means that the two Boolean networks,– one with yone with yjj forced to 0 and forced to 0 and

– one with yone with yjj forced to 1 forced to 1

compute the same value for zcompute the same value for zkk when x when x ODC ODCjkjk

0 1{ | ( ) | ( ) | }j j

njk k y k yODC x B z x z x

11

Don't Cares for Node j Don't Cares for Node j

FFjj

inputsinputs

outputsoutputs

ODCODC

SSDD

CC

Define the don't care sets Define the don't care sets DCDCjj for a node j as for a node j as

ODC and SDC ODC and SDC

illustrated:illustrated: BooleanBooleannetworknetwork

1

( ) ( )j

p

ij i i jk kii TFO k

DC y F y F ODC XDC

12

Main TheoremMain TheoremTHEOREM 2:THEOREM 2: The function The function FFjj = (F = (Fjj-DC-DCjj, DC, DCjj, F, Fjj+DC+DCjj) is the ) is the

completecomplete set of implementable functions at node j set of implementable functions at node j

COROLLARY 3:COROLLARY 3: F Fjj is prime and irredundant is prime and irredundant (in the multi-(in the multi-level sense)level sense) iff it is prime and irredundant cover of iff it is prime and irredundant cover of FFjj

A least cost expression at node j can be obtained by minimizing A least cost expression at node j can be obtained by minimizing FFjj. .

A prime and irredundant Boolean network can be obtained by using A prime and irredundant Boolean network can be obtained by using only 2 level logic minimization for each node j with the don't care only 2 level logic minimization for each node j with the don't care DCDCjj . .

Note:Note: If FIf Fjj is changed, then DC is changed, then DCii may change for some other node i may change for some other node i in the network.in the network.

13

End of lecture 11End of lecture 11

14

Local Optimization Practical Local Optimization Practical Questions Questions

1.1. How to How to computecompute the don't care set at a the don't care set at a node? node? – XDC is given, SDC is easy, XDC is given, SDC is easy, – but how about but how about ODCODC? ?

• This don't care set may be too large. A good subset? This don't care set may be too large. A good subset?

2.2. How to How to minimizeminimize the function with the the function with the don't care? don't care? – Complement may be too large? Complement may be too large? – #Literals v.s. #Cubes? #Literals v.s. #Cubes?

15

ODC Computation ODC Computation zzkk

ggqqgg22

gg11

yyjj

xx11 xx22 xxnn

0 1{ | ( ) | ( ) | }j j

njk k y k yODC x B z x z x

0 1( ) | ( ) | }j j

kk y k y

j

zz x z x

y

kjk

j

zODC

y

DenoteDenote

wherewhere

16

ODC ComputationODC Computation

In general,In general,zzkk

ggqqgg22

gg11

yyjj

xx11 xx22 xxnn

17

ODC ComputationODC Computation

Conjecture:Conjecture:

This conjecture is This conjecture is truetrue if there is no reconvergent fanout if there is no reconvergent fanout in TFOin TFOjj. .

With reconvergence, the conjecture can be With reconvergence, the conjecture can be incorrectincorrect in in two ways: two ways: – it does not compute the complete ODC. (can have it does not compute the complete ODC. (can have correctcorrect

results but results but conservativeconservative) ) – it contains care points. (leads to it contains care points. (leads to incorrectincorrect answer) answer)

1

p

j jkk

ODC ODC

0 1[( | | ) ]j j

j

j i y i y ii FO

ODC F F ODC

18

Transduction (Muroga-197x) Transduction (Muroga-197x)

Definition:Definition: Given a node j, a permissible function at j is a Given a node j, a permissible function at j is a function of the function of the primary inputsprimary inputs implementable at j. implementable at j.

The original transduction computes a set of permissible The original transduction computes a set of permissible functions for a NOR gate in an functions for a NOR gate in an all NOR gateall NOR gate network. network. MSPFMSPF (Maximum Set of Permissible Functions) (Maximum Set of Permissible Functions)

CSPFCSPF (Compatible Set of Permissible Functions) (Compatible Set of Permissible Functions)

Both of these are just Both of these are just incompletely specified functionsincompletely specified functions, i.e. , i.e. functions with don’t cares.functions with don’t cares.

Definition:Definition: We denote by We denote by ggjj the function f the function fj j expressed in expressed in terms of the primary inputs. terms of the primary inputs. – ggjj(x) is called the (x) is called the global functionglobal function of j. of j.

19

Transduction CSPF Transduction CSPF

MSPF:MSPF: – is is expensiveexpensive to compute. to compute. – if the function of j is changed, the MSPF for some if the function of j is changed, the MSPF for some

other node i in the network may other node i in the network may changechange. .

CSPF:CSPF: – Consider a set of incompletely specified Consider a set of incompletely specified

functions {ffunctions {fjjCC} for a set of nodes J such that a } for a set of nodes J such that a

simultaneoussimultaneous replacement of the functions at all replacement of the functions at all nodes jnodes jJ each by an arbitrary cover of fJ each by an arbitrary cover of fjj

C C does does not change the functionality of the network. not change the functionality of the network.

– ffjjCC is called a is called a CSPFCSPF at j. The set {f at j. The set {fjj

CC} is called a } is called a compatible set of permissible functions (compatible set of permissible functions (CSPFsCSPFs). ).

20

Transduction CSPF Transduction CSPF

Note:Note: • CSPFs are defined for a CSPFs are defined for a setset of nodes. of nodes. • We don't need to recompute CSPF's if the We don't need to recompute CSPF's if the

function of other nodes in the set are changed function of other nodes in the set are changed according to their CSPFs according to their CSPFs – The CSPFs can be used The CSPFs can be used independentlyindependently..

• Any CSPF at a node is a Any CSPF at a node is a subsetsubset of the MSPF at of the MSPF at the node the node

• External don’t cares (External don’t cares (XDCXDC) must be compatible) must be compatible

21

Transduction CSPF Transduction CSPF

Key Ideas:Key Ideas: • Compute CSPF for one node at a time. Compute CSPF for one node at a time.

– from the primary outputs to the primary inputs from the primary outputs to the primary inputs

• If (fIf (f11CC ,…, f ,…, fj-1j-1

C C )) have been computed, compute fhave been computed, compute fjjC C so so

that simultaneous replacement of the functions at that simultaneous replacement of the functions at the nodes the nodes precedingpreceding j by functions in (f j by functions in (f11

CC ,…, f ,…, fj-1j-1C C ) is ) is

valid.valid.– put more don’t cares to those processed earlierput more don’t cares to those processed earlier

• Compute CSPFs for Compute CSPFs for edgesedges so that so that

Note: Note: – CSPFs are CSPFs are dependentdependent on the orderings of nodes/edges. on the orderings of nodes/edges.

[ , ]( ) ( )j

C Cj j i

i FO

f x f x

22

CSPF's for Edges CSPF's for Edges

Assume CSPF fAssume CSPF fiiCC for a node i for a node i

is given.is given.

• Ordering of Edges: Ordering of Edges: yy11 < y < y22 < … < y < … < yrr – put more don't cares on the edges processed earlier.put more don't cares on the edges processed earlier.– only for only for NORNOR gates gates

00 if fif fiiCC(x) = 1(x) = 1

ff[j,i][j,i]CC(x) =(x) = 11 if fif fii

CC(x) = 0 and for all y(x) = 0 and for all yk k > y> yjj: g: gkk(x) = 0 and(x) = 0 andggjj(x) = 1(x) = 1

** (don’t care)(don’t care) otherwiseotherwise

23

Transduction CSPF Transduction CSPF

Example:Example: y y1 1 < y< y2 2 < y< y33

yyii = [1 0 0 0 0 0 0 0] output= [1 0 0 0 0 0 0 0] output

yy11 = [0 0 0 0 = [0 0 0 0 11 1 1 1] 1 1 1] yy22 = [0 0 = [0 0 11 1 0 0 1 0 0 11 1] 1]

yy33 = [0 = [0 11 0 0 11 0 0 11 0 0 11]]

ff[1,i][1,i]C C = [0 * * * 1 * * *]= [0 * * * 1 * * *]

ff[2,i][2,i]C C = [0 * 1 * * * 1 *]= [0 * 1 * * * 1 *]

ff[3,i][3,i]C C = [0 1 * 1 * 1 * 1] = [0 1 * 1 * 1 * 1]

Note:Note: we just make the last 1 stay 1 and all others *. we just make the last 1 stay 1 and all others *. Note:Note: CSPF for [1; i] has the most don't cares among the CSPF for [1; i] has the most don't cares among the

three input edges. three input edges.

globalglobalfunctionsfunctionsof inputsof inputs

edge CSPFsedge CSPFs

ii

24

CSPF Computation CSPF Computation

1.1. Compute the global functions g for all the Compute the global functions g for all the nodes. nodes.

2.2. For each primary output zFor each primary output zkk , ,

ffzzkkCC(x)= *(x)= * if xif xXDCXDCkk

ffzzkkCC(x)= g(x)= gzzkk

(x)(x) otherwiseotherwise

3.3. For each node j in a topological order from For each node j in a topological order from the outputs, the outputs, – compute fcompute fjj

CC = = iFOjFOjff[j,i][j,i]

CC(x) (x) – compute CSPF for each fanin compute CSPF for each fanin

edge of j, i.e. f edge of j, i.e. f [k,j][k,j]CC

jj[j,i][j,i]

[k,j][k,j]

25

Generalization of CSPF's Generalization of CSPF's A Boolean network where a node function is A Boolean network where a node function is

arbitrary (arbitrary (not just NOR gatesnot just NOR gates). ).

Based on the same idea as Transduction Based on the same idea as Transduction – process one node at a time in a topological order process one node at a time in a topological order

from the primary outputs. from the primary outputs. – compute a compatible don't care set for an compute a compatible don't care set for an edgeedge, ,

CODCCODC[j,i][j,i] – intersect for all the fanout edges to compute a intersect for all the fanout edges to compute a

compatible don't care set for a compatible don't care set for a nodenode. .

CODCCODCjj= = iFoj Foj CODCCODC[j,i][j,i]CC

– Put more don't cares on nodes/edges processed Put more don't cares on nodes/edges processed earlier.earlier.

26

Compatible Don't Cares at Edges Compatible Don't Cares at Edges

Ordering of edges: yOrdering of edges: y1 1 < y< y2 2 < … < y< … < yrr

• Assume no don't care at a node i. Assume no don't care at a node i.

• A compatible don't care for an edge [j,i] is a A compatible don't care for an edge [j,i] is a function of CODCfunction of CODC[j,i][j,i](y) : B(y) : Br r BB

NoteNote: it is a function of the : it is a function of the locallocal inputs inputs (y(y1 1 , y, y2 2 ,… ,y,… ,yrr). It is 1 at m ). It is 1 at m B Brr if m is assigned if m is assigned

to be don’t care for the input line [j,i]. to be don’t care for the input line [j,i].

27

Compatible Don't Cares at EdgesCompatible Don't Cares at Edges

PropertyProperty on {CODC on {CODC[1,i][1,i],…,CODC,…,CODC[r,i][r,i]}}

• For all mFor all mBBrr, the value of y, the value of yii does not does not change by change by arbitrarily flippingarbitrarily flipping the values of the values of { y{ yjjFIFIi i | CODC| CODC[j,i][j,i](m) = 1 }(m) = 1 }

ii

CODCCODC[j,i][j,i](m)=1(m)=1

jjkk

CODCCODC[k,i][k,i](m)=1(m)=1

yyiino changeno changem is held fixed, but valuem is held fixed, but valueon yon yjj can be arbitrary can be arbitrary

if CODCif CODC[j,i][j,i](m) is don’t care(m) is don’t care

28

Compatible Don't Cares at Edges Compatible Don't Cares at Edges

Given {CODCGiven {CODC[1,i][1,i],…,CODC,…,CODC[j-1,i][j-1,i]}}compute CODCcompute CODC[j,i] [j,i] (m) = 1 iff the (m) = 1 iff the the value of ythe value of yii remains insensitive remains insensitiveto yto yjj under arbitrarily flipping of under arbitrarily flipping ofthe values of those ythe values of those ykk in the set: in the set:

= { k = { kFIFIi i | y| yk k < y< yjj, CODC, CODC[k,i][k,i](m) = 1 }(m) = 1 }

Equivalently, Equivalently, CODCCODC[j,i][j,i](m) = 1(m) = 1 iff for iff for | |( ) ( , ) 1i

j

fm B m m

y

( , , )jm m m m

29

Compatible Don't Cares at Edges Compatible Don't Cares at Edges

(here ) Thus we are arbitrarily flipping the m(here ) Thus we are arbitrarily flipping the m part. part.

In some sense is enough to keep fIn some sense is enough to keep fii insensitive to the value of insensitive to the value of

yyjj..

is called the is called the Boolean differenceBoolean difference of f of fii with respect to y with respect to yjj and is all and is all conditions when fconditions when fii is is sensitivesensitive to the value of y to the value of yjj. . – this is a function of FIthis is a function of FIii, but not y, but not yjj..

| |( ) ( , ) 1i

j

fm B m m

y

0 1( | | )j j

ki y i y

j

ff f

y

( , , )jm m m m m

30

Compatible Don't Cares at a Node Compatible Don't Cares at a Node

Compatible don't care at a node j, CODCCompatible don't care at a node j, CODC jj, can also be , can also be expressed as a function of the primary inputs. expressed as a function of the primary inputs.

• if j is a primary output, CODCif j is a primary output, CODCj j = XDC= XDCjj

• otherwise, otherwise, – represent CODCrepresent CODC[j,i][j,i] by the primary inputs for each fanout edge by the primary inputs for each fanout edge

[j,i]. [j,i]. – CODCCODCjj= = iFOjFOj(CODC(CODCii+CODC+CODC[j,i][j,i]))

THEOREM 7:THEOREM 7:

The set of incompletely specified functions with the The set of incompletely specified functions with the CODCsCODCs computed above for all the nodes provides a computed above for all the nodes provides a set of set of CSPFsCSPFs for an for an arbitraryarbitrary Boolean network. Boolean network.

31

Easier Computations of CODC Easier Computations of CODC Subset Subset

On page 46 of the paper by H. Savoj, an On page 46 of the paper by H. Savoj, an easier method for computing a CODC easier method for computing a CODC subset on each fanin ysubset on each fanin ykkof a function f is: of a function f is:

where CODCwhere CODCff is the compatible don’t care is the compatible don’t care already computed for node f, and where f already computed for node f, and where f has its inputs yhas its inputs y11, y, y2 2 ,…, y,…, yrr in that order. in that order.

The The notationnotation for the operator, C for the operator, Cyyf = ff = fy y ffyy , is , is used here.used here.

1 1

1 1

( ) ( )k ky y y f

k k

f f fCODC C C CODC

y y y

32

Easier Computations of CODC Easier Computations of CODC Subset Subset

The interpretation of the term for CODCThe interpretation of the term for CODCyy22

is that: of the minterms mis that: of the minterms mBBrr where f is where f is insensitiveinsensitive to yto y22, ,

we allow m to be a don’t care of ywe allow m to be a don’t care of y2 2 ifif– either m is either m is notnot a don’t care for the y a don’t care for the y11 input or input or

– no matter what value is chosen for yno matter what value is chosen for y11, , (C(Cyy11),), f is still f is still

insensitive to yinsensitive to y22 under m under m (f is insensitive at m for both (f is insensitive at m for both values of yvalues of y2 2 ))

1

1 2

( )yf f

Cy y

2

f

y

1

f

y

33

Computing Don't Cares using Computing Don't Cares using BDD'sBDD's

Handles Handles arbitraryarbitrary Boolean networks. Boolean networks.

– MSPF's for general case MSPF's for general case

– The complete set of implementable functions for The complete set of implementable functions for a given node a given node • incorporating SDC's incorporating SDC's

34

The Set of Implementable The Set of Implementable Functions Functions

Problem:Problem:

GivenGiven a node j and a set of a node j and a set of variables variables

S S { x { x11, …, x, …, xnn, y, y11, …, y, …, ym m }\}\TFOTFOjj, ,

FindFind the set of all the set of all implementable functions for implementable functions for j, where the inputvariables of j, where the inputvariables of each function is a subset of each function is a subset of S.S.

35

The Set of Implementable The Set of Implementable Functions Functions

Note:Note: • SDC's are subsumed.SDC's are subsumed.

• (S = {x(S = {x11, …, x, …, xnn} ) } ) MSPF MSPF

• (S = { x(S = { x11, …, x, …, xnn, y, y11, …, y, …, ym m }\}\TFOTFOjj)) the complete set the complete set of of implementable implementable functions functions at j.at j.

36

The Set of Implementable The Set of Implementable Functions Functions

Definitions:Definitions:

ggS S : B: Bn n B B|S| |S| the global functions of S; the global functions of S;the ithe ithth function of g function of gSS is the global function of is the global function of the ithe ithth variable of S. variable of S.

ggZ Z : B: Bn n { 0, 1, * } { 0, 1, * }pp the global functions of the global functions of the primary outputs the primary outputs plusplus XDC XDC

zzM M : B: Bn+1 n+1 B Bpp the functions of the primary the functions of the primary outputs expressed by the primary inputs outputs expressed by the primary inputs and yand yjj – for the node function of each primary output, for the node function of each primary output,

recursively substitute each fanin by its node recursively substitute each fanin by its node function, function, unlessunless the fanin is either a primary the fanin is either a primary input or yinput or yj j

j

SS

37

The Maximal Set of Implementable FunctionsThe Maximal Set of Implementable Functions

Given S: Given S: Consider a Boolean Consider a Boolean relationrelation

FFjjMM(s,y(s,yjj) : B) : B|S||S|B B B s.t. B s.t.

xxBBn n : (s = g: (s = gSS(x)) (x)) z zMM(x, y(x, yjj) ) g gZZ(x)(x)

NoteNote: F: FjjMM represents an represents an

incompletely specified function of sincompletely specified function of s,, i.e. if an s is associated with i.e. if an s is associated with bothboth y yj j = 1 and y= 1 and yj j = 0 then y= 0 then yj j = * (= * (don't care for that sdon't care for that s))

Theorem 8:Theorem 8: The set of functions given by F The set of functions given by FjjMM is is

the set of all implementable functions at j the set of all implementable functions at j (as (as functions of the variables of S.)functions of the variables of S.) – ProofProof. Easy.. Easy.

j

38

BDD Computation for FBDD Computation for FjjMM(s,y(s,yjj) )

• FFjjMM(s,y(s,yjj) is a ) is a relationrelation a one to many map from s a one to many map from syyjj

• FFjjMM(s,y(s,yjj) ) 1 iff 1 iff

xxBBn n : (s = g: (s = gSS(x)) (x)) z zMM(x,y(x,yjj))ggZZ(x)(x)

Universal Quantification:Universal Quantification:

For a function h : BFor a function h : BrrB of variables V={vB of variables V={v11,v,v22,..,v,..,vrr} and } and VVk k ={v={v11,v,v22,..,v,..,vkk} } V, the universal quantification of V, the universal quantification of h by Vh by Vkk is the function h is the function hkk of the variables V\V of the variables V\Vkk ( = V( = Vr- r-

kk ) ) s.t. s.t.

hhkk(V(Vr-kr-k) = 1 iff ) = 1 iff (V(VkkBBkk ) h(V ) h(Vkk, V, Vr-kr-k)=1)=1..

This is written as This is written as VVkk h(v) h(v) of of CCVVk k

h(v). h(v).

39

BDD Computation for FBDD Computation for FjjM M (s,y(s,yjj))

hhkk(V(Vr-kr-k) = 1 iff ) = 1 iff (V(VkkBBkk ) h(V ) h(Vkk, V, Vr-kr-k)=1)=1..

hhkk is computed by is computed by successivesuccessive cofactors of h by cofactors of h by VVhh..

hhkk(V(Vr-kr-k)=C)=Cvv11(C(Cvv22

(...C(...Cvvkk(h)..))(h)..))

where the operator where the operator

The computation can be done The computation can be done easilyeasily using using BDD'sBDD's..

Thus FThus FjjMM can be computed and represented using can be computed and represented using

BDD's. BDD's.

1 0i i i i iv v v v vC h h h h

( , ) ( ( )) ( , ) ( )M Mj j x S j ZF s y C s g x z x y g x

40

The Set of Implementable The Set of Implementable Functions Functions

Remarks:Remarks: • The BDD for FThe BDD for Fjj

M M may be may be largelarge. .

• Typically, S is set to FITypically, S is set to FIjj plusplus those variables whose fanins those variables whose fanins

are a are a subsetsubset of FI of FIjj..

– In processing yIn processing y22 we use y we use y33 since its support is a subset of the since its support is a subset of the support of ysupport of y22. .

• called the called the subset support filter.subset support filter. • corresponds to Boolean corresponds to Boolean re-substitutionre-substitution since F since Fjj

M M is a is a function of yfunction of y33. .

41

Summary of Computation of Don't Summary of Computation of Don't Cares Cares

• XDC is given, SDC is easy to compute. XDC is given, SDC is easy to compute. • Transduction Transduction

– NORNOR gate networks gate networks – MSPF, CSPF (MSPF, CSPF (permissible functions of PI onlypermissible functions of PI only) )

• Extension of CSPF's Extension of CSPF's (CODCs)(CODCs) for general for general networks networks – can be expensivecan be expensive to compute, to compute, not maximalnot maximal – implementable functions of implementable functions of PI and yPI and y. .

• Direct computation using BDD's Direct computation using BDD's – the the completecomplete set of implementable functions set of implementable functions – SDC's are also SDC's are also subsumedsubsumed. .

• Subset of don't cares Subset of don't cares – TFITFIjj and the nodes whose support are a and the nodes whose support are a subsetsubset of the of the

fanins of j. fanins of j.

42

End of lecture 12End of lecture 12

43

Minimizing Local Functions Minimizing Local Functions

Once an incompletely specified function (ISF) is Once an incompletely specified function (ISF) is derived, we minimize it. derived, we minimize it.

1. Minimize the number of literals 1. Minimize the number of literals – Minimum literal()Minimum literal() in the slides for Boolean division in the slides for Boolean division

2. The off set of the function may be too large. 2. The off set of the function may be too large. – Reduced offsetReduced offset minimization (built into ESPRESSO minimization (built into ESPRESSO

in SIS)in SIS)– TautologyTautology based minimization based minimization

If all else If all else failsfails, use ATPG techniques to remove , use ATPG techniques to remove redundancies.redundancies.

44

Reduced Offset Reduced Offset

Idea:Idea: In expanding any single In expanding any single cubecube, only part of , only part of the off set is useful. This part is called the the off set is useful. This part is called the reduced reduced offset for that cubeoffset for that cube. .

Example:Example:In expanding the cubeIn expanding the cube

a b c the point abc isa b c the point abc isof no use. Therefore of no use. Therefore during this expansion during this expansion abc might as well be put abc might as well be put in the offset. Then the offset which was ab + ab + bc in the offset. Then the offset which was ab + ab + bc becomes a + b. The reduced offset is always becomes a + b. The reduced offset is always unateunate. The . The tricktrick is to derive the reduced offset for a particular cube is to derive the reduced offset for a particular cube withoutwithout computing the offset. computing the offset.

45

Tautology based Two Level Tautology based Two Level Minimization Minimization

In this, two level minimization is done In this, two level minimization is done withoutwithout using the offset. Offset is used for blocking using the offset. Offset is used for blocking the expansion of a cube too far. The other the expansion of a cube too far. The other method of expansion is based on method of expansion is based on tautologytautology. .

Example:Example: • In expanding a cube c = abeg to aeg we In expanding a cube c = abeg to aeg we

can test if aeg can test if aeg f +d. This can be done by f +d. This can be done by testing (f +d)testing (f +d)aegaeg 1 i.e. is (f + d) 1 i.e. is (f + d) aegaeg a a tautology? tautology?

46

ATPG ATPG

Multi Level Tautology:Multi Level Tautology:

Idea:Idea: • Use testing methods. Use testing methods. (ATPG is (ATPG is

a highly developed a highly developed technology).technology). If we can prove If we can prove that a fault is that a fault is untestableuntestable, then , then the untestable signal can be the untestable signal can be set to a set to a constantconstant. .

• This is like This is like expansionexpansion in in . .

47

Removing Redundancies Removing Redundancies Redundancy removal:Redundancy removal: • do do randomrandom testing to locate easy tests testing to locate easy tests • apply new ATPG methods to apply new ATPG methods to proveprove testability of testability of

remaining faults. remaining faults. (if non-testable for s-a-1, set to 1 (if non-testable for s-a-1, set to 1 etc.)etc.)

ReductionReduction (redundancy addition)(redundancy addition) is the reverse of this. is the reverse of this. It is done to make something else It is done to make something else untestableuntestable. There . There is a close analogy with reduction in espresso. Here is a close analogy with reduction in espresso. Here also reduction is used to move away from a also reduction is used to move away from a local local minimumminimum. . && reduction = add an inputreduction = add an input

used in transduction (Muroga)used in transduction (Muroga) global flow (Bermen and Trevellan)global flow (Bermen and Trevellan) redundancy addition and removal (Marek-Sadowska et. al.)redundancy addition and removal (Marek-Sadowska et. al.)

ccbbaa

dd

48

Multiple Output Functions Multiple Output Functions Network of Multiple Output Functions: Network of Multiple Output Functions:

What is the set of implementable functions for fWhat is the set of implementable functions for fjj at N? at N? – Don't care formulation Don't care formulation does not workdoes not work – Boolean Relation:Boolean Relation: (completely specified) (completely specified)

BB : B : Bnn22BBmm

(one to many mapping)(one to many mapping)

49

Multiple Output Functions Multiple Output Functions

Implementable functions:Implementable functions: A function g A function gjj is an is an implementationimplementation (cover) of a Boolean (cover) of a Boolean relation relation BB (g(gj j BB ) ) ( (or contained inor contained in) iff: ) iff:

x, gx, gjj(x)(x)BB (x) (x)

50

Example: Boolean Relation Example: Boolean Relation

Adder followed by Adder followed by comparatorcomparator

WantWant: f : f BB

One solution:One solution:

f = 000 if a + b f = 000 if a + b 4,5,6 4,5,6

f = 100 if a + b = 4,5,6f = 100 if a + b = 4,5,6

This can’t be expressedThis can’t be expressedwith don’t careswith don’t cares

51

Representing Boolean Relations Representing Boolean Relations

Observability Function:Observability Function:

OO = characteristic function of Boolean = characteristic function of Boolean relation relation BB . .

OO (x,z) = 1 (x,z) = 1 z zBB (x)(x)

52

Representing Boolean Relations Representing Boolean Relations

Observability Network:Observability Network:

network of multiple output nodes network of multiple output nodes – same computational model same computational model – hierarchicalhierarchical formulation formulation NNjj

53

General Problem General Problem

GivenGiven network of multiple output functions and network of multiple output functions and observability specification: observability specification:

SummarizeSummarize all implementable all implementable functions at node j, i.e. derive functions at node j, i.e. derive FFjj

MM((yy,,yyjj ) ) such that: such that:– f is implementable at node j f is implementable at node j

f f F FjjMM((yy,,yyjj ) )

{Cerny 1976, {Cerny 1976,

Savoj - thesis 1992, IWLS'93 }Savoj - thesis 1992, IWLS'93 }

Optimization Problem:Optimization Problem:

Find Find bestbest f fj j : f: fj j F FjjMM((yy,,yyjj ) )

54

Deriving the Maximum Flexibility Deriving the Maximum Flexibility

Given S:Given S:

• Consider a Boolean Consider a Boolean relationrelation F FjjM M : B: B|S||S|BBkkB B

FFjjMM( ( ss, , yyjj) = ) =

xx { ( { ( ss = g = gSS((xx)) )) zz [ ( [ ( zz = z = zMM((xx, , yyjj) ) ) ) OO ((xx,,zz)] })] }

Note:Note: z zMM((xx, , yyjj) represents the mapping given by the ) represents the mapping given by the current circuitcurrent circuit between between xx, , yyjj and the outputs and the outputs zz. .

55

Deriving the Maximum Flexibility Deriving the Maximum Flexibility

Theorem:Theorem: The set of functions given by f The set of functions given by f F FjjMM is the is the

set of set of allall implementable multi output functions at implementable multi output functions at node j node j (expressed as functions whose support is in (expressed as functions whose support is in S.)S.)

Note:Note: OO can be treated as can be treated as justjust anotheranother node in the node in the Boolean network. Boolean network. – even if we start with an even if we start with an initialinitial Boolean relation Boolean relation

specificationspecification, and a network of , and a network of singlesingle output nodes, we output nodes, we can use the can use the standardstandard methods (e.g. methods (e.g. full_simplifyfull_simplify in SIS) in SIS) for optimization. for optimization.

Note: Note:

xx { ( { ( ss = g = gSS((xx)) )) zz [ ( [ ( zz = z = zMM((xx, , yyjj) ) ) ) OO ((xx,,zz)] })] }Can be computed by Can be computed by standardstandard BDD operations BDD operations

56

Boolean Relation Minimizers: Boolean Relation Minimizers:

Find Find bestbest f fj j : f: fj j F FjjMM((yy,,yyjj ) )

ExactExact Somenzi (1989), Somenzi (1989), Like Like Quine McCluskey:Quine McCluskey: – define prime implicants define prime implicants – generate all primes generate all primes – solve covering (solve covering (binatebinate) problem ) problem

HeuristicHeuristic Watanabe (1991) Watanabe (1991) Like Like ESPRESSOESPRESSO: : – iterates iterates reducereduce, , expand,expand, irredundantirredundant until no until no

change. change. – Uses BDD's to represent Boolean relations Uses BDD's to represent Boolean relations

57

The EndThe End