ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
dsdInt.h File Reference
#include "bdd/extrab/extraBdd.h"
#include "dsd.h"
Include dependency graph for dsdInt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Dsd_Manager_t_
 STRUCTURE DEFINITIONS ///. More...
 
struct  Dsd_Node_t_
 

Macros

#define MAXINPUTS   1000
 MACRO DEFINITIONS ///.
 

Functions

void Dsd_CheckCacheAllocate (int nEntries)
 PARAMETERS ///.
 
void Dsd_CheckCacheDeallocate ()
 
void Dsd_CheckCacheClear ()
 
int Dsd_CheckRootFunctionIdentity (DdManager *dd, DdNode *bF1, DdNode *bF2, DdNode *bC1, DdNode *bC2)
 
Dsd_Node_tDsd_TreeNodeCreate (int Type, int nDecs, int BlockNum)
 FUNCTION DEFINITIONS ///.
 
void Dsd_TreeNodeDelete (DdManager *dd, Dsd_Node_t *pNode)
 
void Dsd_TreeUnmark (Dsd_Manager_t *dMan)
 
DdNode * Dsd_TreeGetPrimeFunctionOld (DdManager *dd, Dsd_Node_t *pNode, int fRemap)
 

Variables

ABC_NAMESPACE_HEADER_START typedef unsigned char byte
 TYPEDEF DEFINITIONS ///.
 

Macro Definition Documentation

◆ MAXINPUTS

#define MAXINPUTS   1000

MACRO DEFINITIONS ///.

Definition at line 69 of file dsdInt.h.

Function Documentation

◆ Dsd_CheckCacheAllocate()

void Dsd_CheckCacheAllocate ( int nEntries)
extern

PARAMETERS ///.

FUNCTION DECLARATIONS ///

PARAMETERS ///.

Function********************************************************************

Synopsis [(Re)allocates the local cache.]

Description []

SideEffects []

SeeAlso []

Definition at line 63 of file dsdCheck.c.

64{
65 int nRequested;
66
67 pCache = ABC_ALLOC( Dds_Cache_t, 1 );
68 memset( pCache, 0, sizeof(Dds_Cache_t) );
69
70 // check what is the size of the current cache
71 nRequested = Abc_PrimeCudd( nEntries );
72 if ( pCache->nTableSize != nRequested )
73 { // the current size is different
74 // deallocate the old, allocate the new
75 if ( pCache->nTableSize )
77 // allocate memory for the hash table
78 pCache->nTableSize = nRequested;
79 pCache->pTable = ABC_ALLOC( Dsd_Entry_t, nRequested );
80 }
81 // otherwise, there is no need to allocate, just clean
83// printf( "\nThe number of allocated cache entries = %d.\n\n", pCache->nTableSize );
84}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
void Dsd_CheckCacheDeallocate()
Definition dsdCheck.c:97
typedefABC_NAMESPACE_IMPL_START struct Dsd_Cache_t_ Dds_Cache_t
DECLARATIONS ///.
Definition dsdCheck.c:28
void Dsd_CheckCacheClear()
Definition dsdCheck.c:114
struct Dsd_Entry_t_ Dsd_Entry_t
Definition dsdCheck.c:29
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dsd_CheckCacheClear()

void Dsd_CheckCacheClear ( )
extern

Function********************************************************************

Synopsis [Clears the local cache.]

Description []

SideEffects []

SeeAlso []

Definition at line 114 of file dsdCheck.c.

115{
116 int i;
117 for ( i = 0; i < pCache->nTableSize; i++ )
118 pCache->pTable[0].bX[0] = NULL;
119}
Here is the caller graph for this function:

◆ Dsd_CheckCacheDeallocate()

void Dsd_CheckCacheDeallocate ( )
extern

Function********************************************************************

Synopsis [Deallocates the local cache.]

Description []

SideEffects []

SeeAlso []

Definition at line 97 of file dsdCheck.c.

98{
99 ABC_FREE( pCache->pTable );
100 ABC_FREE( pCache );
101}
#define ABC_FREE(obj)
Definition abc_global.h:267
Here is the caller graph for this function:

