factoring logic functions using graph partitioning
play

Factoring Logic Functions Using Graph Partitioning Aviad Mintz - PowerPoint PPT Presentation

Factoring Logic Functions Using Graph Partitioning Aviad Mintz Martin C. Golumbic University of Haifa Outline of Talk Introduction Proposed Method Read Once Functions Clusters and Cluster Intersection Graph Separability


  1. Factoring Logic Functions Using Graph Partitioning Aviad Mintz Martin C. Golumbic University of Haifa

  2. Outline of Talk  Introduction  Proposed Method  Read Once Functions  Clusters and Cluster Intersection Graph  Separability function and partition algorithms  Form Conversions - P2SS2P  Factoring Algorithm - Xfactor  Results  Analysis of Xfactor’s parameters  Best Combination Group versus Best Average List  Run Time  Summary

  3. Introduction  Factoring Boolean Functions: Deriving a minimal factored form from a sum of products representation .       ( ) F ab ac d a b c d Example.  Complexity: NP - Hard.  Known Algorithms: Algebraic methods (QF and GF), Boolean methods.  All algorithms work with a kind of division.

  4. Proposed Method  Use Graph Partitioning rather than division.  Exploiting locality of the literals.  Identify Read Once Functions and factor them separately.  Fast to factor, and frequently appears in lower levels of logic.

  5. Read Once Functions  Definition: Read Once Function - A function that has a factored form in which each variable appears exactly once. Example:       ( ( )) F a b a c d a c g a b c d g  Remarks:  Read Once functions are subset of Unate Functions.  Read Once Functions frequently appear at lower levels of Logic Design (PP 95).  The complexity of identifying and factoring Read Once functions has almost linear complexity (in the input size).

  6. Clusters  Definition: A Cluster is the set of literals in a prime implicant of an SOP representation or prime explicant in a POS representation.     Example: F abd abg acd cg Clusters of F:      , , , , , , , a b d a b g a c d c g

  7. Cluster Intersection Graph  Definition: G(C,E) an undirected weighted graph where: C - clusters of the function         , E i j Ci Cj - the number of common literals W ( , ) i j     F abd abg acd cg Example: 2 {a,b,d} {a,b,g} 1 1 2 1 {c,g} {a,c,d}

  8. Separability Function  Measure separability of the cluster intersection graph by a graph partitioning algorithm.  Try to partition the graph evenly (to minimize the number of stages).   Choose the minimal separabilty and return its value A , B and partitions ( - sets of vertices).

  9. Form Conversions – P2S and S2P Functions  P2S - convert sum of product to product of sums  S2P - convert product of sums to sum of products  P2SS2P – a shortcut for both

  10. Factoring Algorithm Using Graph Partitioning - Xfactor Input: Parse tree T of the Boolean function being factored. Xfactor(T).  If T is a Read Once function - Construct the Read Once tree and exit.  Otherwise, Construct the Cluster Intersection Graph G corresponding to T and Calculate the Separability.  If the Separability of G is not 0 - Build T* by P2SS2P, Construct the Cluster Intersection Graph G* and Calculate the Separability.  If the Separability of G is lower than the Separabilty of G* - Partition T accordingly and Call Xfactor with each part.  Otherwise, Partition T* and Call Xfactor with each part.

  11. Factoring Algorithm - Example     F abd abg acd cg 2 {a,b,d} {a,b,g} G(C,E): 1 1 2 1 {c,g} {a,c,d}

  12. Factoring Algorithm - Example ( Cont . 1)      * ( )( )( )( ) F a c a g b c d g 1 {a,g} {a,c} G*(C*,E*): 1 1 {b,c} {d,g} Xfactor chooses the second option and partitions G* evenly.    ( )( ) F a g d g 1    ( )( ) F a c b c 2

  13. Factoring Algorithm - Example ( Cont . 2) F1 and F2 are Read Once functions.      ( )( ) F a g d g ad g 1      ( )( ) F a c b c ab c 2 Thus.    ( )( ) F ad g ab c Algebraic factoring (GF) produces worse result:     ( ( ( ) ) F a b d g cd cg Boolean factoring produces same result as. Xfactor.

  14. Results #1 Factoring Results 1 30 25 20 QF Literals GF 15 BF XF 10 5 0 Ofactor Pfactor Qfactor Rfactor Sfactor Tfactor Boolean Functions

  15. Results #2 Factoring Results2 400 350 300 250 QF Literals GF 200 BF XF 150 100 50 0 5xp1 f51m misex1 rd53 sao2 vg2 z4ml Boolean Functions

  16. GF XF 0 s _ 0 1 r _ 1 term 0 0 r d _ _ term 8 0 b sct _ 0 pcler a _ z pcle _ pcle y _ pcle pcle mux 0 majority n d _ _ 2 1 i a m _ 85 frg a l _ t 85 a cm _ a s 85 Factoring Results3 cm _ a r Boolean Functions 163 cm _ a q 163 cm _ a r 163 cm _ a q 163 cm _ a p 162 cm _ a o 162 cm _ a 162 cm a 162 cm 150 cm 0 t cm _ 0 8 s c _ 0 8 r c _ 0 8 z c _ 1 9 i _ b 1 9 Results #3 d b _ 1 9 a b v _ _ 9 4 b p _ 4 o alu _ 4 o alu _ 2 alu l _ 2 k alu _ 2 alu alu symml 9 400 350 300 250 200 150 100 50 0 Literals

  17. Results - Summary Total # of Literals Algorithm QF 3630 GF 3408 XF 2586

  18. Xfactor’s Parameters Parameter Description Option CI Graph’s Type C (1) VCI, (0) LCI W Weight Balancing (1) Use or (0) no use of weight balancing P Partition Cut Value (1) Use or (0) no use of modified cut size F FM Refinement (1) Use or (0) no use of FM I Initial Search Vertex (0) arbitrary, (1) min., (2) max., (3) random L LSP Stopping (1) 50% of vertices, (0) completing the 50% level M IBM90 Merge Function (1)maximum, (0) addition

  19. Parameters of Cluster Intersection Graph  Type of cluster intersection graph (C parameter): variable (VCI) or literal (LCI)   C ab C a b Example: i j No edge in LCI, edge in VCI  Edges weight (W parameter): number of common literals or balance function  result 2 /(| || |) z w C C ( , ) ( , ) C C C C i j  Balance function: i j i j   C a b c C abdh Example: i j   1/3 * 1/4 1/12 z LCI graph :   ( , ) C C i j 2/3 * 2/4 1/3 z VCI graph : ( , ) C C i j

  20. Separability Function Parameters  Separability value (P parameter): Regular cut size.        ( , ) { ( ) | , } A B w u A v B Or. ( , ) u v Modified cut size.     ( , ) * (| | | |) /( 4 * | | * | |) A B A B A B

  21. Partition Algorithms  Use of 4 different partition algorithms  Level structure partitioning (LSP)  Greedy graph growing partitioning (GGGP)  Max grow partitioning (MGP)  Ibm90  Refinement algorithm (F parameter ): Use or no use of the Fiduccia-Mattheyses refinement algorithm

  22. Partition Algorithm 1 – Level Structure Partitioning (LSP) General structure  Choose a starting vertex v  Partition the graph vertices into levels by using breadth first search (BFS)  LSP stopping parameter (L parameter): Stop the BFS after covering 50 % of the graph’s vertices or Stop the BFS after completing the remainder of the level k where the 50% vertex occurs  Initialize parameter (I parameter): Possible values: an arbitrary vertex 0, a minimum connected vertex, a maximum connected vertex and a random vertex

  23. Partition Algorithm 2 – Greedy Graph Growing Partitioning (GGGP) General structure -.  Divide the graph’s nodes to two sets, the growing region and the other region .  Nodes move only from the other region to the growing region until there are no nodes in the other region .  The order of the movement is greedy; The next node that will be moved is the one that will reduce the connectivity between the regions by the maximum amount.  First node moving to the growing region is selected by the I parameter .

  24. Partition Algorithm 3 – Max Grow Partitioning (MGP) General structure -.  Divide the graph’s nodes to two sets, the growing region and the other region .  Nodes move only from the other region to the growing region until there are no nodes in the other region .  The order of the movement is by the heaviest edge, the node connected to the heaviest edge in the cut, will be moved to the growing region.  First node moving to the growing region is selected by the I parameter.

  25. Partition Algorithm 4 – IBM90 General structure.  At each step the algorithm chooses two vertices u and v which are connected by the heaviest edge (e = (u,v)) and merges them to one new vertex (uv).  During the merge, the edge e=(u,v) connecting the two vertices is eliminated and each pair of edges ((u.X),(v,x)) connecting these two vertices to another vertex x are merged.  This process stops when there are exist two vertices and one edge which represents the bipartition of the whole graph.  Weight of the merged edge (M parameter): Sum of its originals or max of its originals.    ( , ) w Max w w w w w ( , ) ( , ) ( , ) uv x u x v x ( , ) ( , ) ( , ) uv x u x v x

  26. Analysis of Xfactor’s Parameters Parameter Preferred Value Condition C Literal Type Graph (LCI) Always Balanced Edge’s Wight Most of the Time W P Modified Cut Size Always F Using Refinement Most of the Time I None No Clear Answer L None No Clear Answer M Maximum Value Always

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend