170 likes | 275 Views
A Semi-Canonical Form for Sequential AIGs. Alan Mishchenko, Niklas Een, Robert Brayton UC Berkeley Michael Case, Pankaj Chauhan, Nikhil Sharma Calypto Design Systems. Motivation. Logic networks often contain duplicate sub-circuits Leads to redundant work
E N D
A Semi-Canonical Form for Sequential AIGs Alan Mishchenko, Niklas Een, Robert BraytonUC Berkeley Michael Case, Pankaj Chauhan, Nikhil Sharma Calypto Design Systems
Motivation • Logic networks often contain duplicate sub-circuits • Leads to redundant work • Synthesis and verification tools re-analyze the same sub-circuit • Verification tools waste time on duplicate proof obligations
Motivation • Key idea: identify duplicate logic regions • Ideal solution: isomorphism • Our approximate solution: semi-canonical mapping • Use the circuit structure to classify each sub-circuit
Example • Fanout count {b}, {m} are unique • Complemented outputs {c} is unique • Fanin level {F}, {G} are unique
Example • Sometimes nodes cannot be distinguished • After semi-canonicization: {F, F’}, {G, G’} • Isomorphisms: F ≈ F’ , G ≈ G’ F’ G’
Implementation • Implemented within ABC as an internal routine • Puts the netlist in semi-canonical form • Node order reflects both topological order & signatures • Application 1: “write_aiger –u” • Writes the netlist in semi-canonical form • Application 2: “&iso” • Discard isomorphic POs
Algorithm Overview • Compute signatures for each node • Signatures indicate which class a node is in • Singleton nodes: nodes that have unique signatures • Goal: assign unique signatures for as many nodes as possible 0 0 Initially all signatures are 0 0 0 0 0 0 0
Algorithm Overview • Edge value: reflects the structure around an edge • edge_value := hash(driver_signature, edge_is_complemented) 0 0 2 3 1 0 8 0 5 7 6 4 0 0 0 0
Algorithm Overview • Function: PropagateSignaturesForward() • Assign the same random signature to all inputs • For each node, signature := hash(old_signature, fanin edge_values) 42 0 0 71 2 3 1 15 0 8 19 0 5 7 6 4 0 0 0 0 12 12 12 12
Algorithm Overview • Function: PropagateSignaturesBackward() • Recompute edge values • Assign the same random signature to all outputs • For each node, signature := hash(old_signature,fanout edge_values) 42 71 15 19 12 12 12 12
Algorithm Overview • Sometimes we cannot distinguish nodes tie breaking • Choose the equiv class with the largest level • Assign unique signatures to the class nodes • Propagate signatures to other nodes until convergence • If there some equiv classes are left, go to Step 1 71 42 15 15
Implementation • Implemented within ABC as an internal routine • Puts the netlist in semi-canonical form • Node order reflects both topological order & signatures • Application 1: “write_aiger –u” • Writes the netlist in semi-canonical form • Application 2: “&iso” • Discard isomorphic POs
Implementation • Application 1: “write_aiger –u” • Writes the netlist in semi-canonical form • Useful for quickly comparing AIGER netlists Netlist N write_aiger -u N.aig diff Netlist N’ write_aiger -u Nprime.aig
Implementation • Application 2: “&iso” • Convert each PO to semi-canonical form (separately) • Discard POs that have duplicate semi-canonical forms • i.e. “drop isomorphic proof obligations” F’ G’ b’ c’ d’ a' • Counterexamples/invariants on F/G can be re-mapped to F’/G’
Experimental Results With industrial verification benchmarks Remove isomorphic POs Apply synthesis, remove proved POs Remove isomorphic POs (again) Initial AIG Size
Conclusion • Previous work: • computing functional symmetries and automorphisms • simplifying reachability and SAT instances with symmetries • First work on semi-canonical labeling of nodes in a sequential AIG • Allows for caching intermediate AIGs in EDA tools • Future work may include: • Speeding up propagation of node signatures • Generalizing the algorithm to work for logic networks other than the traditional AIGs
THANK YOU Public implementation is available in ABC https://bitbucket.org/alanmi/abc