abc-master
|
Go to the source code of this file.
Macros | |
#define | Dsd_IsComplement(p) (((int)((ABC_PTRUINT_T) (p) & 01))) |
MACRO DEFINITIONS ///. More... | |
#define | Dsd_Regular(p) ((Dsd_Node_t *)((ABC_PTRUINT_T)(p) & ~01)) |
#define | Dsd_Not(p) ((Dsd_Node_t *)((ABC_PTRUINT_T)(p) ^ 01)) |
#define | Dsd_NotCond(p, c) ((Dsd_Node_t *)((ABC_PTRUINT_T)(p) ^ (c))) |
#define | Dsd_NodeForEachChild(Node, Index, Child) |
ITERATORS ///. More... | |
Typedefs | |
typedef struct Dsd_Manager_t_ | Dsd_Manager_t |
TYPEDEF DEFINITIONS ///. More... | |
typedef struct Dsd_Node_t_ | Dsd_Node_t |
typedef enum Dsd_Type_t_ | Dsd_Type_t |
Enumerations | |
enum | Dsd_Type_t_ { DSD_NODE_NONE = 0, DSD_NODE_CONST1 = 1, DSD_NODE_BUF = 2, DSD_NODE_OR = 3, DSD_NODE_EXOR = 4, DSD_NODE_PRIME = 5 } |
STRUCTURE DEFINITIONS ///. More... | |
#define Dsd_NodeForEachChild | ( | Node, | |
Index, | |||
Child | |||
) |
ITERATORS ///.
#define Dsd_Not | ( | p | ) | ((Dsd_Node_t *)((ABC_PTRUINT_T)(p) ^ 01)) |
#define Dsd_NotCond | ( | p, | |
c | |||
) | ((Dsd_Node_t *)((ABC_PTRUINT_T)(p) ^ (c))) |
#define Dsd_Regular | ( | p | ) | ((Dsd_Node_t *)((ABC_PTRUINT_T)(p) & ~01)) |
typedef struct Dsd_Manager_t_ Dsd_Manager_t |
typedef struct Dsd_Node_t_ Dsd_Node_t |
typedef enum Dsd_Type_t_ Dsd_Type_t |
enum Dsd_Type_t_ |
STRUCTURE DEFINITIONS ///.
CFile****************************************************************
FileName [dsd.h]
PackageName [DSD: Disjoint-support decomposition package.]
Synopsis [External declarations of the package. This fast BDD-based recursive algorithm for simple (single-output) DSD is based on the following papers: (1) V. Bertacco and M. Damiani, "Disjunctive decomposition of logic functions," Proc. ICCAD '97, pp. 78-82. (2) Y. Matsunaga, "An exact and efficient algorithm for disjunctive decomposition", Proc. SASIMI '98, pp. 44-50. The scope of detected decompositions is the same as in the paper: T. Sasao and M. Matsuura, "DECOMPOS: An integrated system for functional decomposition," Proc. IWLS '98, pp. 471-477.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 8.0. Started - September 22, 2003.]
Revision [
]PARAMETERS ///
Enumerator | |
---|---|
DSD_NODE_NONE | |
DSD_NODE_CONST1 | |
DSD_NODE_BUF | |
DSD_NODE_OR | |
DSD_NODE_EXOR | |
DSD_NODE_PRIME |
void Dsd_Decompose | ( | Dsd_Manager_t * | pDsdMan, |
DdNode ** | pbFuncs, | ||
int | nFuncs | ||
) |
DECOMPOSITION FUNCTIONS ///.
Function*************************************************************
Synopsis [Performs DSD for the array of functions represented by BDDs.]
Description [This function takes the DSD manager, which should be previously allocated by the call to Dsd_ManagerStart(). The resulting DSD tree is stored in the DSD manager (pDsdMan->pRoots, pDsdMan->nRoots). Access to the tree is through the APIs of the manager. The resulting tree is a shared DSD DAG for the functions given in the array. For one function the resulting DAG is always a tree. The root node pointers can be complemented, as discussed in the literature referred to in "dsd.h". This procedure can be called repeatedly for different functions. There is no need to remove the decomposition tree after it is returned, because the next call to the DSD manager will "recycle" the tree. The user should not modify or dereference any data associated with the nodes of the DSD trees (the user can only change the contents of a temporary mark associated with each node by the calling to Dsd_NodeSetMark()). All the decomposition trees and intermediate nodes will be removed when the DSD manager is deallocated at the end by calling Dsd_ManagerStop().]
SideEffects []
SeeAlso []
Definition at line 113 of file dsdProc.c.
Dsd_Node_t* Dsd_DecomposeOne | ( | Dsd_Manager_t * | pDsdMan, |
DdNode * | bFunc | ||
) |
Function*************************************************************
Synopsis [Performs decomposition for one function.]
Description []
SideEffects []
SeeAlso []
Definition at line 230 of file dsdProc.c.
Dsd_Node_t* Dsd_ManagerReadConst1 | ( | Dsd_Manager_t * | pMan | ) |
DdManager* Dsd_ManagerReadDd | ( | Dsd_Manager_t * | pMan | ) |
Dsd_Node_t* Dsd_ManagerReadInput | ( | Dsd_Manager_t * | pMan, |
int | i | ||
) |
Dsd_Node_t* Dsd_ManagerReadRoot | ( | Dsd_Manager_t * | pMan, |
int | i | ||
) |
Function*************************************************************
Synopsis [APIs of the DSD manager.]
Description [Allows the use to get hold of an individual leave of the DSD tree (Dsd_ManagerReadInput) or an individual root of the decomposition tree (Dsd_ManagerReadRoot). The root may have the complemented attribute.]
SideEffects []
SeeAlso []
Definition at line 93 of file dsdApi.c.
Dsd_Manager_t* Dsd_ManagerStart | ( | DdManager * | dd, |
int | nSuppMax, | ||
int | fVerbose | ||
) |
FUNCTION DECLARATIONS ///.
CFile****************************************************************
FileName [dsdMan.c]
PackageName [DSD: Disjoint-support decomposition package.]
Synopsis [APIs of the DSD manager.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 8.0. Started - September 22, 2003.]
Revision [
]API OF DSD MANAGER /// Function*************************************************************
Synopsis [Starts the DSD manager.]
Description [Takes the started BDD manager and the maximum support size of the function to be DSD-decomposed. The manager should have at least as many variables as there are variables in the support. The functions should be expressed using the first nSuppSizeMax variables in the manager (these may be ordered not necessarily on top of the manager).]
SideEffects []
SeeAlso []
Definition at line 47 of file dsdMan.c.
void Dsd_ManagerStop | ( | Dsd_Manager_t * | dMan | ) |
Function*************************************************************
Synopsis [Stops the DSD manager.]
Description [Stopping the DSD manager automatically derefereces and deallocates all the DSD nodes that were created during the life time of the DSD manager. As a result, the user does not need to deref or deallocate any DSD nodes or trees that are derived and placed in the manager while it exists.]
SideEffects []
SeeAlso []
void Dsd_NodePrint | ( | FILE * | pFile, |
Dsd_Node_t * | pNode | ||
) |
Function*************************************************************
Synopsis [Prints the decompostion tree into file.]
Description []
SideEffects []
SeeAlso []
Definition at line 949 of file dsdTree.c.
Dsd_Node_t* Dsd_NodeReadDec | ( | Dsd_Node_t * | p, |
int | i | ||
) |
Dsd_Node_t** Dsd_NodeReadDecs | ( | Dsd_Node_t * | p | ) |
int Dsd_NodeReadDecsNum | ( | Dsd_Node_t * | p | ) |
DdNode* Dsd_NodeReadFunc | ( | Dsd_Node_t * | p | ) |
int Dsd_NodeReadMark | ( | Dsd_Node_t * | p | ) |
DdNode* Dsd_NodeReadSupp | ( | Dsd_Node_t * | p | ) |
Dsd_Type_t Dsd_NodeReadType | ( | Dsd_Node_t * | p | ) |
FUNCTION DEFINITIONS ///.
FUNCTION DEFINITIONS ///.
CFile****************************************************************
FileName [dsdApi.c]
PackageName [DSD: Disjoint-support decomposition package.]
Synopsis [Implementation of API functions.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 8.0. Started - September 22, 2003.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [APIs of the DSD node.]
Description [The node's type can be retrieved by calling Dsd_NodeReadType(). The type is one of the following: constant 1 node, the buffer (or the elementary variable), OR gate, EXOR gate, or PRIME function (a non-DSD-decomposable function with more than two inputs). The return value of Dsd_NodeReadFunc() is the global function of the DSD node. The return value of Dsd_NodeReadSupp() is the support of the global function of the DSD node. The array of DSD nodes returned by Dsd_NodeReadDecs() is the array of decomposition nodes for the formal inputs of the given node. The number of decomposition entries returned by Dsd_NodeReadDecsNum() is the number of formal inputs. The mark is explained below.]
SideEffects []
SeeAlso []
Definition at line 53 of file dsdApi.c.
void Dsd_NodeSetMark | ( | Dsd_Node_t * | p, |
int | Mark | ||
) |
Function*************************************************************
Synopsis [APIs of the DSD node.]
Description [This API allows the user to set the integer mark in the given DSD node. The mark is guaranteed to persist as long as the calls to the decomposition are not performed. In any case, the mark is useful to associate the node with some temporary information, such as its number in the DFS ordered list of the DSD nodes or its number in the BLIF file that it being written.]
SideEffects []
SeeAlso []
Definition at line 77 of file dsdApi.c.
int Dsd_TreeCollectDecomposableVars | ( | Dsd_Manager_t * | pDsdMan, |
int * | pVars | ||
) |
Function*************************************************************
Synopsis [Collects the decomposable vars on the PI side.]
Description []
SideEffects []
SeeAlso []
Definition at line 470 of file dsdTree.c.
Dsd_Node_t** Dsd_TreeCollectNodesDfs | ( | Dsd_Manager_t * | pDsdMan, |
int * | pnNodes | ||
) |
Function*************************************************************
Synopsis [Creates the DFS ordered array of DSD nodes in the tree.]
Description [The collected nodes do not include the terminal nodes and the constant 1 node. The array of nodes is returned. The number of entries in the array is returned in the variale pnNodes.]
SideEffects []
SeeAlso []
Definition at line 555 of file dsdTree.c.
Dsd_Node_t** Dsd_TreeCollectNodesDfsOne | ( | Dsd_Manager_t * | pDsdMan, |
Dsd_Node_t * | pNode, | ||
int * | pnNodes | ||
) |
Function*************************************************************
Synopsis [Creates the DFS ordered array of DSD nodes in the tree.]
Description [The collected nodes do not include the terminal nodes and the constant 1 node. The array of nodes is returned. The number of entries in the array is returned in the variale pnNodes.]
SideEffects []
SeeAlso []
Definition at line 585 of file dsdTree.c.
int Dsd_TreeCountNonTerminalNodes | ( | Dsd_Manager_t * | pDsdMan | ) |
Function*************************************************************
Synopsis [Counts non-terminal nodes of the DSD tree.]
Description [Nonterminal nodes include all the nodes with the support more than 1. These are OR, EXOR, and PRIME nodes. They do not include the elementary variable nodes and the constant 1 node.]
SideEffects []
SeeAlso []
Definition at line 310 of file dsdTree.c.
int Dsd_TreeCountNonTerminalNodesOne | ( | Dsd_Node_t * | pRoot | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 331 of file dsdTree.c.
int Dsd_TreeCountPrimeNodes | ( | Dsd_Manager_t * | pDsdMan | ) |
Function*************************************************************
Synopsis [Counts prime nodes of the DSD tree.]
Description [Prime nodes are nodes with the support more than 2, that is not an OR or EXOR gate.]
SideEffects []
SeeAlso []
Definition at line 389 of file dsdTree.c.
int Dsd_TreeCountPrimeNodesOne | ( | Dsd_Node_t * | pRoot | ) |
Function*************************************************************
Synopsis [Counts prime nodes for one root.]
Description []
SideEffects []
SeeAlso []
Definition at line 410 of file dsdTree.c.
int Dsd_TreeGetAigCost | ( | Dsd_Node_t * | pNode | ) |
DdNode* Dsd_TreeGetPrimeFunction | ( | DdManager * | dd, |
Dsd_Node_t * | pNode | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Returns the local function of the DSD node. ]
Description [The local function is computed using the global function of the node and the global functions of the formal inputs. The resulting local function is mapped using the topmost N variables of the manager. The number of variables N is equal to the number of formal inputs.]
SideEffects []
SeeAlso []
Definition at line 54 of file dsdLocal.c.
void Dsd_TreeNodeGetInfo | ( | Dsd_Manager_t * | pDsdMan, |
int * | DepthMax, | ||
int * | GateSizeMax | ||
) |
Function*************************************************************
Synopsis [Getting information about the node.]
Description [This function computes the max depth and the max gate size of the tree rooted at the node.]
SideEffects []
SeeAlso []
Definition at line 156 of file dsdTree.c.
void Dsd_TreeNodeGetInfoOne | ( | Dsd_Node_t * | pNode, |
int * | DepthMax, | ||
int * | GateSizeMax | ||
) |
Function*************************************************************
Synopsis [Getting information about the node.]
Description [This function computes the max depth and the max gate size of the tree rooted at the node.]
SideEffects []
SeeAlso []
Definition at line 183 of file dsdTree.c.
void Dsd_TreePrint | ( | FILE * | pFile, |
Dsd_Manager_t * | pDsdMan, | ||
char * | pInputNames[], | ||
char * | pOutputNames[], | ||
int | fShortNames, | ||
int | Output | ||
) |
Function*************************************************************
Synopsis [Prints the decompostion tree into file.]
Description []
SideEffects []
SeeAlso []
Definition at line 641 of file dsdTree.c.
void Dsd_TreePrint2 | ( | FILE * | pFile, |
Dsd_Manager_t * | dMan, | ||
char * | pInputNames[], | ||
char * | pOutputNames[], | ||
int | Output | ||
) |
Definition at line 917 of file dsdTree.c.