1 / 38

A Semi-Canonical Form for Sequential AIGs

A Semi-Canonical Form for Sequential AIGs. Alan Mishchenko, Niklas Een, Robert Brayton UC Berkeley Michael Case, Pankaj Chauhan, Nikhil Sharma Calypto Design Systems. OUTLINE. Introduction Motivation example Background Algorithm Experimental results Conclusion. INTRODUCTION.

craig-mcgee
Download Presentation

A Semi-Canonical Form for Sequential AIGs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Semi-Canonical Form for Sequential AIGs Alan Mishchenko, Niklas Een, Robert BraytonUC Berkeley Michael Case, Pankaj Chauhan, Nikhil Sharma Calypto Design Systems

  2. OUTLINE • Introduction • Motivation example • Background • Algorithm • Experimental results • Conclusion

  3. INTRODUCTION • In sequential and-inverter-graphs (AIGs) there frequently exist many instances of the same logic sub-circuit but with different inputs • Many synthesis and verification packages spend significant time analyzing logic, and the presence of identical sub-circuits results in duplication of effort • Leads to redundant work • Tools re-analyze the same sub-circuit • Waste time on duplicate proof obligations • Suppose a tool is re-run on a minimally-changed netlist, do we re-analyze sub-circuits that haven’t changed?

  4. INTRODUCTION • Key idea: identify duplicate logic regionsIdeal solution: isomorphism • An approximate solution: semi-canonical mapping • Use the circuit structure to classify each sub-circuit • Use re-labeling and listing in numerical order

  5. MOTIVATION • PI(b) : two fanout, level 0 • Internal node (m) : two fanout, level 1 • PI(c) : one complemented edge • PO(F) : two same-level fanins • PO(G) : two different-level fanins • …

  6. APPLICATIONS • 1. Detect structurally isomorphic primary outputs (POs) of a multi-output sequential AIG • 2. In verification, where each output represents a property to be proved, if two outputs are isomorphic then it is only necessary to solve one • When verifying a set of outputs, only one representative of each isomorphic class need be considered, reducing the number of proof obligations • 3. It can be used to cache synthesis or verification results that have been computed previously on an AIG

  7. OUTLINE • Introduction • Motivation example • Background • Algorithm • Experimental results • Conclusion

  8. BACKGROUND • Asequential AIG has a constant node, primary inputs andoutputs, flop inputs and outputs, and internal AND nodes • Node attributes {PI, PO, FF, internal} • Edgeattributes {direction, complementation} • Two graphs areidentical ( H ≡ G ) if their representations are identical • The conventional representation of an AIG is asequence of triplets {(a1,b1,c1),…,(aN,bN,cN)}

  9. BACKGROUND • An isomorphism f between two attributed graphs, H and G, is a 1-1 mapping f: V(G) → V(H), where nodes (u, f (u) ) have the same attributes, and edges (u →v, f (u)→ f (v)) have the same attributes • Two graphs are isomorphic (G ≈ H ) if an isomorphism exists between the two

  10. BACKGROUND • Graph canonization is the problem of finding a mapping canon: V(G) → V(G) such that • 1. canon(G) ≈ G , and • 2. [ canon(H) ≡ canon(G) ]⇔[ H ≈ G ] • canon(G) is said to be a canonical form for G and canon is said to be a canonical mapping for G.

  11. DISCUSSION • Semi-canonical mapping • We give an algorithm for re-labeling of nodes of V(G), iso, such that iso(G) ≈ G • Clearly if iso(H) ≡ iso(G) , then H ≈ G • We do not claim that iso is a canonical mapping, but we do claim that for the majority of graphs if H ≈ G , then iso(H) ≡ iso(G)

  12. OUTLINE • Introduction • Motivation example • Background • Algorithm • Experimental results • Conclusion

  13. Our Approach • Signature: a value reflecting the circuit structure surrounding a node • Goal: assign unique signatures to all nodes • Semi-canonical form: represent an AIG on disk by ordering nodes by topological order & signatures 42 71 15 19 2 3 4 1

  14. ALGORITHM • Computing semi-canonical labels • Computing edge values • Node signature propagation • Refining node signature • Breaking ties

  15. Algorithm • Compute signatures for each node • Goal: assign unique signatures to all nodes • Initially all signatures are 0 0 0 0 0 0 0 0 0

  16. Algorithm • Edge value: reflects the structure around an edge

  17. Algorithm • Edge value: reflects the structure around an edge 3 3 1 1 1 2 1

  18. Algorithm • Function: PropagateSignaturesForward() • Assign the same random signature to all inputs • Note: deterministic random numbers are used 3 3 3 1 1 1 2 1 12 12 12 12

  19. Algorithm • Function: PropagateSignaturesForward() • Node signature is computed as the sum of (a) its old • signature, (b) its node-fanin signatures, and (c) its fanin edge values 59 43 3 3 3 1 27 1 26 1 2 1 12 12 12 12

  20. Algorithm • Function: PropagateSignaturesForward() • Node signature is computed as the sum of (a) its old • signature, (b) its node-fanin signatures, and (c) its fanin edge values 59 LB1 43 LB2 3 3 3 1 LB3 27 LB4 1 26 1 2 1 12 12 12 12

  21. Algorithm • Function: PropagateSignaturesBackward() • (Recompute edge values) • Starting signatures for primary inputs are not assigned and signatures of the POs are not changed • The AIG is traversed in the reverse topological order • Instead of fanins and fanin edges, fanouts and fanout edges are considered; • Signatures are transferred from flop outputs to flop inputs and not vice versa.

  22. Refining node signatures • Refining node signatures • Refinement refers to the process of updating signatures for every node to reduce the number of nodes having the same signature

  23. Refining node signatures • Starting signatures for primary inputs are not assigned and signatures of the POs are not changed 59 LB1 43 LB2 3 3 3 1 LB3 27 LB4 1 26 1 2 1

  24. Refining node signatures • Starting signatures for primary inputs are not assigned and signatures of the POs are not changed 59 LB1 43 LB2 3 3 3 1 LB3 27 LB4 1 26 1 2 1

  25. Refining node signatures 59 43 3 3 3 1 135 1 88 1 2 1

  26. Refining node signatures 59 43 3 3 3 1 135 1 88 1 2 1 89 225 137 44

  27. Refining node signatures LB1 LB2 59 43 LB3 3 3 3 LB4 1 135 1 88 1 2 1 89 225 137 44 LB5 LB6 LB7 LB8

  28. Breaking ties • 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

  29. Breaking ties • Sometimes we cannot distinguish nodes  tie breaking

  30. MAIN PROCEDURE

  31. OUTLINE • Introduction • Motivation example • Background • Algorithm • Experimental results • Conclusion

  32. Implementation • Implemented within ABC as an internal routine • Puts the netlist in semi-canonical form • Node order reflects both topological order & signatures • Creating the semi-canonical AIGER file and checking isomorphism : “write_aiger –u” • Filtering isomorphic POs: “&iso”

  33. Implementation • Creating the semi-canonical AIGER file and checking isomorphism • Writes the netlist in semi-canonical form • Sort the nodes in the order of their new labels along with their fanins ordered according to increasing fanin node label • Normalizes the netlist, allows for caching of results Netlist N write_aiger -u N.aig diff Netlist N’ write_aiger -u Nprime.aig

  34. Implementation • Filtering isomorphic POs • Multi-output netlist  series of single output netlists • Put each netlist into semi-canonical form • Discard isomorphic POs F’ G’ b’ c’ d’ a' • Isomorphisms: F ≈ F’ , G ≈ G’ • Counterexamples/invariants on F/G can be re-mapped to F’/G’

  35. IMPLEMENTATION

  36. EXPERIMENTALRESULTS • Publicbenchmarks

  37. EXPERIMENTALRESULTS • Industrial benchmarks

  38. 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 detecting duplicate circuits 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

More Related