spfds - a new method for specifying flexibility
DESCRIPTION
SPFDs - A new method for specifying flexibility. S ets of P airs of F unctions to be D istinguished From the paper: “ A new Method to Express Functional Permissibilities for LUT Based FPGAs and Its Applications ” - PowerPoint PPT PresentationTRANSCRIPT
1
SPFDs - A new method for SPFDs - A new method for specifying flexibilityspecifying flexibilitySSets of ets of PPairs of airs of FFunctions to be unctions to be
DDistinguishedistinguishedFrom the paper:From the paper:
““A new Method to Express Functional A new Method to Express Functional Permissibilities for LUT Based Permissibilities for LUT Based FPGAsFPGAs and Its and Its Applications Applications ” ”
by S. Yamashita, H. Sawada, and A. Nagoya, by S. Yamashita, H. Sawada, and A. Nagoya, NTT Communications Science Lab., Kyoto, Japan NTT Communications Science Lab., Kyoto, Japan ICCAD’96ICCAD’96
BUTBUT:: this paper is more about a this paper is more about a new kindnew kind of “don’t of “don’t cares”, rather than about application to FPGAscares”, rather than about application to FPGAs
2
Methods for Expressing Methods for Expressing Sets of FunctionsSets of Functions
• Don’t Cares Don’t Cares (=> incompletely specified (=> incompletely specified functions (functions (ISFsISFs))))– Satisfiability DCsSatisfiability DCs– Observability DCsObservability DCs– XDCsXDCs
• ATPG Redundancy RemovalATPG Redundancy Removal• Boolean RelationsBoolean Relations• Sets of Boolean RelationsSets of Boolean Relations• SPFDs. SPFDs. (Actually, they are (Actually, they are setssets of ISFs). of ISFs).
3
ODCs and SPFDsODCs and SPFDs
ODCs:ODCs:– Different ways to compute themDifferent ways to compute them
• Full method (difficult)Full method (difficult)• SubsetsSubsets
– Compatible Sets of Permissible functions Compatible Sets of Permissible functions (CSPFs)(CSPFs)» (Easier to compute)(Easier to compute)
– Compatible observability don’t cares Compatible observability don’t cares ((CODCsCODCs))» see Savoj thesis - generalization of CSPFssee Savoj thesis - generalization of CSPFs
– CSPFs and CODCsCSPFs and CODCs• have advantage that they can be computed fast - from have advantage that they can be computed fast - from
outputs to inputsoutputs to inputs• are independentare independent
4
ODCs and SPFDsODCs and SPFDs
SPFDs:SPFDs:• like like CSPFs/CODCsCSPFs/CODCs
– can be computed fast from outputs to can be computed fast from outputs to inputsinputs
– are independentare independent• but but more powerfulmore powerful and and • not a subsetnot a subset of DCs ( of DCs (they are a sets of they are a sets of
ISFsISFs))
5
ISFsISFsUsually we deal with binary ISFs.Usually we deal with binary ISFs.
– They can be represented as They can be represented as complete bipartite graphscomplete bipartite graphs on on minterms.minterms.
– Vertices are minterms. Set of vertices may be Vertices are minterms. Set of vertices may be subsetsubset of all of all mintermsminterms
– An An edgeedge means that we need to build a function that means that we need to build a function that distinguishesdistinguishes (i.e. has different values) the two minterms on the edge.(i.e. has different values) the two minterms on the edge.
A connected bipartite graph has only A connected bipartite graph has only twotwo colorings, one the colorings, one the onsetonset and the other the and the other the offsetoffset and vice versa ( and vice versa (onsetonset, , offsetoffset))
offsetoffsetonsetonset
6
Building FBuilding F
We start with a complete bipartite graph (ISF) for F. This We start with a complete bipartite graph (ISF) for F. This gives a set of minterms that must be distinguished.gives a set of minterms that must be distinguished.
FF
gg11 gg22 gg33
yy11yy22yy33
xx
YY space is (y space is (y11,y,y22,y,y33). ). Each yEach yii
is a minterm in is a minterm in YY
yy11
yy33
yy22yy44
yy55
7
Building FBuilding FSuppose that the inputs to F are Suppose that the inputs to F are
y = (gy = (g11(x), g(x), g22(x), g(x), g33(x)). (x)).
As long as {yAs long as {y11, y, y22, y, y33} are } are encodedencoded differently from {y differently from {y44, y, y55} by } by g(x), there exists a function F which implements the ISF.g(x), there exists a function F which implements the ISF.
yy11
yy33
yy22yy44
yy55
1 4
2 5
3
001 101 100 001
010 110 101 111
011 010
y y
y y
y
oldold newnew oldold newnew
New F:New F:(101) 1 (001) 0
(110) 1 (111) 0
(010) 1
f f
f f
f
8
Distributing the jobDistributing the job
We can We can distributedistribute the “encoding” job separately to the the “encoding” job separately to the input wires.input wires.
Note:Note: as long as each edge is distinguished by one of the inputs, as long as each edge is distinguished by one of the inputs, this is sufficient for a new encodingthis is sufficient for a new encoding. .
yy11
yy33
yy22yy44
yy55
yy11
yy22
yy55
yy44
input 1input 1yy22
yy33
yy55
yy44
input 2input 2yy11
yy33
yy44
yy55
input 3input 3
9
Input GraphsInput Graphs
Each of the edges on the input graphs means Each of the edges on the input graphs means that the input signal gthat the input signal gii(x) has to have a (x) has to have a different value for the two nodes.different value for the two nodes.
Note:Note: the graphs are bipartite, but the graphs are bipartite, but not completenot complete and may be and may be disconnecteddisconnected. In the above case, . In the above case, each graph has 4 different legal colorings.each graph has 4 different legal colorings.
yy11
yy22
yy55
yy44
input 1input 1yy22
yy33
yy55
yy44
input 2input 2yy11
yy33
yy44
yy55
input 3input 3
10
Assigning ValuesAssigning Values
Now we can assign values to the graphs Now we can assign values to the graphs (color the (color the graphs).graphs).
Thus, for exampleThus, for example
yy11=1*1, y=1*1, y22=00*, y=00*, y33=*10, y=*10, y44=011, y=011, y55=100=100
yy11
yy22
yy55
yy44
input 1input 1yy22
yy33
yy55
yy44
input 2input 2yy11
yy33
yy44
yy55
input 3input 3
11
Assigning ValuesAssigning ValuesNote that yNote that y11, y, y22, y, y33, y, y44, y, y55 are all distinctly encoded in this case. But, in general, that is not necessary, are all distinctly encoded in this case. But, in general, that is not necessary,
e.g. could have e.g. could have yy11 yy2 2 yy3 3 all encoded with the same value.all encoded with the same value.
The original ISF can be implemented with either encodingThe original ISF can be implemented with either encodingF(yF(y11) = F(y) = F(y22) = F(y) = F(y33) = 1 and F(y) = 1 and F(y44) = F(y) = F(y55) = 0) = 0
Now just call ESPRESSO to get a minimized F.Now just call ESPRESSO to get a minimized F.
yy11
yy22
yy33
yy44
yy55
yy11
yy22
yy55
yy44
input 1input 1yy22
yy33
yy55
yy44
input 2input 2yy11
yy33
yy44
yy55
input 3input 3
yy11
yy22
yy55
yy44
input 1input 1
yy22
yy33
yy55
yy44
input 2input 2
yy11
yy33
yy44
yy55
input 3input 3
12
SPFDsSPFDsNow we generalize this becauseNow we generalize this because
1.1. we canwe can
2.2. it is more powerful it is more powerful (can be applied to multiple outputs and multiple valued variables)(can be applied to multiple outputs and multiple valued variables)
3.3. it improves understandingit improves understanding
Definition 1:Definition 1: A SPFD F(y) on domain Y is an A SPFD F(y) on domain Y is an undirectedundirected graph graph (V,E) where each v(V,E) where each vV is associated with a mintermV is associated with a mintermm = (ym = (y11,...,y,...,ykk) ) Y Y
yy11 yy22
yy66
yy55yy44
yy33
13
ImplementsImplements
Definition 2:Definition 2: A function f(y) A function f(y) implementsimplements F(y) = F(y) = (V,E) iff f(y) is a valid coloring of F, i.e.(V,E) iff f(y) is a valid coloring of F, i.e.
(y(y11, y, y22) ) E E iffiff f(y f(y11) ) f(y f(y22), ),
Three ColoringsThree ColoringsMust have at least 3 colors sinceMust have at least 3 colors since
the chromatic number of graph is 3the chromatic number of graph is 3
14
CompatibleCompatibleDefinition 3:Definition 3: A mapping y(x) = A mapping y(x) =
(y(y11(x),...,y(x),...,ykk(x)) is (x)) is F(z)-compatibleF(z)-compatible ifif(((z(zii,z,zjj) ) F(z)) F(z)) y(X(zy(X(zii)) )) y(X(z y(X(zjj)) = 0)) = 0where X(zwhere X(zii) = { x | z(x) = z) = { x | z(x) = zi i }.}.
X(zX(zjj))
y(x)y(x)
Y-spaceY-space
PrimaryPrimaryInputInputSpaceSpace
z(x)z(x)
X(zX(zii))
y(x)y(x)
z(x)z(x)
zziizzjj
F(z)F(z)Z-spaceZ-space
gg
Boolean NetworkBoolean Network
Y-spaceY-space
Z-spaceZ-space
x-space (x-space (primary inputsprimary inputs))
15
Re-implementing a Re-implementing a FunctionFunctionTheorem 1:Theorem 1: If y(x) is F(z)-compatible, then there If y(x) is F(z)-compatible, then there existsexists a function g(y) which implements a function g(y) which implements
F(z).F(z).
Proof.Proof.Translate SPFD F(z) into F(y). Thus for each (zTranslate SPFD F(z) into F(y). Thus for each (z ii,, zzjj) ) F(z)), put an edge for every pair (y F(z)), put an edge for every pair (ykk,, yyll) ) where ywhere ykk y(X(z y(X(zii)) and y)) and yll y(X(z y(X(zjj)). Since y(X(z)). Since y(X(zii)) )) y(X(z y(X(zjj)) = 0, there is no self edge in )) = 0, there is no self edge in F(y). Hence a coloring exists. F(y). Hence a coloring exists.
X(zX(zjj))
y(x)y(x)
Y-spaceY-space
PrimaryPrimaryInputInputSpaceSpace
z(x)z(x)
X(zX(zii))
y(x)y(x)
z(x)z(x)
zziizzjj
F(z)F(z)Z-spaceZ-space
16
Re-implementing a Re-implementing a FunctionFunction
ColorColor F(y) and implement the F(y) and implement the corresponding ISF by some function g(y).corresponding ISF by some function g(y).
Each y(X(zEach y(X(zii)) creates an )) creates an equivalenceequivalence class class which can all be colored with the same which can all be colored with the same color, color, (but different colors can be used if (but different colors can be used if preferred.)preferred.)
17
Re-implementing the Re-implementing the Inputs to a FunctionInputs to a Function
We want to build new functions We want to build new functions y’(x)y’(x) at the inputs to G at the inputs to G..
GG
Boolean NetworkBoolean Network
Y-spaceY-space
Z-spaceZ-space
x-space (primary inputs)x-space (primary inputs)
18
Re-implementing the Re-implementing the Inputs to a FunctionInputs to a Function
For new functions y’(x), just need for each edge in For new functions y’(x), just need for each edge in F(y), F(y), at least one input that has different values at least one input that has different values for the two minterms of the vertices of the edgefor the two minterms of the vertices of the edge
Theorem 2:Theorem 2: y’(x) is F(z)-compatible if y’(x) is F(z)-compatible if
(z(zii,z,zjj))F, F, k, k, (((x(xii,x,xjj) ) (X(z (X(zii),X(z),X(zjj))), y’))), y’kk(x(xii) ) y’ y’kk(x(xjj))
Proof.Proof. Since y’ Since y’kk(x(xii) ) y’ y’kk(x(xjj), then y’(x), then y’(xii) ) y’(x y’(xjj). ). Hence y’(X(zHence y’(X(zii)) )) y’(X(z y’(X(zjj)) = 0.)) = 0.
19
Re-using Old TopologyRe-using Old TopologyNoteNote: up to now we could have assigned any edge of the node SPFD to any of the inputs: up to now we could have assigned any edge of the node SPFD to any of the inputs
An efficient way of building a new mapping y’(x) is to use part of the An efficient way of building a new mapping y’(x) is to use part of the oldold implementation. implementation.
GG
Boolean NetworkBoolean Network
Y-spaceY-space
Z-spaceZ-space
x-space (primary inputs)x-space (primary inputs)
ww11 ww22 ww33
20
Re-using Old TopologyRe-using Old Topology
Construct SPFDs {FConstruct SPFDs {F11(y),...,F(y),...,Frr(y)} (y)} (for each local (for each local
input)input) such that such that
1.1. FFk k (y) = { (y(y) = { (yii,y,yjj) ) F(y) only if } F(y) only if }
i.e. the ki.e. the kthth input currently distinguishes (y input currently distinguishes (yii,y,yjj) for all those x ) for all those x
which map to ywhich map to yii, or to y, or to yjj
2.2. (y(yii,y,yjj) ) F(y), F(y), k, (yk, (yii,y,yjj) ) F Fkk(y)(y)
i.e. each edge is assigned to one of the inputsi.e. each edge is assigned to one of the inputs
yyj
k
i
k
21
Efficient Re-Efficient Re-implementationimplementationTheorem 3:Theorem 3: Suppose the current implementation of the global functions Suppose the current implementation of the global functions
at y, y(x), are implemented with sets of intermediate variables at y, y(x), are implemented with sets of intermediate variables ww = = ((ww11,...,,...,wwrr),),
i.e. y(x) = (fi.e. y(x) = (f11((ww11(x)),...,f(x)),...,frr((wwrr(x))).(x))).
Then for each k, any coloring of FThen for each k, any coloring of Fk k (y) can be implemented with some (y) can be implemented with some function f’function f’k k ((wwkk(x)).(x)).(i.e. the new fanins of G can be implemented with the same inputs (i.e. the new fanins of G can be implemented with the same inputs ww11,...,,...,wwrr as the as the old fanins)old fanins)
Thus a new set of input functions y’(x) can be obtained asThus a new set of input functions y’(x) can be obtained asy’ = (f’y’ = (f’11((ww11(x)),...,(f’(x)),...,(f’rr((wwrr(x)))(x)))
i.e. a set of functions of the i.e. a set of functions of the currentcurrent intermediate inputs to f intermediate inputs to f11,...,f,...,frr..
GGY-spaceY-space
ww11 ww22 wwrr……
22
End of lecture 15End of lecture 15
23
Efficient Re-Efficient Re-implementationimplementation
Proof.Proof. Consider F Consider Fkk(y) for some input k. The current (y) for some input k. The current ffk k implements Fimplements Fkk(y) since for (y(y) since for (yii,y,yjj) ) F Fkk, f, fkk(y(yii) ) ffkk(y(yjj), i.e.), i.e.
ffkk(X(y(X(yii)) )) f fkk(X(y(X(yjj)) = 0)) = 0Thus for all xThus for all xii X(y X(yii), x), xjj X(y X(yjj), we must have ), we must have wwkk(x(xii) ) wwkk(x(xjj). Otherwise, f). Otherwise, fkk((wwkk(x(xii)) = f)) = fkk((wwkk(x(xjj)) )) contradicting that fcontradicting that fkk(y(yii) ) f fkk(y(yjj). Since w). Since wkk distinguishes xdistinguishes xii from x from xj j (i.e. the information is (i.e. the information is available at the inputs of node k)available at the inputs of node k), functions , functions f’f’kk((wwkk) exist which distinguish x) exist which distinguish xii and x and xjj..
24
How Do We Use ThisHow Do We Use This
Note:Note: since y(x) is F(z)-compatible, then so is since y(x) is F(z)-compatible, then so is yy++ = (y(x),y = (y(x),yk+1k+1(x)).(x)).
Theorem 4:Theorem 4: Wire yWire y11 can be removed if and only ifcan be removed if and only if(y(y22,...,y,...,yk+1k+1) is F(z)-compatible.) is F(z)-compatible.
GG
Boolean NetworkBoolean Network
y-spacey-space
z-spacez-space
x-space (primary inputs)x-space (primary inputs)
25
Conclusions and futureConclusions and future
• SPFDs offer SPFDs offer greater choicegreater choice in implementing a in implementing a circuitcircuit– Can change both a node and its inputsCan change both a node and its inputs– An SPFD can be colored in many waysAn SPFD can be colored in many ways
• New way to obtain New way to obtain BooleanBoolean divisors divisors• Implementation using Implementation using MDDsMDDs in progress in progress• Implementation using Implementation using SATSAT in progress in progress• Useful for DSM for Useful for DSM for rewiringrewiring for noise avoidance for noise avoidance
or better layoutor better layout• Can be used to define “don’t care wires”Can be used to define “don’t care wires”
26
Ruggedizing SPFD Ruggedizing SPFD computationcomputation
Currently done using Currently done using BDDsBDDs– Works for medium sized circuitsWorks for medium sized circuits
Have developed a method using Have developed a method using SATSAT– Implementation almost doneImplementation almost done
Z-spaceZ-space
Y-spaceY-space
SPFD(SPFD(ZZ))
SPFD(SPFD(YY))
Primary inputs XPrimary inputs X
Image computation:Image computation: which minterms in Zwhich minterms in Z are mapped into whichare mapped into which minterms in Y?minterms in Y?
z -> yz -> yif exists x such thatif exists x such thatffZZ(x) = z and f(x) = z and fYY(x) = (x) =
yy
27
MV-SPFDs and Wire MV-SPFDs and Wire RemovalRemoval
An MV-SPFD represents the An MV-SPFD represents the informationinformation content content of a wire in a network.of a wire in a network.– the MV-SPFD of each fanin to a node, gives the the MV-SPFD of each fanin to a node, gives the
information that it information that it must providemust provide. .
The sum The sum totaltotal of the information content of a of the information content of a node’s fanin wires must node’s fanin wires must covercover the information the information required of the output of the node.required of the output of the node.
We determine a minimal subset of fanins atWe determine a minimal subset of fanins at each each node which cover the required information by node which cover the required information by solving a solving a covering problemcovering problem..
28
Wire Wire Removal and Removal and
Wire Wire SubstitutionSubstitution
SPFDSPFDoutout
SPFDin2
SPFDin1
SPFDSPFDin3in3
SPFDSPFDin4in4
SPFDSPFDin5in5
SPFDSPFDoutout SPFD SPFDin3in3SPFDSPFDin4in4SPFDSPFDin5in5
Wire removal: suppose
Then, can remove in1 and in2
Important:Because wires arechanged, the internallogic of a block maychange.
SPFDSPFDin4in4 SPFD SPFDin6in6
Wire substitution: suppose
Then, can replace in4 by in6
29
Don’t Care WiresDon’t Care WiresEach input pin Each input pin will have a will have a setset of sources, of sources, SS
(among which we can choose any one).(among which we can choose any one).
Each source Each source (driver of a wire)(driver of a wire) distinguishesdistinguishes a a setset of pairs of minterms of pairs of minterms (SPFD)(SPFD) in the primary in the primary input spaceinput space
Wire Wire is assigned as a is assigned as a candidatecandidate source for source for input pin input pin if: if:
SPFDSPFD SPFD SPFD
30
Compatible sets of don’t Compatible sets of don’t care wirescare wires
Want to be able to select one source from Want to be able to select one source from each set each set SS independentindependent of the selection of the selection made from any other set made from any other set SS
’’ ( (compatible compatible
set of candidate sets of sourcesset of candidate sets of sources))
TheoremTheorem: A set of sets {: A set of sets {SS} of candidate } of candidate wires is wires is compatiblecompatible if if– it can never produce a it can never produce a cycliccyclic network network– for each wire for each wire SSSPFDSPFD SPFD SPFD
31
Choosing best subset of wires
AWC:AWC: alternate wire choicealternate wire choice problem problem Given:Given: a a pointpoint placement of pins and a set placement of pins and a set
of candidate wires for each input pinof candidate wires for each input pinFind:Find: a a selectionselection of wires for each input of wires for each input
pin that minimizes the total half-pin that minimizes the total half-perimeters of the nets’ bounding boxes.perimeters of the nets’ bounding boxes.
(The problem is NP-complete)(The problem is NP-complete)
32
Placement using don’t care wires
Current placement by Current placement by
Mincut/Annealing Mincut/Annealing or by aor by a Force Force
Directed Method:Directed Method:
– wire choiceswire choices considered in move to considered in move to
determine cost of movedetermine cost of move
• use semi-greedy use semi-greedy AWCAWC algorithm during algorithm during
each placement moveeach placement move
33
Experiments – total wire Experiments – total wire length length
(placement, no routing)(placement, no routing)Initial PLA Initial PLA netlistnetlist
Alternate wires Alternate wires (13.5%)(13.5%)
Re-synthesisRe-synthesis
PlacePlace
Wire Wire choiceschoices
13.7%13.7%
Wire removalWire removal
and Re-and Re-synthesissynthesis
PlacePlace
8.5%8.5%
Wire removalWire removal
PlacePlace
14.4%14.4%
PlacePlace 6.6%6.6%PlacePlace
0%0%
Max Alternates Max Alternates (15%)(15%)
PlacePlace 10.2%10.2%
Notes: 13.5% -> 15% in alternate wires results in 6.6% -> 10.2% improvement in wire length
Wire removal currently does not use placement information
Wire removalWire removal
PlacePlace
? %? %
34
Primary outputs: information required (in terms of PIs)
??
????
????
??
??
??
??
InformationArrives - PIs
A block logic function exists iff the information at the inputs covers the information required at the output
Function inside block only needs to provide the information required of its fanouts
??
Wireplanning before Wireplanning before decompositiondecomposition
35
Information Flow TheoremInformation Flow TheoremTheorem:Theorem: A set of logic functions A set of logic functions
exists for the blocks exists for the blocks if and onlyif and only if if there exists a path from input there exists a path from input IIk k to to output output OOjj whenever whenever OOj j depends on depends on IIkk. .
??
????
????
??
??
??
?? Open question: Howdo you make the assignment of SPFDedges so that the resulting logic in theblocks is as simple aspossible?
Open question: Howdo you make the assignment of SPFDedges so that the resulting logic in theblocks is as simple aspossible?