72 FILE * pFile = fopen( pFileName,
"wb" );
75 printf(
"Cannot open file \"%s\" for writing.\n", pFileName );
78 assert( Abc_NtkIsMappedLogic(pNtk) );
84 fprintf( pFile,
"%d %s %s\n", Count,
Abc_ObjName(pObj),
"SA0" ), Count++;
85 fprintf( pFile,
"%d %s %s\n", Count,
Abc_ObjName(pObj),
"SA1" ), Count++;
86 fprintf( pFile,
"%d %s %s\n", Count,
Abc_ObjName(pObj),
"NEG" ), Count++;
95 printf(
"Generated fault list \"%s\" for network \"%s\" with %d nodes and %d %sfaults.\n",
96 pFileName, Abc_NtkName(pNtk), Abc_NtkNodeNum(pNtk), Count-1, fStuckAt ?
"stuck-at ":
"" );
116 printf(
"Cannot find gate \"%s\" in the current library.\n", pThis );
172 int i, Type, iObj, fFound, nLines = 1;
173 FILE * pFile = fopen( pFileName,
"r" );
176 printf(
"Cannot open input file \"%s\" for reading.\n", pFileName );
181 vMap = Vec_IntAlloc( 1000 );
182 Vec_IntPush( vMap, -1 );
185 if ( !Abc_ObjIsCi(pObj) && !Abc_ObjIsNode(pObj) )
190 printf(
"The same name \"%s\" appears twice among CIs and internal nodes.\n",
Abc_ObjName(pObj) );
193 Vec_IntPush( vMap, Abc_ObjId(pObj) );
197 vPairs = Vec_IntAlloc( 1000 );
198 Vec_IntPushTwo( vPairs, -1, -1 );
199 while ( fgets(Buffer, 1000, pFile) != NULL )
202 char * pToken =
strtok( Buffer,
" \n\r\t" );
203 if ( pToken == NULL )
205 if ( nLines++ != atoi(pToken) )
207 printf(
"Line numbers are not consecutive. Quitting.\n" );
208 Vec_IntFreeP( &vPairs );
212 pToken =
strtok( NULL,
" \n\r\t" );
216 printf(
"Cannot find object with name \"%s\".\n", pToken );
220 pToken =
strtok( NULL,
" \n\r\t" );
221 if ( Abc_NtkIsMappedLogic(pNtk) )
232 printf(
"Cannot read type \"%s\" of object \"%s\".\n", pToken,
Abc_ObjName(Abc_NtkObj(pNtk, iObj)) );
235 Vec_IntPushTwo( vPairs, Vec_IntEntry(vMap, iObj), Type );
237 assert( Vec_IntSize(vPairs) == 2 * nLines );
238 printf(
"Finished reading %d lines from the fault list file \"%s\".\n", nLines - 1, pFileName );
267 Abc_Obj_t * pObj, * pFanin, * pReset, * pEnable, * pSignal;
268 Abc_Obj_t * pResetN, * pEnableN, * pAnd0, * pAnd1, * pMux;
269 int i, k, iStartPo, nPisOld = Abc_NtkPiNum(pNtk), nPosOld = Abc_NtkPoNum(pNtk);
276 vNodes = Vec_PtrAlloc( Abc_NtkNodeNum(pNtk) );
278 Vec_PtrPush( vNodes, pObj );
280 vFanins = Vec_PtrAlloc( 2 );
285 if ( i < nPisOld - pNtk->nConstrs )
292 iStartPo = nPosOld + 4 * (i - nPisOld);
293 pReset = Abc_ObjFanin0( Abc_NtkPo( pNtk, iStartPo + 1 ) );
294 pEnable = Abc_ObjFanin0( Abc_NtkPo( pNtk, iStartPo + 2 ) );
295 pSignal = Abc_ObjFanin0( Abc_NtkPo( pNtk, iStartPo + 3 ) );
298 Vec_PtrFillTwo( vFanins, 2, pEnableN, pObj );
300 Vec_PtrFillTwo( vFanins, 2, pEnable, pSignal );
302 Vec_PtrFillTwo( vFanins, 2, pAnd0, pAnd1 );
304 Vec_PtrFillTwo( vFanins, 2, pResetN, pMux );
319 if ( i < nPosOld - 4 * pNtk->nConstrs )
328 Vec_PtrFree( vFanins );
329 Vec_PtrFree( vNodes );
352 int Entry = Vec_IntEntry(vMap, Abc_ObjId(pObj));
356 assert( Abc_ObjIsCi(pObj) || Abc_ObjIsNode(pObj) );
358 if ( Abc_ObjFanoutNum(pObj) == 0 )
360 Vec_IntWriteEntry( vMap, Abc_ObjId(pObj), 0 );
365 if ( Abc_ObjFanoutNum(pObj) == 1 )
367 Vec_IntWriteEntry( vMap, Abc_ObjId(pObj), Entry );
370 vSet = Vec_IntAlloc( 16 );
372 vArray = Hsh_VecReadEntry( pHash, Entry );
373 Vec_IntClear( vSet );
374 Vec_IntAppend( vSet, vArray );
381 vArray = Hsh_VecReadEntry( pHash, Entry );
382 Vec_IntTwoMerge2( vSet, vArray, vTemp );
386 Entry = Hsh_VecManAdd( pHash, vSet );
387 Vec_IntWriteEntry( vMap, Abc_ObjId(pObj), Entry );
397 int i, iObj, SetId, ClassId;
401 Vec_Int_t * vMap = Vec_IntStartFull( Abc_NtkObjNumMax(pNtk) );
403 assert( Abc_NtkIsLogic(pNtk) );
405 SetId = Hsh_VecManAdd( pHash, vSet );
409 Vec_IntFill( vSet, 1, Abc_ObjId(pObj) );
410 SetId = Hsh_VecManAdd( pHash, vSet );
411 Vec_IntWriteEntry( vMap, Abc_ObjId(pObj), SetId );
414 Vec_IntSort( vObjs, 0 );
420 vClassMap = Vec_IntStartFull( Hsh_VecSize(pHash) + 1 );
422 vClasses = Vec_WecAlloc( 1000 );
427 SetId = Vec_IntEntry( vMap, iObj );
430 ClassId = Vec_IntEntry( vClassMap, SetId );
434 Vec_IntWriteEntry( vClassMap, SetId, Vec_WecSize(vClasses) );
435 vClass = Vec_WecPushLevel( vClasses );
438 vClass = Vec_WecEntry( vClasses, ClassId );
440 Vec_IntPush( vClass, iObj );
446 *pvCos = Vec_WecStart( Vec_WecSize(vClasses) );
449 iObj = Vec_IntEntry( vClass, 0 );
451 SetId = Vec_IntEntry( vMap, iObj );
454 vSet = Hsh_VecReadEntry( pHash, SetId );
455 Vec_IntAppend( Vec_WecEntry(*pvCos, i), vSet );
457 Hsh_VecManStop( pHash );
458 Vec_IntFree( vClassMap );
468 vObjs = Vec_IntAlloc( Abc_NtkCiNum(pNtk) );
470 Vec_IntPush( vObjs, Abc_ObjId(pObj) );
473 Vec_WecPrint( vRes, 0 );
474 Vec_WecPrint( vCos, 0 );
476 Vec_IntFree( vObjs );
495 if ( Abc_NodeIsTravIdCurrent(pObj) )
497 Abc_NodeSetTravIdCurrent(pObj);
498 if ( Abc_ObjIsCi(pObj) )
499 Vec_IntPush( vCis, Abc_ObjId(pObj) );
503 assert( Abc_ObjIsNode( pObj ) );
506 Vec_IntPush( vNodes, Abc_ObjId(pObj) );
512 Vec_IntClear( vCis );
513 Vec_IntClear( vNodes );
514 Abc_NtkIncrementTravId( pNtk );
535 for ( w = 0; w <
nWords; w++ )
538 for ( i = 0; i < nVars; i++ )
539 uFanins[i] = ppFaninSims[i][w];
540 pObjSim[w] = Exp_Truth6( nVars, vExpr, uFanins );
559 for ( i = 0; i < nVars; i++ )
580 if ( Exp_IsConst0(vExpr) )
582 if ( Exp_IsConst1(vExpr) )
584 if ( Exp_IsLit(vExpr) )
586 int Index0 = Vec_IntEntry(vExpr,0) >> 1;
587 int fCompl0 = Vec_IntEntry(vExpr,0) & 1;
589 return Abc_LitNotCond( iLits[Index0], fCompl0 );
591 Vec_IntClear( vLits );
592 for ( i = 0; i < nVars; i++ )
593 Vec_IntPush( vLits, iLits[i] );
594 for ( i = 0; i < Exp_NodeNum(vExpr); i++ )
596 int Index0 = Vec_IntEntry( vExpr, 2*i+0 ) >> 1;
597 int Index1 = Vec_IntEntry( vExpr, 2*i+1 ) >> 1;
598 int fCompl0 = Vec_IntEntry( vExpr, 2*i+0 ) & 1;
599 int fCompl1 = Vec_IntEntry( vExpr, 2*i+1 ) & 1;
600 Vec_IntPush( vLits,
Gia_ManHashAnd( pGia, Abc_LitNotCond(Vec_IntEntry(vLits, Index0), fCompl0), Abc_LitNotCond(Vec_IntEntry(vLits, Index1), fCompl1) ) );
602 return Abc_LitNotCond( Vec_IntEntryLast(vLits), Vec_IntEntryLast(vExpr) & 1 );
618 if ( Abc_NtkIsMappedLogic(pObj->
pNtk) && Type >= 0 )
623 for ( i = 0; i < Abc_ObjFaninNum(pObj); i++ )
624 Lits[i] = Vec_IntEntry( vMap, Abc_Var2Lit(Abc_ObjFaninId(pObj, i), n) );
629 int iLit0 = Abc_ObjFaninNum(pObj) > 0 ? Vec_IntEntry( vMap, Abc_Var2Lit(Abc_ObjFaninId0(pObj), n) ) : -1;
630 int iLit1 = Abc_ObjFaninNum(pObj) > 1 ? Vec_IntEntry( vMap, Abc_Var2Lit(Abc_ObjFaninId1(pObj), n) ) : -1;
648 if ( Abc_NtkIsMappedLogic(pObj->
pNtk) && Type >= 0 )
653 for ( i = 0; i < Abc_ObjFaninNum(pObj); i++ )
655 word * pSim0 = Vec_WrdEntryP( vSims,
nWords * Abc_ObjFaninId(pObj, i) );
656 iBits[i] = Abc_InfoHasBit( (
unsigned*)pSim0, iBit );
662 word * pSim0 = Abc_ObjFaninNum(pObj) > 0 ? Vec_WrdEntryP( vSims,
nWords * Abc_ObjFaninId0(pObj) ) : NULL;
663 word * pSim1 = Abc_ObjFaninNum(pObj) > 1 ? Vec_WrdEntryP( vSims,
nWords * Abc_ObjFaninId1(pObj) ) : NULL;
664 int iBit0 = Abc_ObjFaninNum(pObj) > 0 ? Abc_InfoHasBit( (
unsigned*)pSim0, iBit ) : -1;
665 int iBit1 = Abc_ObjFaninNum(pObj) > 1 ? Abc_InfoHasBit( (
unsigned*)pSim1, iBit ) : -1;
683 if ( Abc_NtkIsMappedLogic(pObj->
pNtk) )
686 word * ppSims[6];
int i;
687 word * pSim = Vec_WrdEntryP( vSims,
nWords * Abc_ObjId(pObj) );
689 for ( i = 0; i < Abc_ObjFaninNum(pObj); i++ )
690 ppSims[i] = Vec_WrdEntryP( vSims,
nWords * Abc_ObjFaninId(pObj, i) );
695 word * pSim = Vec_WrdEntryP( vSims,
nWords * Abc_ObjId(pObj) );
int w;
696 word * pSim0 = Abc_ObjFaninNum(pObj) > 0 ? Vec_WrdEntryP( vSims,
nWords * Abc_ObjFaninId0(pObj) ) : NULL;
697 word * pSim1 = Abc_ObjFaninNum(pObj) > 1 ? Vec_WrdEntryP( vSims,
nWords * Abc_ObjFaninId1(pObj) ) : NULL;
721 word * pSim0 = Vec_WrdEntryP( vSims,
nWords * Abc_ObjFaninId0(pObj) );
722 if ( Abc_InfoHasBit((
unsigned*)pSim0, i1) != Abc_InfoHasBit((
unsigned*)pSim0, i2) )
729 int iObjs[2],
int Types[2],
Vec_Int_t * vLits )
734 int n, i, Type, iMiter, iLit, * pLits;
743 iLit = Gia_ManAppendCi(pNew);
744 for ( n = 0; n < 2; n++ )
746 if ( iObjs[n] != (
int)Abc_ObjId(pObj) )
747 Vec_IntWriteEntry( vLits, Abc_Var2Lit(Abc_ObjId(pObj), n), iLit );
749 Vec_IntWriteEntry( vLits, Abc_Var2Lit(Abc_ObjId(pObj), n), Abc_NtkFinSimOneLit(pNew, pObj, Types[n], vLits, n, vTemp) );
751 Vec_IntWriteEntry( vLits, Abc_Var2Lit(Abc_ObjId(pObj), n), Abc_LitNot(iLit) );
758 for ( n = 0; n < 2; n++ )
760 if ( iObjs[n] != (
int)Abc_ObjId(pObj) )
761 Vec_IntWriteEntry( vLits, Abc_Var2Lit(Abc_ObjId(pObj), n), Abc_NtkFinSimOneLit(pNew, pObj, Type, vLits, n, vTemp) );
763 Vec_IntWriteEntry( vLits, Abc_Var2Lit(Abc_ObjId(pObj), n), Abc_NtkFinSimOneLit(pNew, pObj, Types[n], vLits, n, vTemp) );
765 Vec_IntWriteEntry( vLits, Abc_Var2Lit(Abc_ObjId(pObj), n), Abc_LitNot(Abc_NtkFinSimOneLit(pNew, pObj, Type, vLits, n, vTemp)) );
772 pLits = Vec_IntEntryP( vLits, Abc_Var2Lit(Abc_ObjFaninId0(pObj), 0) );
776 Gia_ManAppendCo( pNew, iMiter );
780 Vec_IntFree( vTemp );
789 int nItems = Vec_WecSizeSize(vRes);
790 assert( nItems == Vec_WecSizeSize(vMap2) );
793 assert( Vec_IntSize(vPat) == Vec_IntSize(vCis) );
796 int w, iObj = Abc_ObjId( pObj );
797 word Init = Vec_IntEntry(vPat, i) ? ~((
word)0) : 0;
798 word * pSim = Vec_WrdEntryP( vSims,
nWords * Abc_ObjId(pObj) );
799 for ( w = 0; w <
nWords; w++ )
801 vArray = Vec_WecEntry(vMap2, iObj);
802 if ( Vec_IntSize(vArray) > 0 )
804 int k, iFin, Index, iObj, Type;
808 iObj = Vec_IntEntry( vPairs, 2*iFin );
809 assert( iObj == (
int)Abc_ObjId(pObj) );
810 Type = Vec_IntEntry( vPairs, 2*iFin+1 );
812 if ( Type ==
ABC_FIN_NEG || Abc_InfoHasBit((
unsigned *)pSim, Index) != Abc_NtkFinSimOneBit(pObj, Type, vSims,
nWords, Index) )
813 Abc_InfoXorBit( (
unsigned *)pSim, Index );
821 int iObj = Abc_ObjId( pObj );
822 int Type = Abc_NtkIsMappedLogic(pNtk) ? -1 : Vec_IntEntry( vTypes, iObj );
823 word * pSim = Vec_WrdEntryP( vSims,
nWords * Abc_ObjId(pObj) );
824 Abc_NtkFinSimOneWord( pObj, Type, vSims,
nWords );
825 vArray = Vec_WecEntry(vMap2, iObj);
826 if ( Vec_IntSize(vArray) > 0 )
828 int k, iFin, Index, iObj, Type;
832 iObj = Vec_IntEntry( vPairs, 2*iFin );
833 assert( iObj == (
int)Abc_ObjId(pObj) );
834 Type = Vec_IntEntry( vPairs, 2*iFin+1 );
835 if ( Type ==
ABC_FIN_NEG || Abc_InfoHasBit((
unsigned *)pSim, Index) != Abc_NtkFinSimOneBit(pObj, Type, vSims,
nWords, Index) )
836 Abc_InfoXorBit( (
unsigned *)pSim, Index );
841 assert( nItems == 2*Counter );
846 int k, iFin, Index, Value;
847 int Index0 = Vec_IntEntry( vClass, 1 );
850 if ( i == iLevel && k/2 >= iItem )
853 Value = Abc_NtkFinCompareSimTwo( pNtk, vCos, vSims,
nWords, Index0, Index );
861 int k, iFin, Index, Value, Index0 = Vec_IntEntry(vClass, 1);
862 int j = (i == iLevel) ? 2*iItem : 2;
866 Value = Abc_NtkFinCompareSimTwo( pNtk, vCos, vSims,
nWords, Index0, Index );
869 Vec_IntWriteEntry( vClass, j++, iFin );
870 Vec_IntWriteEntry( vClass, j++, Index );
874 vNewClass = vNewClass ? vNewClass : Vec_WecPushLevel( vRes );
875 Vec_IntPushTwo( vNewClass, iFin, Index );
876 vClass = Vec_WecEntry( vRes, i );
878 Vec_IntShrink( vClass, j );
896 if ( Gia_ManAndNum(pGia) == 0 && Gia_ObjIsConst0(Gia_ObjFanin0(Gia_ManCo(pGia, 0))) )
898 Vec_Int_t * vPat = Gia_ObjFaninC0(Gia_ManCo(pGia, 0)) ? Vec_IntStart(Vec_IntSize(vCis)) : NULL;
914 int i, nConfLimit = 10000;
916 int status, iVarBeg = pCnf->
nVars - Gia_ManPiNum(pGia);
920 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, 0, 0, 0 );
922 vPat = Vec_IntAlloc(0);
923 else if ( status ==
l_True )
925 vPat = Vec_IntAlloc( Vec_IntSize(vCis) );
926 for ( i = 0; i < Vec_IntSize(vCis); i++ )
927 Vec_IntPush( vPat, sat_solver_var_value(pSat, iVarBeg+i) );
951 Vec_IntClear( vResArray );
954 int iObj = Vec_IntEntry( vPairs, 2*iFin );
955 Vec_Int_t * vArray = Vec_WecEntry( vMap2, iObj );
956 Vec_IntPushTwo( vArray, iFin, i );
957 Vec_IntPushTwo( vResArray, iFin, i );
965 int iObj = Vec_IntEntry( vPairs, 2*iFin );
966 Vec_Int_t * vArray = Vec_WecEntry( vMap2, iObj );
967 Vec_IntClear( vArray );
974 int nWords = Abc_Bit6WordNum( Vec_IntSize(vList) );
976 Vec_Int_t * vLits = Vec_IntStart( 2*Abc_NtkObjNumMax(pNtk) );
978 int i, k, iFin, Index, nCalls = 0;
980 vArray = Vec_WecPushLevel( vRes );
983 for ( i = 0; i < 2; i++ )
985 vPat = Vec_IntAlloc( Vec_IntSize(vCis) );
986 Vec_IntFill( vPat, Vec_IntSize(vCis), i );
987 Abc_NtkFinSimulateOne( pNtk, vTypes, vCos, vCis, vNodes, vMap2, vPat, vSims,
nWords, vPairs, vRes, 0, 1 );
994 int iFin0 = Vec_IntEntry( vClass, 0 );
997 int Objs[2] = { Vec_IntEntry(vPairs, 2*iFin0), Vec_IntEntry(vPairs, 2*iFin) };
998 int Types[2] = { Vec_IntEntry(vPairs, 2*iFin0+1), Vec_IntEntry(vPairs, 2*iFin+1) };
1004 assert( Vec_IntEntry(vClass, k) == iFin );
1005 if ( Vec_IntSize(vPat) == 0 )
1007 Vec_Int_t * vNewClass = Vec_WecPushLevel( vRes );
1008 Vec_IntPushTwo( vNewClass, iFin, Index );
1009 vClass = Vec_WecEntry( vRes, i );
1010 Vec_IntDrop( vClass, k+1 );
1011 Vec_IntDrop( vClass, k );
1014 Abc_NtkFinSimulateOne( pNtk, vTypes, vCos, vCis, vNodes, vMap2, vPat, vSims,
nWords, vPairs, vRes, i, k/2 );
1015 Vec_IntFree( vPat );
1017 vClass = Vec_WecEntry( vRes, i );
1018 assert( Vec_IntSize(vClass) <= k || Vec_IntEntry(vClass, k) != iFin );
1028 assert( Vec_IntSize(vArray) % 2 == 0 );
1029 if ( Vec_IntSize(vArray) <= 2 )
1031 vClass = Vec_WecPushLevel( vResult );
1033 Vec_IntPush( vClass, iFin );
1035 Vec_WecFree( vRes );
1036 Vec_WrdFree( vSims );
1037 Vec_IntFree( vLits );
1052static inline int Abc_ObjFinGateType(
Abc_Obj_t * pNode )
1054 char * pSop = (
char *)pNode->
pData;
1079 Abc_Obj_t * pObj = Abc_NtkObj( pNtk, iObj );
1094 Vec_Int_t * vObjs = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
1096 Vec_IntWriteEntry( vObjs, Abc_ObjId(pObj), Abc_ObjFinGateType(pObj) );
1102 Vec_Int_t * vObjs = Vec_IntAlloc( 100 );
1103 *pvMap = Vec_WecStart( nObjs );
1106 Vec_IntPush( vObjs, iObj );
1107 Vec_WecPush( *pvMap, iObj, i/2 );
1109 Vec_IntUniqify( vObjs );
1115 Vec_Int_t * vList = Vec_IntAlloc( 100 );
1117 Vec_IntAppend( vList, Vec_WecEntry(vMap, iObj) );
1125 Counter += Vec_IntSize(vLevel) - 1;
1143 int i, iObj, nCalls;
1144 if ( pNtk->
vFins == NULL )
1146 printf(
"Current network does not have the required info.\n" );
1149 assert( Abc_NtkIsSopLogic(pNtk) || Abc_NtkIsMappedLogic(pNtk) );
1150 if ( Abc_NtkIsSopLogic(pNtk) )
1155 printf(
"Current network contains unsupported gate types (for example, see node \"%s\").\n",
Abc_ObjName(Abc_NtkObj(pNtk, iObj)) );
1160 else if ( Abc_NtkIsMappedLogic(pNtk) )
1165 printf(
"Current network has mismatch between mapped gate size and fault gate size (for example, see node \"%s\").\n",
Abc_ObjName(Abc_NtkObj(pNtk, iObj)) );
1172 vPairs = pNtk->
vFins;
1176 vCiSet = Vec_IntAlloc( 1000 );
1177 vNodeSet = Vec_IntAlloc( 1000 );
1178 vMap2 = Vec_WecStart( Abc_NtkObjNumMax(pNtk) );
1179 vResult = Vec_WecAlloc( 1000 );
1183 vCoSet = Vec_WecEntry( vCoSets, i );
1187 nCalls =
Abc_NtkFinRefinement( pNtk, vTypes, vCoSet, vCiSet, vNodeSet, vPairs, vList, vMap2, vResult );
1189 printf(
"Group %4d : Obj =%4d. Fins =%4d. CI =%5d. CO =%5d. Node =%6d. SAT calls =%5d.\n",
1190 i, Vec_IntSize(vClass), Vec_IntSize(vList), Vec_IntSize(vCiSet), Vec_IntSize(vCoSet), Vec_IntSize(vNodeSet), nCalls );
1191 Vec_IntFree( vList );
1195 Vec_IntSort( vClass, 0 );
1197 Vec_WecSortByFirstInt( vResult, 0 );
1199 Vec_IntFreeP( & vTypes );
1200 Vec_IntFree( vObjs );
1201 Vec_WecFree( vClasses );
1202 Vec_WecFree( vMap );
1203 Vec_WecFree( vMap2 );
1204 Vec_WecFree( vCoSets );
1205 Vec_IntFree( vCiSet );
1206 Vec_IntFree( vNodeSet );
1227 printf(
"%d %d\n", Vec_IntEntry(vClass, 0), Entry );
1248 printf(
"Computed %d equivalence classes with %d item pairs. ", Vec_WecSize(vResult),
Abc_NtkFinCountPairs(vResult) );
1249 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
1251 Vec_WecPrint( vResult, 1 );
1254 Vec_WecFree( vResult );
char * Io_WriteFinType(int Type)
void Abc_NtkFinMiterCollect_rec(Abc_Obj_t *pObj, Vec_Int_t *vCis, Vec_Int_t *vNodes)
Vec_Int_t * Abc_NtkFinCreateList(Vec_Wec_t *vMap, Vec_Int_t *vClass)
void Abc_NtkDetectClassesTest2(Abc_Ntk_t *pNtk, int fVerbose, int fVeryVerbose)
void Abc_NtkDetectClassesTest(Abc_Ntk_t *pNtk, int fSeq, int fVerbose, int fVeryVerbose)
Abc_FinType_t
DECLARATIONS ///.
void Abc_NtkFinLocalSetdown(Vec_Int_t *vPairs, Vec_Int_t *vList, Vec_Wec_t *vMap2)
int Abc_NtkDetectObjClasses_rec(Abc_Obj_t *pObj, Vec_Int_t *vMap, Hsh_VecMan_t *pHash, Vec_Int_t *vTemp)
void Abc_NtkFinLocalSetup(Vec_Int_t *vPairs, Vec_Int_t *vList, Vec_Wec_t *vMap2, Vec_Int_t *vResArray)
int Io_ReadFinType(char *pThis)
Gia_Man_t * Abc_NtkFinMiterToGia(Abc_Ntk_t *pNtk, Vec_Int_t *vTypes, Vec_Int_t *vCos, Vec_Int_t *vCis, Vec_Int_t *vNodes, int iObjs[2], int Types[2], Vec_Int_t *vLits)
Vec_Int_t * Abc_NtkFinCheckPair(Abc_Ntk_t *pNtk, Vec_Int_t *vTypes, Vec_Int_t *vCos, Vec_Int_t *vCis, Vec_Int_t *vNodes, int iObjs[2], int Types[2], Vec_Int_t *vLits)
Vec_Int_t * Io_ReadFins(Abc_Ntk_t *pNtk, char *pFileName, int fVerbose)
void Abc_NtkGenFaultList(Abc_Ntk_t *pNtk, char *pFileName, int fStuckAt)
FUNCTION DEFINITIONS ///.
Vec_Wec_t * Abc_NtkDetectObjClasses(Abc_Ntk_t *pNtk, Vec_Int_t *vObjs, Vec_Wec_t **pvCos)
int Abc_NtkFinRefinement(Abc_Ntk_t *pNtk, Vec_Int_t *vTypes, Vec_Int_t *vCos, Vec_Int_t *vCis, Vec_Int_t *vNodes, Vec_Int_t *vPairs, Vec_Int_t *vList, Vec_Wec_t *vMap2, Vec_Wec_t *vResult)
void Abc_NtkFinSimulateOne(Abc_Ntk_t *pNtk, Vec_Int_t *vTypes, Vec_Int_t *vCos, Vec_Int_t *vCis, Vec_Int_t *vNodes, Vec_Wec_t *vMap2, Vec_Int_t *vPat, Vec_Wrd_t *vSims, int nWords, Vec_Int_t *vPairs, Vec_Wec_t *vRes, int iLevel, int iItem)
int Mio_LibGateSimulateOne(Mio_Gate_t *pGate, int iBits[6])
void Abc_NtkFrameExtend(Abc_Ntk_t *pNtk)
Vec_Int_t * Abc_NtkFinComputeObjects(Vec_Int_t *vPairs, Vec_Wec_t **pvMap, int nObjs)
int Abc_NtkFinCountPairs(Vec_Wec_t *vClasses)
Vec_Int_t * Abc_NtkFinComputeTypes(Abc_Ntk_t *pNtk)
int Io_ReadFinTypeMapped(Mio_Library_t *pLib, char *pThis)
void Mio_LibGateSimulate(Mio_Gate_t *pGate, word *ppFaninSims[6], int nWords, word *pObjSim)
int Abc_NtkFinCheckTypesOk(Abc_Ntk_t *pNtk)
void Abc_NtkPrintFinResults(Vec_Wec_t *vClasses)
int Mio_LibGateSimulateGia(Gia_Man_t *pGia, Mio_Gate_t *pGate, int iLits[6], Vec_Int_t *vLits)
Vec_Wec_t * Abc_NtkDetectFinClasses(Abc_Ntk_t *pNtk, int fVerbose)
void Abc_NtkFinMiterCollect(Abc_Ntk_t *pNtk, Vec_Int_t *vCos, Vec_Int_t *vCis, Vec_Int_t *vNodes)
int Abc_NtkFinCheckTypesOk2(Abc_Ntk_t *pNtk)
struct Abc_Obj_t_ Abc_Obj_t
#define Abc_NtkForEachCo(pNtk, pCo, i)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
#define Abc_NtkForEachPo(pNtk, pPo, i)
ABC_DLL Abc_Obj_t * Abc_NtkDupObj(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCopyName)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeOr(Abc_Ntk_t *pNtk, Vec_Ptr_t *vFanins)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeAnd(Abc_Ntk_t *pNtk, Vec_Ptr_t *vFanins)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
#define Abc_NtkForEachPi(pNtk, pPi, i)
#define Abc_NtkForEachCi(pNtk, pCi, i)
ABC_DLL void Abc_ObjPatchFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFaninOld, Abc_Obj_t *pFaninNew)
#define Abc_NtkForEachObjVec(vIds, pNtk, pObj, i)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_SWAP(Type, a, b)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
struct Cnf_Dat_t_ Cnf_Dat_t
void Cnf_DataFree(Cnf_Dat_t *p)
void Gia_ManStop(Gia_Man_t *p)
void Gia_ManHashStart(Gia_Man_t *p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
struct Gia_Man_t_ Gia_Man_t
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
void * Mf_ManGenerateCnf(Gia_Man_t *pGia, int nLutSize, int fCnfObjIds, int fAddOrCla, int fMapping, int fVerbose)
unsigned __int64 word
DECLARATIONS ///.
int Mio_GateReadPinNum(Mio_Gate_t *pGate)
struct Mio_LibraryStruct_t_ Mio_Library_t
Vec_Int_t * Mio_GateReadExpr(Mio_Gate_t *pGate)
Mio_Gate_t * Mio_LibraryReadGateByName(Mio_Library_t *pLib, char *pName, char *pOutName)
#define Mio_LibraryForEachGate(Lib, Gate)
GLOBAL VARIABLES ///.
char * Mio_GateReadName(Mio_Gate_t *pGate)
Mio_Gate_t * Mio_LibraryReadGateById(Mio_Library_t *pLib, int iD)
struct Mio_GateStruct_t_ Mio_Gate_t
int Mio_GateReadCell(Mio_Gate_t *pGate)
word * Mio_GateReadTruthP(Mio_Gate_t *pGate)
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
void sat_solver_delete(sat_solver *s)
int Abc_NamStrFind(Abc_Nam_t *p, char *pStr)
int Abc_NamStrFindOrAdd(Abc_Nam_t *p, char *pStr, int *pfFound)
int Abc_NamObjNumMax(Abc_Nam_t *p)
Abc_Nam_t * Abc_NamStart(int nObjs, int nAveSize)
FUNCTION DEFINITIONS ///.
void Abc_NamDeref(Abc_Nam_t *p)
typedefABC_NAMESPACE_HEADER_START struct Abc_Nam_t_ Abc_Nam_t
INCLUDES ///.
struct Hsh_VecMan_t_ Hsh_VecMan_t
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
#define Vec_IntForEachEntryDoubleStart(vVec, Entry1, Entry2, i, Start)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
#define Vec_WecForEachLevelStart(vGlob, vVec, i, LevelStart)
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
#define Vec_WecForEachLevelStop(vGlob, vVec, i, LevelStop)
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.