Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003.

Similar presentations


Presentation on theme: "1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003."— Presentation transcript:

1 1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003

2 2 Circuit as DAG (Subject Graph) A Directed Acyclic Graph, also called a DAG, is a directed graph with no directed cycles; that is, for any vertex v, there is no nonempty directed path starting and ending on v. c 1 2 3 4 6 5 7 a b o1 o2

3 3 Pattern Graphs used for the cover inv(1) nand3 (3) oai21 (3) nor(2) nor3 (3) aoi21 (3) nand2(2) (cost)

4 4 Binate Covering Problem: Example c m8m8 1 2 3 4 5 6 7 a b o1o1 m9m9 m 10 o2o2 GateCostInputProducesCovers m1m1 inv1ag1g1 g1g1 m2m2 1bg2g2 g2g2 m3m3 nand22g 1, g 2 g3g3 g3g3 m4m4 nand22a, bg4g4 g4g4 m5m5 nand22g 3, g 4 g5g5 g5g5 m6m6 inv1g4g4 g6g6 g6g6 m7m7 nand22g 6, cg7g7 g7g7 m8m8 nand33a, bg7g7 g 4, g 6, g 7 m9m9 xnor25a, bg5g5 g 1, g 2, g 3, g 4, g 5 m 10 oai213a, b, g 4 g5g5 g 1, g 2, g 3, g 5

5 5 Binate Covering Problem Compute all possible matches {m k } for each node. Using a variable m i for each match of a pattern graph in the subject graph, (m i = 1 if match is chosen; m i = 0 otherwise) Write a clause for each node of the subject graph indicating which matches cover this node. Each node has to be covered. –e.g., if a subject node is covered by matches {m 2, m 5, m 10 }, then the clause would be (m 2 + m 5 + m 10 ). Repeat for each subject node and take the product over all subject nodes (CNF). m 1 m 2... m k n1n2...nln1n2...nl nodes

6 6 Binate Covering Problem: Example Generate constraints that each node n i be covered by some match. (m 1 + m 9 + m 10 )(m 2 + m 9 + m 10 )(m 3 + m 9 + m 10 )(m 4 + m 8 + m 9 ) (m 5 + m 9 + m 10 )(m 6 + m 8 ) (m 7 + m 9 ) m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 m7m7 m8m8 m9m9 m 10 n1n1 1000000011 n2n2 0100000011 n3n3 0010000011 n4n4 0001000110 n5n5 0000100011 n6n6 0000010100 n7n7 0000001100

7 7 Binate Covering A Unate Covering Problem is a product-of-sums expression, containing Boolean propositions (i.e. variables which can have value 0 or 1).The propositions are all “uncomplemented.” For example: P = (P1 + P3)(P1 + P4 + P5)(P6 + P8)  A BINATE COVERING PROBLEM is similar, but now the propositions can be both “uncomplemented” and “complemented.” For example: P = (P1' + P3)(P1 + P4' + P5)(P2 + P5)(P2' + P3')

8 8 Create Outputs for a Legal Cover Any satisfying assignment guarantees that all subject nodes are covered, but It does not guarantee that other matches create outputs needed as inputs for a given match (legal covering). Rectify this by adding additional clauses. not an output of a chosen match

9 9 Binate Covering Problem Let match m i have subject nodes s i1,…,s in as inputs. If m i is chosen, one of the matches that realizes s ij must also be chosen for each intermediate input j Let S ij be the disjunctive expression in the variables m k giving the possible matches which realize s ij as an output node. Selecting match m i implies satisfying each of the expressions S ij for j = 1 … n. This can be written as: ( m i  (S i1 … S in ) )  (  m i + (S i1 … S in ) )  ((  m i + S i1 ) … (  m i + S in ) ) mimi s i1 s ij s in

10 10 Binate Covering Problem: Example For example, selecting m3 requires that: a match be chosen which produces g2 as an output, and a match be chosen which produces g1 as an output. The only match which produces g1 is m1; same for g2 and m2, etc. So, two extra clauses are required: c 1 2 3 4 5 6 7 a b o1o1 o2o2

11 11 Binate Covering: Example Finally, we get: seven additional clauses. Note: –A match which requires a primary input as an input is satisfied trivially. –Matches m 1,m 2,m 4,m 8,m 9 are driven only by primary inputs and do not require additional clauses c m8m8 1 2 3 4 5 6 7 a b o1o1 m9m9 m 10 o2o2

12 12 Binate Covering Problem An assignment of values to variables m i that satisfies P, the above covering expression, is a legal graph cover. For area optimization, each match m i has a cost c i : the area of the gate the match represents. The goal is a satisfying assignment with the least total cost. –Find a least-cost prime: if a variable m i = 0 its cost is 0, else its cost is c i m i = 1 means that match i is chosen m i = 0 means that match i is not chosen

13 13 Binate Covering: Example The least cost prime implicant is: This uses two gates for a cost of eight gate units, for matches: m 8 (nand3) and m 9 (xnor2). c m8m8 1 2 3 4 5 6 7 a b o1o1 m9m9 m 10 o2o2 Note that the node g 4 is covered by both matches

14 14 Summary Given a subject graph, the binate covering provides the exact solution to the technology-mapping problem. Finding a feasible solution to a binate covering is NP-complete. Problems that are NP-complete can be solved by algorithms that run in exponential time. No polynomial time algorithms are known to exist for any of the NP-complete problems and it is very unlikely that polynomial time algorithms should indeed exist although nobody has yet been able to prove their non-existence.


Download ppt "1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003."

Similar presentations


Ads by Google