29 #define Fraig_NodeIsSimComplement(p) (Fraig_IsComplement(p)? !(Fraig_Regular(p)->fInv) : (p)->fInv)
55 pNode->
Num = p->vNodes->nSize;
65 memset( pNode->
puSimR, 0,
sizeof(
unsigned) * p->nWordsRand );
66 memset( pNode->
puSimD, 0,
sizeof(
unsigned) * p->nWordsDyna );
69 pNode->
nOnes = p->nWordsRand *
sizeof(unsigned) * 8;
98 memset( pNode->
puSimD, 0,
sizeof(
unsigned) * p->nWordsDyna );
101 pNode->
Num = p->vNodes->nSize;
105 pNode->
NumPi = p->vInputs->nSize;
116 for ( i = 0; i < p->nWordsRand; i++ )
132 for ( i = 0; i < p->iWordStart; i++ )
143 assert( pNodeRes == NULL );
174 pNode->
Num = p->vNodes->nSize;
199 pNode->
nOnes = p->nWordsRand * 32 - pNode->
nOnes;
203 #ifdef FRAIG_ENABLE_FANOUTS
228 unsigned * pSims, * pSims1, * pSims2;
230 int fCompl, fCompl1, fCompl2, i;
240 fCompl = pNode->
fInv;
246 if ( fCompl1 && fCompl2 )
249 for ( i = iWordStart; i < iWordStop; i++ )
251 pSims[i] = (pSims1[i] | pSims2[i]);
255 for ( i = iWordStart; i < iWordStop; i++ )
257 pSims[i] = ~(pSims1[i] | pSims2[i]);
261 else if ( fCompl1 && !fCompl2 )
264 for ( i = iWordStart; i < iWordStop; i++ )
266 pSims[i] = (pSims1[i] | ~pSims2[i]);
270 for ( i = iWordStart; i < iWordStop; i++ )
272 pSims[i] = (~pSims1[i] & pSims2[i]);
276 else if ( !fCompl1 && fCompl2 )
279 for ( i = iWordStart; i < iWordStop; i++ )
281 pSims[i] = (~pSims1[i] | pSims2[i]);
285 for ( i = iWordStart; i < iWordStop; i++ )
287 pSims[i] = (pSims1[i] & ~pSims2[i]);
294 for ( i = iWordStart; i < iWordStop; i++ )
296 pSims[i] = ~(pSims1[i] & pSims2[i]);
300 for ( i = iWordStart; i < iWordStop; i++ )
302 pSims[i] = (pSims1[i] & pSims2[i]);
void Fraig_NodeVecPush(Fraig_NodeVec_t *p, Fraig_Node_t *Entry)
typedefABC_NAMESPACE_HEADER_START struct Fraig_ManStruct_t_ Fraig_Man_t
INCLUDES ///.
ABC_NAMESPACE_IMPL_START void Fraig_NodeAddFaninFanout(Fraig_Node_t *pFanin, Fraig_Node_t *pFanout)
DECLARATIONS ///.
void Fraig_NodeSimulate(Fraig_Node_t *pNode, int iWordStart, int iWordStop, int fUseRand)
Fraig_Node_t * Fraig_NodeCreate(Fraig_Man_t *p, Fraig_Node_t *p1, Fraig_Node_t *p2)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
#define FRAIG_RANDOM_UNSIGNED
Fraig_Node_t * Fraig_HashTableLookupF0(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
#define ABC_NAMESPACE_IMPL_END
#define Fraig_IsComplement(p)
GLOBAL VARIABLES ///.
#define ABC_NAMESPACE_IMPL_START
#define Fraig_NodeIsSimComplement(p)
DECLARATIONS ///.
int Fraig_BitStringCountOnes(unsigned *pString, int nWords)
Fraig_Node_t * Fraig_NodeCreatePi(Fraig_Man_t *p)
Fraig_Node_t * Fraig_HashTableLookupF(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
char * Fraig_MemFixedEntryFetch(Fraig_MemFixed_t *p)
Fraig_Node_t * Fraig_NodeCreateConst(Fraig_Man_t *p)
FUNCTION DEFINITIONS ///.
int s_FraigPrimes[FRAIG_MAX_PRIMES]
DECLARATIONS ///.