Binary Decision Diagrams, ACM Computing Surveys, Sept 1992

Binary Decision Diagrams, ACM Computing Surveys, Sept 1992

((LecLec 3 3)) BinaryBinary DecisionDecision Diagrams:Diagrams: RepresentationRepresentation ^ What you know X Lots of useful, advanced techniques from Boolean algebra X Lots of cofactor-related manipulations X A little bit of computational strategy X Cubelists, positional cube notation X Unate recursive paradigm ^ What you don’t know X The “right” data structure for dealing with Boolean functions: BDDs X Properties of BDDs X Graph representation of a Boolean function X Canonical representation X Efficient algorithms for creating, manipulating BDDs X Again based on recursive divide&conquer strategy (Thanks to Randy Bryant for nice BDD pics+slides) © R. Rutenbar 2001, CMU 18-760, Fall 2001 1 CopyrightCopyright NoticeNotice © Rob A. Rutenbar, 2001 All rights reserved. You may not make copies of this material in any form without my express permission. © R. Rutenbar 2001, CMU 18-760, Fall 2001 2 Page 1 HandoutsHandouts ^ Physical X Lecture 03 -- BDDs: Representation X Paper: Symbolic Boolean Manipulation with Ordered Binary Decision Diagrams, ACM Computing Surveys, Sept 1992. ^ Electronic X Nothing today ^ Reminder X HW1 is due Thu in class © R. Rutenbar 2001, CMU 18-760, Fall 2001 3 WhereWhere AreAre We?We? ^ Still doing Boolean background, now focussed on data structs M T W Th F Aug 27 28 29 30 31 1 Introduction Sep 3 4 5 6 7 2 Advanced Boolean algebra 10 11 12 13 14 3 JAVA Review 17 18 19 20 21 4 Formal verification 24 25 26 27 28 5 2-Level logic synthesis Oct 1 2 3 4 5 6 Multi-level logic synthesis 8 9 10 11 12 7 Technology mapping 15 16 17 18 19 8 Placement 22 23 24 25 26 9 Routing 29 30 31 1 2 10 Static timing analysis Nov 5 6 7 8 9 11 12 13 14 15 16 12 Electrical timing analysis Thnxgive 19 20 21 22 23 13 Geometric data structs & apps 26 27 28 29 30 14 Dec 3 4 5 6 7 15 10 11 12 13 14 16 © R. Rutenbar 2001, CMU 18-760, Fall 2001 4 Page 2 ReadingsReadings ^ In De Micheli book X pp 75-85 does BDDs, but not in as much depth as the notes ^ Randy Bryant paper X Symbolic Boolean Manipulation with Ordered Binary Decision Diagrams, ACM Computing Surveys, Sept 1992. X Lots more detail (some of it you don’t need just yet) but very complete, if a bit terse. © R. Rutenbar 2001, CMU 18-760, Fall 2001 5 BDDBDD HistoryHistory ^ A little history... X Original idea for Binary Decision Diagrams due to Lee (1959) and Akers (1978) X Critical refinement–Ordered BDDs–due to Bryant (1986) X Refinement imposes some restrictions on structure X Restrictions needed to make result canonical representation ^ A little terminology X A BDD is a directed acyclic graph X Graph: vertices connected by edges X Directed: edges have direction (draw them with an arrow) X Acyclic: no cycles possible by following arrows in graph X Often see this shortened to “DAG” © R. Rutenbar 2001, CMU 18-760, Fall 2001 6 Page 3 GraphsGraphs ^ DAGs -- a reminder of some technicalities... vertex directed edge edge A graph A directed graph A directed acyclic graph vertices + edges ...but not acyclic ...note that a “loop” is not a directed cycle, you are only allowed to follow edges along direction that the arrow points © R. Rutenbar 2001, CMU 18-760, Fall 2001 7 BinaryBinary DecisionDecision DiagramsDiagrams ^ Big Idea #1: Binary Decision Diagram X Turn a truth table for the Boolean function into a Decision Diagram Vertices = Edges = Leaf nodes = X In simplest case, resulting graph is just a tree ^ Aside X Convention is that we don’t actually draw arrows on the edges in the DAG representing a decision diagram X Everybody knows which way they point, implicitly X Point from parent to child in the decision tree ^ Look at a simple example... © R. Rutenbar 2001, CMU 18-760, Fall 2001 8 Page 4 BinaryBinary DecisionDecision DiagramsDiagrams Truth Table Decision Tree x1 x2 x3 f x1 0 0 0 0 0 0 1 0 0 1 0 0 x2 x2 0 1 1 1 1 0 0 0 1 0 1 1 x3 x3 x3 x3 1 1 0 0 1 1 1 1 • Vertex represents a decision • Follow green (dashed) line for value 0 • Follow red (solid) line for value 1 • Function value determined by leaf value. © R. Rutenbar 2001, CMU 18-760, Fall 2001 9 BinaryBinary DecisionDecision DiagramsDiagrams ^ Some terminology A ‘variable’ vertex The ‘lo’ pointer to ‘lo’ son or x1 The ‘hi’ pointer child of the to ‘hi’ son or vertex child of the x2 x2 vertex A ‘constant’ vertex x x x x 3 3 3 3 at the bottom leaves of the tree 0 0 0 1 0 1 0 1 The ‘variable ordering’, which is the order in which decisions about vars are made. Here, it’s X1 X2 X3 © R. Rutenbar 2001, CMU 18-760, Fall 2001 10 Page 5 OrderingOrdering ^ Note: Different variable orders are possible x1 x2 x2 Order for this subtree is X2 then X3 x3 x3 x3 x3 0 0 0 1 0 1 0 1 Here, it’s x1 X3 then X2 x x 2 2x3 x3 x3 xx32 xx32 0 0 0 1 00 10 01 11 © R. Rutenbar 2001, CMU 18-760, Fall 2001 11 BinaryBinary DecisionDecision DiagramsDiagrams ^ Observations X Each path from root to leaf traverses variables in a some order X Each such path constitutes a row of the truth table, ie, a decision about what output is when vars take particular values X But we have not yet specified anything about the order of decisions X This decision diagram is not canonical for this function ^ Reminder: canonical forms X Representation that does not depend on the logic gate implementation of a Boolean function X Same function (ie, truth table) of same vars always produces this exact same representation X Example: a truth table is canonical a minterm list, for our function f = Σ m(3,5,7), is canonical © R. Rutenbar 2001, CMU 18-760, Fall 2001 12 Page 6 BinaryBinary DecisionDecision DiagramsDiagrams ^ What’s wrong with this representation? X It’s not canonical, X Way too big to be useful X ...in fact it’s every bit as big as a truth table: 1 leaf per row ^ Big idea #2: Ordering X Restrict global ordering of variables Means: X Note X It’s OK to omit a variable if you don’t need to check it to decide which leaf node to reach for final value of function © R. Rutenbar 2001, CMU 18-760, Fall 2001 13 TotalTotal OrderingOrdering ^ Assign arbitrary total ordering to variables X x1 < x2 < x3 X Variables must appear in this specific order along all paths OK Not OK x1 x 1 x3 x 1 x2 x2 x3 x3 x1 x1 ^ Properties X No conflicting variable assignments along path (see each var at most once walking down the path). X Simplifies manipulation © R. Rutenbar 2001, CMU 18-760, Fall 2001 14 Page 7 BinaryBinary DecisionDecision DiagramsDiagrams ^ OK, now what’s wrong with it? X Variable ordering simplifies things... X ...but representation still too big X ...and still not necessarily canonical x1 Original decision diagram x2 x2 Equivalent, but x3 x3 x3 x3 different diagram 0 0 0 1 0 1 0 1 x1 x2 x2 x3 x3 x3 x3 0 0 0 1 0 1 0 1 1 © R. Rutenbar 2001, CMU 18-760, Fall 2001 15 BinaryBinary DecisionDecision DiagramsDiagrams ^ Big Idea #3: Reduction X Identify redundancies in the DAG that can remove unnecessary nodes and edges X Removal of X2 node and its children, replacement with X3 node is an example of this sort of reduction ^ Why are we doing this? X To combat size problem: want DAGs as small as possible X To achieve canonical form: for same function, given total variable order, want there to be exactly one graph that represents this function © R. Rutenbar 2001, CMU 18-760, Fall 2001 16 Page 8 ReductionReduction RulesRules ^ Reduction Rule 1: Merge equivalent leaves a a a X ‘a’ is either a constant 1 or constant 0 here X Just keep one copy of the leaf node X Redirect all edges that went into the redundant leaves into this one kept node © R. Rutenbar 2001, CMU 18-760, Fall 2001 17 ReductionReduction RulesRules ^ Apply Rule 1 to our example... x1 x1 x2 x2 x2 x2 x3 x3 x3 x3 x3 x3 x3 x3 0 0 0 1 0 1 0 1 0 1 © R. Rutenbar 2001, CMU 18-760, Fall 2001 18 Page 9 ReductionReduction RulesRules ^ Reduction Rule 2: Merge isomorphic nodes x x x y z y z X Isomorphic: Means 2 nodes with same var and identical children X You cannot tell these nodes apart from how they contribute to decisions as you decend thru DAG X Note: means exact same physical child nodes, not just children with same labels X Remove redundant node (extra ‘x’ node here) X Redirect all edges that went into the redundant node into the one copy that you kept (edges into right ‘x’ node now into left as well) © R. Rutenbar 2001, CMU 18-760, Fall 2001 19 ReductionReduction RulesRules ^ Apply Rule 2 to our example x1 x2 x2 x3 x3 x3 x3 0 1 © R. Rutenbar 2001, CMU 18-760, Fall 2001 20 Page 10 ReductionReduction RulesRules ^ Reduction Rule #3: Eliminate Redundant Tests x y y X Test: means a variable node here... X It’s redundant since both of its children go to same node... X ...so we don’t care what value x node takes in this diagram X Remove redundant node X Redirect all edges into the redundant node (x) into the one child node (y) of the removed node © R.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    32 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us