mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-04 00:31:14 +02:00
Version abc70115_2
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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*************************************************************
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user