270 likes | 450 Views
CS137: Electronic Design Automation. Day 15: November 4, 2005 SAT for Partitioning. Today. SAT Partitioning Devadas Wrighton. Partitioning Problem. Given: netlist of interconnect cells Graph G=(V,E) Partition into two equal halves (A,B) V=A B AB = {} |A|=|V|/2
E N D
CS137:Electronic Design Automation Day 15: November 4, 2005 SAT for Partitioning
Today • SAT Partitioning • Devadas • Wrighton
Partitioning Problem • Given: netlist of interconnect cells • Graph G=(V,E) • Partition into two equal halves (A,B) • V=AB • AB = {} • |A|=|V|/2 • minimize the number of nets shared by halves • |e=(s,t)E and sA and tB or sB and tA |<C
Constraining Partitions • Balance: • |V| 2P • P-long bit vector for each vV • Goal assign each v a unique bitvector • v0 v1 … v(p-1) • partition on v(p-1) [Devadas DAC1989]
Balance • Balance Constraints: • Forall pairs vi,vj • vivj • vi0^vj0+vi1^vj1+…vi(p-1)^vj(p-1)=1 • |V|<2P • Assign 2P-|V| codes such that vi(p-1) will form partition • E.g. if |V|=6 • Assign 000 and 100 • vi0^0+vi1^0+vi2^0=1 • |V|(2P-|V|) clauses
Cost • Decision problem • Can ask for a partition that satisfies a constraint • Optimization: search for min C will satisfy
Partitioning Results • Devadas 1989
Constraint sets • Cardinality • Results • Variations • Replication • Soed
Formulation • Acceptable Partition: • All Nodes Represented • Partitions Balanced • Cut Edges < Bound • For each variable, for each partition • Vi True if V appears in partition i
All Nodes Represented (A0A1A2) (B0B1B2) (C0C1C2)…
Exclusivity • If do not want replication • Assert that node is in only one partition • E.g. /(A0&A1)+/(A1&A2)+(/A0&A2)
Balance • Sum of nodes in each part less than target
Cut Edges • Edge cut if source or any sinks in different partitions • Pick source as point of reference • Cut if any sink not in partition with source
Counting • Can use boolean logic to create binary counters • Problem: don’t enable implications on partial assignments
Alternate Counting • Unencoded counter representation • …b3b2b1b0 • Position i says: there are at least i things • Count: 00000 00001 00011 00111 … • Add: • XXX11 + XXXX1 = XX111
Size of Totalizers • N+N 2N totalizer • Ci=Ai+(Ai-1&B1)+…+(A1&Bi-1)+Bi • i clauses Totalizer Tree: 2N2 + 2(N2/2)+4(N2/8)+… 4N2
Replication • Two partitions of size 60%
Other Targets • Relatively easy to change constraints • Sum of external degrees • Sum of IO from all partitions • Maximum subdomain degree • IO from largest partition • Just need to add appropriate counters and constraints
Sum of External Degrees 20% total extra space
Maximum Subdomain Degree 20% total extra space
Admin • Assignment 3B due today
Big Ideas • Tools: SAT Reduction • Bounding Enable pruning