diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-01-15 20:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-01-15 20:01:00 -0800 |
commit | 76bcf6b25411e1b0d73e5dff6c8fd3e2f4bab9e1 (patch) | |
tree | 5956241cd46a10ca868092acec7f94a3fa6df2ad /src/base | |
parent | 93aedd2c5155478de7602db4db2c2df4c73e32e0 (diff) | |
download | abc-76bcf6b25411e1b0d73e5dff6c8fd3e2f4bab9e1.tar.gz abc-76bcf6b25411e1b0d73e5dff6c8fd3e2f4bab9e1.tar.bz2 abc-76bcf6b25411e1b0d73e5dff6c8fd3e2f4bab9e1.zip |
Version abc70115_2
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abc.h | 10 | ||||
-rw-r--r-- | src/base/abc/abcAig.c | 1 | ||||
-rw-r--r-- | src/base/abc/abcFanio.c | 2 | ||||
-rw-r--r-- | src/base/abc/abcFunc.c | 3 |
4 files changed, 14 insertions, 2 deletions
diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h index 1ec21986..5774afbc 100644 --- a/src/base/abc/abc.h +++ b/src/base/abc/abc.h @@ -232,6 +232,16 @@ static inline int Abc_TruthWordNum( int nVars ) { return nV static inline int Abc_InfoHasBit( unsigned * p, int i ) { return (p[(i)>>5] & (1<<((i) & 31))) > 0; } static inline void Abc_InfoSetBit( unsigned * p, int i ) { p[(i)>>5] |= (1<<((i) & 31)); } static inline void Abc_InfoXorBit( unsigned * p, int i ) { p[(i)>>5] ^= (1<<((i) & 31)); } +static inline unsigned Abc_InfoRandom() { return ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand())); } // #define RAND_MAX 0x7fff +static inline void Abc_InfoClear( unsigned * p, int nWords ) { memset( p, 0, sizeof(unsigned) * nWords ); } +static inline void Abc_InfoFill( unsigned * p, int nWords ) { memset( p, 0xff, sizeof(unsigned) * nWords );} +static inline void Abc_InfoNot( unsigned * p, int nWords ) { int i; for ( i = nWords - 1; i >= 0; i-- ) p[i] = ~p[i]; } +static inline int Abc_InfoIsZero( unsigned * p, int nWords ) { int i; for ( i = nWords - 1; i >= 0; i-- ) if ( p[i] ) return 0; return 1; } +static inline int Abc_InfoIsOne( unsigned * p, int nWords ) { int i; for ( i = nWords - 1; i >= 0; i-- ) if ( !p[i] ) return 0; return 1; } +static inline void Abc_InfoCopy( unsigned * p, unsigned * q, int nWords ) { int i; for ( i = nWords - 1; i >= 0; i-- ) p[i] = q[i]; } +static inline void Abc_InfoAnd( unsigned * p, unsigned * q, int nWords ) { int i; for ( i = nWords - 1; i >= 0; i-- ) p[i] &= q[i]; } +static inline void Abc_InfoOr( unsigned * p, unsigned * q, int nWords ) { int i; for ( i = nWords - 1; i >= 0; i-- ) p[i] |= q[i]; } +static inline void Abc_InfoXor( unsigned * p, unsigned * q, int nWords ) { int i; for ( i = nWords - 1; i >= 0; i-- ) p[i] ^= q[i]; } // checking the network type static inline bool Abc_NtkIsNetlist( Abc_Ntk_t * pNtk ) { return pNtk->ntkType == ABC_NTK_NETLIST; } diff --git a/src/base/abc/abcAig.c b/src/base/abc/abcAig.c index 99c62504..1761e10e 100644 --- a/src/base/abc/abcAig.c +++ b/src/base/abc/abcAig.c @@ -139,6 +139,7 @@ Abc_Aig_t * Abc_AigAlloc( Abc_Ntk_t * pNtkAig ) assert( pNtkAig->vObjs->nSize == 0 ); pMan->pConst1 = Abc_NtkCreateObj( pNtkAig, ABC_OBJ_NODE ); pMan->pConst1->Type = ABC_OBJ_CONST1; + pMan->pConst1->fPhase = 1; pNtkAig->nObjCounts[ABC_OBJ_NODE]--; // save the current network pMan->pNtkAig = pNtkAig; diff --git a/src/base/abc/abcFanio.c b/src/base/abc/abcFanio.c index fea98c53..154fe149 100644 --- a/src/base/abc/abcFanio.c +++ b/src/base/abc/abcFanio.c @@ -263,7 +263,7 @@ void Abc_ObjReplace( Abc_Obj_t * pNodeOld, Abc_Obj_t * pNodeNew ) // transfer the fanouts to the old node Abc_ObjTransferFanout( pNodeOld, pNodeNew ); // remove the old node - Abc_NtkDeleteObj( pNodeOld ); + Abc_NtkDeleteObj_rec( pNodeOld, 1 ); } /**Function************************************************************* diff --git a/src/base/abc/abcFunc.c b/src/base/abc/abcFunc.c index fe218fb7..59f736e5 100644 --- a/src/base/abc/abcFunc.c +++ b/src/base/abc/abcFunc.c @@ -221,7 +221,8 @@ int Abc_NtkBddToSop( Abc_Ntk_t * pNtk, int fDirect ) else fMode = -1; - assert( Abc_NtkIsBddLogic(pNtk) ); + assert( Abc_NtkIsBddLogic(pNtk) ); + if ( dd->size > 0 ) Cudd_zddVarsFromBddVars( dd, 2 ); // create the new manager pManNew = Extra_MmFlexStart(); |