62static inline int Ssw_RarGetBinPat(
Ssw_RarMan_t *
p,
int iBin,
int iPat )
64 assert( iBin >= 0 && iBin < Aig_ManRegNum(
p->pAig) /
p->pPars->nBinSize );
65 assert( iPat >= 0 && iPat < (1 <<
p->pPars->nBinSize) );
66 return p->pRarity[iBin * (1 <<
p->pPars->nBinSize) + iPat];
68static inline void Ssw_RarSetBinPat(
Ssw_RarMan_t *
p,
int iBin,
int iPat,
int Value )
70 assert( iBin >= 0 && iBin < Aig_ManRegNum(
p->pAig) /
p->pPars->nBinSize );
71 assert( iPat >= 0 && iPat < (1 <<
p->pPars->nBinSize) );
72 p->pRarity[iBin * (1 <<
p->pPars->nBinSize) + iPat] = Value;
74static inline void Ssw_RarAddToBinPat(
Ssw_RarMan_t *
p,
int iBin,
int iPat )
76 assert( iBin >= 0 && iBin < Aig_ManRegNum(
p->pAig) /
p->pPars->nBinSize );
77 assert( iPat >= 0 && iPat < (1 <<
p->pPars->nBinSize) );
78 p->pRarity[iBin * (1 <<
p->pPars->nBinSize) + iPat]++;
81static inline int Ssw_RarBitWordNum(
int nBits ) {
return (nBits>>6) + ((nBits&63) > 0); }
83static inline word * Ssw_RarObjSim(
Ssw_RarMan_t *
p,
int Id ) {
assert( Id < Aig_ManObjNumMax(
p->pAig) );
return p->pObjData +
p->pPars->nWords * Id; }
84static inline word * Ssw_RarPatSim(
Ssw_RarMan_t *
p,
int Id ) {
assert( Id < 64 * p->pPars->nWords );
return p->pPatData +
p->nWordsReg * Id; }
115 p->fSetLastState = 0;
135 for ( i = 0; i < nRandSeed; i++ )
157 pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
158 for ( w = 0; w <
p->pPars->nWords; w++ )
162 pSim[0] = (pSim[0] << 4) | ((i & 1) ? 0xA : 0xC);
183 int i, r, f, iBit, iPatThis;
185 iPatThis = iPatFinal;
186 vTrace = Vec_IntStartFull( iFrame /
p->pPars->nFrames + 1 );
187 Vec_IntWriteEntry( vTrace, iFrame /
p->pPars->nFrames, iPatThis );
188 for ( r = iFrame /
p->pPars->nFrames - 1; r >= 0; r-- )
190 iPatThis = Vec_IntEntry(
p->vPatBests, r *
p->pPars->nWords + iPatThis / 64 );
191 Vec_IntWriteEntry( vTrace, r, iPatThis );
194 pCex =
Abc_CexAlloc( Aig_ManRegNum(
p->pAig), Saig_ManPiNum(
p->pAig), iFrame+1 );
195 pCex->iFrame = iFrame;
198 iBit = Aig_ManRegNum(
p->pAig);
199 for ( f = 0; f <= iFrame; f++ )
202 iPatThis = Vec_IntEntry( vTrace, f /
p->pPars->nFrames );
205 pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
206 if ( Abc_InfoHasBit( (
unsigned *)pSim, iPatThis ) )
207 Abc_InfoSetBit( pCex->pData, iBit );
211 Vec_IntFree( vTrace );
212 assert( iBit == pCex->nBits );
216 Abc_Print( 1,
"Ssw_RarDeriveCex(): Counter-example is invalid.\n" );
242 unsigned t, m = 0x0000FFFF;
243 for ( j = 16; j != 0; j = j >> 1, m = m ^ (m << j) )
245 for ( k = 0; k < 32; k = (k + j + 1) & ~j )
247 t = (A[k] ^ (A[k+j] >> j)) & m;
249 A[k+j] = A[k+j] ^ (t << j);
268 word t, m = 0x00000000FFFFFFFF;
269 for ( j = 32; j != 0; j = j >> 1, m = m ^ (m << j) )
271 for ( k = 0; k < 64; k = (k + j + 1) & ~j )
273 t = (A[k] ^ (A[k+j] >> j)) & m;
275 A[k+j] = A[k+j] ^ (t << j);
294 for ( i = 0; i < 64; i++ )
296 for ( i = 0; i < 64; i++ )
297 for ( k = 0; k < 64; k++ )
298 if ( (A[i] >> k) & 1 )
299 B[k] |= ((
word)1 << (63-i));
321 for ( i = 0; i < 64; i++ )
327 for ( i = 0; i < 100001; i++ )
329 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
332 for ( i = 0; i < 100001; i++ )
334 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
336 for ( i = 0; i < 64; i++ )
338 Abc_Print( 1,
"Mismatch\n" );
365 for ( w = 0; w <
p->pPars->nWords; w++ )
366 for ( r = 0; r <
p->nWordsReg; r++ )
369 for ( i = 0; i < 64; i++ )
371 if ( r*64 + 63-i < Aig_ManRegNum(
p->pAig) )
373 pObj = Saig_ManLi(
p->pAig, r*64 + 63-i );
374 M[i] = Ssw_RarObjSim(
p, Aig_ObjId(pObj) )[w];
382 for ( i = 0; i < 64; i++ )
383 Ssw_RarPatSim(
p, w*64 + 63-i )[r] =
M[i];
418 word * pSim, * pSimLi;
421 pObj = Aig_ManConst1(
p->pAig );
422 pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
423 for ( w = 0; w <
p->pPars->nWords; w++ )
430 assert( Vec_IntSize(vInit) == Saig_ManRegNum(
p->pAig) *
p->pPars->nWords );
433 pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
434 for ( w = 0; w <
p->pPars->nWords; w++ )
435 pSim[w] = Vec_IntEntry(vInit, w * Saig_ManRegNum(
p->pAig) + i) ? ~(
word)0 : (
word)0;
442 pSimLi = Ssw_RarObjSim(
p, Aig_ObjId(pObjLi) );
443 pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
444 for ( w = 0; w <
p->pPars->nWords; w++ )
464 word * pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
466 for ( w = 0; w <
p->pPars->nWords; w++ )
486 word * pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
489 for ( w = 0; w <
p->pPars->nWords; w++ )
490 if ( pSim[w] ^ Flip )
509 word * pSim0 = Ssw_RarObjSim(
p, pObj0->
Id );
510 word * pSim1 = Ssw_RarObjSim(
p, pObj1->
Id );
513 for ( w = 0; w <
p->pPars->nWords; w++ )
514 if ( pSim0[w] ^ pSim1[w] ^ Flip )
533 static int s_SPrimes[128] = {
534 1009, 1049, 1093, 1151, 1201, 1249, 1297, 1361, 1427, 1459,
535 1499, 1559, 1607, 1657, 1709, 1759, 1823, 1877, 1933, 1997,
536 2039, 2089, 2141, 2213, 2269, 2311, 2371, 2411, 2467, 2543,
537 2609, 2663, 2699, 2741, 2797, 2851, 2909, 2969, 3037, 3089,
538 3169, 3221, 3299, 3331, 3389, 3461, 3517, 3557, 3613, 3671,
539 3719, 3779, 3847, 3907, 3943, 4013, 4073, 4129, 4201, 4243,
540 4289, 4363, 4441, 4493, 4549, 4621, 4663, 4729, 4793, 4871,
541 4933, 4973, 5021, 5087, 5153, 5227, 5281, 5351, 5417, 5471,
542 5519, 5573, 5651, 5693, 5749, 5821, 5861, 5923, 6011, 6073,
543 6131, 6199, 6257, 6301, 6353, 6397, 6481, 6563, 6619, 6689,
544 6737, 6803, 6863, 6917, 6977, 7027, 7109, 7187, 7237, 7309,
545 7393, 7477, 7523, 7561, 7607, 7681, 7727, 7817, 7877, 7933,
546 8011, 8039, 8059, 8081, 8093, 8111, 8123, 8147
552 pSims = (
unsigned *)Ssw_RarObjSim(
p, pObj->
Id );
553 for ( i = 0; i < 2 *
p->pPars->nWords; i++ )
554 uHash ^= pSims[i] * s_SPrimes[i & 0x7F];
571 word * pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
574 for ( w = 0; w <
p->pPars->nWords; w++ )
575 if ( pSim[w] ^ Flip )
577 for ( i = 0; i < 64; i++ )
578 if ( ((pSim[w] ^ Flip) >> i) & 1 )
605 if (
p->pAig->nConstrs && i >= Saig_ManPoNum(
p->pAig) -
p->pAig->nConstrs )
607 if (
p->vCexes && Vec_PtrEntry(
p->vCexes, i) )
613 if ( !
p->pPars->fSolveAll )
617 if (
p->vCexes == NULL )
618 p->vCexes = Vec_PtrStart( Saig_ManPoNum(
p->pAig) );
619 assert( Vec_PtrEntry(
p->vCexes, i) == NULL );
620 Vec_PtrWriteEntry(
p->vCexes, i, (
void *)(ABC_PTRINT_T)1 );
621 if (
p->pPars->pFuncOnFail &&
p->pPars->pFuncOnFail(i, NULL) )
624 if ( !
p->pPars->fNotVerbose )
626 int nOutDigits = Abc_Base10Log( Saig_ManPoNum(
p->pAig) );
627 Abc_Print( 1,
"Output %*d was asserted in frame %4d (solved %*d out of %*d outputs). ",
628 nOutDigits,
p->iFailPo, iFrame,
629 nOutDigits,
p->pPars->nSolved,
630 nOutDigits, Saig_ManPoNum(
p->pAig) );
631 Abc_PrintTime( 1,
"Time", Time );
634 if (
p->iFailPo >= 0 )
654 word * pSim, * pSim0, * pSim1;
655 word Flip, Flip0, Flip1;
659 Vec_PtrClear(
p->vUpdConst );
660 Vec_PtrClear(
p->vUpdClass );
666 pRepr = Aig_ObjRepr(
p->pAig, pObj);
667 if ( pRepr == NULL || Aig_ObjIsTravIdCurrent(
p->pAig, pRepr ) )
672 if ( pRepr == Aig_ManConst1(
p->pAig) )
673 Vec_PtrPush(
p->vUpdConst, pObj );
676 Vec_PtrPush(
p->vUpdClass, pRepr );
677 Aig_ObjSetTravIdCurrent(
p->pAig, pRepr );
683 pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
684 pSim0 = Ssw_RarObjSim(
p, Aig_ObjFaninId0(pObj) );
685 pSim1 = Ssw_RarObjSim(
p, Aig_ObjFaninId1(pObj) );
686 Flip0 = Aig_ObjFaninC0(pObj) ? ~(
word)0 : 0;
687 Flip1 = Aig_ObjFaninC1(pObj) ? ~(
word)0 : 0;
688 for ( w = 0; w <
p->pPars->nWords; w++ )
689 pSim[w] = (Flip0 ^ pSim0[w]) & (Flip1 ^ pSim1[w]);
695 pRepr = Aig_ObjRepr(
p->pAig, pObj);
696 if ( pRepr == NULL || Aig_ObjIsTravIdCurrent(
p->pAig, pRepr ) )
701 if ( pRepr == Aig_ManConst1(
p->pAig) )
702 Vec_PtrPush(
p->vUpdConst, pObj );
705 Vec_PtrPush(
p->vUpdClass, pRepr );
706 Aig_ObjSetTravIdCurrent(
p->pAig, pRepr );
712 pSim = Ssw_RarObjSim(
p, Aig_ObjId(pObj) );
713 pSim0 = Ssw_RarObjSim(
p, Aig_ObjFaninId0(pObj) );
714 Flip = Aig_ObjFaninC0(pObj) ? ~(
word)0 : 0;
715 for ( w = 0; w <
p->pPars->nWords; w++ )
716 pSim[w] = Flip ^ pSim0[w];
723 Vec_Ptr_t * vCands = Vec_PtrAlloc( 1000 );
725 if ( Ssw_ObjIsConst1Cand(
p->pAig, pObj ) )
726 Vec_PtrPush( vCands, pObj );
729 Vec_PtrFree( vCands );
759 p->nGroups = Aig_ManRegNum(pAig) / pPars->
nBinSize;
761 p->pPatCosts =
ABC_CALLOC(
double,
p->pPars->nWords * 64 );
762 p->nWordsReg = Ssw_RarBitWordNum( Aig_ManRegNum(pAig) );
763 p->pObjData =
ABC_ALLOC(
word, Aig_ManObjNumMax(pAig) *
p->pPars->nWords );
765 p->vUpdConst = Vec_PtrAlloc( 100 );
766 p->vUpdClass = Vec_PtrAlloc( 100 );
767 p->vPatBests = Vec_IntAlloc( 100 );
787 assert(
p->pAig->vSeqModelVec == NULL );
788 p->pAig->vSeqModelVec =
p->vCexes;
792 Vec_IntFreeP( &
p->vInits );
793 Vec_IntFreeP( &
p->vPatBests );
794 Vec_PtrFreeP( &
p->vUpdConst );
795 Vec_PtrFreeP( &
p->vUpdClass );
817 unsigned char * pData;
825 for ( k = 0; k <
p->pPars->nWords * 64; k++ )
827 pData = (
unsigned char *)Ssw_RarPatSim(
p, k );
828 for ( i = 0; i <
p->nGroups; i++ )
829 Ssw_RarAddToBinPat(
p, i, pData[i] );
833 for ( k = 0; k <
p->pPars->nWords * 64; k++ )
835 pData = (
unsigned char *)Ssw_RarPatSim(
p, k );
837 p->pPatCosts[k] = 0.0;
838 for ( i = 0; i <
p->nGroups; i++ )
840 Value = Ssw_RarGetBinPat(
p, i, pData[i] );
842 p->pPatCosts[k] += 1.0/(Value*Value);
849 Vec_IntClear( vInits );
850 for ( i = 0; i <
p->pPars->nWords; i++ )
855 for ( k = 0; k <
p->pPars->nWords * 64; k++ )
856 if ( iCostBest < p->pPatCosts[k] )
858 iCostBest =
p->pPatCosts[k];
865 pPattern = (
unsigned *)Ssw_RarPatSim(
p, iPatBest );
866 for ( k = 0; k < Aig_ManRegNum(
p->pAig); k++ )
867 Vec_IntPush( vInits, Abc_InfoHasBit(pPattern, k) );
869 Vec_IntPush(
p->vPatBests, iPatBest );
871 assert( Vec_IntSize(vInits) == Aig_ManRegNum(
p->pAig) *
p->pPars->nWords );
893 pObj->
fMarkB = Abc_InfoHasBit( pCex->pData, i );
896 for ( f = 0; f <= pCex->iFrame; f++ )
899 Aig_ManConst1(pAig)->fMarkB = 1;
901 pObj->
fMarkB = Abc_InfoHasBit( pCex->pData, iBit++ );
906 pObj->
fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) )
907 & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) );
910 pObj->
fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) );
912 assert( iBit == pCex->nBits );
918 vInit = Vec_IntAlloc( Saig_ManRegNum(pAig) );
922 Vec_IntPush( vInit, pObj->
fMarkB );
947 if ( pAig->nConstrs && i >= Saig_ManPoNum(pAig) - pAig->nConstrs )
952 pAig->pSeqModel =
Abc_CexAlloc( Aig_ManRegNum(pAig), Saig_ManPiNum(pAig), 1 );
953 pAig->pSeqModel->iPo = i;
955 Abc_Print( 1,
"Output %d is trivally SAT in frame 0. \n", i );
979 abctime clk, clkTotal = Abc_Clock();
986 assert( Aig_ManRegNum(pAig) > 0 );
987 assert( Aig_ManConstrNum(pAig) == 0 );
996 Abc_Print( 1,
"Rarity simulation with %d words, %d frames, %d rounds, %d restart, %d seed, and %d sec timeout.\n",
1002 p = Ssw_RarManStart( pAig, pPars );
1003 p->vInits = Vec_IntStart( Aig_ManRegNum(pAig) * pPars->
nWords );
1007 timeLastSolved = Abc_Clock();
1014 Saig_BmcPerform( pNewAig, 0, 100, 2000, 3, 0, 0, 1 , 0, &iFrameFail, 0, 0 );
1020 for ( f = 0; f < pPars->
nFrames; f++ )
1028 Abc_Print( 1,
"Quitting due to callback on fail.\n" );
1036 if ( pPars->
fVerbose ) Abc_Print( 1,
"\n" );
1040 Abc_Print( 1,
"Simulated %d frames for %d rounds with %d restarts.\n", pPars->
nFrames, nNumRestart * pPars->
nRestart + r, nNumRestart );
1044 Abc_Print( 1,
"Output %d of miter \"%s\" was asserted in frame %d. ", pAig->pSeqModel->iPo, pAig->pName, pAig->pSeqModel->iFrame );
1045 Abc_PrintTime( 1,
"Time", Abc_Clock() - clkTotal );
1049 timeLastSolved = Abc_Clock();
1054 if ( pPars->
TimeOut && Abc_Clock() > nTimeToStop )
1059 Abc_Print( 1,
"Simulated %d frames for %d rounds with %d restarts and solved %d outputs. ", pPars->
nFrames, nNumRestart * pPars->
nRestart + r, nNumRestart, pPars->
nSolved );
1060 Abc_Print( 1,
"Reached timeout (%d sec).\n", pPars->
TimeOut );
1064 if ( pPars->
TimeOutGap && timeLastSolved && Abc_Clock() > timeLastSolved + pPars->
TimeOutGap * CLOCKS_PER_SEC )
1069 Abc_Print( 1,
"Simulated %d frames for %d rounds with %d restarts and solved %d outputs. ", pPars->
nFrames, nNumRestart * pPars->
nRestart + r, nNumRestart, pPars->
nSolved );
1070 Abc_Print( 1,
"Reached gap timeout (%d sec).\n", pPars->
TimeOutGap );
1075 if ( pPars->
fSolveAll &&
p->vCexes && Vec_PtrCountZero(
p->vCexes) == 0 )
1082 nSavedSeed = (nSavedSeed + 1) % 1000;
1084 Vec_IntFill(
p->vInits, Aig_ManRegNum(pAig) * pPars->
nWords, 0 );
1086 Vec_IntClear(
p->vPatBests );
1091 Ssw_RarTransferPatterns(
p,
p->vInits );
1097 Abc_Print( 1,
"Starts =%6d ", nNumRestart );
1098 Abc_Print( 1,
"Rounds =%6d ", nNumRestart * pPars->
nRestart + ((r==-1)?0:r) );
1099 Abc_Print( 1,
"Frames =%6d ", (nNumRestart * pPars->
nRestart + r) * pPars->
nFrames );
1100 Abc_Print( 1,
"CEX =%6d (%6.2f %%) ", pPars->
nSolved, 100.0*pPars->
nSolved/Saig_ManPoNum(
p->pAig) );
1101 Abc_PrintTime( 1,
"Time", Abc_Clock() - clkTotal );
1104 Abc_Print( 1,
"." );
1111 assert( Vec_IntSize(
p->vInits) % Aig_ManRegNum(pAig) == 0 );
1112 Vec_IntShrink(
p->vInits, Aig_ManRegNum(pAig) );
1113 pAig->pData =
p->vInits;
p->vInits = NULL;
1130 if ( pPars->
fVerbose ) Abc_Print( 1,
"\n" );
1131 Abc_Print( 1,
"Simulation of %d frames for %d rounds with %d restarts did not assert POs. ", pPars->
nFrames, nNumRestart * pPars->
nRestart + r, nNumRestart );
1132 Abc_PrintTime( 1,
"Time", Abc_Clock() - clkTotal );
1136 Ssw_RarManStop(
p );
1157 printf(
"Generating random permutation of %d flops.\n", nFlops );
1158 vPerm = Vec_IntStartNatural( nFlops );
1159 pArray = Vec_IntArray( vPerm );
1160 for ( i = 0; i < nFlops; i++ )
1162 k = rand() % nFlops;
1163 ABC_SWAP(
int, pArray[i], pArray[k] );
1165 printf(
"Randomly adding %d unused flops.\n", nUnused );
1166 for ( i = 0; i < nUnused; i++ )
1168 k = rand() % Vec_IntSize(vPerm);
1169 Vec_IntPush( vPerm, -1 );
1170 pArray = Vec_IntArray( vPerm );
1171 ABC_SWAP(
int, pArray[Vec_IntSize(vPerm)-1], pArray[k] );
1196 Vec_IntFree( vPerm );
1205 p->pCexSeq = pAig->pSeqModel; pAig->pSeqModel = NULL;
1224 int r, f = -1, i, k;
1225 abctime clkTotal = Abc_Clock();
1227 int nNumRestart = 0;
1230 assert( Aig_ManRegNum(pAig) > 0 );
1231 assert( Aig_ManConstrNum(pAig) == 0 );
1233 if ( Aig_ManNodeNum(pAig) == 0 )
1239 Abc_Print( 1,
"Rarity equiv filtering with %d words, %d frames, %d rounds, %d seed, and %d sec timeout.\n",
1245 p = Ssw_RarManStart( pAig, pPars );
1250 p->vInits = Ssw_RarFindStartingState( pAig, pPars->
pCex );
1251 Abc_Print( 1,
"Beginning simulation from the state derived using the counter-example.\n" );
1254 p->vInits = Vec_IntStart( Aig_ManRegNum(pAig) );
1256 for ( i = 1; i < pPars->
nWords; i++ )
1257 for ( k = 0; k < Aig_ManRegNum(pAig); k++ )
1258 Vec_IntPush(
p->vInits, Vec_IntEntry(
p->vInits, k) );
1259 assert( Vec_IntSize(
p->vInits) == Aig_ManRegNum(pAig) * pPars->
nWords );
1262 if ( pAig->pReprs == NULL )
1270 Abc_Print( 1,
"Initial : " );
1279 Abc_Print( 1,
"All equivalences are refined away.\n" );
1283 for ( f = 0; f < pPars->
nFrames; f++ )
1292 Abc_Print( 1,
"Simulated %d frames for %d rounds with %d restarts.\n", pPars->
nFrames, nNumRestart * pPars->
nRestart + r, nNumRestart );
1295 pAig->pSeqModel =
Ssw_RarDeriveCex(
p, r *
p->pPars->nFrames + f,
p->iFailPo,
p->iFailPat, 1 );
1297 Abc_Print( 1,
"Output %d of miter \"%s\" was asserted in frame %d. ", pAig->pSeqModel->iPo, pAig->pName, pAig->pSeqModel->iFrame );
1298 Abc_PrintTime( 1,
"Time", Abc_Clock() - clkTotal );
1303 if ( pPars->
TimeOut && Abc_Clock() > nTimeToStop )
1305 if ( pPars->
fVerbose ) Abc_Print( 1,
"\n" );
1306 Abc_Print( 1,
"Simulated %d frames for %d rounds with %d restarts. ", pPars->
nFrames, nNumRestart * pPars->
nRestart + r, nNumRestart );
1307 Abc_Print( 1,
"Reached timeout (%d sec).\n", pPars->
TimeOut );
1315 nSavedSeed = (nSavedSeed + 1) % 1000;
1317 Vec_IntFill(
p->vInits, Aig_ManRegNum(pAig) * pPars->
nWords, 0 );
1319 Vec_IntClear(
p->vPatBests );
1324 Ssw_RarTransferPatterns(
p,
p->vInits );
1328 Abc_Print( 1,
"Round %3d: ", r );
1333 Abc_Print( 1,
"." );
1342 Abc_Print( 1,
"Simulation of %d frames for %d rounds with %d restarts did not assert POs. ", pPars->
nFrames, nNumRestart * pPars->
nRestart + r, nNumRestart );
1343 Abc_PrintTime( 1,
"Time", Abc_Clock() - clkTotal );
1346 Ssw_RarManStop(
p );
1366 if (
p->pReprs != NULL )
1376 p->pCexSeq = pAig->pSeqModel; pAig->pSeqModel = NULL;
#define ABC_SWAP(Type, a, b)
#define ABC_ALLOC(type, num)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Aig_ManCleanMarkB(Aig_Man_t *p)
#define Aig_ManForEachObj(p, pObj, i)
void Aig_ManStop(Aig_Man_t *p)
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
struct Aig_Obj_t_ Aig_Obj_t
#define Aig_ManForEachNode(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
#define Aig_ManForEachCo(p, pObj, i)
word Aig_ManRandom64(int fReset)
unsigned Aig_ManRandom(int fReset)
ABC_DLL int Abc_FrameIsBatchMode()
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Saig_BmcPerform(Aig_Man_t *pAig, int nStart, int nFramesMax, int nNodesMax, int nTimeOut, int nConfMaxOne, int nConfMaxAll, int fVerbose, int fVerbOverwrite, int *piFrames, int fSilent, int fUseSatoko)
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
void Gia_ManReprFromAigRepr(Aig_Man_t *pAig, Gia_Man_t *pGia)
void Gia_ManReprToAigRepr2(Aig_Man_t *pAig, Gia_Man_t *pGia)
void Gia_ManStop(Gia_Man_t *p)
Gia_Man_t * Gia_ManDupPermFlopGap(Gia_Man_t *p, Vec_Int_t *vFfPerm)
struct Gia_Man_t_ Gia_Man_t
unsigned __int64 word
DECLARATIONS ///.
word M(word f1, word f2, int n)
Aig_Man_t * Saig_ManDupWithPhase(Aig_Man_t *pAig, Vec_Int_t *vInit)
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
#define Saig_ManForEachLi(p, pObj, i)
#define Saig_ManForEachPo(p, pObj, i)
#define Saig_ManForEachLo(p, pObj, i)
#define Saig_ManForEachPi(p, pObj, i)
int Saig_ManVerifyCex(Aig_Man_t *pAig, Abc_Cex_t *p)
Ssw_Cla_t * Ssw_ClassesPrepareFromReprs(Aig_Man_t *pAig)
int Ssw_ClassesPrepareRehash(Ssw_Cla_t *p, Vec_Ptr_t *vCands, int fConstCorr)
int Ssw_ClassesRefineConst1Group(Ssw_Cla_t *p, Vec_Ptr_t *vRoots, int fRecursive)
int Ssw_ClassesCand1Num(Ssw_Cla_t *p)
Ssw_Cla_t * Ssw_ClassesPrepareSimple(Aig_Man_t *pAig, int fLatchCorr, int nMaxLevs)
int Ssw_ClassesRefineGroup(Ssw_Cla_t *p, Vec_Ptr_t *vReprs, int fRecursive)
int Ssw_ClassesClassNum(Ssw_Cla_t *p)
void Ssw_ClassesPrint(Ssw_Cla_t *p, int fVeryVerbose)
void Ssw_ClassesSetData(Ssw_Cla_t *p, void *pManData, unsigned(*pFuncNodeHash)(void *, Aig_Obj_t *), int(*pFuncNodeIsConst)(void *, Aig_Obj_t *), int(*pFuncNodesAreEqual)(void *, Aig_Obj_t *, Aig_Obj_t *))
void Ssw_ClassesStop(Ssw_Cla_t *p)
struct Ssw_Cla_t_ Ssw_Cla_t
void transpose32(unsigned A[32])
unsigned Ssw_RarManObjHashWord(void *pMan, Aig_Obj_t *pObj)
void Ssw_RarManAssingRandomPis(Ssw_RarMan_t *p)
int Ssw_RarSignalFilter(Aig_Man_t *pAig, Ssw_RarPars_t *pPars)
void Ssw_RarSetDefaultParams(Ssw_RarPars_t *p)
FUNCTION DEFINITIONS ///.
void Ssw_RarManInitialize(Ssw_RarMan_t *p, Vec_Int_t *vInit)
int Ssw_RarSimulateGia(Gia_Man_t *p, Ssw_RarPars_t *pPars)
DECLARATIONS ///.
void transpose64Simple(word A[64], word B[64])
int Ssw_RarCheckTrivial(Aig_Man_t *pAig, int fVerbose)
void transpose64(word A[64])
void Ssw_RarManSimulate(Ssw_RarMan_t *p, Vec_Int_t *vInit, int fUpdate, int fFirst)
Abc_Cex_t * Ssw_RarDeriveCex(Ssw_RarMan_t *p, int iFrame, int iPo, int iPatFinal, int fVerbose)
int Ssw_RarManPoIsConst0(void *pMan, Aig_Obj_t *pObj)
int Ssw_RarManObjWhichOne(Ssw_RarMan_t *p, Aig_Obj_t *pObj)
int Ssw_RarSignalFilterGia(Gia_Man_t *p, Ssw_RarPars_t *pPars)
int Ssw_RarManObjsAreEqual(void *pMan, Aig_Obj_t *pObj0, Aig_Obj_t *pObj1)
int Ssw_RarSimulate(Aig_Man_t *pAig, Ssw_RarPars_t *pPars)
Vec_Int_t * Ssw_RarRandomPermFlop(int nFlops, int nUnused)
void Ssw_RarTranspose(Ssw_RarMan_t *p)
typedefABC_NAMESPACE_IMPL_START struct Ssw_RarMan_t_ Ssw_RarMan_t
DECLARATIONS ///.
void Ssw_RarManPrepareRandom(int nRandSeed)
int Ssw_RarManObjIsConst(void *pMan, Aig_Obj_t *pObj)
int Ssw_RarManCheckNonConstOutputs(Ssw_RarMan_t *p, int iFrame, abctime Time)
struct Ssw_RarPars_t_ Ssw_RarPars_t
void Abc_CexFree(Abc_Cex_t *p)
ABC_NAMESPACE_IMPL_START Abc_Cex_t * Abc_CexAlloc(int nRegs, int nRealPis, int nFrames)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.