Variable Ordering Heuristics for Kronecker Lattice Diagrams

by

Junaid Omar


Project:

Develop a Lattice Diagram package and investigate variable ordering heuristics.

References:

  1. Lattice Diagrams using Reed-Muller Logic -- Perkowski, Jeske and Xu (RM `97)
  2. On Variable Ordering and Decomposition Type Choice in OKFDDs -- Dreschler, Becker and Jahnke
  3. Multi-level Programmable Arrays for Sub-Micron Technology Based on Symmetries -- Perkowski, Jeske et. al
  4. Polarized Pseudo-Kronecker Symmetry and synthesis of 2x2 Lattice Diagrams. -- Drucker, Files, Perkowski and Jeske

Motivation:

Lattice Diagrams are a useful structure for implementing a function directly in regular layout hardware. They resemble Ordered Kronecker diagrams in the sense that the expansion applied at a node can be Shannon, positive-Davio or negative-Davio. They are different from Ordered Kronecker diagrams because internal nodes have two parents instead of one thereby resulting in a lattice-like structure. They grow linearly at each level and thus are more desirable for layout-driven synthesis than other decision diagram structures that grow exponentially. However the merging of nodes results in reintroduction of variables that get eliminated in other decision diagrams after one level, this causes the depth of the diagram to increase and makes a good variable ordering heuristic necessary to keep the depth from becoming unnecessrily large.
The order in which variables are chosen and the type of transformation applied at a level can greatly influence the eventual size of the lattice diagram. Therefore a good heuristic is needed to determine variable ordering. This project will try to apply the heuristics as described in [2] to the Lattice Diagrams as described in [1].

Rules for Merging Nodes

[1] presents very useful introduction and methodologies for creating Lattice Diagrams and how they can be translated into Akers Array type regular layout hardware. Ordered Shannon Lattice Diagrams (OSLDD) and Ordered Kronecker Lattice Diagrams (OKLDD) are described and multiple output OSLDDs are discussed.There are several rules to merge adjacent nodes in a tree depending on whether its a Shannon-Shannon, Davio-Davio or Davio-Shannon node merger. Davio can be positive-Davio or negative-Davio. However note that there is no pD-nD merge transformation. Also Shannon-Shannon transformation only affects the middle node whereas other also effect the right branch. Thus lattice diagrams tend to trail off quickly on the left side and skew towards the center and right. Thus a good mapping to regular layout must try to minimize the skew so that we can get a more evenly shaped lattice. To this end I will attempt to introduce some new transformation on reverse-Shannon, reverse positive-Davio and reverse negative-Davio. [1] only discusses merging rules for normal transformation types. Our heuristic will use the following merging rules from [1]: We will not use the positive Davio-Shannon and negative Davio - Shannon merging rules described in [1] because our heuristic assumes a common decomposition type at a given level. Later refinements to the heuristic may include these merges also but would have to ensure that we don't encounter any unmergable situations such as a pD-nD. Also note that the nD-nD rule in Fig. 1 is not correct. The correct nD-nD merge rule is as follows:
nD-nD Merge Transformations
In addition to these three merge rules defined above we add the following "reverse" merge rules:
Reverse Merge Transformations

Reverse or "flipped" transformations are similar to their normal counterparts with the difference being that the left and right pointers are transposed (flipped around). The flipped expansions have no particular significance for ordinary BDD or OKFDDs since the logic being represented is unchanged. However, in context of shaping the Lattice DD these flipped expansions can play a very useful role. This can obviously help in balancing the shape of the lattice. Ideally a lattice diagram outline should look like an right-angled isosceles triangle but in practice this is not always achievable. Symmetric functions would yield lattices close to this ideal form. Two of these ideal symmetric lattices could be implemented on a rectangular grid hardware layout with minimal wastage of hardware resources.
Also note that merging results in reintroduction of the decision variable which is eliminated in a normal decision diagram. Therefore variables will be repeated more than once in a lattice diagram and it is very important to order the variables in such a manner as to avoid unnecessary repitition which would result in a larger lattice diagram.
Another important difference between our lattice diagram and conventional DDs is that its terminal nodes are single variables instead of ones and zeros. This is logical since our objective is layout-driven synthesis rather than equivalence-checking etc. which are the most common use for other conventional DDs.

An important thing to note in Kronecker lattices is that the only level where there is no merging is the level immediately below the root. Consequently it makes sense to use the variable that occurs in most terms of our function as the decsion variable here. Use of the most common varaible in the first split from the root level will result in certain elimination of that variable with no possibility of its re-emergence due to later merges. Another important aspect of Kronecker lattices is the reuse of the select line. Each level of the diagram can be visualized as a set of 2 input multiplexers with the select line being connected to the decision variable. It is assumed both normal and complemented forms of the decision variable are availbale for connection to the selct lines of the different multiplexers at a given level. But at a given level it is possible and in fact quite likely that the decision variable is not present in all the functions on that level. Rather than wasting the select lines for these functions , we can use them for other variables. This is conceptually equivalent to using different decision variables at that level. The result of this will be the introduction of "curved" levels.
Examining the merging rules shows that negative Davio and Reverse Negtive Davio are the most complicated of all the merging rules since they cause all the child nodes to be affected. Thus a negative Davio merge will cause a lot of agitation and recomputaion of merged nodes. Shannon and Reverse Shannon don't change the balance of the lattice because they only affect the middle node, thus they will be the cause the least perturbation after the merge. However Positive Davio and Reverse Positive Davio are quite useful for purposes of balancing the shape of the lattice Diagram. It would appear that an FDD Lattice with alternating levels using positive and reverse positive Davio expansion may have the most balancing effect on the shape of the lattice diagram. Since positive Davio tends to skew the diagram towards right and reverse postivie Davio tends to skew the tree towards the left.

Heuristic for Variable and Decomposition ordering

[2] describes heuristics for SOP and multi-level circuits for determining variable ordering for OKFDDs and then compares it to previous heuristics for OBDD (a Kronecker with only Shannon Expansions) and OFDD (a Kronecker with only Davio expansions).
We need to know two things before we build the OKFDD. The PLA Heuristic algorithm described in [2] works as follows:
  1. The algorithm uses a constant, k, to determine the extent to which he tree will favor Shannon or Davio expansions. User will arbitrarily choose a value for k where 0 <= k <= 0.5. This constant influences all the other calcuations for variable order and DTL. For k = 0 the tree degenerates to an OBDD with all decompostiuns are Shannon.For k = 0.5 the tree degenerated to a OFDD with all decompositions being Davio. obviously the value of k greatly influences the DTL and variable ordering so it should be chosen by an educated guess about the nature of the function being implemented. If the nature of the function does not have a direct correlation to k then we may need to try different values of k before getting a suitable value
  2. calculate the nlit and plit values for each varaible. nlit and plit for each variable are a measure of how often it occurs in its complemented or uncomplemented form. For example let us assume a PLA which implements two functions f1 and f2 with 3 variables x1,x2,x3
    x1x2x3f1f2
    11001
    10001
    11111
    then nlit for var[i]= sum of 1s in the f1 and f2 columns for which var[i] = 0
    then plit for var[i]= sum of 1s in the f1 and f2 columns for which var[i] = 1
    for example, plit for x2 = 1+2 = 3 and nlit for x2 = 1
    variablenlitplit
    x104
    x213
    x322
  3. Calculate a weight for each variable and then sort the variables by their weight to get the variable ordering
  4. Calculate a DTL by the the PLA heuristic

Objectives/Milestones:



* Because of time limitations many of these milestones may not be reachable in this quarter.

Results (In Progress)

Questions/comments to:junaid_omar@mentorg.com
Last modified: Tue Dec 8 13:57:59 PST 1998
Click to see more great pages on Computers and Technology.