53 char * pFileName =
"bug_found.blif";
54 int i, nSteps, nIter, ModNum, RandNum = 1;
60 if ( !(*pFuncError)( pNtk ) )
62 printf(
"The original network does not cause the bug. Quitting.\n" );
67 for ( nIter = 0; ; nIter++ )
74 for ( i = 0; i < nSteps; i++ )
77 ModNum = (i + RandNum) % nSteps;
83 if ( (*pFuncError)( pNtkMod ) )
92 printf(
"Iter %6d : Latches = %6d. Nodes = %6d. Steps = %6d. Error step = %3d. ",
100 printf(
"Final network written into file \"%s\". ", pFileName );
158 if ( Counter++ == Step )
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NodeIsConst(Abc_Obj_t *pNode)
static ABC_NAMESPACE_IMPL_START int Abc_NtkCountFaninsTotal(Abc_Ntk_t *pNtk)
DECLARATIONS ///.
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst1(Abc_Ntk_t *pNtk)
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
static abctime Abc_Clock()
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
void Abc_NtkAutoDebug(Abc_Ntk_t *pNtk, int(*pFuncError)(Abc_Ntk_t *))
FUNCTION DEFINITIONS ///.
ABC_DLL int Abc_NtkToSop(Abc_Ntk_t *pNtk, int fDirect)
#define ABC_NAMESPACE_IMPL_END
void Abc_NtkCycleInitStateSop(Abc_Ntk_t *pNtk, int nFrames, int fVerbose)
static Abc_Ntk_t * Abc_NtkAutoDebugModify(Abc_Ntk_t *pNtk, int ObjNum, int fConst1)
int Abc_NtkFindGivenFanin(Abc_Ntk_t *pNtk, int Step, Abc_Obj_t **ppObj, Abc_Obj_t **ppFanin)
ABC_DLL void Abc_ObjTransferFanout(Abc_Obj_t *pObjOld, Abc_Obj_t *pObjNew)
#define ABC_NAMESPACE_IMPL_START
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkSweep(Abc_Ntk_t *pNtk, int fVerbose)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL void Abc_NtkDeleteAll_rec(Abc_Obj_t *pObj)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst0(Abc_Ntk_t *pNtk)
static int Abc_ObjIsPo(Abc_Obj_t *pObj)
void Io_WriteBlifLogic(Abc_Ntk_t *pNtk, char *pFileName, int fWriteLatches)
FUNCTION DEFINITIONS ///.
ABC_DLL int Abc_NtkCleanupSeq(Abc_Ntk_t *pNtk, int fLatchSweep, int fAutoSweep, int fVerbose)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.