abc-master
|
Go to the source code of this file.
Data Structures | |
struct | _reo_unit |
struct | _reo_plane |
struct | _reo_hash |
struct | _reo_man |
Macros | |
#define | REO_REORDER_LIMIT 1.15 |
MACRO DEFINITIONS ///. More... | |
#define | REO_QUAL_PAR 3 |
#define | REO_CONST_LEVEL 30000 |
#define | REO_TOPREF_UNDEF 30000 |
#define | REO_CHUNK_SIZE 5000 |
#define | REO_COST_EPSILON 0.0000001 |
#define | REO_HIGH_VALUE 10000000 |
#define | REO_ENABLE 1 |
#define | REO_DISABLE 0 |
#define | Unit_Regular(u) ((reo_unit *)((ABC_PTRUINT_T)(u) & ~01)) |
#define | Unit_Not(u) ((reo_unit *)((ABC_PTRUINT_T)(u) ^ 01)) |
#define | Unit_NotCond(u, c) ((reo_unit *)((ABC_PTRUINT_T)(u) ^ (c))) |
#define | Unit_IsConstant(u) ((int)((u)->lev == REO_CONST_LEVEL)) |
Typedefs | |
typedef struct _reo_unit | reo_unit |
DATA STRUCTURES ///. More... | |
typedef struct _reo_plane | reo_plane |
typedef struct _reo_hash | reo_hash |
typedef struct _reo_man | reo_man |
typedef struct _reo_test | reo_test |
Enumerations | |
enum | reo_min_type { REO_MINIMIZE_NODES, REO_MINIMIZE_WIDTH, REO_MINIMIZE_APL } |
#define REO_REORDER_LIMIT 1.15 |
MACRO DEFINITIONS ///.
CFile****************************************************************
FileName [reo.h]
PackageName [REO: A specialized DD reordering engine.]
Synopsis [External and internal declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - October 15, 2002.]
Revision [
]
#define Unit_IsConstant | ( | u | ) | ((int)((u)->lev == REO_CONST_LEVEL)) |
#define Unit_NotCond | ( | u, | |
c | |||
) | ((reo_unit *)((ABC_PTRUINT_T)(u) ^ (c))) |
#define Unit_Regular | ( | u | ) | ((reo_unit *)((ABC_PTRUINT_T)(u) & ~01)) |
typedef struct _reo_plane reo_plane |
enum reo_min_type |
Function*************************************************************
Synopsis []
Description [Transfers the ADD into another manager minimizes it and returns the min number of nodes; disposes of the BDD in the new manager. Useful for debugging or comparing the performance of other reordering procedures.]
SideEffects []
SeeAlso []
Definition at line 217 of file reoTest.c.
Function*************************************************************
Synopsis []
Description [Transfers the BDD into another manager minimizes it and returns the min number of nodes; disposes of the BDD in the new manager. Useful for debugging or comparing the performance of other reordering procedures.]
SideEffects []
SeeAlso []
Definition at line 180 of file reoTest.c.
Function*************************************************************
Synopsis [Performs reordering of the function.]
Description [Returns the DD minimized by variable reordering in the REO engine. Takes the CUDD decision diagram manager (dd) and the function (Func) represented as a BDD or ADD (MTBDD). If the variable array (pOrder) is not NULL, returns the resulting variable permutation. The permutation is such that if the resulting function is permuted by Cudd_(add,bdd)Permute() using pOrder as the permutation array, the initial function (Func) results. Several flag set by other interface functions specify reordering options:
SideEffects []
SeeAlso []
Definition at line 262 of file reoApi.c.
void Extra_ReorderArray | ( | reo_man * | p, |
DdManager * | dd, | ||
DdNode * | Funcs[], | ||
DdNode * | FuncsRes[], | ||
int | nFuncs, | ||
int * | pOrder | ||
) |
Function*************************************************************
Synopsis [Performs reordering of the array of functions.]
Description [The options are similar to the procedure Extra_Reorder(), except that the user should also provide storage for the resulting DDs, which are returned referenced.]
SideEffects []
SeeAlso []
Definition at line 283 of file reoApi.c.
Function*************************************************************
Synopsis [Reorders the DD using CUDD package.]
Description [Transfers the DD into a temporary manager in such a way that the level correspondence is preserved. Reorders the manager and transfers the DD back into the original manager using the topmost levels of the manager, in such a way that the ordering of levels is preserved. The resulting permutation is returned in the array given by the user.]
SideEffects []
SeeAlso []
Definition at line 109 of file reoTest.c.
reo_man* Extra_ReorderInit | ( | int | nDdVarsMax, |
int | nNodesMax | ||
) |
FUNCTION DECLARATIONS ///.
FUNCTION DECLARATIONS ///.
CFile****************************************************************
FileName [reoApi.c]
PackageName [REO: A specialized DD reordering engine.]
Synopsis [Implementation of API functions.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - October 15, 2002.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Initializes the reordering engine.]
Description [The first argument is the max number of variables in the CUDD DD manager which will be used with the reordering engine (this number of should be the maximum of BDD and ZDD parts). The second argument is the maximum number of BDD nodes in the BDDs to be reordered. These limits are soft. Setting lower limits will later cause the reordering manager to resize internal data structures. However, setting the exact values will make reordering more efficient because resizing will be not necessary.]
SideEffects []
SeeAlso []
Definition at line 50 of file reoApi.c.
void Extra_ReorderQuit | ( | reo_man * | p | ) |
void Extra_ReorderSetIterations | ( | reo_man * | p, |
int | nIters | ||
) |
Function*************************************************************
Synopsis [Sets the number of iterations of sifting performed.]
Description [The default is one iteration. But a higher minimization quality is desired, it is possible to set the number of iterations to any number larger than 1. Convergence is often reached after several iterations, so typically it make no sense to set the number of iterations higher than 3.]
SideEffects []
SeeAlso []
void Extra_ReorderSetMinimizationType | ( | reo_man * | p, |
reo_min_type | fMinType | ||
) |
Function*************************************************************
Synopsis [Sets the type of DD minimizationl that will be performed.]
Description [Currently, three different types of minimization are supported. It is possible to minimize the number of BDD nodes. This is a classical type of minimization, which is attempting to reduce the total number of nodes in the (shared) BDD of the given Boolean functions. It is also possible to minimize the BDD width, defined as the sum total of the number of cofactors on each level in the (shared) BDD (note that the number of cofactors on the given level may be larger than the number of nodes appearing on the given level). It is also possible to minimize the average path length in the (shared) BDD defined as the sum of products, for all BDD paths from the top node to any terminal node, of the number of minterms on the path by the number of nodes on the path. The default reordering type is minimization for the number of BDD nodes. Calling this function with REO_MINIMIZE_WIDTH or REO_MINIMIZE_APL as the second argument, changes the default minimization option for all the reorder calls performed afterwards.]
SideEffects []
SeeAlso []
void Extra_ReorderSetRemapping | ( | reo_man * | p, |
int | fRemapUp | ||
) |
Function*************************************************************
Synopsis [Sets the type of remapping performed by the engine.]
Description [The remapping refers to the way the resulting BDD is expressed using the elementary variables of the CUDD BDD manager. Currently, two types possibilities are supported: remapping and no remapping. Remapping means that the function(s) after reordering depend on the topmost variables in the manager. No remapping means that the function(s) after reordering depend on the same variables as before. Consider the following example. Suppose the initial four variable function depends on variables 2,4,5, and 9 on the CUDD BDD manager, which may be found anywhere in the current variable order. If remapping is set, the function after ordering depends on the topmost variables in the manager, which may or may not be the same as the variables 2,4,5, and 9. If no remapping is set, then the reordered function depend on the same variables 2,4,5, and 9, but the meaning of each variale has changed according to the new ordering. The resulting ordering is returned in the array "pOrder" filled out by the reordering engine in the call to Extra_Reorder(). The default is no remapping.]
SideEffects []
SeeAlso []
void Extra_ReorderSetVerbosity | ( | reo_man * | p, |
int | fVerbose | ||
) |
Function*************************************************************
Synopsis [Sets the verbosity level.]
Description [Setting the level to 1 results in printing statistics before and after the reordering.]
SideEffects []
SeeAlso []
void Extra_ReorderSetVerification | ( | reo_man * | p, |
int | fVerify | ||
) |
Function*************************************************************
Synopsis [Sets the verification mode.]
Description [Setting the level to 1 results in verifying the results of variable reordering. Verification is performed by remapping the resulting functions into the original variable order and comparing them with the original functions given by the user. Enabling verification typically leads to 20-30% increase in the total runtime of REO.]
SideEffects []
SeeAlso []
DECLARATIONS ///.
CFile****************************************************************
FileName [reoTest.c]
PackageName [REO: A specialized DD reordering engine.]
Synopsis [Various testing procedures (may be outdated).]
Author [Alan Mishchenko alanm] i@ec e.pdx .edu
Affiliation [ECE Department. Portland State University, Portland, Oregon.]
Date [Ver. 1.0. Started - October 15, 2002.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Reorders the DD using REO and CUDD.]
Description [This function can be used to test the performance of the reordering package.]
SideEffects []
SeeAlso []
Definition at line 43 of file reoTest.c.
void reoProfileAplPrint | ( | reo_man * | p | ) |
Function********************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 305 of file reoProfile.c.
void reoProfileAplStart | ( | reo_man * | p | ) |
Function*************************************************************
Synopsis [Start the profile for the APL.]
Description [Computes the total path length. The path length is normalized by dividing it by 2^|supp(f)|. To get the "real" APL, multiply by 2^|supp(f)|. This procedure assumes that Weight field of all nodes has been set to 0.0 before the call, except for the weight of the topmost node, which is set to 1.0 (1.0 is the probability of traversing the topmost node). This procedure assigns the edge weights. Because of the equal probability of selecting 0 and 1 assignment at a node, the edge weights are the same for the node. Instead of storing them, we store the weight of the node, which is the probability of traversing the node (pUnit->Weight) during the top down evalation of the BDD. ]
SideEffects []
SeeAlso []
Definition at line 78 of file reoProfile.c.
void reoProfileNodesPrint | ( | reo_man * | p | ) |
Function********************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 289 of file reoProfile.c.
void reoProfileNodesStart | ( | reo_man * | p | ) |
DECLARATIONS ///.
CFile****************************************************************
FileName [reoProfile.c]
PackageName [REO: A specialized DD reordering engine.]
Synopsis [Procudures that compute variables profiles (nodes, width, APL).]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - October 15, 2002.]
Revision [
]FUNCTION DEFINITIONS /// Function********************************************************************
Synopsis [Start the profile for the BDD nodes.]
Description [TopRef is the first level, on this the given node counts towards the width of the BDDs. (In other words, it is the level of the referencing node plus 1.)]
SideEffects []
SeeAlso []
Definition at line 46 of file reoProfile.c.
void reoProfileWidthPrint | ( | reo_man * | p | ) |
Function********************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 321 of file reoProfile.c.
void reoProfileWidthStart | ( | reo_man * | p | ) |
Function********************************************************************
Synopsis [Start the profile for the BDD width. Complexity of the algorithm is O(N + n).]
Description [TopRef is the first level, on which the given node counts towards the width of the BDDs. (In other words, it is the level of the referencing node plus 1.)]
SideEffects []
SeeAlso []
Definition at line 130 of file reoProfile.c.
void reoProfileWidthStart2 | ( | reo_man * | p | ) |
Function********************************************************************
Synopsis [Start the profile for the BDD width. Complexity of the algorithm is O(N * n).]
Description [TopRef is the first level, on which the given node counts towards the width of the BDDs. (In other words, it is the level of the referencing node plus 1.)]
SideEffects []
SeeAlso []
Definition at line 222 of file reoProfile.c.
void reoProfileWidthVerifyLevel | ( | reo_plane * | pPlane, |
int | Level | ||
) |
Function********************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 354 of file reoProfile.c.
void reoReorderArray | ( | reo_man * | p, |
DdManager * | dd, | ||
DdNode * | Funcs[], | ||
DdNode * | FuncsRes[], | ||
int | nFuncs, | ||
int * | pOrder | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 50 of file reoCore.c.
void reoReorderSift | ( | reo_man * | p | ) |
DECLARATIONS ///.
CFile****************************************************************
FileName [reoSift.c]
PackageName [REO: A specialized DD reordering engine.]
Synopsis [Implementation of the sifting algorihtm.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - October 15, 2002.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Implements the variable sifting algorithm.]
Description [Performs a sequence of adjacent variable swaps known as "sifting". Uses the cost functions determined by the flag.]
SideEffects []
SeeAlso []
Definition at line 44 of file reoSift.c.
double reoReorderSwapAdjacentVars | ( | reo_man * | p, |
int | lev0, | ||
int | fMovingUp | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis []
Description [Takes the level (lev0) of the plane, which should be swapped with the next plane. Returns the gain using the current cost function.]
SideEffects []
SeeAlso []
Definition at line 46 of file reoSwap.c.
void reoResizeStructures | ( | reo_man * | p, |
int | nDdVarsMax, | ||
int | nNodesMax, | ||
int | nFuncs | ||
) |
Function*************************************************************
Synopsis [Resizes the internal manager data structures.]
Description []
SideEffects []
SeeAlso []
DECLARATIONS ///.
CFile****************************************************************
FileName [reoTransfer.c]
PackageName [REO: A specialized DD reordering engine.]
Synopsis [Transfering a DD from the CUDD manager into REO"s internal data structures and back.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - October 15, 2002.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Transfers the DD into the internal reordering data structure.]
Description [It is important that the hash table is lossless.]
SideEffects []
SeeAlso []
Definition at line 43 of file reoTransfer.c.
Function*************************************************************
Synopsis [Creates the DD from the internal reordering data structure.]
Description [It is important that the hash table is lossless.]
SideEffects []
SeeAlso []
Definition at line 120 of file reoTransfer.c.
Function*************************************************************
Synopsis [Adds one unit to the list of units which constitutes the plane.]
Description []
SideEffects []
SeeAlso []
Definition at line 135 of file reoUnits.c.
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Extract the next unit from the free unit list.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file reoUnits.c.
Function*************************************************************
Synopsis [Returns the unit to the free unit list.]
Description []
SideEffects []
SeeAlso []
Definition at line 69 of file reoUnits.c.
Function*************************************************************
Synopsis [Returns the list of units to the free unit list.]
Description []
SideEffects []
SeeAlso []
Definition at line 87 of file reoUnits.c.
void reoUnitsStopDispenser | ( | reo_man * | p | ) |
Function*************************************************************
Synopsis [Stops the unit dispenser.]
Description []
SideEffects []
SeeAlso []
Definition at line 115 of file reoUnits.c.