51 char * seg = (
char *)vSuppFun->pArray[i];
54 if(((*seg) & 0x01) == 0x01)
56 if(((*seg) & 0x02) == 0x02)
58 if(((*seg) & 0x04) == 0x04)
60 if(((*seg) & 0x08) == 0x08)
62 if(((*seg) & 0x10) == 0x10)
64 if(((*seg) & 0x20) == 0x20)
66 if(((*seg) & 0x40) == 0x40)
68 if(((*seg) & 0x80) == 0x80)
123 oMatch[curr] = temp[i];
174 iMatch[curr] = temp[i];
291 for(i = 0; i < *oLastItem; i++)
313 printf(
"WARNING! Integer overflow!");
325 oGroup[
Vec_IntEntry(oMatch[i], k)] = *oLastItem+numOfItemsAdded;
340 *oLastItem += numOfItemsAdded;
351 return numOfItemsAdded;
357 int numOfItemsAdded = 0;
360 for(i = 0; i < *iLastItem; i++)
391 iGroup[
Vec_IntEntry(iMatch[i], k)] = *iLastItem+numOfItemsAdded;
406 *iLastItem += numOfItemsAdded;
417 return numOfItemsAdded;
451 int * pValues, Value0, Value1, i;
465 pNode->
iTemp = pModel[input];
468 for(i =
Vec_PtrSize(topOrder[input])-1; i >= 0; i--)
475 if( pNode->
iTemp != (Value0 & Value1))
477 pNode->
iTemp = (Value0 & Value1);
508 int refineIOBySimulation(
Abc_Ntk_t *pNtk,
Vec_Int_t** iMatch,
int* iLastItem,
int * iGroup,
Vec_Int_t** iDep,
Vec_Int_t** oMatch,
int* oLastItem,
int * oGroup,
Vec_Int_t** oDep,
char * vPiValues,
int * observability,
Vec_Ptr_t ** topOrder)
512 int * output, * output2;
515 Vec_Int_t * iComputedNum, * iComputedNumSorted;
518 int isRefined =
FALSE;
523 pModel[i] = vPiValues[i] -
'0';
536 lastItem = *oLastItem;
537 for(i = 0; i < lastItem && (*oLastItem) !=
Abc_NtkPoNum(pNtk); i++)
566 if( (*oLastItem) > lastItem )
575 lastItem = *iLastItem;
576 for(i = 0; i < lastItem && (*iLastItem) !=
Abc_NtkPiNum(pNtk); i++)
602 if(output2[outputIndex])
603 num += (oGroup[outputIndex] + 1) * factor;
605 if(output[outputIndex] != output2[outputIndex])
607 int temp =
Vec_IntEntry(oComputedNum, outputIndex) + i + 1;
641 if( (*iLastItem) > lastItem )
651 lastItem = *oLastItem;
652 for(i = 0; i < lastItem && (*oLastItem) !=
Abc_NtkPoNum(pNtk); i++)
688 if( (*oLastItem) > lastItem )
716 if(iCurrMatch == NULL)
722 pObj->
pCopy = pObjNew;
724 pObj->
pCopy = pObjNew;
735 pObj->
pCopy = pObjNew;
737 pObj->
pCopy = pObjNew;
776 if(oCurrMatch != NULL)
812 int nErrors, nPrinted, i, iNode = -1;
832 if ( ++nPrinted == 3 )
869 int Abc_NtkMiterSatBm(
Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit,
int fVerbose, ABC_INT64_T * pNumConfs, ABC_INT64_T * pNumInspects)
921 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
927 else if ( status ==
l_True )
977 pMiter =
Abc_NtkMiterBm( pNtk1, pNtk2, iMatchPairs, oMatchPairs );
1000 else if( mode == 2 )
1008 if ( pMiter == NULL )
1010 printf(
"Miter computation has failed.");
1018 if(mismatch != NULL)
1040 printf(
"Renoding for CNF has failed.");
1045 RetValue =
Abc_NtkMiterSat( pCnf, (ABC_INT64_T)10000, (ABC_INT64_T)0, 0, NULL, NULL);
1052 if ( mismatch != NULL && pCnf->
pModel )
1084 result =
Abc_NtkBmSat(pNtk1, pNtk2, iMatchPairs, oMatchPairs, NULL, 0);
1087 printf(
"*** Circuits are equivalent ***\n");
1089 printf(
"*** Circuits are NOT equivalent ***\n");
1101 int i, j, numOfLevels;
1114 if(bitVector != NULL)
1128 pObj->
pCopy = pObjNew;
1133 for( i = 0; i <= numOfLevels; i++ )
1134 for( j = 0; j <
Vec_PtrSize( nodesInLevel[i] ); j++)
1187 Vec_Int_t * oNonSingleton,
int oI,
int idx,
int ii,
int iidx)
1189 static int MATCH_FOUND;
1194 static int counter = 0;
1196 MATCH_FOUND =
FALSE;
1200 if( iNonSingleton != NULL)
1201 if(
match1by1(pNtk1, nodesInLevel1, iMatch1, iDep1, matchedInputs1, iGroup1, oMatch1, oGroup1,
1202 pNtk2, nodesInLevel2, iMatch2, iDep2, matchedInputs2, iGroup2, oMatch2, oGroup2,
1203 matchedOutputs1, matchedOutputs2, oMatchedGroups, iNonSingleton, ii, iidx) )
1206 if( iNonSingleton == NULL)
1219 skipList[j] =
FALSE;
1233 if(
Abc_NtkBmSat( subNtk1, subNtk2, NULL, oMatchPairs, mismatch, 0) )
1244 pNtk2, nodesInLevel2, iMatch2, iDep2, matchedInputs2, iGroup2, oMatch2, oGroup2,
1245 matchedOutputs1, matchedOutputs2, oMatchedGroups, iNonSingleton,
1246 subNtk1, subNtk2, oMatchPairs,
1247 oNonSingleton, oI, idx+1, ii, iidx);
1251 pNtk2, nodesInLevel2, iMatch2, iDep2, matchedInputs2, iGroup2, oMatch2, oGroup2,
1252 matchedOutputs1, matchedOutputs2, oMatchedGroups, iNonSingleton,
1253 subNtk1, subNtk2, oMatchPairs,
1254 oNonSingleton, oI+1, 0, ii, iidx);
1260 int * output1, * output2;
1279 pModel[k] = vPiValues[k] -
'0';
1304 if(MATCH_FOUND ==
FALSE )
1311 if(MATCH_FOUND ==
FALSE )
1317 if(MATCH_FOUND && counter != 0)
1333 static int MATCH_FOUND =
FALSE;
1340 static int counter = 0;
1342 MATCH_FOUND =
FALSE;
1355 return match1by1(pNtk1, nodesInLevel1, iMatch1, iDep1, matchedInputs1, iGroup1, oMatch1, oGroup1,
1356 pNtk2, nodesInLevel2, iMatch2, iDep2, matchedInputs2, iGroup2, oMatch2, oGroup2,
1357 matchedOutputs1, matchedOutputs2, oMatchedGroups, iNonSingleton, ii+1, 0);
1366 skipList[j] =
FALSE;
1385 subNtk1 =
computeCofactor(pNtk1, nodesInLevel1, NULL, matchedInputs1);
1399 subNtk2 =
computeCofactor(pNtk2, nodesInLevel2, NULL, matchedInputs2);
1409 if(
Abc_NtkBmSat( subNtk2, subNtk1, NULL, oMatchPairs, mismatch, 0) )
1423 pNtk2, nodesInLevel2, iMatch2, iDep2, matchedInputs2, iGroup2, oMatch2, oGroup2,
1424 matchedOutputs1, matchedOutputs2, oMatchedGroups, iNonSingleton,
1425 subNtk1, subNtk2, oMatchPairs, oNonSingleton, 0, 0, ii, idx);
1438 int * bitVector1, * bitVector2;
1459 for(m = 0; m <
Vec_IntSize(iMatch2[i])-idx+1; m++)
1488 FpNtk1 =
computeCofactor(pNtk1, nodesInLevel1, bitVector1, currInputs1);
1489 FpNtk2 =
computeCofactor(pNtk2, nodesInLevel2, bitVector2, currInputs2);
1496 for(n = 0; n < vSupp->nSize; n++)
1508 for(n = 0; n < vSupp->nSize; n++)
1509 if( (
int)
Abc_ObjId((
Abc_Obj_t *)vSupp->pArray[n])-1 < (Vec_IntSize(iMatch2[i]))-idx+1 &&
1522 for(m = 0; m <
Vec_IntSize(iMatch2[i])-idx+1; m++)
1523 if(suppNum2[m] != suppNum1)
1525 skipList[m+idx-1] =
TRUE;
1544 if( MATCH_FOUND ==
FALSE )
1548 if( MATCH_FOUND ==
FALSE )
1564 if(MATCH_FOUND && counter != 0)
1574 float refineBySAT(
Abc_Ntk_t * pNtk1,
Vec_Int_t ** iMatch1,
int * iGroup1,
Vec_Int_t ** iDep1,
int* iLastItem1,
Vec_Int_t ** oMatch1,
int * oGroup1,
Vec_Int_t ** oDep1,
int* oLastItem1,
int * observability1,
1580 Vec_Int_t * matchedInputs1, * matchedInputs2;
1581 Vec_Int_t * matchedOutputs1, * matchedOutputs2;
1582 Vec_Ptr_t ** nodesInLevel1, ** nodesInLevel2;
1587 float satTime = 0.0;
1617 for(i = 0; i < *iLastItem1; i++)
1628 for(i = 0; i < *oLastItem1; i++)
1637 for(i = 0; i <
Vec_IntSize(iNonSingleton) - 1; i++)
1639 for(j = i + 1; j <
Vec_IntSize(iNonSingleton); j++)
1682 matchFound =
match1by1(pNtk1, nodesInLevel1, iMatch1, iDep1, matchedInputs1, iGroup1, oMatch1, oGroup1,
1683 pNtk2, nodesInLevel2, iMatch2, iDep2, matchedInputs2, iGroup2, oMatch2, oGroup2,
1684 matchedOutputs1, matchedOutputs2, oMatchedGroups, iNonSingleton, 0, 0);
1696 for(i = 0; i < *oLastItem1; i++)
1700 subNtk1 =
computeCofactor(pNtk1, nodesInLevel1, NULL, matchedInputs1);
1701 subNtk2 =
computeCofactor(pNtk2, nodesInLevel2, NULL, matchedInputs2);
1703 matchFound =
matchNonSingletonOutputs(pNtk1, nodesInLevel1, iMatch1, iDep1, matchedInputs1, iGroup1, oMatch1, oGroup1,
1704 pNtk2, nodesInLevel2, iMatch2, iDep2, matchedInputs2, iGroup1, oMatch2, oGroup2,
1705 matchedOutputs1, matchedOutputs2, oMatchedGroups, NULL,
1706 subNtk1, subNtk2, oMatchPairs, oNonSingleton, 0, 0, 0, 0);
1715 satTime = (float)(
Abc_Clock() - clk)/(
float)(CLOCKS_PER_SEC);
1719 checkEquivalence( pNtk1, matchedInputs1, matchedOutputs1, pNtk2, matchedInputs2, matchedOutputs2);
1721 result = fopen(
"IOmatch.txt",
"w");
1728 fprintf(result,
"\n-----------------------------------------\n");
1730 for(i = 0; i <
Vec_IntSize(matchedOutputs1) ; i++)
1760 if(iLastItem1 != iLastItem2 || oLastItem1 != oLastItem2)
1783 int * iGroup1, * oGroup1;
1784 int * iGroup2, * oGroup2;
1785 int iLastItem1, oLastItem1;
1786 int iLastItem2, oLastItem2;
1789 char * vPiValues1, * vPiValues2;
1790 int * observability1, * observability2;
1795 Vec_Ptr_t ** topOrder1 = NULL, ** topOrder2 = NULL;
1804 extern int refineIOBySimulation(
Abc_Ntk_t *pNtk,
Vec_Int_t** iMatch,
int* iLastItem,
int * iGroup,
Vec_Int_t** iDep,
Vec_Int_t** oMatch,
int* oLastItem,
int * oGroup,
Vec_Int_t** oDep,
char * vPiValues,
int * observability,
Vec_Ptr_t ** topOrder);
1805 extern float refineBySAT(
Abc_Ntk_t * pNtk1,
Vec_Int_t ** iMatch1,
int * iGroup1,
Vec_Int_t ** iDep1,
int* iLastItem1,
Vec_Int_t ** oMatch1,
int * oGroup1,
Vec_Int_t ** oDep1,
int* oLastItem1,
int * observability1,
1844 vPiValues1[i] =
'0';
1845 vPiValues2[i] =
'0';
1847 observability1[i] = 0;
1848 observability2[i] = 0;
1863 printf(
"Network strashing is done!\n");
1869 printf(
"Getting dependencies is done!\n");
1873 initMatchList(pNtk1, iDep1, oDep1, iMatch1, &iLastItem1, oMatch1, &oLastItem1, iGroup1, oGroup1, p_equivalence);
1874 initMatchList(pNtk2, iDep2, oDep2, iMatch2, &iLastItem2, oMatch2, &oLastItem2, iGroup2, oGroup2, p_equivalence);
1875 printf(
"Initializing match lists is done!\n");
1878 if( !
checkListConsistency(iMatch1, oMatch1, iMatch2, oMatch2, iLastItem1, oLastItem1, iLastItem2, oLastItem2) )
1880 fprintf( stdout,
"I/O dependencies of two circuits are different.\n");
1884 printf(
"Refining IOs by dependencies ...");
1888 int iNumOfItemsAdded = 1, oNumOfItemsAdded = 1;
1892 if( oNumOfItemsAdded )
1898 if( iNumOfItemsAdded )
1906 iSplitByDep(pNtk1, iDep1, iMatch1, iGroup1, &iLastItem1, oGroup1);
1908 oSplitByDep(pNtk1, oDep1, oMatch1, oGroup1, &oLastItem1, iGroup1);
1912 iNumOfItemsAdded =
iSplitByDep(pNtk2, iDep2, iMatch2, iGroup2, &iLastItem2, oGroup2);
1914 iNumOfItemsAdded = 0;
1917 oNumOfItemsAdded =
oSplitByDep(pNtk2, oDep2, oMatch2, oGroup2, &oLastItem2, iGroup2);
1919 oNumOfItemsAdded = 0;
1921 if(!
checkListConsistency(iMatch1, oMatch1, iMatch2, oMatch2, iLastItem1, oLastItem1, iLastItem2, oLastItem2))
1923 fprintf( stdout,
"I/O dependencies of two circuits are different.\n");
1926 }
while(iNumOfItemsAdded != 0 || oNumOfItemsAdded != 0);
1932 initTime = ((float)(
Abc_Clock() - clk)/(
float)(CLOCKS_PER_SEC));
1938 printf(
"Refining IOs by simulation ...");
1943 int ioSuccess1, ioSuccess2;
1947 for(i = 0; i < iLastItem1; i++)
1953 fprintf( stdout,
"Input refinement by simulation finds two circuits different.\n");
1964 ioSuccess1 =
refineIOBySimulation(pNtk1, iMatch1, &iLastItem1, iGroup1, iDep1, oMatch1, &oLastItem1, oGroup1, oDep1, vPiValues1, observability1, topOrder1);
1965 ioSuccess2 =
refineIOBySimulation(pNtk2, iMatch2, &iLastItem2, iGroup2, iDep2, oMatch2, &oLastItem2, oGroup2, oDep2, vPiValues2, observability2, topOrder2);
1967 if(ioSuccess1 && ioSuccess2)
1972 if(ioSuccess1 != ioSuccess2 ||
1973 !
checkListConsistency(iMatch1, oMatch1, iMatch2, oMatch2, iLastItem1, oLastItem1, iLastItem2, oLastItem2))
1975 fprintf( stdout,
"Input refinement by simulation finds two circuits different.\n");
1978 }
while(counter <= 200);
1984 simulTime = (float)(
Abc_Clock() - clk)/(
float)(CLOCKS_PER_SEC);
1985 printf(
"SAT-based search started ...\n");
1987 satTime =
refineBySAT(pNtk1, iMatch1, iGroup1, iDep1, &iLastItem1, oMatch1, oGroup1, oDep1, &oLastItem1, observability1,
1988 pNtk2, iMatch2, iGroup2, iDep2, &iLastItem2, oMatch2, oGroup2, oDep2, &oLastItem2, observability2);
1990 printf(
"Init Time = %4.2f\n", initTime );
1991 printf(
"Simulation Time = %4.2f\n", simulTime );
1992 printf(
"SAT Time = %4.2f\n", satTime );
1993 printf(
"Overall Time = %4.2f\n", initTime + simulTime + satTime );
1997 for(i = 0; i < iLastItem1 ; i++)
2004 for(i = 0; i < oLastItem1 ; i++)
2015 if(topOrder1 != NULL) {
2043 if(topOrder1 != NULL) {
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
static void Vec_IntPushOrder(Vec_Int_t *p, int Entry)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
ABC_DLL int * Abc_NtkVerifyGetCleanModel(Abc_Ntk_t *pNtk, int nFrames)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
int Abc_NtkMiterSatBm(Abc_Ntk_t *pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int fVerbose, ABC_INT64_T *pNumConfs, ABC_INT64_T *pNumInspects)
static int Abc_ObjFaninC1(Abc_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int sat_solver_solve(sat_solver *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
Abc_Ntk_t * Abc_NtkMulti(Abc_Ntk_t *pNtk, int nThresh, int nFaninMax, int fCnf, int fMulti, int fSimple, int fFactor)
FUNCTION DEFINITIONS ///.
#define SIM_RANDOM_UNSIGNED
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
void sat_solver_delete(sat_solver *s)
static Abc_Obj_t * Abc_ObjChild1Copy(Abc_Obj_t *pObj)
float refineBySAT(Abc_Ntk_t *pNtk1, Vec_Int_t **iMatch1, int *iGroup1, Vec_Int_t **iDep1, int *iLastItem1, Vec_Int_t **oMatch1, int *oGroup1, Vec_Int_t **oDep1, int *oLastItem1, int *observability1, Abc_Ntk_t *pNtk2, Vec_Int_t **iMatch2, int *iGroup2, Vec_Int_t **iDep2, int *iLastItem2, Vec_Int_t **oMatch2, int *oGroup2, Vec_Int_t **oDep2, int *oLastItem2, int *observability2)
int checkListConsistency(Vec_Int_t **iMatch1, Vec_Int_t **oMatch1, Vec_Int_t **iMatch2, Vec_Int_t **oMatch2, int iLastItem1, int oLastItem1, int iLastItem2, int oLastItem2)
ABC_DLL Abc_Obj_t * Abc_NtkDupObj(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCopyName)
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
static int Vec_IntFind(Vec_Int_t *p, int Entry)
void iSortDependencies(Abc_Ntk_t *pNtk, Vec_Int_t **iDep, int *oGroup)
int oSplitByDep(Abc_Ntk_t *pNtk, Vec_Int_t **oDep, Vec_Int_t **oMatch, int *oGroup, int *oLastItem, int *iGroup)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define ABC_ALLOC(type, num)
#define Abc_NtkForEachCo(pNtk, pCo, i)
static Abc_Obj_t * Abc_NtkCi(Abc_Ntk_t *pNtk, int i)
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
static void * Vec_PtrPop(Vec_Ptr_t *p)
ABC_DLL void * Abc_NtkMiterSatCreate(Abc_Ntk_t *pNtk, int fAllPrimes)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_NtkCo(Abc_Ntk_t *pNtk, int i)
void initMatchList(Abc_Ntk_t *pNtk, Vec_Int_t **iDep, Vec_Int_t **oDep, Vec_Int_t **iMatch, int *iLastItem, Vec_Int_t **oMatch, int *oLastItem, int *iGroup, int *oGroup, int p_equivalence)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
#define Abc_AigForEachAnd(pNtk, pNode, i)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
ABC_DLL Abc_Obj_t * Abc_AigAnd(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
static Abc_Obj_t * Abc_ObjChild0Copy(Abc_Obj_t *pObj)
int * Abc_NtkSimulateOneNode(Abc_Ntk_t *pNtk, int *pModel, int input, Vec_Ptr_t **topOrder)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
int matchNonSingletonOutputs(Abc_Ntk_t *pNtk1, Vec_Ptr_t **nodesInLevel1, Vec_Int_t **iMatch1, Vec_Int_t **iDep1, Vec_Int_t *matchedInputs1, int *iGroup1, Vec_Int_t **oMatch1, int *oGroup1, Abc_Ntk_t *pNtk2, Vec_Ptr_t **nodesInLevel2, Vec_Int_t **iMatch2, Vec_Int_t **iDep2, Vec_Int_t *matchedInputs2, int *iGroup2, Vec_Int_t **oMatch2, int *oGroup2, Vec_Int_t *matchedOutputs1, Vec_Int_t *matchedOutputs2, Vec_Int_t *oMatchedGroups, Vec_Int_t *iNonSingleton, Abc_Ntk_t *subNtk1, Abc_Ntk_t *subNtk2, Vec_Ptr_t *oMatchPairs, Vec_Int_t *oNonSingleton, int oI, int idx, int ii, int iidx)
void oSortDependencies(Abc_Ntk_t *pNtk, Vec_Int_t **oDep, int *iGroup)
static int Abc_ObjLevel(Abc_Obj_t *pObj)
Vec_Int_t * Abc_NtkGetCiSatVarNums(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_AigLevel(Abc_Ntk_t *pNtk)
static int Vec_IntEntry(Vec_Int_t *p, int i)
ABC_DLL Abc_Obj_t * Abc_AigMiter(Abc_Aig_t *pMan, Vec_Ptr_t *vPairs, int fImplic)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_DLL int Abc_NtkMiterSat(Abc_Ntk_t *pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int fVerbose, ABC_INT64_T *pNumConfs, ABC_INT64_T *pNumInspects)
FUNCTION DEFINITIONS ///.
static void Vec_IntPush(Vec_Int_t *p, int Entry)
int checkEquivalence(Abc_Ntk_t *pNtk1, Vec_Int_t *matchedInputs1, Vec_Int_t *matchedOutputs1, Abc_Ntk_t *pNtk2, Vec_Int_t *matchedInputs2, Vec_Int_t *matchedOutputs2)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
static Abc_Obj_t * Abc_NtkCreatePi(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanout0Ntk(Abc_Obj_t *pObj)
int refineIOBySimulation(Abc_Ntk_t *pNtk, Vec_Int_t **iMatch, int *iLastItem, int *iGroup, Vec_Int_t **iDep, Vec_Int_t **oMatch, int *oLastItem, int *oGroup, Vec_Int_t **oDep, char *vPiValues, int *observability, Vec_Ptr_t **topOrder)
int Abc_NtkBmSat(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, Vec_Ptr_t *iMatchPairs, Vec_Ptr_t *oMatchPairs, Vec_Int_t *mismatch, int mode)
ABC_NAMESPACE_IMPL_START int match1by1(Abc_Ntk_t *pNtk1, Vec_Ptr_t **nodesInLevel1, Vec_Int_t **iMatch1, Vec_Int_t **iDep1, Vec_Int_t *matchedInputs1, int *iGroup1, Vec_Int_t **oMatch1, int *oGroup1, Abc_Ntk_t *pNtk2, Vec_Ptr_t **nodesInLevel2, Vec_Int_t **iMatch2, Vec_Int_t **iDep2, Vec_Int_t *matchedInputs2, int *iGroup2, Vec_Int_t **oMatch2, int *oGroup2, Vec_Int_t *matchedOutputs1, Vec_Int_t *matchedOutputs2, Vec_Int_t *oMatchedGroups, Vec_Int_t *iNonSingleton, int ii, int idx)
int iSplitByDep(Abc_Ntk_t *pNtk, Vec_Int_t **iDep, Vec_Int_t **iMatch, int *iGroup, int *iLastItem, int *oGroup)
Abc_Ntk_t * computeCofactor(Abc_Ntk_t *pNtk, Vec_Ptr_t **nodesInLevel, int *bitVector, Vec_Int_t *currInputs)
static int Vec_IntRemove(Vec_Int_t *p, int Entry)
ABC_DLL void Abc_ObjRemoveFanins(Abc_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
void Abc_NtkVerifyReportError(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int *pModel, Vec_Int_t *mismatch)
static int Vec_IntEntryLast(Vec_Int_t *p)
int sat_solver_simplify(sat_solver *s)
static int Vec_IntSize(Vec_Int_t *p)
ABC_DLL int Abc_NtkMiterIsConstant(Abc_Ntk_t *pMiter)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
void sat_solver_store_free(sat_solver *s)
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
Abc_Ntk_t * Abc_NtkMiterBm(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, Vec_Ptr_t *iCurrMatch, Vec_Ptr_t *oCurrMatch)
Vec_Ptr_t * Sim_ComputeFunSupp(Abc_Ntk_t *pNtk, int fVerbose)
void Abc_NtkDfsReverse_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
ABC_DLL int Abc_NtkIsDfsOrdered(Abc_Ntk_t *pNtk)
static int Vec_IntPushUniqueOrder(Vec_Int_t *p, int Entry)
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
static void Vec_PtrClear(Vec_Ptr_t *p)
Vec_Ptr_t ** findTopologicalOrder(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_NtkPi(Abc_Ntk_t *pNtk, int i)
void Sat_SolverPrintStats(FILE *pFile, sat_solver *p)
ABC_DLL int * Abc_NtkVerifySimulatePattern(Abc_Ntk_t *pNtk, int *pModel)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Vec_IntPushUnique(Vec_Int_t *p, int Entry)
static void Vec_IntClear(Vec_Int_t *p)
static Abc_Obj_t * Abc_NtkCreatePo(Abc_Ntk_t *pNtk)
int * Sat_SolverGetModel(sat_solver *p, int *pVars, int nVars)
void bmGateWay(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int p_equivalence)
void getDependencies(Abc_Ntk_t *pNtk, Vec_Int_t **iDep, Vec_Int_t **oDep)
#define Abc_NtkForEachPi(pNtk, pPi, i)
int Abc_NodeAddClausesTop(sat_solver *pSat, Abc_Obj_t *pNode, Vec_Int_t *vVars)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)