◆ Dsd_CheckRootFunctionIdentity()

int Dsd_CheckRootFunctionIdentity ( DdManager * dd,
DdNode * bF1,
DdNode * bF2,
DdNode * bC1,
DdNode * bC2 )
extern

Function********************************************************************

Synopsis [Checks whether it is true that bF1(bC1=0) == bF2(bC2=0).]

Description []

SideEffects []

SeeAlso []

Definition at line 133 of file dsdCheck.c.

134{
135 int RetValue;
136// pCache->nSuccess = 0;
137// pCache->nFailure = 0;
138 RetValue = Dsd_CheckRootFunctionIdentity_rec(dd, bF1, bF2, bC1, bC2);
139// printf( "Cache success = %d. Cache failure = %d.\n", pCache->nSuccess, pCache->nFailure );
140 return RetValue;
141}

◆ Dsd_TreeGetPrimeFunctionOld()

DdNode * Dsd_TreeGetPrimeFunctionOld ( DdManager * dd,
Dsd_Node_t * pNode,
int fRemap )
extern

Function*************************************************************

Synopsis [Retuns the function of one node of the decomposition tree.]

Description [This is the old procedure. It is now superceded by the procedure Dsd_TreeGetPrimeFunction() found in "dsdLocal.c".]

SideEffects []

SeeAlso []

Definition at line 1309 of file dsdTree.c.

1310{
1311 DdNode * bCof0, * bCof1, * bCube0, * bCube1, * bNewFunc, * bTemp;
1312 int i;
1313 static int Permute[MAXINPUTS];
1314
1315 assert( pNode );
1316 assert( !Dsd_IsComplement( pNode ) );
1317 assert( pNode->Type == DSD_NODE_PRIME );
1318
1319 // transform the function of this block to depend on inputs
1320 // corresponding to the formal inputs
1321
1322 // first, substitute those inputs that have some blocks associated with them
1323 // second, remap the inputs to the top of the manager (then, it is easy to output them)
1324
1325 // start the function
1326 bNewFunc = pNode->G; Cudd_Ref( bNewFunc );
1327 // go over all primary inputs
1328 for ( i = 0; i < pNode->nDecs; i++ )
1329 if ( pNode->pDecs[i]->Type != DSD_NODE_BUF ) // remap only if it is not the buffer
1330 {
1331 bCube0 = Extra_bddFindOneCube( dd, Cudd_Not(pNode->pDecs[i]->G) ); Cudd_Ref( bCube0 );
1332 bCof0 = Cudd_Cofactor( dd, bNewFunc, bCube0 ); Cudd_Ref( bCof0 );
1333 Cudd_RecursiveDeref( dd, bCube0 );
1334
1335 bCube1 = Extra_bddFindOneCube( dd, pNode->pDecs[i]->G ); Cudd_Ref( bCube1 );
1336 bCof1 = Cudd_Cofactor( dd, bNewFunc, bCube1 ); Cudd_Ref( bCof1 );
1337 Cudd_RecursiveDeref( dd, bCube1 );
1338
1339 Cudd_RecursiveDeref( dd, bNewFunc );
1340
1341 // use the variable in the i-th level of the manager
1342// bNewFunc = Cudd_bddIte( dd, dd->vars[dd->invperm[i]],bCof1,bCof0 ); Cudd_Ref( bNewFunc );
1343 // use the first variale in the support of the component
1344 bNewFunc = Cudd_bddIte( dd, dd->vars[pNode->pDecs[i]->S->index],bCof1,bCof0 ); Cudd_Ref( bNewFunc );
1345 Cudd_RecursiveDeref( dd, bCof0 );
1346 Cudd_RecursiveDeref( dd, bCof1 );
1347 }
1348
1349 if ( fRemap )
1350 {
1351 // remap the function to the top of the manager
1352 // remap the function to the first variables of the manager
1353 for ( i = 0; i < pNode->nDecs; i++ )
1354 // Permute[ pNode->pDecs[i]->S->index ] = dd->invperm[i];
1355 Permute[ pNode->pDecs[i]->S->index ] = i;
1356
1357 bNewFunc = Cudd_bddPermute( dd, bTemp = bNewFunc, Permute ); Cudd_Ref( bNewFunc );
1358 Cudd_RecursiveDeref( dd, bTemp );
1359 }
1360
1361 Cudd_Deref( bNewFunc );
1362 return bNewFunc;
1363}
#define MAXINPUTS
INCLUDES ///.
Definition cas.h:38
@ DSD_NODE_PRIME
Definition dsd.h:52
@ DSD_NODE_BUF
Definition dsd.h:49
#define Dsd_IsComplement(p)
MACRO DEFINITIONS ///.
Definition dsd.h:68
DdNode * Extra_bddFindOneCube(DdManager *dd, DdNode *bF)
DdNode * G
Definition dsdInt.h:57
Dsd_Type_t Type
Definition dsdInt.h:56
DdNode * S
Definition dsdInt.h:58
Dsd_Node_t ** pDecs
Definition dsdInt.h:59
short nDecs
Definition dsdInt.h:61
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:

◆ Dsd_TreeNodeCreate()

Dsd_Node_t * Dsd_TreeNodeCreate ( int Type,
int nDecs,
int BlockNum )
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Create the DSD node.]

Description []

SideEffects []

SeeAlso []

Definition at line 61 of file dsdTree.c.

62{
63 // allocate memory for this node
64 Dsd_Node_t * p = (Dsd_Node_t *) ABC_ALLOC( char, sizeof(Dsd_Node_t) );
65 memset( p, 0, sizeof(Dsd_Node_t) );
66 p->Type = (Dsd_Type_t)Type; // the type of this block
67 p->nDecs = nDecs; // the number of decompositions
68 if ( p->nDecs )
69 {
70 p->pDecs = (Dsd_Node_t **) ABC_ALLOC( char, p->nDecs * sizeof(Dsd_Node_t *) );
71 p->pDecs[0] = NULL;
72 }
73 return p;
74}
enum Dsd_Type_t_ Dsd_Type_t
Definition dsd.h:61
struct Dsd_Node_t_ Dsd_Node_t
Definition dsd.h:60
Cube * p
Definition exorList.c:222
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dsd_TreeNodeDelete()

void Dsd_TreeNodeDelete ( DdManager * dd,
Dsd_Node_t * pNode )
extern

Function*************************************************************

Synopsis [Frees the DSD node.]

Description []

SideEffects []

SeeAlso []

Definition at line 87 of file dsdTree.c.

88{
89 if ( pNode->G ) Cudd_RecursiveDeref( dd, pNode->G );
90 if ( pNode->S ) Cudd_RecursiveDeref( dd, pNode->S );
91 ABC_FREE( pNode->pDecs );
92 ABC_FREE( pNode );
93}
Here is the caller graph for this function:

◆ Dsd_TreeUnmark()

void Dsd_TreeUnmark ( Dsd_Manager_t * pDsdMan)
extern

Function*************************************************************

Synopsis [Unmarks the decomposition tree.]

Description [This function assumes that originally pNode->nVisits are set to zero!]

SideEffects []

SeeAlso []

Definition at line 107 of file dsdTree.c.

108{
109 int i;
110 for ( i = 0; i < pDsdMan->nRoots; i++ )
111 Dsd_TreeUnmark_rec( Dsd_Regular( pDsdMan->pRoots[i] ) );
112}
#define Dsd_Regular(p)
Definition dsd.h:69
Dsd_Node_t ** pRoots
Definition dsdInt.h:48
Here is the caller graph for this function:

Variable Documentation

◆ byte

ABC_NAMESPACE_HEADER_START typedef unsigned char byte

TYPEDEF DEFINITIONS ///.

CFile****************************************************************

FileName [dsdInt.h]

PackageName [DSD: Disjoint-support decomposition package.]

Synopsis [Internal declarations of the package.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 8.0. Started - September 22, 2003.]

Revision [

Id
dsdInt.h,v 1.0 2002/22/09 00:00:00 alanmi Exp

]

Definition at line 33 of file dsdInt.h.