diff options
Diffstat (limited to 'src/aig')
68 files changed, 581 insertions, 581 deletions
diff --git a/src/aig/aig/aig.h b/src/aig/aig/aig.h index 61ed26e4..697238ae 100644 --- a/src/aig/aig/aig.h +++ b/src/aig/aig/aig.h @@ -161,8 +161,8 @@ struct Aig_Man_t_ Vec_Int_t * vCiNumsOrig; // original CI names int nComplEdges; // complemented edges // timing statistics - clock_t time1; - clock_t time2; + abctime time1; + abctime time2; }; // cut computation diff --git a/src/aig/aig/aigCanon.c b/src/aig/aig/aigCanon.c index f8a50fab..5ae3cd65 100644 --- a/src/aig/aig/aigCanon.c +++ b/src/aig/aig/aigCanon.c @@ -176,9 +176,9 @@ void Aig_RManTableResize( Aig_RMan_t * p ) Aig_Tru_t * pEntry, * pNext; Aig_Tru_t ** pBinsOld, ** ppPlace; int nBinsOld, Counter, i; - clock_t clk; + abctime clk; assert( p->pBins != NULL ); -clk = clock(); +clk = Abc_Clock(); // save the old Bins pBinsOld = p->pBins; nBinsOld = p->nBins; @@ -200,7 +200,7 @@ clk = clock(); Counter++; } assert( Counter == p->nEntries ); -// ABC_PRT( "Time", clock() - clk ); +// ABC_PRT( "Time", Abc_Clock() - clk ); ABC_FREE( pBinsOld ); } diff --git a/src/aig/aig/aigCuts.c b/src/aig/aig/aigCuts.c index 1ab117f8..af4edcbb 100644 --- a/src/aig/aig/aigCuts.c +++ b/src/aig/aig/aigCuts.c @@ -633,7 +633,7 @@ Aig_ManCut_t * Aig_ComputeCuts( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, in Aig_ManCut_t * p; Aig_Obj_t * pObj; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); assert( pAig->pManCuts == NULL ); // start the manager p = Aig_ManCutStart( pAig, nCutsMax, nLeafMax, fTruth, fVerbose ); @@ -652,7 +652,7 @@ Aig_ManCut_t * Aig_ComputeCuts( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, in Aig_ManObjNum(pAig), nCuts, nLeafMax, nCutsK ); printf( "Cut size = %2d. Truth size = %2d. Total mem = %5.2f MB ", p->nCutSize, 4*p->nTruthWords, 1.0*Aig_MmFixedReadMemUsage(p->pMemCuts)/(1<<20) ); - ABC_PRT( "Runtime", clock() - clk ); + ABC_PRT( "Runtime", Abc_Clock() - clk ); /* Aig_ManForEachNode( pAig, pObj, i ) if ( i % 300 == 0 ) diff --git a/src/aig/aig/aigDfs.c b/src/aig/aig/aigDfs.c index 5334aac0..834da0b2 100644 --- a/src/aig/aig/aigDfs.c +++ b/src/aig/aig/aigDfs.c @@ -781,12 +781,12 @@ int Aig_SupportSizeTest( Aig_Man_t * p ) { Aig_Obj_t * pObj; int i, Counter = 0; - clock_t clk = clock(); + abctime clk = Abc_Clock(); Aig_ManForEachObj( p, pObj, i ) if ( Aig_ObjIsNode(pObj) ) Counter += (Aig_SupportSize(p, pObj) <= 16); printf( "Nodes with small support %d (out of %d)\n", Counter, Aig_ManNodeNum(p) ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return Counter; } diff --git a/src/aig/aig/aigDoms.c b/src/aig/aig/aigDoms.c index a537e2ab..7e3bc504 100644 --- a/src/aig/aig/aigDoms.c +++ b/src/aig/aig/aigDoms.c @@ -624,7 +624,7 @@ Aig_Sto_t * Aig_ManComputeDomsFlops( Aig_Man_t * pAig, int Limit ) Vec_Ptr_t * vNodes; Aig_Obj_t * pObj; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); pSto = Aig_ManDomStart( pAig, Limit ); // initialize flop inputs Saig_ManForEachLi( pAig, pObj, i ) @@ -644,7 +644,7 @@ Aig_Sto_t * Aig_ManComputeDomsFlops( Aig_Man_t * pAig, int Limit ) pSto->nDomNodes, Aig_ManRegNum(pSto->pAig), pSto->nDomsTotal, // pSto->nDomsFilter1, pSto->nDomsFilter2, 1.0 * pSto->nDomsTotal / (pSto->nDomNodes + Aig_ManRegNum(pSto->pAig)) ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return pSto; } @@ -665,7 +665,7 @@ Aig_Sto_t * Aig_ManComputeDomsPis( Aig_Man_t * pAig, int Limit ) Vec_Ptr_t * vNodes; Aig_Obj_t * pObj; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); pSto = Aig_ManDomStart( pAig, Limit ); // initialize flop inputs Aig_ManForEachCo( pAig, pObj, i ) @@ -685,7 +685,7 @@ Aig_Sto_t * Aig_ManComputeDomsPis( Aig_Man_t * pAig, int Limit ) pSto->nDomNodes, Saig_ManPiNum(pSto->pAig), pSto->nDomsTotal, // pSto->nDomsFilter1, pSto->nDomsFilter2, 1.0 * pSto->nDomsTotal / (pSto->nDomNodes + Saig_ManPiNum(pSto->pAig)) ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return pSto; } @@ -706,7 +706,7 @@ Aig_Sto_t * Aig_ManComputeDomsNodes( Aig_Man_t * pAig, int Limit ) Vec_Ptr_t * vNodes; Aig_Obj_t * pObj; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); pSto = Aig_ManDomStart( pAig, Limit ); // initialize flop inputs Aig_ManForEachCo( pAig, pObj, i ) @@ -724,7 +724,7 @@ Aig_Sto_t * Aig_ManComputeDomsNodes( Aig_Man_t * pAig, int Limit ) pSto->nDomNodes, pSto->nDomsTotal, // pSto->nDomsFilter1, pSto->nDomsFilter2, 1.0 * pSto->nDomsTotal / pSto->nDomNodes ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return pSto; } diff --git a/src/aig/aig/aigInter.c b/src/aig/aig/aigInter.c index 636cb494..8f9318b3 100644 --- a/src/aig/aig/aigInter.c +++ b/src/aig/aig/aigInter.c @@ -29,9 +29,9 @@ ABC_NAMESPACE_IMPL_START /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -extern clock_t timeCnf; -extern clock_t timeSat; -extern clock_t timeInt; +extern abctime timeCnf; +extern abctime timeSat; +extern abctime timeInt; //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// @@ -54,7 +54,7 @@ void Aig_ManInterFast( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose ) Cnf_Dat_t * pCnfOn, * pCnfOff; Aig_Obj_t * pObj, * pObj2; int Lits[3], status, i; -// clock_t clk = clock(); +// abctime clk = Abc_Clock(); assert( Aig_ManCiNum(pManOn) == Aig_ManCiNum(pManOff) ); assert( Aig_ManCoNum(pManOn) == Aig_ManCoNum(pManOff) ); @@ -132,7 +132,7 @@ void Aig_ManInterFast( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose ) Cnf_DataFree( pCnfOn ); Cnf_DataFree( pCnfOff ); sat_solver_delete( pSat ); -// ABC_PRT( "Fast interpolation time", clock() - clk ); +// ABC_PRT( "Fast interpolation time", Abc_Clock() - clk ); } /**Function************************************************************* @@ -156,21 +156,21 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fRelation Vec_Int_t * vVarsAB; Aig_Obj_t * pObj, * pObj2; int Lits[3], status, i; - clock_t clk; + abctime clk; int iLast = -1; // Suppress "might be used uninitialized" assert( Aig_ManCiNum(pManOn) == Aig_ManCiNum(pManOff) ); -clk = clock(); +clk = Abc_Clock(); // derive CNFs // pCnfOn = Cnf_Derive( pManOn, 0 ); // pCnfOff = Cnf_Derive( pManOff, 0 ); pCnfOn = Cnf_DeriveSimple( pManOn, 0 ); pCnfOff = Cnf_DeriveSimple( pManOff, 0 ); Cnf_DataLift( pCnfOff, pCnfOn->nVars ); -timeCnf += clock() - clk; +timeCnf += Abc_Clock() - clk; -clk = clock(); +clk = Abc_Clock(); // start the solver pSat = sat_solver_new(); sat_solver_store_alloc( pSat ); @@ -246,7 +246,7 @@ clk = clock(); // solve the problem status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 ); -timeSat += clock() - clk; +timeSat += Abc_Clock() - clk; if ( status == l_False ) { pSatCnf = sat_solver_store_release( pSat ); @@ -269,11 +269,11 @@ timeSat += clock() - clk; } // create the resulting manager -clk = clock(); +clk = Abc_Clock(); pManInter = Inta_ManAlloc(); pRes = (Aig_Man_t *)Inta_ManInterpolate( pManInter, (Sto_Man_t *)pSatCnf, vVarsAB, fVerbose ); Inta_ManFree( pManInter ); -timeInt += clock() - clk; +timeInt += Abc_Clock() - clk; /* // test UNSAT core computation { diff --git a/src/aig/aig/aigJust.c b/src/aig/aig/aigJust.c index 2ee60748..c420b2d9 100644 --- a/src/aig/aig/aigJust.c +++ b/src/aig/aig/aigJust.c @@ -254,7 +254,7 @@ void Aig_ManJustExperiment( Aig_Man_t * pAig ) Vec_Int_t * vSuppLits, * vNodes; Aig_Obj_t * pObj; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int Count0 = 0, Count0f = 0, Count1 = 0, Count1f = 0; int nTotalLits = 0; vSuppLits = Vec_IntAlloc( 100 ); @@ -295,7 +295,7 @@ void Aig_ManJustExperiment( Aig_Man_t * pAig ) Vec_IntFree( vSuppLits ); printf( "PO =%6d. C0 =%6d. C0f =%6d. C1 =%6d. C1f =%6d. (%6.2f %%) Ave =%4.1f ", Aig_ManCoNum(pAig), Count0, Count0f, Count1, Count1f, 100.0*(Count0+Count1)/Aig_ManCoNum(pAig), 1.0*nTotalLits/(Count0+Count1) ); - Abc_PrintTime( 1, "T", clock() - clk ); + Abc_PrintTime( 1, "T", Abc_Clock() - clk ); Aig_ManCleanMarkAB( pAig ); Aig_ManPackStop( pPack ); Vec_IntFree( vNodes ); diff --git a/src/aig/aig/aigPart.c b/src/aig/aig/aigPart.c index 717f3192..9b978e3b 100644 --- a/src/aig/aig/aigPart.c +++ b/src/aig/aig/aigPart.c @@ -689,20 +689,20 @@ Vec_Ptr_t * Aig_ManPartitionSmart( Aig_Man_t * p, int nSuppSizeLimit, int fVerbo Vec_Ptr_t * vSupports, * vPartsAll, * vPartsAll2, * vPartSuppsAll;//, * vPartPtr; Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp; int i, iPart, iOut; - clock_t clk; + abctime clk; // compute the supports for all outputs -clk = clock(); +clk = Abc_Clock(); vSupports = Aig_ManSupports( p ); if ( fVerbose ) { -ABC_PRT( "Supps", clock() - clk ); +ABC_PRT( "Supps", Abc_Clock() - clk ); } // start char-based support representation vPartSuppsBit = Vec_PtrAlloc( 1000 ); // create partitions -clk = clock(); +clk = Abc_Clock(); vPartsAll = Vec_PtrAlloc( 256 ); vPartSuppsAll = Vec_PtrAlloc( 256 ); Vec_PtrForEachEntry( Vec_Int_t *, vSupports, vOne, i ) @@ -748,10 +748,10 @@ clk = clock(); //printf( "\n" ); if ( fVerbose ) { -ABC_PRT( "Parts", clock() - clk ); +ABC_PRT( "Parts", Abc_Clock() - clk ); } -clk = clock(); +clk = Abc_Clock(); // reorder partitions in the decreasing order of support sizes // remember partition number in each partition support Vec_PtrForEachEntry( Vec_Int_t *, vPartSuppsAll, vOne, i ) @@ -774,7 +774,7 @@ clk = clock(); if ( fVerbose ) { -//ABC_PRT( "Comps", clock() - clk ); +//ABC_PRT( "Comps", Abc_Clock() - clk ); } // cleanup @@ -814,24 +814,24 @@ Vec_Ptr_t * Aig_ManPartitionSmartRegisters( Aig_Man_t * pAig, int nSuppSizeLimit Vec_Ptr_t * vSupports, * vPartsAll, * vPartsAll2, * vPartSuppsAll; Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp; int i, iPart, iOut; - clock_t clk; + abctime clk; // add output number to each -clk = clock(); +clk = Abc_Clock(); vSupports = Aig_ManSupportsRegisters( pAig ); assert( Vec_PtrSize(vSupports) == Aig_ManRegNum(pAig) ); Vec_PtrForEachEntry( Vec_Int_t *, vSupports, vOne, i ) Vec_IntPush( vOne, i ); if ( fVerbose ) { -ABC_PRT( "Supps", clock() - clk ); +ABC_PRT( "Supps", Abc_Clock() - clk ); } // start char-based support representation vPartSuppsBit = Vec_PtrAlloc( 1000 ); // create partitions -clk = clock(); +clk = Abc_Clock(); vPartsAll = Vec_PtrAlloc( 256 ); vPartSuppsAll = Vec_PtrAlloc( 256 ); Vec_PtrForEachEntry( Vec_Int_t *, vSupports, vOne, i ) @@ -877,10 +877,10 @@ clk = clock(); //printf( "\n" ); if ( fVerbose ) { -ABC_PRT( "Parts", clock() - clk ); +ABC_PRT( "Parts", Abc_Clock() - clk ); } -clk = clock(); +clk = Abc_Clock(); // reorder partitions in the decreasing order of support sizes // remember partition number in each partition support Vec_PtrForEachEntry( Vec_Int_t *, vPartSuppsAll, vOne, i ) @@ -903,7 +903,7 @@ clk = clock(); if ( fVerbose ) { -//ABC_PRT( "Comps", clock() - clk ); +//ABC_PRT( "Comps", Abc_Clock() - clk ); } // cleanup diff --git a/src/aig/aig/aigPartSat.c b/src/aig/aig/aigPartSat.c index ec6a6d73..2794e886 100644 --- a/src/aig/aig/aigPartSat.c +++ b/src/aig/aig/aigPartSat.c @@ -498,10 +498,10 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize, Vec_Int_t * vNode2Part, * vNode2Var; int nConfRemaining = nConfTotal, nNodes = 0; int i, status, RetValue = -1; - clock_t clk; + abctime clk; // perform partitioning according to the selected algorithm - clk = clock(); + clk = Abc_Clock(); switch ( nAlgo ) { case 0: @@ -524,7 +524,7 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize, if ( fVerbose ) { printf( "Partitioning derived %d partitions. ", Vec_IntFindMax(vNode2Part) + 1 ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } // split the original AIG into partition AIGs (vAigs) @@ -536,7 +536,7 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize, if ( fVerbose ) { printf( "Partions were transformed into AIGs. " ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } // synthesize partitions @@ -557,7 +557,7 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize, // add partitions, one at a time, and run the SAT solver Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig, i ) { -clk = clock(); +clk = Abc_Clock(); // transform polarity of the AIG if ( fAlignPol ) Aig_ManPartSetNodePolarity( p, pAig, Vec_VecEntryInt(vPio2Id,i) ); @@ -577,7 +577,7 @@ clk = clock(); printf( "%4d : Aig = %6d. Vs = %7d. RootCs = %7d. LearnCs = %6d. ", i, nNodes += Aig_ManNodeNum(pAig), sat_solver_nvars(pSat), (int)pSat->stats.clauses, (int)pSat->stats.learnts ); -ABC_PRT( "Time", clock() - clk ); +ABC_PRT( "Time", Abc_Clock() - clk ); } // analize the result if ( status == l_False ) diff --git a/src/aig/aig/aigRet.c b/src/aig/aig/aigRet.c index c36e8709..fbdee61f 100644 --- a/src/aig/aig/aigRet.c +++ b/src/aig/aig/aigRet.c @@ -839,10 +839,10 @@ Aig_Man_t * Rtm_ManRetime( Aig_Man_t * p, int fForward, int nStepsMax, int fVerb Rtm_Obj_t * pObj, * pNext; Aig_Obj_t * pObjAig; int i, k, nAutos, Degree, DegreeMax = 0; - clock_t clk; + abctime clk; // create the retiming manager -clk = clock(); +clk = Abc_Clock(); pRtm = Rtm_ManFromAig( p ); // set registers Aig_ManForEachLoSeq( p, pObjAig, i ) @@ -855,7 +855,7 @@ clk = clock(); if ( fVerbose ) { printf( "Detected %d autonomous objects. ", nAutos ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } // set the current retiming number @@ -866,7 +866,7 @@ clk = clock(); pObj->Num = 0; } -clk = clock(); +clk = Abc_Clock(); // put the LOs on the queue vQueue = Vec_PtrAlloc( 1000 ); if ( fForward ) @@ -946,7 +946,7 @@ clk = clock(); printf( "Performed %d %s latch moves of max depth %d and max latch count %d.\n", Vec_PtrSize(vQueue), fForward? "fwd":"bwd", DegreeMax, Rtm_ManLatchMax(pRtm) ); printf( "Memory usage = %d. ", pRtm->nExtraCur ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } Vec_PtrFree( vQueue ); @@ -956,11 +956,11 @@ clk = clock(); pNew->pSpec = Abc_UtilStrsav( p->pSpec ); Rtm_ManFree( pRtm ); // group the registers -clk = clock(); +clk = Abc_Clock(); pNew = Aig_ManReduceLaches( pNew, fVerbose ); if ( fVerbose ) { - ABC_PRT( "Register sharing time", clock() - clk ); + ABC_PRT( "Register sharing time", Abc_Clock() - clk ); } return pNew; } diff --git a/src/aig/aig/aigSplit.c b/src/aig/aig/aigSplit.c index 7f89638a..90884b8b 100644 --- a/src/aig/aig/aigSplit.c +++ b/src/aig/aig/aigSplit.c @@ -259,7 +259,7 @@ Aig_Man_t * Aig_ManSplit( Aig_Man_t * p, int nVars, int fVerbose ) DdManager * dd; Vec_Ptr_t * vSupp, * vSubs, * vCofs; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); if ( Saig_ManPoNum(p) != 1 ) { printf( "Currently works only for one primary output.\n" ); @@ -297,7 +297,7 @@ Aig_Man_t * Aig_ManSplit( Aig_Man_t * p, int nVars, int fVerbose ) if ( fVerbose ) printf( "Created %d cofactors (out of %d). ", Saig_ManPoNum(pRes), Vec_PtrSize(vCofs) ); if ( fVerbose ) - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); // dereference Cudd_RecursiveDeref( dd, bFunc ); Vec_PtrForEachEntry( DdNode *, vCofs, bFunc, i ) diff --git a/src/aig/aig/aigTable.c b/src/aig/aig/aigTable.c index abd9960a..2c7adee7 100644 --- a/src/aig/aig/aigTable.c +++ b/src/aig/aig/aigTable.c @@ -71,9 +71,9 @@ void Aig_TableResize( Aig_Man_t * p ) Aig_Obj_t * pEntry, * pNext; Aig_Obj_t ** pTableOld, ** ppPlace; int nTableSizeOld, Counter, i; - clock_t clk; + abctime clk; assert( p->pTable != NULL ); -clk = clock(); +clk = Abc_Clock(); // save the old table pTableOld = p->pTable; nTableSizeOld = p->nTableSize; @@ -97,7 +97,7 @@ clk = clock(); } assert( Counter == Aig_ManNodeNum(p) ); // printf( "Increasing the structural table size from %6d to %6d. ", nTableSizeOld, p->nTableSize ); -// ABC_PRT( "Time", clock() - clk ); +// ABC_PRT( "Time", Abc_Clock() - clk ); // replace the table and the parameters ABC_FREE( pTableOld ); } diff --git a/src/aig/gia/giaAig.c b/src/aig/gia/giaAig.c index 6256b7fd..0128ed91 100644 --- a/src/aig/gia/giaAig.c +++ b/src/aig/gia/giaAig.c @@ -629,7 +629,7 @@ int Gia_ManSolveSat( Gia_Man_t * p ) { // extern int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int fFlipBits, int fAndOuts, int fNewSolver, int fVerbose ); Aig_Man_t * pNew; - int RetValue;//, clk = clock(); + int RetValue;//, clk = Abc_Clock(); pNew = Gia_ManToAig( p, 0 ); RetValue = Fra_FraigSat( pNew, 10000000, 0, 0, 0, 0, 1, 1, 0, 0 ); if ( RetValue == 0 ) @@ -657,7 +657,7 @@ int Gia_ManSolveSat( Gia_Man_t * p ) Abc_Print( 1, "The SAT problem is unsatisfiable. " ); else if ( RetValue == -1 ) Abc_Print( 1, "The SAT problem is undecided. " ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); */ Aig_ManStop( pNew ); return RetValue; diff --git a/src/aig/gia/giaBidec.c b/src/aig/gia/giaBidec.c index 183f0e48..4c807cde 100644 --- a/src/aig/gia/giaBidec.c +++ b/src/aig/gia/giaBidec.c @@ -237,7 +237,7 @@ Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose ) Vec_Int_t * vLeaves, * vTruth, * vVisited; Gia_Man_t * pNew, * pTemp; Gia_Obj_t * pObj; - int i;//, clk = clock(); + int i;//, clk = Abc_Clock(); pPars->nVarsMax = Gia_ManLutSizeMax( p ); pPars->fVerbose = fVerbose; if ( pPars->nVarsMax < 2 ) @@ -291,7 +291,7 @@ Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose ) if ( fVerbose ) { // printf( "Total gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pNew) ); -// ABC_PRT( "Total runtime", clock() - clk ); +// ABC_PRT( "Total runtime", Abc_Clock() - clk ); } return pNew; } diff --git a/src/aig/gia/giaCCof.c b/src/aig/gia/giaCCof.c index fd704635..71a6547d 100644 --- a/src/aig/gia/giaCCof.c +++ b/src/aig/gia/giaCCof.c @@ -221,7 +221,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit ) { int ObjPrev = 0, ConfPrev = 0; int Count = 0, LitOut, RetValue; - clock_t clk; + abctime clk; // try solving for the first time and quit if converged RetValue = sat_solver_solve( p->pSat, &Lit, &Lit + 1, p->nConfMax, 0, 0, 0 ); if ( RetValue == l_False ) @@ -229,7 +229,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit ) // iterate circuit cofactoring while ( RetValue == l_True ) { - clk = clock(); + clk = Abc_Clock(); // derive cofactor LitOut = Gia_ManCofOneDerive( p, Lit ); // add the blocking clause @@ -242,7 +242,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit ) { printf( "%3d : AIG =%7d Conf =%7d. ", Count++, Gia_ManObjNum(p->pFrames) - ObjPrev, sat_solver_nconflicts(p->pSat) - ConfPrev ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); ObjPrev = Gia_ManObjNum(p->pFrames); ConfPrev = sat_solver_nconflicts(p->pSat); } @@ -269,8 +269,8 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n Ccf_Man_t * p; Gia_Obj_t * pObj; int f, i, Lit, RetValue = -1, fFailed = 0; - clock_t nTimeToStop = clock() + nTimeMax * CLOCKS_PER_SEC; - clock_t clk = clock(); + abctime nTimeToStop = Abc_Clock() + nTimeMax * CLOCKS_PER_SEC; + abctime clk = Abc_Clock(); assert( Gia_ManPoNum(pGia) == 1 ); // create reachability manager @@ -310,7 +310,7 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n } // report the result - if ( nTimeToStop && clock() > nTimeToStop ) + if ( nTimeToStop && Abc_Clock() > nTimeToStop ) printf( "Runtime limit (%d sec) is reached after %d frames. ", nTimeMax, f ); else if ( f == nFrameMax ) printf( "Completed %d frames without converging. ", f ); @@ -318,7 +318,7 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n printf( "Backward reachability converged after %d iterations. ", f-1 ); else if ( RetValue == -1 ) printf( "Conflict limit or timeout is reached after %d frames. ", f-1 ); - Abc_PrintTime( 1, "Runtime", clock() - clk ); + Abc_PrintTime( 1, "Runtime", Abc_Clock() - clk ); if ( !fFailed && RetValue == 1 ) printf( "Property holds.\n" ); diff --git a/src/aig/gia/giaCSat.c b/src/aig/gia/giaCSat.c index 6d7df6b5..65cf2961 100644 --- a/src/aig/gia/giaCSat.c +++ b/src/aig/gia/giaCSat.c @@ -81,10 +81,10 @@ struct Cbs_Man_t_ int nConfSat; // conflicts in sat problems int nConfUndec; // conflicts in undec problems // runtime stats - clock_t timeSatUnsat; // unsat - clock_t timeSatSat; // sat - clock_t timeSatUndec; // undecided - clock_t timeTotal; // total runtime + abctime timeSatUnsat; // unsat + abctime timeSatSat; // sat + abctime timeSatUndec; // undecided + abctime timeTotal; // total runtime }; static inline int Cbs_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; } @@ -1004,7 +1004,7 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt Vec_Str_t * vStatus; Gia_Obj_t * pRoot; int i, status; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); assert( Gia_ManRegNum(pAig) == 0 ); // Gia_ManCollectTest( pAig ); // prepare AIG @@ -1043,7 +1043,7 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt } continue; } - clk = clock(); + clk = Abc_Clock(); p->Pars.fUseHighest = 1; p->Pars.fUseLowest = 0; status = Cbs_ManSolve( p, Gia_ObjChild0(pRoot) ); @@ -1062,25 +1062,25 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt p->nSatUndec++; p->nConfUndec += p->Pars.nBTThis; Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout - p->timeSatUndec += clock() - clk; + p->timeSatUndec += Abc_Clock() - clk; continue; } if ( status == 1 ) { p->nSatUnsat++; p->nConfUnsat += p->Pars.nBTThis; - p->timeSatUnsat += clock() - clk; + p->timeSatUnsat += Abc_Clock() - clk; continue; } p->nSatSat++; p->nConfSat += p->Pars.nBTThis; // Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit ); Cec_ManSatAddToStore( vCexStore, vCex, i ); - p->timeSatSat += clock() - clk; + p->timeSatSat += Abc_Clock() - clk; } Vec_IntFree( vVisit ); p->nSatTotal = Gia_ManPoNum(pAig); - p->timeTotal = clock() - clkTotal; + p->timeTotal = Abc_Clock() - clkTotal; if ( fVerbose ) Cbs_ManSatPrintStats( p ); // printf( "RecCalls = %8d. RecClause = %8d. RecNonChro = %8d.\n", p->nRecCall, p->nRecClause, p->nRecNonChro ); diff --git a/src/aig/gia/giaCSatOld.c b/src/aig/gia/giaCSatOld.c index 75b4c3e0..a562c8ae 100644 --- a/src/aig/gia/giaCSatOld.c +++ b/src/aig/gia/giaCSatOld.c @@ -73,10 +73,10 @@ struct Cbs0_Man_t_ int nConfSat; // conflicts in sat problems int nConfUndec; // conflicts in undec problems // runtime stats - clock_t timeSatUnsat; // unsat - clock_t timeSatSat; // sat - clock_t timeSatUndec; // undecided - clock_t timeTotal; // total runtime + abctime timeSatUnsat; // unsat + abctime timeSatSat; // sat + abctime timeSatUndec; // undecided + abctime timeTotal; // total runtime }; static inline int Cbs0_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; } @@ -713,7 +713,7 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat Vec_Str_t * vStatus; Gia_Obj_t * pRoot; int i, status; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); assert( Gia_ManRegNum(pAig) == 0 ); // prepare AIG Gia_ManCreateRefs( pAig ); @@ -747,7 +747,7 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat } continue; } - clk = clock(); + clk = Abc_Clock(); p->Pars.fUseHighest = 1; p->Pars.fUseLowest = 0; status = Cbs0_ManSolve( p, Gia_ObjChild0(pRoot) ); @@ -765,25 +765,25 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat p->nSatUndec++; p->nConfUndec += p->Pars.nBTThis; Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout - p->timeSatUndec += clock() - clk; + p->timeSatUndec += Abc_Clock() - clk; continue; } if ( status == 1 ) { p->nSatUnsat++; p->nConfUnsat += p->Pars.nBTThis; - p->timeSatUnsat += clock() - clk; + p->timeSatUnsat += Abc_Clock() - clk; continue; } p->nSatSat++; p->nConfSat += p->Pars.nBTThis; // Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit ); Cec_ManSatAddToStore( vCexStore, vCex, i ); - p->timeSatSat += clock() - clk; + p->timeSatSat += Abc_Clock() - clk; } Vec_IntFree( vVisit ); p->nSatTotal = Gia_ManPoNum(pAig); - p->timeTotal = clock() - clkTotal; + p->timeTotal = Abc_Clock() - clkTotal; if ( fVerbose ) Cbs0_ManSatPrintStats( p ); Cbs0_ManStop( p ); diff --git a/src/aig/gia/giaCTas.c b/src/aig/gia/giaCTas.c index 79b42c66..73575733 100644 --- a/src/aig/gia/giaCTas.c +++ b/src/aig/gia/giaCTas.c @@ -108,10 +108,10 @@ struct Tas_Man_t_ int nConfSat; // conflicts in sat problems int nConfUndec; // conflicts in undec problems // runtime stats - clock_t timeSatUnsat; // unsat - clock_t timeSatSat; // sat - clock_t timeSatUndec; // undecided - clock_t timeTotal; // total runtime + abctime timeSatUnsat; // unsat + abctime timeSatSat; // sat + abctime timeSatUndec; // undecided + abctime timeTotal; // total runtime }; static inline int Tas_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; } @@ -1525,7 +1525,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt // Gia_Man_t * pAigCopy = Gia_ManDup( pAig ), * pAigTemp; int i, status; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); assert( Gia_ManRegNum(pAig) == 0 ); // Gia_ManCollectTest( pAig ); // prepare AIG @@ -1563,7 +1563,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt } continue; } - clk = clock(); + clk = Abc_Clock(); // p->Pars.fUseActive = 1; p->Pars.fUseHighest = 1; p->Pars.fUseLowest = 0; @@ -1585,7 +1585,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt p->nSatUndec++; p->nConfUndec += p->Pars.nBTThis; Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout - p->timeSatUndec += clock() - clk; + p->timeSatUndec += Abc_Clock() - clk; continue; } @@ -1597,14 +1597,14 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt { p->nSatUnsat++; p->nConfUnsat += p->Pars.nBTThis; - p->timeSatUnsat += clock() - clk; + p->timeSatUnsat += Abc_Clock() - clk; continue; } p->nSatSat++; p->nConfSat += p->Pars.nBTThis; // Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit ); Cec_ManSatAddToStore( vCexStore, vCex, i ); - p->timeSatSat += clock() - clk; + p->timeSatSat += Abc_Clock() - clk; // printf( "%d ", Vec_IntSize(vCex) ); } @@ -1615,7 +1615,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt Vec_IntFree( vVisit ); p->nSatTotal = Gia_ManPoNum(pAig); - p->timeTotal = clock() - clkTotal; + p->timeTotal = Abc_Clock() - clkTotal; if ( fVerbose ) Tas_ManSatPrintStats( p ); // printf( "RecCalls = %8d. RecClause = %8d. RecNonChro = %8d.\n", p->nRecCall, p->nRecClause, p->nRecNonChro ); @@ -1705,7 +1705,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve Vec_Str_t * vStatus; Gia_Obj_t * pRoot, * pOldRoot; int i, status; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); int Tried = 0, Stored = 0, Step = Gia_ManCoNum(pAig) / nPatMax; assert( Gia_ManRegNum(pAig) == 0 ); // Gia_ManCollectTest( pAig ); @@ -1731,7 +1731,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve { assert( !Gia_ObjIsConst0(Gia_ObjFanin0(pRoot)) ); Vec_IntClear( vCex ); - clk = clock(); + clk = Abc_Clock(); p->Pars.fUseHighest = 1; p->Pars.fUseLowest = 0; status = Tas_ManSolve( p, Gia_ObjChild0(pRoot), NULL ); @@ -1741,7 +1741,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve p->nSatUndec++; p->nConfUndec += p->Pars.nBTThis; // Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout - p->timeSatUndec += clock() - clk; + p->timeSatUndec += Abc_Clock() - clk; i += Step; continue; @@ -1750,7 +1750,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve { p->nSatUnsat++; p->nConfUnsat += p->Pars.nBTThis; - p->timeSatUnsat += clock() - clk; + p->timeSatUnsat += Abc_Clock() - clk; // record proved pOldRoot = (Gia_Obj_t *)Vec_PtrEntry( vOldRoots, i ); assert( !Gia_ObjProved( pAigOld, Gia_ObjId(pAigOld, pOldRoot) ) ); @@ -1767,13 +1767,13 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve // save pattern Tried++; Stored += Tas_StorePattern( vSimInfo, vPres, vCex ); - p->timeSatSat += clock() - clk; + p->timeSatSat += Abc_Clock() - clk; i += Step; } printf( "Tried = %d Stored = %d\n", Tried, Stored ); Vec_IntFree( vVisit ); p->nSatTotal = Gia_ManPoNum(pAig); - p->timeTotal = clock() - clkTotal; + p->timeTotal = Abc_Clock() - clkTotal; if ( fVerbose ) Tas_ManSatPrintStats( p ); Tas_ManStop( p ); diff --git a/src/aig/gia/giaCof.c b/src/aig/gia/giaCof.c index 522589aa..ceaa8daa 100644 --- a/src/aig/gia/giaCof.c +++ b/src/aig/gia/giaCof.c @@ -672,7 +672,7 @@ void Cof_ManPrintFanio( Cof_Man_t * p ) void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes ) { Cof_Man_t * p; - clock_t clk = clock(); + abctime clk = Abc_Clock(); p = Cof_ManCreateLogicSimple( pGia ); p->nLevels = 1 + Gia_ManLevelNum( pGia ); p->pLevels = ABC_CALLOC( int, p->nLevels ); @@ -683,7 +683,7 @@ void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes ) Cof_ManPrintHighFanout( p, nNodes ); Gia_ManHashStop( pGia ); ABC_PRMn( "Memory for logic network", 4*p->nObjData ); -ABC_PRT( "Time", clock() - clk ); +ABC_PRT( "Time", Abc_Clock() - clk ); Cof_ManStop( p ); } diff --git a/src/aig/gia/giaCone.c b/src/aig/gia/giaCone.c index ba0a8a2e..cd43a65e 100644 --- a/src/aig/gia/giaCone.c +++ b/src/aig/gia/giaCone.c @@ -559,7 +559,7 @@ Gia_Man_t * Gia_ManFindPoPartition( Gia_Man_t * p, int SelectShift, int fOnlyCis Vec_Wrd_t * vSigns; Vec_Ptr_t * vParts; Vec_Int_t * vPart; - clock_t clk = clock(); + abctime clk = Abc_Clock(); vPivots = Gia_ManFindPivots( p, SelectShift, fOnlyCis, fVerbose ); vSigns = Gia_ManDeriveSigns( p, vPivots, fVerbose ); Vec_IntFree( vPivots ); @@ -574,7 +574,7 @@ Gia_Man_t * Gia_ManFindPoPartition( Gia_Man_t * p, int SelectShift, int fOnlyCis { *pvPosEquivs = vParts; printf( "The algorithm divided %d POs into %d partitions. ", Gia_ManPoNum(p), Vec_PtrSize(vParts) ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); } else Vec_VecFree( (Vec_Vec_t *)vParts ); diff --git a/src/aig/gia/giaDfs.c b/src/aig/gia/giaDfs.c index bb79337f..940eaf46 100644 --- a/src/aig/gia/giaDfs.c +++ b/src/aig/gia/giaDfs.c @@ -210,7 +210,7 @@ void Gia_ManCollectTest( Gia_Man_t * p ) Vec_Int_t * vNodes; Gia_Obj_t * pObj; int i, iNode; - clock_t clk = clock(); + abctime clk = Abc_Clock(); vNodes = Vec_IntAlloc( 100 ); Gia_ManIncrementTravId( p ); Gia_ManForEachCo( p, pObj, i ) @@ -219,7 +219,7 @@ void Gia_ManCollectTest( Gia_Man_t * p ) Gia_ManCollectAnds( p, &iNode, 1, vNodes ); } Vec_IntFree( vNodes ); - ABC_PRT( "DFS from each output", clock() - clk ); + ABC_PRT( "DFS from each output", Abc_Clock() - clk ); } /**Function************************************************************* @@ -277,12 +277,12 @@ int Gia_ManSuppSizeTest( Gia_Man_t * p ) { Gia_Obj_t * pObj; int i, Counter = 0; - clock_t clk = clock(); + abctime clk = Abc_Clock(); Gia_ManForEachObj( p, pObj, i ) if ( Gia_ObjIsAnd(pObj) ) Counter += (Gia_ManSuppSizeOne(p, pObj) <= 16); printf( "Nodes with small support %d (out of %d)\n", Counter, Gia_ManAndNum(p) ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return Counter; } @@ -487,7 +487,7 @@ void Gia_ManCollectSeqTest( Gia_Man_t * p ) { Vec_Int_t * vObjs; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); for ( i = 0; i < Gia_ManPoNum(p); i++ ) { if ( i % 10000 == 0 ) @@ -497,7 +497,7 @@ void Gia_ManCollectSeqTest( Gia_Man_t * p ) // printf( "%d ", Vec_IntSize(vObjs) ); Vec_IntFree( vObjs ); } - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); } diff --git a/src/aig/gia/giaEmbed.c b/src/aig/gia/giaEmbed.c index b6c4655e..b646a311 100644 --- a/src/aig/gia/giaEmbed.c +++ b/src/aig/gia/giaEmbed.c @@ -839,12 +839,12 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p ) { int nAttempts = 20; int i, iNode, Dist; - clock_t clk; + abctime clk; Emb_Obj_t * pPivot, * pNext; Gia_ManRandom( 1 ); Emb_ManResetTravId( p ); // compute distances from several randomly selected PIs - clk = clock(); + clk = Abc_Clock(); printf( "From inputs: " ); for ( i = 0; i < nAttempts; i++ ) { @@ -858,9 +858,9 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p ) Dist = Emb_ManComputeDistance_old( p, pPivot ); printf( "%d ", Dist ); } - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); // compute distances from several randomly selected POs - clk = clock(); + clk = Abc_Clock(); printf( "From outputs: " ); for ( i = 0; i < nAttempts; i++ ) { @@ -872,9 +872,9 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p ) Dist = Emb_ManComputeDistance_old( p, pPivot ); printf( "%d ", Dist ); } - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); // compute distances from several randomly selected nodes - clk = clock(); + clk = Abc_Clock(); printf( "From nodes: " ); for ( i = 0; i < nAttempts; i++ ) { @@ -887,7 +887,7 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p ) Dist = Emb_ManComputeDistance_old( p, pPivot ); printf( "%d ", Dist ); } - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } /**Function************************************************************* @@ -904,11 +904,11 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p ) void Gia_ManTestDistance( Gia_Man_t * pGia ) { Emb_Man_t * p; - clock_t clk = clock(); + abctime clk = Abc_Clock(); p = Emb_ManStart( pGia ); // Emb_ManPrintFanio( p ); Emb_ManPrintStats( p ); -ABC_PRT( "Time", clock() - clk ); +ABC_PRT( "Time", Abc_Clock() - clk ); Gia_ManTestDistanceInternal( p ); Emb_ManStop( p ); } @@ -1530,7 +1530,7 @@ void Emb_ManPlacementRefine( Emb_Man_t * p, int nIters, int fVerbose ) float VertX, VertY; int * pPermX, * pPermY; int i, k, Iter, iMinX, iMaxX, iMinY, iMaxY; - clock_t clk = clock(); + abctime clk = Abc_Clock(); if ( p->pPlacement == NULL ) return; pEdgeX = ABC_ALLOC( float, p->nObjs ); @@ -1585,7 +1585,7 @@ void Emb_ManPlacementRefine( Emb_Man_t * p, int nIters, int fVerbose ) if ( fVerbose ) { printf( "%2d : HPWL = %e ", Iter+1, CostThis ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } } ABC_FREE( pEdgeX ); @@ -1792,12 +1792,12 @@ void Gia_ManSolveProblem( Gia_Man_t * pGia, Emb_Par_t * pPars ) { Emb_Man_t * p; int i; - clock_t clkSetup; - clock_t clk; + abctime clkSetup; + abctime clk; // Gia_ManTestDistance( pGia ); // transform AIG into internal data-structure -clk = clock(); +clk = Abc_Clock(); if ( pPars->fCluster ) { p = Emb_ManStart( pGia ); @@ -1816,41 +1816,41 @@ clk = clock(); Gia_ManRandom( 1 ); // reset random numbers for deterministic behavior Emb_ManResetTravId( p ); Emb_ManSetValue( p ); -clkSetup = clock() - clk; +clkSetup = Abc_Clock() - clk; -clk = clock(); +clk = Abc_Clock(); Emb_ManComputeDimensions( p, pPars->nDims ); if ( pPars->fVerbose ) ABC_PRT( "Setup ", clkSetup ); if ( pPars->fVerbose ) -ABC_PRT( "Dimensions", clock() - clk ); +ABC_PRT( "Dimensions", Abc_Clock() - clk ); -clk = clock(); +clk = Abc_Clock(); Emb_ManComputeCovariance( p, pPars->nDims ); if ( pPars->fVerbose ) -ABC_PRT( "Matrix ", clock() - clk ); +ABC_PRT( "Matrix ", Abc_Clock() - clk ); -clk = clock(); +clk = Abc_Clock(); Emb_ManComputeEigenvectors( p, pPars->nDims, pPars->nSols ); Emb_ManComputeSolutions( p, pPars->nDims, pPars->nSols ); Emb_ManDerivePlacement( p, pPars->nSols ); if ( pPars->fVerbose ) -ABC_PRT( "Eigenvecs ", clock() - clk ); +ABC_PRT( "Eigenvecs ", Abc_Clock() - clk ); if ( pPars->fRefine ) { -clk = clock(); +clk = Abc_Clock(); Emb_ManPlacementRefine( p, pPars->nIters, pPars->fVerbose ); if ( pPars->fVerbose ) -ABC_PRT( "Refinement", clock() - clk ); +ABC_PRT( "Refinement", Abc_Clock() - clk ); } if ( (pPars->fDump || pPars->fDumpLarge) && pPars->nSols == 2 ) { -clk = clock(); +clk = Abc_Clock(); Emb_ManDumpGnuplot( p, pGia->pName, pPars->fDumpLarge, pPars->fShowImage ); if ( pPars->fVerbose ) -ABC_PRT( "Image dump", clock() - clk ); +ABC_PRT( "Image dump", Abc_Clock() - clk ); } // transfer placement diff --git a/src/aig/gia/giaEra.c b/src/aig/gia/giaEra.c index 8f0e2b07..b5b94cb5 100644 --- a/src/aig/gia/giaEra.c +++ b/src/aig/gia/giaEra.c @@ -529,7 +529,7 @@ int Gia_ManCollectReachable( Gia_Man_t * pAig, int nStatesMax, int fMiter, int f Gia_ManEra_t * p; Gia_ObjEra_t * pState; int Hash; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int RetValue = 1; assert( Gia_ManPiNum(pAig) <= 12 ); assert( Gia_ManRegNum(pAig) > 0 ); @@ -571,11 +571,11 @@ int Gia_ManCollectReachable( Gia_Man_t * pAig, int nStatesMax, int fMiter, int f p->iCurState, Vec_PtrSize(p->vStates), 1.0*p->iCurState/Vec_PtrSize(p->vStates), Gia_ManCountDepth(p), (1.0/(1<<20))*(1.0*Vec_PtrSize(p->vStates)*(sizeof(Gia_ObjEra_t) + sizeof(unsigned) * p->nWordsDat) + 1.0*p->nBins*sizeof(unsigned) + 1.0*p->vStates->nCap * sizeof(void*)) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } } printf( "Reachability analysis traversed %d states with depth %d. ", p->iCurState-1, Gia_ManCountDepth(p) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); if ( fDumpFile ) { char * pFileName = "test.stg"; diff --git a/src/aig/gia/giaEra2.c b/src/aig/gia/giaEra2.c index 060c83a5..b8ca65cc 100644 --- a/src/aig/gia/giaEra2.c +++ b/src/aig/gia/giaEra2.c @@ -1537,13 +1537,13 @@ int Gia_ManAreDeriveNexts_rec( Gia_ManAre_t * p, Gia_PtrAre_t Sta ) Vec_Int_t * vLits, * vTfos; Gia_Obj_t * pObj; int i; - clock_t clk; + abctime clk; if ( ++p->nRecCalls == MAX_CALL_NUM ) return 0; if ( (pPivot = Gia_ManAreMostUsedPi(p)) == NULL ) { Gia_StaAre_t * pNew; - clk = clock(); + clk = Abc_Clock(); pNew = Gia_ManAreCreateStaNew( p ); pNew->iPrev = Sta; p->fStopped = (p->fMiter && (Gia_ManCheckPOstatus(p) & 1)); @@ -1554,7 +1554,7 @@ int Gia_ManAreDeriveNexts_rec( Gia_ManAre_t * p, Gia_PtrAre_t Sta ) return 1; } Gia_ManAreCubeProcess( p, pNew ); - p->timeCube += clock() - clk; + p->timeCube += Abc_Clock() - clk; return p->fStopped; } // remember values in the cone and perform update @@ -1613,7 +1613,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta ) Gia_StaAre_t * pSta; Gia_Obj_t * pObj; int i, RetValue; - clock_t clk = clock(); + abctime clk = Abc_Clock(); pSta = Gia_ManAreSta( p, Sta ); if ( Gia_StaIsUnused(pSta) ) return 0; @@ -1657,7 +1657,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta ) } // printf( "%d ", p->nRecCalls ); //printf( "%d ", Gia_ManObjNum(p->pNew) ); - p->timeAig += clock() - clk; + p->timeAig += Abc_Clock() - clk; return RetValue; } @@ -1673,7 +1673,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta ) SeeAlso [] ***********************************************************************/ -void Gia_ManArePrintReport( Gia_ManAre_t * p, clock_t Time, int fFinal ) +void Gia_ManArePrintReport( Gia_ManAre_t * p, abctime Time, int fFinal ) { printf( "States =%10d. Reached =%10d. R = %5.3f. Depth =%6d. Mem =%9.2f MB. ", p->iStaCur, p->nStas, 1.0*p->iStaCur/p->nStas, Gia_ManAreDepth(p, p->iStaCur), @@ -1681,11 +1681,11 @@ void Gia_ManArePrintReport( Gia_ManAre_t * p, clock_t Time, int fFinal ) 4.0*p->nStaPages*p->nSize*MAX_ITEM_NUM + 16.0*p->nObjPages*MAX_ITEM_NUM)/(1<<20) ); if ( fFinal ) { - ABC_PRT( "Time", clock() - Time ); + ABC_PRT( "Time", Abc_Clock() - Time ); } else { - ABC_PRTr( "Time", clock() - Time ); + ABC_PRTr( "Time", Abc_Clock() - Time ); } } @@ -1705,7 +1705,7 @@ int Gia_ManArePerform( Gia_Man_t * pAig, int nStatesMax, int fMiter, int fVerbos // extern Gia_Man_t * Gia_ManCompress2( Gia_Man_t * p, int fUpdateLevel, int fVerbose ); extern Abc_Cex_t * Gia_ManAreDeriveCex( Gia_ManAre_t * p, Gia_StaAre_t * pLast ); Gia_ManAre_t * p; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int RetValue = 1; if ( Gia_ManRegNum(pAig) > MAX_VARS_NUM ) { @@ -1734,22 +1734,22 @@ int Gia_ManArePerform( Gia_Man_t * pAig, int nStatesMax, int fMiter, int fVerbos p->fStopped ? "Stopped" : "Completed", p->nStas, Gia_ManAreListCountUsed(p), Gia_ManAreDepth(p, p->iStaCur-1) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); if ( pAig->pCexSeq != NULL ) Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d.\n", p->iStaCur, pAig->pName, Gia_ManAreDepth(p, p->iStaCur)-1 ); if ( fVerbose ) { - ABC_PRTP( "Cofactoring", p->timeAig - p->timeCube, clock() - clk ); - ABC_PRTP( "Containment", p->timeCube, clock() - clk ); - ABC_PRTP( "Other ", clock() - clk - p->timeAig, clock() - clk ); - ABC_PRTP( "TOTAL ", clock() - clk, clock() - clk ); + ABC_PRTP( "Cofactoring", p->timeAig - p->timeCube, Abc_Clock() - clk ); + ABC_PRTP( "Containment", p->timeCube, Abc_Clock() - clk ); + ABC_PRTP( "Other ", Abc_Clock() - clk - p->timeAig, Abc_Clock() - clk ); + ABC_PRTP( "TOTAL ", Abc_Clock() - clk, Abc_Clock() - clk ); } if ( Gia_ManRegNum(pAig) <= 30 ) { - clk = clock(); + clk = Abc_Clock(); printf( "The number of unique state minterms in computed state cubes is %d. ", Gia_ManCountMinterms(p) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } // printf( "Compares = %d. Equals = %d. Disj = %d. Disj2 = %d. Disj3 = %d.\n", // p->nCompares, p->nEquals, p->nDisjs, p->nDisjs2, p->nDisjs3 ); diff --git a/src/aig/gia/giaForce.c b/src/aig/gia/giaForce.c index d37fa455..0b3003a8 100644 --- a/src/aig/gia/giaForce.c +++ b/src/aig/gia/giaForce.c @@ -714,7 +714,7 @@ Vec_Int_t * Frc_ManCollectCos( Frc_Man_t * p ) void Frc_ManCrossCutTest( Frc_Man_t * p, Vec_Int_t * vOrderInit ) { Vec_Int_t * vOrder; -// clock_t clk = clock(); +// abctime clk = Abc_Clock(); vOrder = vOrderInit? vOrderInit : Frc_ManCollectCos( p ); printf( "CrossCut = %6d\n", Frc_ManCrossCut( p, vOrder, 0 ) ); printf( "CrossCut = %6d\n", Frc_ManCrossCut( p, vOrder, 1 ) ); @@ -724,7 +724,7 @@ void Frc_ManCrossCutTest( Frc_Man_t * p, Vec_Int_t * vOrderInit ) Vec_IntReverseOrder( vOrder ); if ( vOrder != vOrderInit ) Vec_IntFree( vOrder ); -// ABC_PRT( "Time", clock() - clk ); +// ABC_PRT( "Time", Abc_Clock() - clk ); } @@ -892,7 +892,7 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose ) float * pVertX, VertX; int * pPermX, * pHandles; int k, h, Iter, iMinX, iMaxX, Counter, nCutStart, nCutCur, nCutCur2, nCutPrev; - clock_t clk = clock(), clk2, clk2Total = 0; + abctime clk = Abc_Clock(), clk2, clk2Total = 0; // create starting one-dimensional placement vCoOrder = Frc_ManCollectCos( p ); if ( fRandomize ) @@ -930,9 +930,9 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose ) } assert( Counter == Frc_ManObjNum(p) ); // sort these numbers - clk2 = clock(); + clk2 = Abc_Clock(); pPermX = Gia_SortFloats( pVertX, pHandles, p->nObjs ); - clk2Total += clock() - clk2; + clk2Total += Abc_Clock() - clk2; assert( pPermX == pHandles ); Vec_IntClear( vCoOrder ); for ( k = 0; k < p->nObjs; k++ ) @@ -954,7 +954,7 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose ) { printf( "%2d : Span = %e ", Iter+1, CostThis ); printf( "Cut = %6d (%5.2f %%) CutR = %6d ", nCutCur, 100.0*(nCutStart-nCutCur)/nCutStart, nCutCur2 ); - ABC_PRTn( "Total", clock() - clk ); + ABC_PRTn( "Total", Abc_Clock() - clk ); ABC_PRT( "Sort", clk2Total ); // Frc_ManCrossCutTest( p, vCoOrder ); } @@ -1068,7 +1068,7 @@ void For_ManFileExperiment() FILE * pFile; int * pBuffer; int i, Size, Exp = 25; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int RetValue; Size = (1 << Exp); @@ -1077,19 +1077,19 @@ void For_ManFileExperiment() pBuffer = ABC_ALLOC( int, Size ); for ( i = 0; i < Size; i++ ) pBuffer[i] = i; -ABC_PRT( "Fillup", clock() - clk ); +ABC_PRT( "Fillup", Abc_Clock() - clk ); -clk = clock(); +clk = Abc_Clock(); pFile = fopen( "test.txt", "rb" ); RetValue = fread( pBuffer, 1, sizeof(int) * Size, pFile ); fclose( pFile ); -ABC_PRT( "Read ", clock() - clk ); +ABC_PRT( "Read ", Abc_Clock() - clk ); -clk = clock(); +clk = Abc_Clock(); pFile = fopen( "test.txt", "wb" ); fwrite( pBuffer, 1, sizeof(int) * Size, pFile ); fclose( pFile ); -ABC_PRT( "Write ", clock() - clk ); +ABC_PRT( "Write ", Abc_Clock() - clk ); /* 2^25 machine words (134217728 bytes). Fillup = 0.06 sec diff --git a/src/aig/gia/giaFrames.c b/src/aig/gia/giaFrames.c index 23caacc4..ae832af9 100644 --- a/src/aig/gia/giaFrames.c +++ b/src/aig/gia/giaFrames.c @@ -227,7 +227,7 @@ Gia_ManUnr_t * Gia_ManUnrStart( Gia_Man_t * pAig, Gia_ParFra_t * pPars ) Gia_ManUnr_t * p; Gia_Obj_t * pObj; int i, k, iRank, iFanin, Degree, Shift; - clock_t clk = clock(); + abctime clk = Abc_Clock(); p = ABC_CALLOC( Gia_ManUnr_t, 1 ); p->pAig = pAig; @@ -291,7 +291,7 @@ Gia_ManUnr_t * Gia_ManUnrStart( Gia_Man_t * pAig, Gia_ParFra_t * pPars ) Vec_IntSize(p->vLimit) - 1, Gia_ManObjNum(pAig) - Gia_ManObjNum(p->pOrder), 1.0*Vec_IntSize(p->vStore)/Gia_ManObjNum(p->pOrder) - 1.0 ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); } return p; } @@ -608,10 +608,10 @@ Gia_Man_t * Gia_ManUnroll( Gia_ManUnr_t * p ) Gia_Man_t * Gia_ManFrames2( Gia_Man_t * pAig, Gia_ParFra_t * pPars ) { Gia_Man_t * pNew; - clock_t clk = clock(); + abctime clk = Abc_Clock(); pNew = Gia_ManUnroll( pAig, pPars ); if ( pPars->fVerbose ) - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return pNew; } diff --git a/src/aig/gia/giaFront.c b/src/aig/gia/giaFront.c index fc99cfe9..8c7e06e5 100644 --- a/src/aig/gia/giaFront.c +++ b/src/aig/gia/giaFront.c @@ -151,7 +151,7 @@ Gia_Man_t * Gia_ManFront( Gia_Man_t * p ) char * pFront; // places used for the frontier int i, iLit, nCrossCut = 0, nCrossCutMax = 0; int nCrossCutMaxInit = Gia_ManCrossCutSimple( p ); - int iFront = 0;//, clk = clock(); + int iFront = 0;//, clk = Abc_Clock(); // set references for all objects Gia_ManCreateValueRefs( p ); // start the new manager @@ -243,7 +243,7 @@ Gia_Man_t * Gia_ManFront( Gia_Man_t * p ) assert( pFront[i] == 0 ); ABC_FREE( pFront ); //printf( "Crosscut = %6d. Frontier = %6d. ", nCrossCutMaxInit, pNew->nFront ); -//ABC_PRT( "Time", clock() - clk ); +//ABC_PRT( "Time", Abc_Clock() - clk ); Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); return pNew; } diff --git a/src/aig/gia/giaGlitch.c b/src/aig/gia/giaGlitch.c index 2b958cba..cc69f6b3 100644 --- a/src/aig/gia/giaGlitch.c +++ b/src/aig/gia/giaGlitch.c @@ -741,7 +741,7 @@ void Gli_ManSetPiRandomSeq( Gli_Man_t * p, float PiTransProb ) void Gli_ManSwitchesAndGlitches( Gli_Man_t * p, int nPatterns, float PiTransProb, int fVerbose ) { int i, k; - clock_t clk = clock(); + abctime clk = Abc_Clock(); Gia_ManRandom( 1 ); Gli_ManFinalize( p ); if ( p->nRegs == 0 ) @@ -774,7 +774,7 @@ void Gli_ManSwitchesAndGlitches( Gli_Man_t * p, int nPatterns, float PiTransProb { printf( "\nSimulated %d patterns. ", nPatterns ); ABC_PRMn( "Memory", 4*p->nObjData ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } } diff --git a/src/aig/gia/giaIso.c b/src/aig/gia/giaIso.c index fcb7f363..5c03d1d2 100644 --- a/src/aig/gia/giaIso.c +++ b/src/aig/gia/giaIso.c @@ -82,12 +82,12 @@ struct Gia_IsoMan_t_ Vec_Int_t * vClasses; Vec_Int_t * vClasses2; // statistics - clock_t timeStart; - clock_t timeSim; - clock_t timeRefine; - clock_t timeSort; - clock_t timeOther; - clock_t timeTotal; + abctime timeStart; + abctime timeSim; + abctime timeRefine; + abctime timeSort; + abctime timeOther; + abctime timeTotal; }; static inline unsigned Gia_IsoGetValue( Gia_IsoMan_t * p, int i ) { return (unsigned)(p->pStoreW[i]); } @@ -178,7 +178,7 @@ void Gia_IsoPrintClasses( Gia_IsoMan_t * p ) printf( "\n" ); } } -void Gia_IsoPrint( Gia_IsoMan_t * p, int Iter, clock_t Time ) +void Gia_IsoPrint( Gia_IsoMan_t * p, int Iter, abctime Time ) { printf( "Iter %4d : ", Iter ); printf( "Entries =%8d. ", p->nEntries ); @@ -301,7 +301,7 @@ int Gia_IsoSort( Gia_IsoMan_t * p ) Gia_Obj_t * pObj, * pObj0; int i, k, fSameValue, iBegin, iBeginOld, nSize, nSizeNew; int fRefined = 0; - clock_t clk; + abctime clk; // go through the equiv classes p->nSingles = 0; @@ -326,9 +326,9 @@ int Gia_IsoSort( Gia_IsoMan_t * p ) } fRefined = 1; // sort objects - clk = clock(); + clk = Abc_Clock(); Abc_QuickSort3( p->pStoreW + iBegin, nSize, 0 ); - p->timeSort += clock() - clk; + p->timeSort += Abc_Clock() - clk; // divide into new classes iBeginOld = iBegin; pObj0 = Gia_ManObj( p->pGia, Gia_IsoGetItem(p,iBegin) ); @@ -725,7 +725,7 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose Vec_Ptr_t * vEquivs = NULL; int fRefined, fRefinedAll; int i, c; - clock_t clk = clock(), clkTotal = clock(); + abctime clk = Abc_Clock(), clkTotal = Abc_Clock(); assert( Gia_ManCiNum(pGia) > 0 ); assert( Gia_ManPoNum(pGia) > 0 ); @@ -733,9 +733,9 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose p = Gia_IsoManStart( pGia ); Gia_IsoPrepare( p ); Gia_IsoAssignUnique( p ); - p->timeStart = clock() - clk; + p->timeStart = Abc_Clock() - clk; if ( fVerbose ) - Gia_IsoPrint( p, 0, clock() - clkTotal ); + Gia_IsoPrint( p, 0, Abc_Clock() - clkTotal ); // Gia_IsoRecognizeMuxes( pGia ); @@ -744,10 +744,10 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose { for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 ) { - clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk; - clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk; + clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk; + clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk; if ( fVerbose ) - Gia_IsoPrint( p, i+1, clock() - clkTotal ); + Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal ); } } else @@ -759,18 +759,18 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose fRefinedAll = 0; for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 ) { - clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk; - clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk; + clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk; + clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk; if ( fVerbose ) - Gia_IsoPrint( p, i+1, clock() - clkTotal ); + Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal ); fRefinedAll |= fRefined; } for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 ) { - clk = clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += clock() - clk; - clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk; + clk = Abc_Clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += Abc_Clock() - clk; + clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk; if ( fVerbose ) - Gia_IsoPrint( p, i+1, clock() - clkTotal ); + Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal ); fRefinedAll |= fRefined; } } @@ -788,18 +788,18 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose fRefinedAll = 0; for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 ) { - clk = clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += clock() - clk; - clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk; + clk = Abc_Clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += Abc_Clock() - clk; + clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk; if ( fVerbose ) - Gia_IsoPrint( p, i+1, clock() - clkTotal ); + Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal ); fRefinedAll |= fRefined; } for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 ) { - clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk; - clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk; + clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk; + clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk; if ( fVerbose ) - Gia_IsoPrint( p, i+1, clock() - clkTotal ); + Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal ); fRefinedAll |= fRefined; // if ( fRefined ) // printf( "Refinedment happened.\n" ); @@ -808,12 +808,12 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose } if ( fVerbose ) - Gia_IsoPrint( p, i+2, clock() - clkTotal ); + Gia_IsoPrint( p, i+2, Abc_Clock() - clkTotal ); } // Gia_IsoPrintClasses( p ); if ( fVerbose ) { - p->timeTotal = clock() - clkTotal; + p->timeTotal = Abc_Clock() - clkTotal; p->timeOther = p->timeTotal - p->timeStart - p->timeSim - p->timeRefine; ABC_PRTP( "Start ", p->timeStart, p->timeTotal ); ABC_PRTP( "Simulate ", p->timeSim, p->timeTotal ); @@ -1080,7 +1080,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P Vec_Str_t * vStr, * vStr2; int i, k, s, sStart, iPo, Counter; int nClasses, nUsedPos; - clock_t clk = clock(); + abctime clk = Abc_Clock(); if ( pvPosEquivs ) *pvPosEquivs = NULL; if ( pvPiPerms ) @@ -1113,7 +1113,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P nClasses = Vec_IntCountNonTrivial( vEquivs, &nUsedPos ); printf( "Reduced %d outputs to %d candidate classes (%d outputs are in %d non-trivial classes). ", Gia_ManPoNum(p), Vec_PtrSize(vEquivs), nUsedPos, nClasses ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); if ( fEstimate ) { Vec_VecFree( (Vec_Vec_t *)vEquivs ); @@ -1212,7 +1212,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P Gia_ManPoNum(p), Vec_PtrSize(vEquivs), nUsedPos, nClasses ); else printf( "Reduced %d dual outputs to %d dual outputs. ", Gia_ManPoNum(p)/2, Gia_ManPoNum(pPart)/2 ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); if ( fVerbose ) { printf( "Nontrivial classes:\n" ); @@ -1241,10 +1241,10 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P void Gia_IsoTestOld( Gia_Man_t * p, int fVerbose ) { Vec_Ptr_t * vEquivs; - clock_t clk = clock(); + abctime clk = Abc_Clock(); vEquivs = Gia_IsoDeriveEquivPos( p, 0, fVerbose ); printf( "Reduced %d outputs to %d. ", Gia_ManPoNum(p), vEquivs ? Vec_PtrSize(vEquivs) : 1 ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); if ( fVerbose && vEquivs && Gia_ManPoNum(p) != Vec_PtrSize(vEquivs) ) { printf( "Nontrivial classes:\n" ); diff --git a/src/aig/gia/giaIso2.c b/src/aig/gia/giaIso2.c index 17b3ec40..79e0bb10 100644 --- a/src/aig/gia/giaIso2.c +++ b/src/aig/gia/giaIso2.c @@ -89,12 +89,12 @@ struct Gia_Iso2Man_t_ Vec_Int_t * vMap1; // isomorphism map // statistics int nIters; - clock_t timeStart; - clock_t timeSim; - clock_t timeRefine; - clock_t timeSort; - clock_t timeOther; - clock_t timeTotal; + abctime timeStart; + abctime timeSim; + abctime timeRefine; + abctime timeSort; + abctime timeOther; + abctime timeTotal; }; //////////////////////////////////////////////////////////////////////// @@ -245,7 +245,7 @@ void Gia_Iso2ManStop( Gia_Iso2Man_t * p ) Vec_IntFree( p->vVec1 ); ABC_FREE( p ); } -void Gia_Iso2ManPrint( Gia_Iso2Man_t * p, clock_t Time, int fVerbose ) +void Gia_Iso2ManPrint( Gia_Iso2Man_t * p, abctime Time, int fVerbose ) { if ( !fVerbose ) return; @@ -611,25 +611,25 @@ Vec_Wec_t * Gia_Iso2ManCheckIsoClasses( Gia_Man_t * p, Vec_Wec_t * vEquivs ) Vec_Wec_t * Gia_Iso2ManPerform( Gia_Man_t * pGia, int fVerbose ) { Gia_Iso2Man_t * p; - clock_t clk = clock(); + abctime clk = Abc_Clock(); p = Gia_Iso2ManStart( pGia ); Gia_Iso2ManPrepare( pGia ); Gia_Iso2ManPropagate( pGia ); - Gia_Iso2ManPrint( p, clock() - clk, fVerbose ); + Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose ); while ( Gia_Iso2ManUniqify( p ) ) { - Gia_Iso2ManPrint( p, clock() - clk, fVerbose ); + Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose ); Gia_Iso2ManPropagate( pGia ); } - Gia_Iso2ManPrint( p, clock() - clk, fVerbose ); + Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose ); /* Gia_Iso2ManUpdate( p, 20 ); while ( Gia_Iso2ManUniqify( p ) ) { - Gia_Iso2ManPrint( p, clock() - clk, fVerbose ); + Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose ); Gia_Iso2ManPropagate( pGia ); } - Gia_Iso2ManPrint( p, clock() - clk, fVerbose ); + Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose ); */ Gia_Iso2ManStop( p ); return Gia_Iso2ManDerivePoClasses( pGia ); @@ -652,13 +652,13 @@ Gia_Man_t * Gia_ManIsoReduce2( Gia_Man_t * pGia, Vec_Ptr_t ** pvPosEquivs, Vec_P Vec_Wec_t * vEquivs, * vEquivs2; Vec_Int_t * vRemains; int nClasses, nUsedPos; - clock_t clk = clock(); + abctime clk = Abc_Clock(); vEquivs = Gia_Iso2ManPerform( pGia, fVeryVerbose ); // report class stats nClasses = Vec_WecCountNonTrivial( vEquivs, &nUsedPos ); printf( "Reduced %d outputs to %d candidate classes (%d outputs are in %d non-trivial classes). ", Gia_ManPoNum(pGia), Vec_WecSize(vEquivs), nUsedPos, nClasses ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); if ( fEstimate ) { Vec_WecFree( vEquivs ); @@ -677,7 +677,7 @@ Gia_Man_t * Gia_ManIsoReduce2( Gia_Man_t * pGia, Vec_Ptr_t ** pvPosEquivs, Vec_P nClasses = Vec_WecCountNonTrivial( vEquivs, &nUsedPos ); printf( "Reduced %d outputs to %d equivalence classes (%d outputs are in %d non-trivial classes). ", Gia_ManPoNum(pGia), Vec_WecSize(vEquivs), nUsedPos, nClasses ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); if ( fVerbose ) { printf( "Nontrivial classes:\n" ); diff --git a/src/aig/gia/giaRetime.c b/src/aig/gia/giaRetime.c index 3f68c0d1..c229adae 100644 --- a/src/aig/gia/giaRetime.c +++ b/src/aig/gia/giaRetime.c @@ -268,27 +268,27 @@ Gia_Man_t * Gia_ManRetimeForward( Gia_Man_t * p, int nMaxIters, int fVerbose ) { Gia_Man_t * pNew, * pTemp; int i, nRegFixed, nRegMoves = 1; - clock_t clk; + abctime clk; pNew = p; for ( i = 0; i < nMaxIters && nRegMoves > 0; i++ ) { - clk = clock(); + clk = Abc_Clock(); pNew = Gia_ManRetimeForwardOne( pTemp = pNew, &nRegFixed, &nRegMoves ); if ( fVerbose ) { printf( "%2d : And = %6d. Reg = %5d. Unret = %5d. Move = %6d. ", i + 1, Gia_ManAndNum(pTemp), Gia_ManRegNum(pTemp), nRegFixed, nRegMoves ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } if ( pTemp != p ) Gia_ManStop( pTemp ); } /* - clk = clock(); + clk = Abc_Clock(); pNew = Gia_ManReduceLaches( pNew, fVerbose ); if ( fVerbose ) { - ABC_PRT( "Register sharing time", clock() - clk ); + ABC_PRT( "Register sharing time", Abc_Clock() - clk ); } */ return pNew; diff --git a/src/aig/gia/giaShrink.c b/src/aig/gia/giaShrink.c index 65fed129..af727726 100644 --- a/src/aig/gia/giaShrink.c +++ b/src/aig/gia/giaShrink.c @@ -53,7 +53,7 @@ Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose ) Gia_Obj_t * pObj, * pFanin; unsigned * pTruth; int i, k, iFan; - clock_t clk = clock(); + abctime clk = Abc_Clock(); // int ClassCounts[222] = {0}; int * pLutClass, Counter = 0; assert( p->pMapping != NULL ); @@ -139,7 +139,7 @@ Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose ) if ( fVerbose ) { printf( "Total gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pNew) ); - ABC_PRT( "Total runtime", clock() - clk ); + ABC_PRT( "Total runtime", Abc_Clock() - clk ); } ABC_FREE( pLutClass ); return pNew; diff --git a/src/aig/gia/giaShrink6.c b/src/aig/gia/giaShrink6.c index e7873d91..5ca95fd3 100644 --- a/src/aig/gia/giaShrink6.c +++ b/src/aig/gia/giaShrink6.c @@ -402,8 +402,8 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in word uTruth, uTruth0, uTruth1; int i, k, nDivs, iNode; int RetValue, Counter1 = 0, Counter2 = 0; - clock_t clk2, clk = clock(); - clock_t timeFanout = 0; + abctime clk2, clk = Abc_Clock(); + abctime timeFanout = 0; assert( p->pMapping != NULL ); pMan = Shr_ManAlloc( p ); Gia_ManFillValue( p ); @@ -446,10 +446,10 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in Vec_IntWriteEntry( pMan->vLeaves, k, Abc_Lit2Var(pFanin->Value) ); } // compute divisors - clk2 = clock(); + clk2 = Abc_Clock(); nDivs = Shr_ManCollectDivisors( pMan, pMan->vLeaves, pMan->nDivMax, nFanoutMax ); assert( nDivs <= pMan->nDivMax ); - timeFanout += clock() - clk2; + timeFanout += Abc_Clock() - clk2; // compute truth tables Shr_ManComputeTruths( pMan->pNew, Vec_IntSize(pMan->vLeaves), pMan->vDivs, pMan->vDivTruths, pMan->vTruths ); // perform resubstitution @@ -474,7 +474,7 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in { printf( "Performed %d resubs and %d decomps. ", Counter1, Counter2 ); printf( "Gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pMan->pNew) ); - ABC_PRT( "Runtime", clock() - clk ); + ABC_PRT( "Runtime", Abc_Clock() - clk ); // ABC_PRT( "Divisors", timeFanout ); } return Shr_ManFree( pMan ); diff --git a/src/aig/gia/giaSim.c b/src/aig/gia/giaSim.c index 52ffd6e1..4871f17d 100644 --- a/src/aig/gia/giaSim.c +++ b/src/aig/gia/giaSim.c @@ -109,7 +109,7 @@ Vec_Int_t * Gia_ManSimDeriveResets( Gia_Man_t * pGia ) int i, k, Lit, Count; int Counter0 = 0, Counter1 = 0; int CounterPi0 = 0, CounterPi1 = 0; - clock_t clk = clock(); + abctime clk = Abc_Clock(); // create reset counters for each literal vCountLits = Vec_IntStart( 2 * Gia_ManObjNum(pGia) ); @@ -155,7 +155,7 @@ Vec_Int_t * Gia_ManSimDeriveResets( Gia_Man_t * pGia ) Vec_IntFree( vCountLits ); printf( "Logic0 = %d (%d). Logic1 = %d (%d). ", Counter0, CounterPi0, Counter1, CounterPi1 ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return vResult; } @@ -609,9 +609,9 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) { extern int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars ); Gia_ManSim_t * p; - clock_t clkTotal = clock(); + abctime clkTotal = Abc_Clock(); int i, iOut, iPat, RetValue = 0; - clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0; + abctime nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0; if ( pAig->pReprs && pAig->pNexts ) return Gia_ManSimSimulateEquiv( pAig, pPars ); ABC_FREE( pAig->pCexSeq ); @@ -624,7 +624,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) if ( pPars->fVerbose ) { Abc_Print( 1, "Frame %4d out of %4d and timeout %3d sec. ", i+1, pPars->nIters, pPars->TimeLimit ); - Abc_Print( 1, "Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC ); + Abc_Print( 1, "Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC ); } if ( pPars->fCheckMiter && Gia_ManCheckPos( p, &iOut, &iPat ) ) { @@ -648,7 +648,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) RetValue = 1; break; } - if ( clock() > nTimeToStop ) + if ( Abc_Clock() > nTimeToStop ) { i++; break; @@ -659,7 +659,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) Gia_ManSimDelete( p ); if ( pAig->pCexSeq == NULL ) Abc_Print( 1, "No bug detected after simulating %d frames with %d words. ", i, pPars->nWords ); - Abc_PrintTime( 1, "Time", clock() - clkTotal ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal ); return RetValue; } diff --git a/src/aig/gia/giaSim2.c b/src/aig/gia/giaSim2.c index 85428769..349f8732 100644 --- a/src/aig/gia/giaSim2.c +++ b/src/aig/gia/giaSim2.c @@ -639,9 +639,9 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) { Gia_Sim2_t * p; Gia_Obj_t * pObj; - clock_t clkTotal = clock(); + abctime clkTotal = Abc_Clock(); int i, RetValue = 0, iOut, iPat; - clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0; + abctime nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0; assert( pAig->pReprs && pAig->pNexts ); ABC_FREE( pAig->pCexSeq ); p = Gia_Sim2Create( pAig, pPars ); @@ -656,7 +656,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) Abc_Print( 1, "Frame %4d out of %4d and timeout %3d sec. ", i+1, pPars->nIters, pPars->TimeLimit ); if ( pAig->pReprs && pAig->pNexts ) Abc_Print( 1, "Lits = %4d. ", Gia_ManEquivCountLitsAll(pAig) ); - Abc_Print( 1, "Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC ); + Abc_Print( 1, "Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC ); } if ( pPars->fCheckMiter && Gia_Sim2CheckPos( p, &iOut, &iPat ) ) { @@ -682,7 +682,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) } if ( pAig->pReprs && pAig->pNexts ) Gia_Sim2InfoRefineEquivs( p ); - if ( clock() > nTimeToStop ) + if ( Abc_Clock() > nTimeToStop ) { i++; break; @@ -693,7 +693,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) Gia_Sim2Delete( p ); if ( pAig->pCexSeq == NULL ) Abc_Print( 1, "No bug detected after simulating %d frames with %d words. ", i, pPars->nWords ); - Abc_PrintTime( 1, "Time", clock() - clkTotal ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal ); return RetValue; } diff --git a/src/aig/gia/giaSort.c b/src/aig/gia/giaSort.c index 5183c441..7586be65 100644 --- a/src/aig/gia/giaSort.c +++ b/src/aig/gia/giaSort.c @@ -160,27 +160,27 @@ void Gia_SortTest() { int nSize = 100000000; int * pArray; - clock_t clk = clock(); + abctime clk = Abc_Clock(); printf( "Sorting %d integers\n", nSize ); pArray = Gia_SortGetTest( nSize ); -clk = clock(); +clk = Abc_Clock(); qsort( pArray, nSize, 4, (int (*)(const void *, const void *)) num_cmp1 ); -ABC_PRT( "qsort ", clock() - clk ); +ABC_PRT( "qsort ", Abc_Clock() - clk ); Gia_SortVerifySorted( pArray, nSize ); ABC_FREE( pArray ); pArray = Gia_SortGetTest( nSize ); -clk = clock(); +clk = Abc_Clock(); minisat_sort( pArray, nSize, (int (*)(const void *, const void *)) num_cmp2 ); -ABC_PRT( "minisat", clock() - clk ); +ABC_PRT( "minisat", Abc_Clock() - clk ); Gia_SortVerifySorted( pArray, nSize ); ABC_FREE( pArray ); pArray = Gia_SortGetTest( nSize ); -clk = clock(); +clk = Abc_Clock(); minisat_sort2( pArray, nSize ); -ABC_PRT( "minisat with inlined comparison", clock() - clk ); +ABC_PRT( "minisat with inlined comparison", Abc_Clock() - clk ); Gia_SortVerifySorted( pArray, nSize ); ABC_FREE( pArray ); } diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c index 5ff05a37..f1295990 100644 --- a/src/aig/gia/giaSweeper.c +++ b/src/aig/gia/giaSweeper.c @@ -83,13 +83,13 @@ struct Swp_Man_t_ int nSatCallsUnsat; int nSatCallsUndec; int nSatProofs; - clock_t timeStart; - clock_t timeTotal; - clock_t timeCnf; - clock_t timeSat; - clock_t timeSatSat; - clock_t timeSatUnsat; - clock_t timeSatUndec; + abctime timeStart; + abctime timeTotal; + abctime timeCnf; + abctime timeSat; + abctime timeSatSat; + abctime timeSatUnsat; + abctime timeSatUndec; }; static inline int Swp_ManObj2Lit( Swp_Man_t * p, int Id ) { return Vec_IntGetEntry( p->vId2Lit, Id ); } @@ -134,7 +134,7 @@ static inline Swp_Man_t * Swp_ManStart( Gia_Man_t * pGia ) Swp_ManSetObj2Lit( p, 0, (Lit = Abc_Var2Lit(p->nSatVars++, 0)) ); Lit = Abc_LitNot(Lit); sat_solver_addclause( p->pSat, &Lit, &Lit + 1 ); - p->timeStart = clock(); + p->timeStart = Abc_Clock(); return p; } static inline void Swp_ManStop( Gia_Man_t * pGia ) @@ -205,7 +205,7 @@ void Gia_SweeperPrintStats( Gia_Man_t * pGia ) ABC_PRMP( "SAT solver ", nMemSat, nMemTot ); ABC_PRMP( "TOTAL ", nMemTot, nMemTot ); printf( "Runtime usage:\n" ); - p->timeTotal = clock() - p->timeStart; + p->timeTotal = Abc_Clock() - p->timeStart; ABC_PRTP( "CNF construction", p->timeCnf, p->timeTotal ); ABC_PRTP( "SAT solving ", p->timeSat, p->timeTotal ); ABC_PRTP( " Sat ", p->timeSatSat, p->timeTotal ); @@ -492,7 +492,7 @@ Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime ) Swp_ManSetObj2Lit( pSwp, 0, (iLit = Abc_Var2Lit(pSwp->nSatVars++, 0)) ); iLit = Abc_LitNot(iLit); sat_solver_addclause( pSwp->pSat, &iLit, &iLit + 1 ); - pSwp->timeStart = clock(); + pSwp->timeStart = Abc_Clock(); // return the result pNew->pData = p->pData; p->pData = NULL; Gia_ManStop( p ); @@ -673,11 +673,11 @@ static void Gia_ManCnfNodeAddToSolver( Swp_Man_t * p, int NodeId ) { Gia_Obj_t * pNode; int i, k, Id, Lit; - clock_t clk; + abctime clk; // quit if CNF is ready if ( NodeId == 0 || Swp_ManObj2Lit(p, NodeId) ) return; -clk = clock(); +clk = Abc_Clock(); // start the frontier Vec_IntClear( p->vFront ); Gia_ManObjAddToFrontier( p, NodeId, p->vFront ); @@ -706,7 +706,7 @@ clk = clock(); } assert( Vec_IntSize(p->vFanins) > 1 ); } -p->timeCnf += clock() - clk; +p->timeCnf += Abc_Clock() - clk; } @@ -756,7 +756,7 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 ) { Swp_Man_t * p = (Swp_Man_t *)pGia->pData; int iLitOld, iLitNew, iLitAig, pLitsSat[2], RetValue, RetValue1, ProbeId, i; - clock_t clk; + abctime clk; p->nSatCalls++; assert( p->pSat != NULL ); p->vCexUser = NULL; @@ -802,32 +802,32 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 ) // set runtime limit for this call if ( p->nTimeOut ) - sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + clock() ); + sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() ); -clk = clock(); +clk = Abc_Clock(); RetValue1 = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump), (ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 ); Vec_IntShrink( p->vCondAssump, Vec_IntSize(p->vCondAssump) - 2 ); -p->timeSat += clock() - clk; +p->timeSat += Abc_Clock() - clk; if ( RetValue1 == l_False ) { pLitsSat[0] = Abc_LitNot( pLitsSat[0] ); RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 ); assert( RetValue ); pLitsSat[0] = Abc_LitNot( pLitsSat[0] ); -p->timeSatUnsat += clock() - clk; +p->timeSatUnsat += Abc_Clock() - clk; p->nSatCallsUnsat++; } else if ( RetValue1 == l_True ) { p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp ); -p->timeSatSat += clock() - clk; +p->timeSatSat += Abc_Clock() - clk; p->nSatCallsSat++; return 0; } else // if ( RetValue1 == l_Undef ) { -p->timeSatUndec += clock() - clk; +p->timeSatUndec += Abc_Clock() - clk; p->nSatCallsUndec++; return -1; } @@ -844,30 +844,30 @@ p->timeSatUndec += clock() - clk; Vec_IntPush( p->vCondAssump, Abc_LitNot(pLitsSat[0]) ); Vec_IntPush( p->vCondAssump, pLitsSat[1] ); -clk = clock(); +clk = Abc_Clock(); RetValue1 = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump), (ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 ); Vec_IntShrink( p->vCondAssump, Vec_IntSize(p->vCondAssump) - 2 ); -p->timeSat += clock() - clk; +p->timeSat += Abc_Clock() - clk; if ( RetValue1 == l_False ) { pLitsSat[1] = Abc_LitNot( pLitsSat[1] ); RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 ); assert( RetValue ); pLitsSat[1] = Abc_LitNot( pLitsSat[1] ); -p->timeSatUnsat += clock() - clk; +p->timeSatUnsat += Abc_Clock() - clk; p->nSatCallsUnsat++; } else if ( RetValue1 == l_True ) { p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp ); -p->timeSatSat += clock() - clk; +p->timeSatSat += Abc_Clock() - clk; p->nSatCallsSat++; return 0; } else // if ( RetValue1 == l_Undef ) { -p->timeSatUndec += clock() - clk; +p->timeSatUndec += Abc_Clock() - clk; p->nSatCallsUndec++; return -1; } @@ -891,7 +891,7 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia ) { Swp_Man_t * p = (Swp_Man_t *)pGia->pData; int RetValue, ProbeId, iLitAig, i; - clock_t clk; + abctime clk; assert( p->pSat != NULL ); p->nSatCalls++; p->vCexUser = NULL; @@ -908,16 +908,16 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia ) // set runtime limit for this call if ( p->nTimeOut ) - sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + clock() ); + sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() ); -clk = clock(); +clk = Abc_Clock(); RetValue = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump), (ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 ); -p->timeSat += clock() - clk; +p->timeSat += Abc_Clock() - clk; if ( RetValue == l_False ) { assert( Vec_IntSize(p->vCondProbes) > 0 ); -p->timeSatUnsat += clock() - clk; +p->timeSatUnsat += Abc_Clock() - clk; p->nSatCallsUnsat++; p->nSatProofs++; return 1; @@ -925,13 +925,13 @@ p->timeSatUnsat += clock() - clk; else if ( RetValue == l_True ) { p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp ); -p->timeSatSat += clock() - clk; +p->timeSatSat += Abc_Clock() - clk; p->nSatCallsSat++; return 0; } else // if ( RetValue1 == l_Undef ) { -p->timeSatUndec += clock() - clk; +p->timeSatUndec += Abc_Clock() - clk; p->nSatCallsUndec++; return -1; } diff --git a/src/aig/gia/giaSwitch.c b/src/aig/gia/giaSwitch.c index 8bf027a4..d5307461 100644 --- a/src/aig/gia/giaSwitch.c +++ b/src/aig/gia/giaSwitch.c @@ -560,11 +560,11 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars ) Vec_Int_t * vSwitching; float * pSwitching; int i; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); if ( pPars->fProbOne && pPars->fProbTrans ) printf( "Conflict of options: Can either compute probability of 1, or probability of switching by observing transitions.\n" ); // create manager - clk = clock(); + clk = Abc_Clock(); p = Gia_ManSwiCreate( pAig, pPars ); if ( pPars->fVerbose ) { @@ -574,7 +574,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars ) 12.0*Gia_ManObjNum(p->pAig)/(1<<20), 4.0*p->nWords*p->pAig->nFront/(1<<20), 4.0*p->nWords*(Gia_ManCiNum(p->pAig) + Gia_ManCoNum(p->pAig))/(1<<20) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } // perform simulation Gia_ManRandom( 1 ); @@ -592,7 +592,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars ) if ( pPars->fVerbose ) { printf( "Simulated %d frames with %d words. ", pPars->nIters, pPars->nWords ); - ABC_PRT( "Simulation time", clock() - clkTotal ); + ABC_PRT( "Simulation time", Abc_Clock() - clkTotal ); } // derive the result vSwitching = Vec_IntStart( Gia_ManObjNum(pAig) ); diff --git a/src/aig/gia/giaTest.c b/src/aig/gia/giaTest.c index c41e5013..d662382d 100644 --- a/src/aig/gia/giaTest.c +++ b/src/aig/gia/giaTest.c @@ -379,7 +379,7 @@ void Mig_ManSetRefs( Mig_Man_t * p ) { Mig_Obj_t * pObj; int i, iFanin; - clock_t clk = clock(); + abctime clk = Abc_Clock(); Vec_IntFill( &p->vRefs, Mig_ManObjNum(p), 0 ); // increment references Mig_ManForEachObj( p, pObj ) @@ -389,7 +389,7 @@ void Mig_ManSetRefs( Mig_Man_t * p ) // check that internal nodes have fanins Mig_ManForEachNode( p, pObj ) assert( Vec_IntEntry(&p->vRefs, Mig_ObjId(pObj)) > 0 ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); } /**Function************************************************************* @@ -443,12 +443,12 @@ int Mig_ManSuppSizeTest( Mig_Man_t * p ) { Mig_Obj_t * pObj; int Counter = 0; - clock_t clk = clock(); + abctime clk = Abc_Clock(); Mig_ManForEachObj( p, pObj ) if ( Mig_ObjIsNode(pObj) ) Counter += (Mig_ManSuppSizeOne(pObj) <= 16); printf( "Nodes with small support %d (out of %d)\n", Counter, Mig_ManNodeNum(p) ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return Counter; } @@ -1343,13 +1343,13 @@ finish: void Mpm_ManPerform( Mpm_Man_t * p ) { Mig_Obj_t * pObj; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int i; Mig_ManForEachCi( p->pMig, pObj, i ) Mpm_ManObj(p, pObj)->iCutList = Mpm_CutCreateUnit( p, pObj ); Mig_ManForEachNode( p->pMig, pObj ) Mpm_ManDeriveCuts( p, pObj ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); } void Mpm_ManPerformTest( Mig_Man_t * pMig ) { diff --git a/src/aig/gia/giaTruth.c b/src/aig/gia/giaTruth.c index 3f09d480..26a380d7 100644 --- a/src/aig/gia/giaTruth.c +++ b/src/aig/gia/giaTruth.c @@ -223,14 +223,14 @@ void Gia_ObjComputeTruthTableTest( Gia_Man_t * p ) { Gia_Obj_t * pObj; unsigned * pTruth; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int i; Gia_ManForEachPo( p, pObj, i ) { pTruth = (unsigned *)Gia_ObjComputeTruthTable( p, pObj ); // Extra_PrintHex( stdout, pTruth, Gia_ManPiNum(p) ); printf( "\n" ); } - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); } diff --git a/src/aig/gia/giaTsim.c b/src/aig/gia/giaTsim.c index 4a3d5342..7f93c542 100644 --- a/src/aig/gia/giaTsim.c +++ b/src/aig/gia/giaTsim.c @@ -670,10 +670,10 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose ) Gia_ManTer_t * p; unsigned * pState, * pPrev, * pLoop; int i, Counter; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); assert( Gia_ManRegNum(pAig) > 0 ); // create manager - clk = clock(); + clk = Abc_Clock(); p = Gia_ManTerCreate( pAig ); if ( 0 ) { @@ -683,7 +683,7 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose ) 12.0*Gia_ManObjNum(p->pAig)/(1<<20), 4.0*Abc_BitWordNum(2 * p->pAig->nFront)/(1<<20), 4.0*Abc_BitWordNum(2 * (Gia_ManCiNum(pAig) + Gia_ManCoNum(pAig)))/(1<<20) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } // perform simulation Gia_ManTerSimInfoInit( p ); @@ -718,7 +718,7 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose ) if ( fVerbose ) { printf( "Ternary simulation saturated after %d iterations. ", i+1 ); - ABC_PRT( "Time", clock() - clkTotal ); + ABC_PRT( "Time", Abc_Clock() - clkTotal ); } return p; } diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c index 10bfa154..bec23f8c 100644 --- a/src/aig/gia/giaUtil.c +++ b/src/aig/gia/giaUtil.c @@ -1255,7 +1255,7 @@ unsigned * Gia_ManComputePoTruthTables( Gia_Man_t * p, int nBytesMax ) int nTotalNodes = 0, nRounds = 0; Vec_Int_t * vObjs; Gia_Obj_t * pObj; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int i; printf( "Var = %d. Words = %d. Truths = %d.\n", nVars, nTruthWords, nTruths ); vObjs = Vec_IntAlloc( nTruths ); @@ -1277,7 +1277,7 @@ unsigned * Gia_ManComputePoTruthTables( Gia_Man_t * p, int nBytesMax ) Vec_IntFree( vObjs ); printf( "Rounds = %d. Objects = %d. Total = %d. ", nRounds, Gia_ManObjNum(p), nTotalNodes ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return NULL; } @@ -1427,8 +1427,8 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi Vec_Int_t * vOutMap; Vec_Ptr_t * vCexes; int i, k, nGroupCur, nGroups; - clock_t clk, timeComm = 0; - clock_t timeStart = clock(); + abctime clk, timeComm = 0; + abctime timeStart = Abc_Clock(); // pre-conditions assert( nGroupSize > 0 ); assert( pCommLine != NULL ); @@ -1448,9 +1448,9 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi // set the current GIA Abc_FrameUpdateGia( pAbc, pGroup ); // solve the group - clk = clock(); + clk = Abc_Clock(); Cmd_CommandExecute( pAbc, pCommLine ); - timeComm += clock() - clk; + timeComm += Abc_Clock() - clk; // get the solution status if ( nGroupSize == 1 ) { @@ -1485,7 +1485,7 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi Abc_Print( 1, "UNDEC = %6d. ", Vec_IntCountEntry(vOutMap, -1) ); Abc_Print( 1, "\n" ); Abc_PrintTime( 1, "Command time", timeComm ); - Abc_PrintTime( 1, "Total time ", clock() - timeStart ); + Abc_PrintTime( 1, "Total time ", Abc_Clock() - timeStart ); // cleanup Vec_IntFree( vOuts ); Gia_ManStop( p ); diff --git a/src/aig/hop/hop.h b/src/aig/hop/hop.h index d8ce8062..7d9be165 100644 --- a/src/aig/hop/hop.h +++ b/src/aig/hop/hop.h @@ -106,8 +106,8 @@ struct Hop_Man_t_ Vec_Ptr_t * vPages; // memory pages used by nodes Hop_Obj_t * pListFree; // the list of free nodes // timing statistics - clock_t time1; - clock_t time2; + abctime time1; + abctime time2; }; //////////////////////////////////////////////////////////////////////// diff --git a/src/aig/hop/hopTable.c b/src/aig/hop/hopTable.c index 1adab015..14e87699 100644 --- a/src/aig/hop/hopTable.c +++ b/src/aig/hop/hopTable.c @@ -168,8 +168,8 @@ void Hop_TableResize( Hop_Man_t * p ) Hop_Obj_t * pEntry, * pNext; Hop_Obj_t ** pTableOld, ** ppPlace; int nTableSizeOld, Counter, nEntries, i; - clock_t clk; -clk = clock(); + abctime clk; +clk = Abc_Clock(); // save the old table pTableOld = p->pTable; nTableSizeOld = p->nTableSize; @@ -193,7 +193,7 @@ clk = clock(); nEntries = Hop_ManNodeNum(p); assert( Counter == nEntries ); // printf( "Increasing the structural table size from %6d to %6d. ", nTableSizeOld, p->nTableSize ); -// ABC_PRT( "Time", clock() - clk ); +// ABC_PRT( "Time", Abc_Clock() - clk ); // replace the table and the parameters ABC_FREE( pTableOld ); } diff --git a/src/aig/ivy/ivy.h b/src/aig/ivy/ivy.h index 1cce1217..c2bbd5ab 100644 --- a/src/aig/ivy/ivy.h +++ b/src/aig/ivy/ivy.h @@ -125,8 +125,8 @@ struct Ivy_Man_t_ Vec_Ptr_t * vPages; // memory pages used by nodes Ivy_Obj_t * pListFree; // the list of free nodes // timing statistics - clock_t time1; - clock_t time2; + abctime time1; + abctime time2; }; struct Ivy_FraigParams_t_ diff --git a/src/aig/ivy/ivyCut.c b/src/aig/ivy/ivyCut.c index 19d37bb2..5b5957ed 100644 --- a/src/aig/ivy/ivyCut.c +++ b/src/aig/ivy/ivyCut.c @@ -969,7 +969,7 @@ void Ivy_ManTestCutsAll( Ivy_Man_t * p ) { Ivy_Obj_t * pObj; int i, nCutsCut, nCutsTotal, nNodeTotal, nNodeOver; - clock_t clk = clock(); + abctime clk = Abc_Clock(); nNodeTotal = nNodeOver = 0; nCutsTotal = -Ivy_ManNodeNum(p); Ivy_ManForEachObj( p, pObj, i ) @@ -983,7 +983,7 @@ void Ivy_ManTestCutsAll( Ivy_Man_t * p ) } printf( "Total cuts = %6d. Trivial = %6d. Nodes = %6d. Satur = %6d. ", nCutsTotal, Ivy_ManPiNum(p) + Ivy_ManNodeNum(p), nNodeTotal, nNodeOver ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } //////////////////////////////////////////////////////////////////////// diff --git a/src/aig/ivy/ivyCutTrav.c b/src/aig/ivy/ivyCutTrav.c index 5834a6fc..75acd260 100644 --- a/src/aig/ivy/ivyCutTrav.c +++ b/src/aig/ivy/ivyCutTrav.c @@ -439,7 +439,7 @@ void Ivy_ManTestCutsTravAll( Ivy_Man_t * p ) Vec_Int_t * vStore; Vec_Vec_t * vBitCuts; int i, nCutsCut, nCutsTotal, nNodeTotal, nNodeOver; - clock_t clk = clock(); + abctime clk = Abc_Clock(); vNodes = Vec_PtrAlloc( 100 ); vFront = Vec_PtrAlloc( 100 ); @@ -460,7 +460,7 @@ void Ivy_ManTestCutsTravAll( Ivy_Man_t * p ) } printf( "Total cuts = %6d. Trivial = %6d. Nodes = %6d. Satur = %6d. ", nCutsTotal, Ivy_ManPiNum(p) + Ivy_ManNodeNum(p), nNodeTotal, nNodeOver ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); Vec_PtrFree( vNodes ); Vec_PtrFree( vFront ); diff --git a/src/aig/ivy/ivyFastMap.c b/src/aig/ivy/ivyFastMap.c index 34d2796e..b8322b3f 100644 --- a/src/aig/ivy/ivyFastMap.c +++ b/src/aig/ivy/ivyFastMap.c @@ -67,7 +67,7 @@ static inline Ivy_Supp_t * Ivy_ObjSuppStart( Ivy_Man_t * pAig, Ivy_Obj_t * pObj return pSupp; } -static void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, clock_t Time, char * pStr ); +static void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, abctime Time, char * pStr ); static int Ivy_FastMapDelay( Ivy_Man_t * pAig ); static int Ivy_FastMapArea( Ivy_Man_t * pAig ); static void Ivy_FastMapNode( Ivy_Man_t * pAig, Ivy_Obj_t * pObj, int nLimit ); @@ -83,7 +83,7 @@ static int Ivy_FastMapNodeRef( Ivy_Man_t * pAig, Ivy_Obj_t * pObj ); static int Ivy_FastMapNodeDeref( Ivy_Man_t * pAig, Ivy_Obj_t * pObj ); -extern clock_t s_MappingTime; +extern abctime s_MappingTime; extern int s_MappingMem; @@ -107,7 +107,7 @@ void Ivy_FastMapPerform( Ivy_Man_t * pAig, int nLimit, int fRecovery, int fVerbo Ivy_SuppMan_t * pMan; Ivy_Obj_t * pObj; int i, Delay, Area; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); // start the memory for supports pMan = ABC_ALLOC( Ivy_SuppMan_t, 1 ); memset( pMan, 0, sizeof(Ivy_SuppMan_t) ); @@ -118,7 +118,7 @@ void Ivy_FastMapPerform( Ivy_Man_t * pAig, int nLimit, int fRecovery, int fVerbo memset( pMan->pMem, 0, pMan->nObjs * pMan->nSize ); pMan->vLuts = Vec_VecAlloc( 100 ); pAig->pData = pMan; -clk = clock(); +clk = Abc_Clock(); // set the PI mapping Ivy_ObjSuppStart( pAig, Ivy_ManConst1(pAig) ); Ivy_ManForEachPi( pAig, pObj, i ) @@ -130,22 +130,22 @@ clk = clock(); Delay = Ivy_FastMapDelay( pAig ); Area = Ivy_FastMapArea(pAig); if ( fVerbose ) - Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Delay oriented mapping: " ); + Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Delay oriented mapping: " ); // 2-1-2 (doing 2-1-2-1-2 improves 0.5%) if ( fRecovery ) { -clk = clock(); +clk = Abc_Clock(); Ivy_FastMapRequired( pAig, Delay, 0 ); // remap the nodes Ivy_FastMapRecover( pAig, nLimit ); Delay = Ivy_FastMapDelay( pAig ); Area = Ivy_FastMapArea(pAig); if ( fVerbose ) - Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Area recovery 2 : " ); + Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Area recovery 2 : " ); -clk = clock(); +clk = Abc_Clock(); Ivy_FastMapRequired( pAig, Delay, 0 ); // iterate through all nodes in the topological order Ivy_ManForEachNode( pAig, pObj, i ) @@ -153,20 +153,20 @@ clk = clock(); Delay = Ivy_FastMapDelay( pAig ); Area = Ivy_FastMapArea(pAig); if ( fVerbose ) - Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Area recovery 1 : " ); + Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Area recovery 1 : " ); -clk = clock(); +clk = Abc_Clock(); Ivy_FastMapRequired( pAig, Delay, 0 ); // remap the nodes Ivy_FastMapRecover( pAig, nLimit ); Delay = Ivy_FastMapDelay( pAig ); Area = Ivy_FastMapArea(pAig); if ( fVerbose ) - Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Area recovery 2 : " ); + Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Area recovery 2 : " ); } - s_MappingTime = clock() - clkTotal; + s_MappingTime = Abc_Clock() - clkTotal; s_MappingMem = pMan->nObjs * pMan->nSize; /* { @@ -211,7 +211,7 @@ void Ivy_FastMapStop( Ivy_Man_t * pAig ) SeeAlso [] ***********************************************************************/ -void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, clock_t Time, char * pStr ) +void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, abctime Time, char * pStr ) { printf( "%s : Delay = %3d. Area = %6d. ", pStr, Delay, Area ); ABC_PRT( "Time", Time ); diff --git a/src/aig/ivy/ivyFraig.c b/src/aig/ivy/ivyFraig.c index 776a41b3..4a1487e7 100644 --- a/src/aig/ivy/ivyFraig.c +++ b/src/aig/ivy/ivyFraig.c @@ -93,16 +93,16 @@ struct Ivy_FraigMan_t_ int nSatFails; int nSatFailsReal; // runtime - clock_t timeSim; - clock_t timeTrav; - clock_t timeSat; - clock_t timeSatUnsat; - clock_t timeSatSat; - clock_t timeSatFail; - clock_t timeRef; - clock_t timeTotal; - clock_t time1; - clock_t time2; + abctime timeSim; + abctime timeTrav; + abctime timeSat; + abctime timeSatUnsat; + abctime timeSatSat; + abctime timeSatFail; + abctime timeRef; + abctime timeTotal; + abctime time1; + abctime time2; }; typedef struct Prove_ParamsStruct_t_ Prove_Params_t; @@ -198,7 +198,7 @@ static int Ivy_FraigSetActivityFactors( Ivy_FraigMan_t * p, Ivy_Obj_t static void Ivy_FraigAddToPatScores( Ivy_FraigMan_t * p, Ivy_Obj_t * pClass, Ivy_Obj_t * pClassNew ); static int Ivy_FraigMiterStatus( Ivy_Man_t * pMan ); static void Ivy_FraigMiterProve( Ivy_FraigMan_t * p ); -static void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, clock_t clk, int fVerbose ); +static void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, abctime clk, int fVerbose ); static int * Ivy_FraigCreateModel( Ivy_FraigMan_t * p ); static int Ivy_FraigNodesAreEquivBdd( Ivy_Obj_t * pObj1, Ivy_Obj_t * pObj2 ); @@ -258,7 +258,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars ) Ivy_FraigParams_t Params, * pIvyParams = &Params; Ivy_Man_t * pManAig, * pManTemp; int RetValue, nIter; - clock_t clk;//, Counter; + abctime clk;//, Counter; ABC_INT64_T nSatConfs = 0, nSatInspects = 0; // start the network and parameters @@ -280,7 +280,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars ) // if SAT only, solve without iteration if ( !pParams->fUseRewriting && !pParams->fUseFraiging ) { - clk = clock(); + clk = Abc_Clock(); pIvyParams->nBTLimitMiter = pParams->nMiteringLimitLast / Ivy_ManPoNum(pManAig); pManAig = Ivy_FraigMiter( pManTemp = pManAig, pIvyParams ); Ivy_ManStop( pManTemp ); RetValue = Ivy_FraigMiterStatus( pManAig ); @@ -292,7 +292,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars ) if ( Ivy_ManNodeNum(pManAig) < 500 ) { // run the first mitering - clk = clock(); + clk = Abc_Clock(); pIvyParams->nBTLimitMiter = pParams->nMiteringLimitStart / Ivy_ManPoNum(pManAig); pManAig = Ivy_FraigMiter( pManTemp = pManAig, pIvyParams ); Ivy_ManStop( pManTemp ); RetValue = Ivy_FraigMiterStatus( pManAig ); @@ -320,7 +320,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars ) if ( pParams->fUseRewriting ) { // bug in Ivy_NodeFindCutsAll() when leaves are identical! /* - clk = clock(); + clk = Abc_Clock(); Counter = (int)(pParams->nRewritingLimitStart * pow(pParams->nRewritingLimitMulti,nIter)); pManAig = Ivy_ManRwsat( pManAig, 0 ); RetValue = Ivy_FraigMiterStatus( pManAig ); @@ -338,7 +338,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars ) // try fraiging followed by mitering if ( pParams->fUseFraiging ) { - clk = clock(); + clk = Abc_Clock(); pIvyParams->nBTLimitNode = (int)(pParams->nFraigingLimitStart * pow(pParams->nFraigingLimitMulti,nIter)); pIvyParams->nBTLimitMiter = 1 + (int)(pParams->nMiteringLimitStart * pow(pParams->nMiteringLimitMulti,nIter)) / Ivy_ManPoNum(pManAig); pManAig = Ivy_FraigPerform_int( pManTemp = pManAig, pIvyParams, pParams->nTotalBacktrackLimit, pParams->nTotalInspectLimit, &nSatConfs, &nSatInspects ); Ivy_ManStop( pManTemp ); @@ -368,7 +368,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars ) printf( "Attempting SAT with conflict limit %d ...\n", pParams->nMiteringLimitLast ); fflush( stdout ); } - clk = clock(); + clk = Abc_Clock(); pIvyParams->nBTLimitMiter = pParams->nMiteringLimitLast / Ivy_ManPoNum(pManAig); if ( pParams->nTotalBacktrackLimit ) s_nBTLimitGlobal = pParams->nTotalBacktrackLimit - pParams->nTotalBacktracksMade; @@ -415,10 +415,10 @@ Ivy_Man_t * Ivy_FraigPerform_int( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pPara { Ivy_FraigMan_t * p; Ivy_Man_t * pManAigNew; - clock_t clk; + abctime clk; if ( Ivy_ManNodeNum(pManAig) == 0 ) return Ivy_ManDup(pManAig); -clk = clock(); +clk = Abc_Clock(); assert( Ivy_ManLatchNum(pManAig) == 0 ); p = Ivy_FraigStart( pManAig, pParams ); // set global limits @@ -428,7 +428,7 @@ clk = clock(); Ivy_FraigSimulate( p ); Ivy_FraigSweep( p ); pManAigNew = p->pManFraig; -p->timeTotal = clock() - clk; +p->timeTotal = Abc_Clock() - clk; if ( pnSatConfs ) *pnSatConfs = p->pSat? p->pSat->stats.conflicts : 0; if ( pnSatInspects ) @@ -452,16 +452,16 @@ Ivy_Man_t * Ivy_FraigPerform( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pParams ) { Ivy_FraigMan_t * p; Ivy_Man_t * pManAigNew; - clock_t clk; + abctime clk; if ( Ivy_ManNodeNum(pManAig) == 0 ) return Ivy_ManDup(pManAig); -clk = clock(); +clk = Abc_Clock(); assert( Ivy_ManLatchNum(pManAig) == 0 ); p = Ivy_FraigStart( pManAig, pParams ); Ivy_FraigSimulate( p ); Ivy_FraigSweep( p ); pManAigNew = p->pManFraig; -p->timeTotal = clock() - clk; +p->timeTotal = Abc_Clock() - clk; Ivy_FraigStop( p ); return pManAigNew; } @@ -483,8 +483,8 @@ Ivy_Man_t * Ivy_FraigMiter( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pParams ) Ivy_Man_t * pManAigNew; Ivy_Obj_t * pObj; int i; - clock_t clk; -clk = clock(); + abctime clk; +clk = Abc_Clock(); assert( Ivy_ManLatchNum(pManAig) == 0 ); p = Ivy_FraigStartSimple( pManAig, pParams ); // set global limits @@ -508,7 +508,7 @@ clk = clock(); // remove dangling nodes Ivy_ManCleanup( p->pManFraig ); pManAigNew = p->pManFraig; -p->timeTotal = clock() - clk; +p->timeTotal = Abc_Clock() - clk; //printf( "Final nodes = %6d. ", Ivy_ManNodeNum(pManAigNew) ); //ABC_PRT( "Time", p->timeTotal ); @@ -991,8 +991,8 @@ void Ivy_FraigSimulateOne( Ivy_FraigMan_t * p ) { Ivy_Obj_t * pObj; int i; - clock_t clk; -clk = clock(); + abctime clk; +clk = Abc_Clock(); Ivy_ManForEachNode( p->pManAig, pObj, i ) { Ivy_NodeSimulate( p, pObj ); @@ -1005,7 +1005,7 @@ clk = clock(); printf( "\n" ); */ } -p->timeSim += clock() - clk; +p->timeSim += Abc_Clock() - clk; p->nSimRounds++; } @@ -1023,11 +1023,11 @@ p->nSimRounds++; void Ivy_FraigSimulateOneSim( Ivy_FraigMan_t * p ) { Ivy_FraigSim_t * pSims; - clock_t clk; -clk = clock(); + abctime clk; +clk = Abc_Clock(); for ( pSims = p->pSimStart; pSims; pSims = pSims->pNext ) Ivy_NodeSimulateSim( p, pSims ); -p->timeSim += clock() - clk; +p->timeSim += Abc_Clock() - clk; p->nSimRounds++; } @@ -1388,7 +1388,7 @@ int Ivy_FraigRefineClasses( Ivy_FraigMan_t * p ) { Ivy_Obj_t * pClass, * pClass2; int RetValue, Counter = 0; - clock_t clk; + abctime clk; // check if some outputs already became non-constant // this is a special case when computation can be stopped!!! if ( p->pParams->fProve ) @@ -1396,7 +1396,7 @@ int Ivy_FraigRefineClasses( Ivy_FraigMan_t * p ) if ( p->pManFraig->pData ) return 0; // refine the classed -clk = clock(); +clk = Abc_Clock(); Ivy_FraigForEachEquivClassSafe( p->lClasses.pHead, pClass, pClass2 ) { if ( pClass->fMarkA ) @@ -1406,9 +1406,9 @@ clk = clock(); //if ( Ivy_ObjIsConst1(pClass) ) //printf( "%d ", RetValue ); //if ( Ivy_ObjIsConst1(pClass) ) -// p->time1 += clock() - clk; +// p->time1 += Abc_Clock() - clk; } -p->timeRef += clock() - clk; +p->timeRef += Abc_Clock() - clk; return Counter; } @@ -1793,12 +1793,12 @@ void Ivy_FraigResimulate( Ivy_FraigMan_t * p ) SeeAlso [] ***********************************************************************/ -void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, clock_t clk, int fVerbose ) +void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, abctime clk, int fVerbose ) { if ( !fVerbose ) return; printf( "Nodes = %7d. Levels = %4d. ", Ivy_ManNodeNum(pNtk), Ivy_ManLevels(pNtk) ); - ABC_PRT( pString, clock() - clk ); + ABC_PRT( pString, Abc_Clock() - clk ); } /**Function************************************************************* @@ -1881,13 +1881,13 @@ void Ivy_FraigMiterProve( Ivy_FraigMan_t * p ) { Ivy_Obj_t * pObj, * pObjNew; int i, RetValue; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int fVerbose = 0; Ivy_ManForEachPo( p->pManAig, pObj, i ) { if ( i && fVerbose ) { - ABC_PRT( "Time", clock() -clk ); + ABC_PRT( "Time", Abc_Clock() -clk ); } pObjNew = Ivy_ObjChild0Equiv(pObj); // check if the output is constant 1 @@ -1950,7 +1950,7 @@ void Ivy_FraigMiterProve( Ivy_FraigMan_t * p ) } if ( fVerbose ) { - ABC_PRT( "Time", clock() -clk ); + ABC_PRT( "Time", Abc_Clock() -clk ); } } @@ -2099,7 +2099,7 @@ void Ivy_FraigPrintActivity( Ivy_FraigMan_t * p ) int Ivy_FraigNodesAreEquiv( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pNew ) { int pLits[4], RetValue, RetValue1, nBTLimit; - clock_t clk; //, clk2 = clock(); + abctime clk; //, clk2 = Abc_Clock(); // make sure the nodes are not complemented assert( !Ivy_IsComplement(pNew) ); @@ -2141,17 +2141,17 @@ int Ivy_FraigNodesAreEquiv( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pN // solve under assumptions // A = 1; B = 0 OR A = 1; B = 1 -clk = clock(); +clk = Abc_Clock(); pLits[0] = toLitCond( Ivy_ObjSatNum(pOld), 0 ); pLits[1] = toLitCond( Ivy_ObjSatNum(pNew), pOld->fPhase == pNew->fPhase ); //Sat_SolverWriteDimacs( p->pSat, "temp.cnf", pLits, pLits + 2, 1 ); RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2, (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, p->nBTLimitGlobal, p->nInsLimitGlobal ); -p->timeSat += clock() - clk; +p->timeSat += Abc_Clock() - clk; if ( RetValue1 == l_False ) { -p->timeSatUnsat += clock() - clk; +p->timeSatUnsat += Abc_Clock() - clk; pLits[0] = lit_neg( pLits[0] ); pLits[1] = lit_neg( pLits[1] ); RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 ); @@ -2161,14 +2161,14 @@ p->timeSatUnsat += clock() - clk; } else if ( RetValue1 == l_True ) { -p->timeSatSat += clock() - clk; +p->timeSatSat += Abc_Clock() - clk; Ivy_FraigSavePattern( p ); p->nSatCallsSat++; return 0; } else // if ( RetValue1 == l_Undef ) { -p->timeSatFail += clock() - clk; +p->timeSatFail += Abc_Clock() - clk; /* if ( nBTLimit > 1000 ) { @@ -2194,16 +2194,16 @@ p->timeSatFail += clock() - clk; // solve under assumptions // A = 0; B = 1 OR A = 0; B = 0 -clk = clock(); +clk = Abc_Clock(); pLits[0] = toLitCond( Ivy_ObjSatNum(pOld), 1 ); pLits[1] = toLitCond( Ivy_ObjSatNum(pNew), pOld->fPhase ^ pNew->fPhase ); RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2, (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, p->nBTLimitGlobal, p->nInsLimitGlobal ); -p->timeSat += clock() - clk; +p->timeSat += Abc_Clock() - clk; if ( RetValue1 == l_False ) { -p->timeSatUnsat += clock() - clk; +p->timeSatUnsat += Abc_Clock() - clk; pLits[0] = lit_neg( pLits[0] ); pLits[1] = lit_neg( pLits[1] ); RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 ); @@ -2212,14 +2212,14 @@ p->timeSatUnsat += clock() - clk; } else if ( RetValue1 == l_True ) { -p->timeSatSat += clock() - clk; +p->timeSatSat += Abc_Clock() - clk; Ivy_FraigSavePattern( p ); p->nSatCallsSat++; return 0; } else // if ( RetValue1 == l_Undef ) { -p->timeSatFail += clock() - clk; +p->timeSatFail += Abc_Clock() - clk; /* if ( nBTLimit > 1000 ) { @@ -2238,12 +2238,12 @@ p->timeSatFail += clock() - clk; // check BDD proof { int RetVal; - ABC_PRT( "Sat", clock() - clk2 ); - clk2 = clock(); + ABC_PRT( "Sat", Abc_Clock() - clk2 ); + clk2 = Abc_Clock(); RetVal = Ivy_FraigNodesAreEquivBdd( pOld, pNew ); // printf( "%d ", RetVal ); assert( RetVal ); - ABC_PRT( "Bdd", clock() - clk2 ); + ABC_PRT( "Bdd", Abc_Clock() - clk2 ); printf( "\n" ); } */ @@ -2266,7 +2266,7 @@ p->timeSatFail += clock() - clk; int Ivy_FraigNodeIsConst( Ivy_FraigMan_t * p, Ivy_Obj_t * pNew ) { int pLits[2], RetValue1; - clock_t clk; + abctime clk; int RetValue; // make sure the nodes are not complemented @@ -2293,15 +2293,15 @@ int Ivy_FraigNodeIsConst( Ivy_FraigMan_t * p, Ivy_Obj_t * pNew ) Ivy_FraigSetActivityFactors( p, NULL, pNew ); // solve under assumptions -clk = clock(); +clk = Abc_Clock(); pLits[0] = toLitCond( Ivy_ObjSatNum(pNew), pNew->fPhase ); RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 1, (ABC_INT64_T)p->pParams->nBTLimitMiter, (ABC_INT64_T)0, p->nBTLimitGlobal, p->nInsLimitGlobal ); -p->timeSat += clock() - clk; +p->timeSat += Abc_Clock() - clk; if ( RetValue1 == l_False ) { -p->timeSatUnsat += clock() - clk; +p->timeSatUnsat += Abc_Clock() - clk; pLits[0] = lit_neg( pLits[0] ); RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 1 ); assert( RetValue ); @@ -2310,7 +2310,7 @@ p->timeSatUnsat += clock() - clk; } else if ( RetValue1 == l_True ) { -p->timeSatSat += clock() - clk; +p->timeSatSat += Abc_Clock() - clk; if ( p->pPatWords ) Ivy_FraigSavePattern( p ); p->nSatCallsSat++; @@ -2318,7 +2318,7 @@ p->timeSatSat += clock() - clk; } else // if ( RetValue1 == l_Undef ) { -p->timeSatFail += clock() - clk; +p->timeSatFail += Abc_Clock() - clk; /* if ( p->pParams->nBTLimitMiter > 1000 ) { @@ -2636,9 +2636,9 @@ int Ivy_FraigSetActivityFactors_rec( Ivy_FraigMan_t * p, Ivy_Obj_t * pObj, int L int Ivy_FraigSetActivityFactors( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pNew ) { int LevelMin, LevelMax; - clock_t clk; + abctime clk; assert( pOld || pNew ); -clk = clock(); +clk = Abc_Clock(); // reset the active variables veci_resize(&p->pSat->act_vars, 0); // prepare for traversal @@ -2653,7 +2653,7 @@ clk = clock(); if ( pNew && !Ivy_ObjIsConst1(pNew) ) Ivy_FraigSetActivityFactors_rec( p, pNew, LevelMin, LevelMax ); //Ivy_FraigPrintActivity( p ); -p->timeTrav += clock() - clk; +p->timeTrav += Abc_Clock() - clk; return 1; } diff --git a/src/aig/ivy/ivyObj.c b/src/aig/ivy/ivyObj.c index becf69d1..2829fd38 100644 --- a/src/aig/ivy/ivyObj.c +++ b/src/aig/ivy/ivyObj.c @@ -354,7 +354,7 @@ void Ivy_ObjReplace( Ivy_Man_t * p, Ivy_Obj_t * pObjOld, Ivy_Obj_t * pObjNew, in assert( !Ivy_IsComplement(pObjNew) ); if ( fUpdateLevel ) { -//clk = clock(); +//clk = Abc_Clock(); // if the new node's arrival time is different, recursively update arrival time of the fanouts if ( p->fFanout && !Ivy_ObjIsBuf(pObjNew) && pObjOld->Level != pObjNew->Level ) { @@ -362,9 +362,9 @@ void Ivy_ObjReplace( Ivy_Man_t * p, Ivy_Obj_t * pObjOld, Ivy_Obj_t * pObjNew, in pObjOld->Level = pObjNew->Level; Ivy_ObjUpdateLevel_rec( p, pObjOld ); } -//p->time1 += clock() - clk; +//p->time1 += Abc_Clock() - clk; // if the new node's required time has changed, recursively update required time of the fanins -//clk = clock(); +//clk = Abc_Clock(); if ( p->vRequired ) { int ReqNew = Vec_IntEntry(p->vRequired, pObjOld->Id); @@ -374,7 +374,7 @@ void Ivy_ObjReplace( Ivy_Man_t * p, Ivy_Obj_t * pObjOld, Ivy_Obj_t * pObjNew, in Ivy_ObjUpdateLevelR_rec( p, pObjNew, ReqNew ); } } -//p->time2 += clock() - clk; +//p->time2 += Abc_Clock() - clk; } // delete the old object if ( fDeleteOld ) diff --git a/src/aig/ivy/ivyResyn.c b/src/aig/ivy/ivyResyn.c index dc483bf6..1eacbe5e 100644 --- a/src/aig/ivy/ivyResyn.c +++ b/src/aig/ivy/ivyResyn.c @@ -44,30 +44,30 @@ ABC_NAMESPACE_IMPL_START ***********************************************************************/ Ivy_Man_t * Ivy_ManResyn0( Ivy_Man_t * pMan, int fUpdateLevel, int fVerbose ) { - clock_t clk; + abctime clk; Ivy_Man_t * pTemp; if ( fVerbose ) { printf( "Original:\n" ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pMan, fUpdateLevel ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); // Ivy_ManRewriteAlg( pMan, fUpdateLevel, 0 ); -clk = clock(); +clk = Abc_Clock(); Ivy_ManRewritePre( pMan, fUpdateLevel, 0, 0 ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel ); Ivy_ManStop( pTemp ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); return pMan; } @@ -85,58 +85,58 @@ if ( fVerbose ) Ivy_ManPrintStats( pMan ); ***********************************************************************/ Ivy_Man_t * Ivy_ManResyn( Ivy_Man_t * pMan, int fUpdateLevel, int fVerbose ) { - clock_t clk; + abctime clk; Ivy_Man_t * pTemp; if ( fVerbose ) { printf( "Original:\n" ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pMan, fUpdateLevel ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); // Ivy_ManRewriteAlg( pMan, fUpdateLevel, 0 ); -clk = clock(); +clk = Abc_Clock(); Ivy_ManRewritePre( pMan, fUpdateLevel, 0, 0 ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel ); Ivy_ManStop( pTemp ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); // Ivy_ManRewriteAlg( pMan, fUpdateLevel, 1 ); -clk = clock(); +clk = Abc_Clock(); Ivy_ManRewritePre( pMan, fUpdateLevel, 1, 0 ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel ); Ivy_ManStop( pTemp ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); // Ivy_ManRewriteAlg( pMan, fUpdateLevel, 1 ); -clk = clock(); +clk = Abc_Clock(); Ivy_ManRewritePre( pMan, fUpdateLevel, 1, 0 ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel ); Ivy_ManStop( pTemp ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); return pMan; } @@ -154,38 +154,38 @@ if ( fVerbose ) Ivy_ManPrintStats( pMan ); ***********************************************************************/ Ivy_Man_t * Ivy_ManRwsat( Ivy_Man_t * pMan, int fVerbose ) { - clock_t clk; + abctime clk; Ivy_Man_t * pTemp; if ( fVerbose ) { printf( "Original:\n" ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); Ivy_ManRewritePre( pMan, 0, 0, 0 ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pTemp = pMan, 0 ); // pMan = Ivy_ManDup( pTemp = pMan ); Ivy_ManStop( pTemp ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); /* -clk = clock(); +clk = Abc_Clock(); Ivy_ManRewritePre( pMan, 0, 0, 0 ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); -clk = clock(); +clk = Abc_Clock(); pMan = Ivy_ManBalance( pTemp = pMan, 0 ); Ivy_ManStop( pTemp ); if ( fVerbose ) { printf( "\n" ); } -if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); } +if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); } if ( fVerbose ) Ivy_ManPrintStats( pMan ); */ return pMan; diff --git a/src/aig/ivy/ivyRwr.c b/src/aig/ivy/ivyRwr.c index 2e3689c1..a4bfe54b 100644 --- a/src/aig/ivy/ivyRwr.c +++ b/src/aig/ivy/ivyRwr.c @@ -57,7 +57,7 @@ int Ivy_ManRewritePre( Ivy_Man_t * p, int fUpdateLevel, int fUseZeroCost, int fV Rwt_Man_t * pManRwt; Ivy_Obj_t * pNode; int i, nNodes, nGain; - clock_t clk, clkStart = clock(); + abctime clk, clkStart = Abc_Clock(); // start the rewriting manager pManRwt = Rwt_ManStart( 0 ); p->pData = pManRwt; @@ -105,14 +105,14 @@ int Ivy_ManRewritePre( Ivy_Man_t * p, int fUpdateLevel, int fUseZeroCost, int fV } */ // complement the FF if needed -clk = clock(); +clk = Abc_Clock(); if ( fCompl ) Dec_GraphComplement( pGraph ); Ivy_GraphUpdateNetwork( p, pNode, pGraph, fUpdateLevel, nGain ); if ( fCompl ) Dec_GraphComplement( pGraph ); -Rwt_ManAddTimeUpdate( pManRwt, clock() - clk ); +Rwt_ManAddTimeUpdate( pManRwt, Abc_Clock() - clk ); } } -Rwt_ManAddTimeTotal( pManRwt, clock() - clkStart ); +Rwt_ManAddTimeTotal( pManRwt, Abc_Clock() - clkStart ); // print stats if ( fVerbose ) Rwt_ManPrintStats( pManRwt ); @@ -164,18 +164,18 @@ int Ivy_NodeRewrite( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int fUp int Required, nNodesSaved; int nNodesSaveCur = -1; // Suppress "might be used uninitialized" int i, c, GainCur, GainBest = -1; - clock_t clk, clk2; + abctime clk, clk2; p->nNodesConsidered++; // get the required times Required = fUpdateLevel? Vec_IntEntry( pMan->vRequired, pNode->Id ) : 1000000; // get the node's cuts -clk = clock(); +clk = Abc_Clock(); pStore = Ivy_NodeFindCutsAll( pMan, pNode, 5 ); -p->timeCut += clock() - clk; +p->timeCut += Abc_Clock() - clk; // go through the cuts -clk = clock(); +clk = Abc_Clock(); for ( c = 1; c < pStore->nCuts; c++ ) { pCut = pStore->pCuts + c; @@ -193,9 +193,9 @@ clk = clock(); } p->nCutsGood++; // get the fanin permutation -clk2 = clock(); +clk2 = Abc_Clock(); uTruth = 0xFFFF & Ivy_NodeGetTruth( pNode, pCut->pArray, pCut->nSize ); // truth table -p->timeTruth += clock() - clk2; +p->timeTruth += Abc_Clock() - clk2; pPerm = p->pPerms4[ (int) p->pPerms[uTruth] ]; uPhase = p->pPhases[uTruth]; // collect fanins with the corresponding permutation/phase @@ -208,7 +208,7 @@ p->timeTruth += clock() - clk2; pFanin = Ivy_NotCond(pFanin, ((uPhase & (1<<i)) > 0) ); Vec_PtrWriteEntry( p->vFaninsCur, i, pFanin ); } -clk2 = clock(); +clk2 = Abc_Clock(); /* printf( "Considering: (" ); Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i ) @@ -224,12 +224,12 @@ clk2 = clock(); // unmark the fanin boundary Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i ) Ivy_ObjRefsDec( Ivy_Regular(pFanin) ); -p->timeMffc += clock() - clk2; +p->timeMffc += Abc_Clock() - clk2; // evaluate the cut -clk2 = clock(); +clk2 = Abc_Clock(); pGraph = Rwt_CutEvaluate( pMan, p, pNode, p->vFaninsCur, nNodesSaved, Required, &GainCur, uTruth ); -p->timeEval += clock() - clk2; +p->timeEval += Abc_Clock() - clk2; // check if the cut is better than the current best one if ( pGraph != NULL && GainBest < GainCur ) @@ -246,7 +246,7 @@ p->timeEval += clock() - clk2; Vec_PtrPush( p->vFanins, pFanin ); } } -p->timeRes += clock() - clk; +p->timeRes += Abc_Clock() - clk; if ( GainBest == -1 ) return -1; diff --git a/src/aig/ivy/ivySeq.c b/src/aig/ivy/ivySeq.c index c905fa62..c231dea6 100644 --- a/src/aig/ivy/ivySeq.c +++ b/src/aig/ivy/ivySeq.c @@ -65,7 +65,7 @@ int Ivy_ManRewriteSeq( Ivy_Man_t * p, int fUseZeroCost, int fVerbose ) Rwt_Man_t * pManRwt; Ivy_Obj_t * pNode; int i, nNodes, nGain; - clock_t clk, clkStart = clock(); + abctime clk, clkStart = Abc_Clock(); // set the DC latch values Ivy_ManForEachLatch( p, pNode, i ) @@ -99,14 +99,14 @@ int Ivy_ManRewriteSeq( Ivy_Man_t * p, int fUseZeroCost, int fVerbose ) Dec_Graph_t * pGraph = (Dec_Graph_t *)Rwt_ManReadDecs(pManRwt); int fCompl = Rwt_ManReadCompl(pManRwt); // complement the FF if needed -clk = clock(); +clk = Abc_Clock(); if ( fCompl ) Dec_GraphComplement( pGraph ); Ivy_GraphUpdateNetworkSeq( p, pNode, pGraph, nGain ); if ( fCompl ) Dec_GraphComplement( pGraph ); -Rwt_ManAddTimeUpdate( pManRwt, clock() - clk ); +Rwt_ManAddTimeUpdate( pManRwt, Abc_Clock() - clk ); } } -Rwt_ManAddTimeTotal( pManRwt, clock() - clkStart ); +Rwt_ManAddTimeTotal( pManRwt, Abc_Clock() - clkStart ); // print stats if ( fVerbose ) Rwt_ManPrintStats( pManRwt ); @@ -157,16 +157,16 @@ int Ivy_NodeRewriteSeq( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int int nNodesSaved; int nNodesSaveCur = -1; // Suppress "might be used uninitialized" int i, c, GainCur, GainBest = -1; - clock_t clk, clk2;//, clk3; + abctime clk, clk2;//, clk3; p->nNodesConsidered++; // get the node's cuts -clk = clock(); +clk = Abc_Clock(); pStore = Ivy_CutComputeForNode( pMan, pNode, 5 ); -p->timeCut += clock() - clk; +p->timeCut += Abc_Clock() - clk; // go through the cuts -clk = clock(); +clk = Abc_Clock(); vFanout = Vec_PtrAlloc( 100 ); for ( c = 1; c < pStore->nCuts; c++ ) { @@ -185,9 +185,9 @@ clk = clock(); } p->nCutsGood++; // get the fanin permutation -clk2 = clock(); +clk2 = Abc_Clock(); uTruth = 0xFFFF & Ivy_CutGetTruth( pMan, pNode, pCut->pArray, pCut->nSize ); // truth table -p->timeTruth += clock() - clk2; +p->timeTruth += Abc_Clock() - clk2; pPerm = p->pPerms4[ (int)p->pPerms[uTruth] ]; uPhase = p->pPhases[uTruth]; // collect fanins with the corresponding permutation/phase @@ -200,7 +200,7 @@ p->timeTruth += clock() - clk2; pFanin = Ivy_NotCond(pFanin, ((uPhase & (1<<i)) > 0) ); Vec_PtrWriteEntry( p->vFaninsCur, i, pFanin ); } -clk2 = clock(); +clk2 = Abc_Clock(); // mark the fanin boundary Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i ) Ivy_ObjRefsInc( Ivy_Regular(pFanin) ); @@ -213,12 +213,12 @@ clk2 = clock(); // unmark the fanin boundary Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i ) Ivy_ObjRefsDec( Ivy_Regular(pFanin) ); -p->timeMffc += clock() - clk2; +p->timeMffc += Abc_Clock() - clk2; // evaluate the cut -clk2 = clock(); +clk2 = Abc_Clock(); pGraph = Rwt_CutEvaluateSeq( pMan, p, pNode, pCut, pPerm, p->vFaninsCur, nNodesSaved, &GainCur, uTruth ); -p->timeEval += clock() - clk2; +p->timeEval += Abc_Clock() - clk2; // check if the cut is better than the current best one @@ -239,7 +239,7 @@ p->timeEval += clock() - clk2; } } Vec_PtrFree( vFanout ); -p->timeRes += clock() - clk; +p->timeRes += Abc_Clock() - clk; if ( GainBest == -1 ) return -1; @@ -253,9 +253,9 @@ p->timeRes += clock() - clk; } */ -//clk3 = clock(); +//clk3 = Abc_Clock(); //nNewClauses = Ivy_CutTruthPrint( pMan, p->pCut, uTruth ); -//timeInv += clock() - clk; +//timeInv += Abc_Clock() - clk; // nClauses += nNewClauses; // nMoves++; @@ -1110,7 +1110,7 @@ void Ivy_CutComputeAll( Ivy_Man_t * p, int nInputs ) Ivy_Store_t * pStore; Ivy_Obj_t * pObj; int i, nCutsTotal, nCutsTotalM, nNodeTotal, nNodeOver; - clock_t clk = clock(); + abctime clk = Abc_Clock(); if ( nInputs > IVY_CUT_INPUT ) { printf( "Cannot compute cuts for more than %d inputs.\n", IVY_CUT_INPUT ); @@ -1130,7 +1130,7 @@ void Ivy_CutComputeAll( Ivy_Man_t * p, int nInputs ) } printf( "All = %6d. Minus = %6d. Triv = %6d. Node = %6d. Satur = %6d. ", nCutsTotal, nCutsTotalM, Ivy_ManPiNum(p) + Ivy_ManNodeNum(p), nNodeTotal, nNodeOver ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } //////////////////////////////////////////////////////////////////////// diff --git a/src/aig/ivy/ivyTable.c b/src/aig/ivy/ivyTable.c index d2753aa8..7d8590d8 100644 --- a/src/aig/ivy/ivyTable.c +++ b/src/aig/ivy/ivyTable.c @@ -207,8 +207,8 @@ void Ivy_TableResize( Ivy_Man_t * p ) { int * pTableOld, * pPlace; int nTableSizeOld, Counter, nEntries, e; - clock_t clk; -clk = clock(); + abctime clk; +clk = Abc_Clock(); // save the old table pTableOld = p->pTable; nTableSizeOld = p->nTableSize; @@ -231,7 +231,7 @@ clk = clock(); nEntries = Ivy_ManHashObjNum(p); // assert( Counter == nEntries ); // printf( "Increasing the structural table size from %6d to %6d. ", nTableSizeOld, p->nTableSize ); -// ABC_PRT( "Time", clock() - clk ); +// ABC_PRT( "Time", Abc_Clock() - clk ); // replace the table and the parameters ABC_FREE( pTableOld ); } diff --git a/src/aig/saig/saigConstr2.c b/src/aig/saig/saigConstr2.c index 7213bdff..8ab5df51 100644 --- a/src/aig/saig/saigConstr2.c +++ b/src/aig/saig/saigConstr2.c @@ -60,7 +60,7 @@ int Ssw_ManProfileConstraints( Aig_Man_t * p, int nWords, int nFrames, int fVerb Aig_Obj_t * pObj, * pObjLi; unsigned * pInfo, * pInfo0, * pInfo1, * pInfoMask, * pInfoMask2; int i, w, f, RetValue = 1; - clock_t clk = clock(); + abctime clk = Abc_Clock(); if ( fVerbose ) printf( "Simulating %d nodes and %d flops for %d frames with %d words... ", Aig_ManNodeNum(p), Aig_ManRegNum(p), nFrames, nWords ); @@ -196,7 +196,7 @@ int Ssw_ManProfileConstraints( Aig_Man_t * p, int nWords, int nFrames, int fVerb } } if ( fVerbose ) - Abc_PrintTime( 1, "T", clock() - clk ); + Abc_PrintTime( 1, "T", Abc_Clock() - clk ); // print the state if ( fVerbose ) { diff --git a/src/aig/saig/saigInd.c b/src/aig/saig/saigInd.c index f9cccae8..114db997 100644 --- a/src/aig/saig/saigInd.c +++ b/src/aig/saig/saigInd.c @@ -152,7 +152,7 @@ int Saig_ManInduction( Aig_Man_t * p, int nFramesMax, int nConfMax, int fUnique, Aig_Obj_t * pObjPi, * pObjPiCopy, * pObjPo; int i, k, f, Lits[2], status = -1, RetValue, nSatVarNum, nConfPrev; int nOldSize, iReg, iLast, fAdded, nConstrs = 0, nClauses = 0; - clock_t clk; + abctime clk; assert( fUnique == 0 || fUniqueAll == 0 ); assert( Saig_ManPoNum(p) == 1 ); Aig_ManSetCioIds( p ); @@ -180,7 +180,7 @@ int Saig_ManInduction( Aig_Man_t * p, int nFramesMax, int nConfMax, int fUnique, Aig_ManStop( pAigPart ); Cnf_DataFree( pCnfPart ); } - clk = clock(); + clk = Abc_Clock(); // get the bottom Aig_SupportNodes( p, (Aig_Obj_t **)Vec_PtrArray(vTop), Vec_PtrSize(vTop), vBot ); // derive AIG for the part between top and bottom @@ -289,7 +289,7 @@ nextrun: printf( "%4d : PI =%5d. PO =%5d. AIG =%5d. Var =%7d. Clau =%7d. Conf =%7d. ", f, Aig_ManCiNum(pAigPart), Aig_ManCoNum(pAigPart), Aig_ManNodeNum(pAigPart), nSatVarNum, nClauses, (int)pSat->stats.conflicts-nConfPrev ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } if ( status == l_Undef ) break; diff --git a/src/aig/saig/saigIso.c b/src/aig/saig/saigIso.c index 14a488ad..1f931eae 100644 --- a/src/aig/saig/saigIso.c +++ b/src/aig/saig/saigIso.c @@ -427,8 +427,8 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV Vec_Int_t * vLevel, * vRemain; Vec_Str_t * vStr, * vPrev; int i, nPos; - clock_t clk = clock(); - clock_t clkDup = 0, clkAig = 0, clkIso = 0, clk2; + abctime clk = Abc_Clock(); + abctime clkDup = 0, clkAig = 0, clkIso = 0, clk2; *pvPosEquivs = NULL; // derive AIG for each PO @@ -439,17 +439,17 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV if ( i % 100 == 0 ) printf( "%6d finished...\r", i ); - clk2 = clock(); + clk2 = Abc_Clock(); pPart = Saig_ManDupCones( pAig, &i, 1 ); - clkDup += clock() - clk2; + clkDup += Abc_Clock() - clk2; - clk2 = clock(); + clk2 = Abc_Clock(); pTemp = Saig_ManDupIsoCanonical( pPart, 0 ); - clkIso += clock() - clk2; + clkIso += Abc_Clock() - clk2; - clk2 = clock(); + clk2 = Abc_Clock(); vStr = Ioa_WriteAigerIntoMemoryStr( pTemp ); - clkAig += clock() - clk2; + clkAig += Abc_Clock() - clk2; Vec_PtrPush( vBuffers, vStr ); Aig_ManStop( pTemp ); @@ -466,11 +466,11 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV } // sort the infos - clk = clock(); + clk = Abc_Clock(); Vec_PtrSort( vBuffers, (int (*)(void))Iso_StoCompareVecStr ); // create classes - clk = clock(); + clk = Abc_Clock(); vClasses = Vec_PtrAlloc( Saig_ManPoNum(pAig) ); // start the first class Vec_PtrPush( vClasses, (vLevel = Vec_IntAlloc(4)) ); @@ -488,7 +488,7 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV Vec_VecFree( (Vec_Vec_t *)vBuffers ); if ( fVerbose ) - Abc_PrintTime( 1, "Sorting time", clock() - clk ); + Abc_PrintTime( 1, "Sorting time", Abc_Clock() - clk ); // Abc_PrintTime( 1, "Traversal time", time_Trav ); // report the results @@ -540,10 +540,10 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV Aig_Man_t * Iso_ManTest( Aig_Man_t * pAig, int fVerbose ) { Vec_Int_t * vPerm; - clock_t clk = clock(); + abctime clk = Abc_Clock(); vPerm = Saig_ManFindIsoPerm( pAig, fVerbose ); Vec_IntFree( vPerm ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); return NULL; } @@ -561,10 +561,10 @@ Aig_Man_t * Iso_ManTest( Aig_Man_t * pAig, int fVerbose ) Aig_Man_t * Saig_ManIsoReduce( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fVerbose ) { Aig_Man_t * pPart; - clock_t clk = clock(); + abctime clk = Abc_Clock(); pPart = Iso_ManFilterPos( pAig, pvPosEquivs, fVerbose ); printf( "Reduced %d outputs to %d outputs. ", Saig_ManPoNum(pAig), Saig_ManPoNum(pPart) ); - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); if ( fVerbose && *pvPosEquivs && Saig_ManPoNum(pAig) != Vec_PtrSize(*pvPosEquivs) ) { printf( "Nontrivial classes:\n" ); diff --git a/src/aig/saig/saigIsoFast.c b/src/aig/saig/saigIsoFast.c index 08718fa8..6378e4db 100644 --- a/src/aig/saig/saigIsoFast.c +++ b/src/aig/saig/saigIsoFast.c @@ -160,7 +160,7 @@ void Iso_StoCollectInfo_rec( Aig_Man_t * p, Aig_Obj_t * pObj, int fCompl, Vec_In Vec_IntPush( vVisited, Aig_ObjId(pObj) ); } -//static clock_t time_Trav = 0; +//static abctime time_Trav = 0; /**Function************************************************************* @@ -181,7 +181,7 @@ Vec_Int_t * Iso_StoCollectInfo( Iso_Sto_t * p, Aig_Obj_t * pPo ) Aig_Man_t * pAig = p->pAig; Aig_Obj_t * pObj; int i, Value, Entry, * pPerm; -// clock_t clk = clock(); +// abctime clk = Abc_Clock(); assert( Aig_ObjIsCo(pPo) ); @@ -194,7 +194,7 @@ Vec_Int_t * Iso_StoCollectInfo( Iso_Sto_t * p, Aig_Obj_t * pPo ) Vec_PtrForEachEntry( Aig_Obj_t *, p->vRoots, pObj, i ) if ( !Aig_ObjIsConst1(Aig_ObjFanin0(pObj)) ) Iso_StoCollectInfo_rec( pAig, Aig_ObjFanin0(pObj), Aig_ObjFaninC0(pObj), p->vVisited, p->pData, p->vRoots ); -// time_Trav += clock() - clk; +// time_Trav += Abc_Clock() - clk; // count how many times each data entry appears Vec_IntClear( p->vPlaces ); @@ -287,7 +287,7 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig ) Vec_Ptr_t * vClasses, * vInfos; Vec_Int_t * vInfo, * vPrev, * vLevel; int i, Number, nUnique = 0; - clock_t clk = clock(); + abctime clk = Abc_Clock(); // collect infos and remember their number pMan = Iso_StoStart( pAig ); @@ -299,14 +299,14 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig ) Vec_PtrPush( vInfos, vInfo ); } Iso_StoStop( pMan ); - Abc_PrintTime( 1, "Info computation time", clock() - clk ); + Abc_PrintTime( 1, "Info computation time", Abc_Clock() - clk ); // sort the infos - clk = clock(); + clk = Abc_Clock(); Vec_PtrSort( vInfos, (int (*)(void))Iso_StoCompareVecInt ); // create classes - clk = clock(); + clk = Abc_Clock(); vClasses = Vec_PtrAlloc( Saig_ManPoNum(pAig) ); // start the first class Vec_PtrPush( vClasses, (vLevel = Vec_IntAlloc(4)) ); @@ -323,7 +323,7 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig ) vPrev = vInfo; } Vec_VecFree( (Vec_Vec_t *)vInfos ); - Abc_PrintTime( 1, "Sorting time", clock() - clk ); + Abc_PrintTime( 1, "Sorting time", Abc_Clock() - clk ); // Abc_PrintTime( 1, "Traversal time", time_Trav ); // report the results diff --git a/src/aig/saig/saigIsoSlow.c b/src/aig/saig/saigIsoSlow.c index 25cd68f0..58dc6596 100644 --- a/src/aig/saig/saigIsoSlow.c +++ b/src/aig/saig/saigIsoSlow.c @@ -290,11 +290,11 @@ struct Iso_Man_t_ Vec_Ptr_t * vClasses; // other classes Vec_Ptr_t * vTemp1; // other classes Vec_Ptr_t * vTemp2; // other classes - clock_t timeHash; - clock_t timeFout; - clock_t timeSort; - clock_t timeOther; - clock_t timeTotal; + abctime timeHash; + abctime timeFout; + abctime timeSort; + abctime timeOther; + abctime timeTotal; }; static inline Iso_Obj_t * Iso_ManObj( Iso_Man_t * p, int i ) { assert( i >= 0 && i < p->nObjs ); return i ? p->pObjs + i : NULL; } @@ -557,7 +557,7 @@ void Iso_ManCollectClasses( Iso_Man_t * p ) { Iso_Obj_t * pIso; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); Vec_PtrClear( p->vSingles ); Vec_PtrClear( p->vClasses ); for ( i = 0; i < p->nBins; i++ ) @@ -571,10 +571,10 @@ void Iso_ManCollectClasses( Iso_Man_t * p ) Vec_PtrPush( p->vSingles, pIso ); } } - clk = clock(); + clk = Abc_Clock(); Vec_PtrSort( p->vSingles, (int (*)(void))Iso_ObjCompare ); Vec_PtrSort( p->vClasses, (int (*)(void))Iso_ObjCompare ); - p->timeSort += clock() - clk; + p->timeSort += Abc_Clock() - clk; assert( Vec_PtrSize(p->vSingles) == p->nSingles ); assert( Vec_PtrSize(p->vClasses) == p->nClasses ); // assign IDs to singletons @@ -1172,20 +1172,20 @@ Vec_Int_t * Saig_ManFindIsoPerm( Aig_Man_t * pAig, int fVerbose ) int fVeryVerbose = 0; Vec_Int_t * vRes; Iso_Man_t * p; - clock_t clk = clock(), clk2 = clock(); + abctime clk = Abc_Clock(), clk2 = Abc_Clock(); p = Iso_ManCreate( pAig ); - p->timeFout += clock() - clk; + p->timeFout += Abc_Clock() - clk; Iso_ManPrintClasses( p, fVerbose, fVeryVerbose ); while ( p->nClasses ) { // assign adjacency to classes - clk = clock(); + clk = Abc_Clock(); Iso_ManAssignAdjacency( p ); - p->timeFout += clock() - clk; + p->timeFout += Abc_Clock() - clk; // rehash the class nodes - clk = clock(); + clk = Abc_Clock(); Iso_ManRehashClassNodes( p ); - p->timeHash += clock() - clk; + p->timeHash += Abc_Clock() - clk; Iso_ManPrintClasses( p, fVerbose, fVeryVerbose ); // force refinement while ( p->nSingles == 0 && p->nClasses ) @@ -1194,17 +1194,17 @@ Vec_Int_t * Saig_ManFindIsoPerm( Aig_Man_t * pAig, int fVerbose ) // assign IDs to the topmost level of classes Iso_ManBreakTies( p, fVerbose ); // assign adjacency to classes - clk = clock(); + clk = Abc_Clock(); Iso_ManAssignAdjacency( p ); - p->timeFout += clock() - clk; + p->timeFout += Abc_Clock() - clk; // rehash the class nodes - clk = clock(); + clk = Abc_Clock(); Iso_ManRehashClassNodes( p ); - p->timeHash += clock() - clk; + p->timeHash += Abc_Clock() - clk; Iso_ManPrintClasses( p, fVerbose, fVeryVerbose ); } } - p->timeTotal = clock() - clk2; + p->timeTotal = Abc_Clock() - clk2; // printf( "IDs assigned = %d. Objects = %d.\n", p->nObjIds, 1+Aig_ManCiNum(p->pAig)+Aig_ManNodeNum(p->pAig) ); assert( p->nObjIds == 1+Aig_ManCiNum(p->pAig)+Aig_ManNodeNum(p->pAig) ); // if ( p->nClasses ) diff --git a/src/aig/saig/saigMiter.c b/src/aig/saig/saigMiter.c index 8ebb81dd..67aed490 100644 --- a/src/aig/saig/saigMiter.c +++ b/src/aig/saig/saigMiter.c @@ -1077,7 +1077,7 @@ int Ssw_SecSpecial( Aig_Man_t * pPart0, Aig_Man_t * pPart1, int nFrames, int fVe int iOut, nOuts; Aig_Man_t * pMiterCec; int RetValue; - clock_t clkTotal = clock(); + abctime clkTotal = Abc_Clock(); if ( fVerbose ) { Aig_ManPrintStats( pPart0 ); @@ -1112,12 +1112,12 @@ int Ssw_SecSpecial( Aig_Man_t * pPart0, Aig_Man_t * pPart1, int nFrames, int fVe if ( RetValue == 1 ) { printf( "Networks are equivalent. " ); -ABC_PRT( "Time", clock() - clkTotal ); +ABC_PRT( "Time", Abc_Clock() - clkTotal ); } else if ( RetValue == 0 ) { printf( "Networks are NOT EQUIVALENT. " ); -ABC_PRT( "Time", clock() - clkTotal ); +ABC_PRT( "Time", Abc_Clock() - clkTotal ); if ( pMiterCec->pData == NULL ) printf( "Counter-example is not available.\n" ); else @@ -1140,7 +1140,7 @@ ABC_PRT( "Time", clock() - clkTotal ); else { printf( "Networks are UNDECIDED. " ); -ABC_PRT( "Time", clock() - clkTotal ); +ABC_PRT( "Time", Abc_Clock() - clkTotal ); } fflush( stdout ); Aig_ManStop( pMiterCec ); diff --git a/src/aig/saig/saigRetFwd.c b/src/aig/saig/saigRetFwd.c index 006167d5..bac2ee4a 100644 --- a/src/aig/saig/saigRetFwd.c +++ b/src/aig/saig/saigRetFwd.c @@ -214,26 +214,26 @@ Aig_Man_t * Saig_ManRetimeForward( Aig_Man_t * p, int nMaxIters, int fVerbose ) { Aig_Man_t * pNew, * pTemp; int i, nRegFixed, nRegMoves = 1; - clock_t clk; + abctime clk; pNew = p; for ( i = 0; i < nMaxIters && nRegMoves > 0; i++ ) { - clk = clock(); + clk = Abc_Clock(); pNew = Saig_ManRetimeForwardOne( pTemp = pNew, &nRegFixed, &nRegMoves ); if ( fVerbose ) { printf( "%2d : And = %6d. Reg = %5d. Unret = %5d. Move = %6d. ", i + 1, Aig_ManNodeNum(pTemp), Aig_ManRegNum(pTemp), nRegFixed, nRegMoves ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } if ( pTemp != p ) Aig_ManStop( pTemp ); } - clk = clock(); + clk = Abc_Clock(); pNew = Aig_ManReduceLaches( pNew, fVerbose ); if ( fVerbose ) { - ABC_PRT( "Register sharing time", clock() - clk ); + ABC_PRT( "Register sharing time", Abc_Clock() - clk ); } return pNew; } diff --git a/src/aig/saig/saigSimFast.c b/src/aig/saig/saigSimFast.c index 39456c63..fef83675 100644 --- a/src/aig/saig/saigSimFast.c +++ b/src/aig/saig/saigSimFast.c @@ -349,14 +349,14 @@ Vec_Int_t * Faig_ManComputeSwitchProbs4( Aig_Man_t * p, int nFrames, int nPref, int * pProbs; float * pSwitching; int nFramesReal; - clock_t clk;//, clkTotal = clock(); + abctime clk;//, clkTotal = Abc_Clock(); if ( fProbOne ) fTrans = 0; vSwitching = Vec_IntStart( Aig_ManObjNumMax(p) ); pSwitching = (float *)vSwitching->pArray; -clk = clock(); +clk = Abc_Clock(); pAig = Faig_ManCreate( p ); -//ABC_PRT( "\nCreation ", clock() - clk ); +//ABC_PRT( "\nCreation ", Abc_Clock() - clk ); Aig_ManRandom( 1 ); // get the number of frames to simulate // if the parameter "seqsimframes" is defined, use it @@ -371,10 +371,10 @@ clk = clock(); nFramesReal = nFrames; } //printf( "Simulating %d frames.\n", nFramesReal ); -clk = clock(); +clk = Abc_Clock(); pProbs = Faig_ManSimulateFrames( pAig, nFramesReal, nPref, fTrans ); -//ABC_PRT( "Simulation", clock() - clk ); -clk = clock(); +//ABC_PRT( "Simulation", Abc_Clock() - clk ); +clk = Abc_Clock(); if ( fTrans ) { Aig_Obj_t * pObj; @@ -419,8 +419,8 @@ clk = clock(); } ABC_FREE( pProbs ); ABC_FREE( pAig ); -//ABC_PRT( "Switch ", clock() - clk ); -//ABC_PRT( "TOTAL ", clock() - clkTotal ); +//ABC_PRT( "Switch ", Abc_Clock() - clk ); +//ABC_PRT( "TOTAL ", Abc_Clock() - clkTotal ); return vSwitching; } diff --git a/src/aig/saig/saigSimMv.c b/src/aig/saig/saigSimMv.c index 71259930..3621cdd3 100644 --- a/src/aig/saig/saigSimMv.c +++ b/src/aig/saig/saigSimMv.c @@ -882,13 +882,13 @@ Vec_Ptr_t * Saig_MvManSimulate( Aig_Man_t * pAig, int nFramesSymb, int nFramesSa Saig_MvMan_t * p; Saig_MvObj_t * pEntry; int f, i, iState; - clock_t clk = clock(); + abctime clk = Abc_Clock(); assert( nFramesSymb >= 1 && nFramesSymb <= nFramesSatur ); // start manager p = Saig_MvManStart( pAig, nFramesSatur ); if ( fVerbose ) -ABC_PRT( "Constructing the problem", clock() - clk ); +ABC_PRT( "Constructing the problem", Abc_Clock() - clk ); // initialize registers Vec_PtrForEachEntry( Saig_MvObj_t *, p->vFlops, pEntry, i ) @@ -897,7 +897,7 @@ ABC_PRT( "Constructing the problem", clock() - clk ); if ( fVeryVerbose ) Saig_MvPrintState( 0, p ); // simulate until convergence - clk = clock(); + clk = Abc_Clock(); for ( f = 0; ; f++ ) { if ( f == nFramesSatur ) @@ -937,7 +937,7 @@ ABC_PRT( "Constructing the problem", clock() - clk ); } // printf( "Coverged after %d frames.\n", f ); if ( fVerbose ) -ABC_PRT( "Multi-valued simulation", clock() - clk ); +ABC_PRT( "Multi-valued simulation", Abc_Clock() - clk ); // implement equivalences // Saig_MvManPostProcess( p, iState-1 ); vMap = Saig_MvManDeriveMap( p, fVerbose ); diff --git a/src/aig/saig/saigSimSeq.c b/src/aig/saig/saigSimSeq.c index d92461c8..ba414680 100644 --- a/src/aig/saig/saigSimSeq.c +++ b/src/aig/saig/saigSimSeq.c @@ -456,7 +456,7 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i Raig_Man_t * p; Sec_MtrStatus_t Status; int i, iPat, RetValue = 0; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); assert( Aig_ManRegNum(pAig) > 0 ); Status = Sec_MiterStatus( pAig ); if ( Status.nSat > 0 ) @@ -475,12 +475,12 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i // iterate through objects for ( i = 0; i < nIters; i++ ) { - clk = clock(); + clk = Abc_Clock(); RetValue = Raig_ManSimulateRound( p, fMiter, i==0, &iPat ); if ( fVerbose ) { printf( "Frame %4d out of %4d and timeout %3d sec. ", i+1, nIters, TimeLimit ); - printf("Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC); + printf("Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC); } if ( RetValue > 0 ) { @@ -491,7 +491,7 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i printf( "Miter is satisfiable after simulation (output %d).\n", iOut ); break; } - if ( (clock() - clk)/CLOCKS_PER_SEC >= TimeLimit ) + if ( (Abc_Clock() - clk)/CLOCKS_PER_SEC >= TimeLimit ) { printf( "No bug detected after %d frames with time limit %d seconds.\n", i+1, TimeLimit ); break; @@ -503,7 +503,7 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i p->nMemsMax, 1.0*(p->nObjs * 16)/(1<<20), 1.0*(p->nMemsMax * 4 * (nWords+1))/(1<<20) ); - ABC_PRT( "Total time", clock() - clkTotal ); + ABC_PRT( "Total time", Abc_Clock() - clkTotal ); } Raig_ManDelete( p ); return RetValue > 0; diff --git a/src/aig/saig/saigStrSim.c b/src/aig/saig/saigStrSim.c index 72cf9bbe..6c4ffa8e 100644 --- a/src/aig/saig/saigStrSim.c +++ b/src/aig/saig/saigStrSim.c @@ -878,7 +878,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis Aig_Man_t * pPart0, * pPart1; Aig_Obj_t * pObj0, * pObj1; int i, nMatches; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); Aig_ManRandom( 1 ); // consider the case when a miter is given if ( p1 == NULL ) @@ -919,7 +919,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis nMatches = 1; for ( i = 0; nMatches > 0; i++ ) { - clk = clock(); + clk = Abc_Clock(); Saig_StrSimulateRound( pPart0, pPart1 ); nMatches = Saig_StrSimDetectUnique( pPart0, pPart1 ); if ( fVerbose ) @@ -930,7 +930,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis i, nMatches, nFlops, 100.0*nFlops/Aig_ManRegNum(pPart0), nNodes, 100.0*nNodes/Aig_ManNodeNum(pPart0) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } if ( i == 20 ) break; @@ -963,7 +963,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis Aig_ManFanoutStop( pPart1 ); Aig_ManStop( pPart0 ); Aig_ManStop( pPart1 ); - ABC_PRT( "Total runtime", clock() - clkTotal ); + ABC_PRT( "Total runtime", Abc_Clock() - clkTotal ); return vPairs; } diff --git a/src/aig/saig/saigSwitch.c b/src/aig/saig/saigSwitch.c index 9217dd53..b18ca803 100644 --- a/src/aig/saig/saigSwitch.c +++ b/src/aig/saig/saigSwitch.c @@ -269,12 +269,12 @@ Vec_Int_t * Saig_ManComputeSwitchProb4s( Aig_Man_t * p, int nFrames, int nPref, Vec_Int_t * vSwitching; float * pSwitching; int nFramesReal; - clock_t clk;//, clkTotal = clock(); + abctime clk;//, clkTotal = Abc_Clock(); vSwitching = Vec_IntStart( Aig_ManObjNumMax(p) ); pSwitching = (float *)vSwitching->pArray; -clk = clock(); +clk = Abc_Clock(); pAig = Saig_ManCreateMan( p ); -//ABC_PRT( "\nCreation ", clock() - clk ); +//ABC_PRT( "\nCreation ", Abc_Clock() - clk ); Aig_ManRandom( 1 ); // get the number of frames to simulate @@ -290,10 +290,10 @@ clk = clock(); nFramesReal = nFrames; } //printf( "Simulating %d frames.\n", nFramesReal ); -clk = clock(); +clk = Abc_Clock(); Saig_ManSimulateFrames( pAig, nFramesReal, nPref ); -//ABC_PRT( "Simulation", clock() - clk ); -clk = clock(); +//ABC_PRT( "Simulation", Abc_Clock() - clk ); +clk = Abc_Clock(); for ( pEntry = pAig; pEntry->Type != AIG_OBJ_VOID; pEntry++ ) { /* @@ -318,8 +318,8 @@ clk = clock(); //printf( "%3d : %7.2f\n", pEntry-pAig, pSwitching[pEntry-pAig] ); } ABC_FREE( pAig ); -//ABC_PRT( "Switch ", clock() - clk ); -//ABC_PRT( "TOTAL ", clock() - clkTotal ); +//ABC_PRT( "Switch ", Abc_Clock() - clk ); +//ABC_PRT( "TOTAL ", Abc_Clock() - clkTotal ); // Aig_CManCreate( p ); return vSwitching; diff --git a/src/aig/saig/saigSynch.c b/src/aig/saig/saigSynch.c index 28c8150f..02b8ed12 100644 --- a/src/aig/saig/saigSynch.c +++ b/src/aig/saig/saigSynch.c @@ -505,9 +505,9 @@ Aig_Man_t * Saig_SynchSequenceApply( Aig_Man_t * pAig, int nWords, int fVerbose Vec_Str_t * vSequence; Vec_Ptr_t * vSimInfo; int RetValue; - clock_t clk; + abctime clk; -clk = clock(); +clk = Abc_Clock(); // derive synchronization sequence vSequence = Saig_SynchSequence( pAig, nWords ); if ( vSequence == NULL ) @@ -516,7 +516,7 @@ clk = clock(); printf( "Design 1: Synchronizing sequence of length %4d is found. ", Vec_StrSize(vSequence) / Saig_ManPiNum(pAig) ); if ( fVerbose ) { - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } else printf( "\n" ); @@ -559,7 +559,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords, Vec_Str_t * vSeq1, * vSeq2; Vec_Ptr_t * vSimInfo; int RetValue; - clock_t clk; + abctime clk; /* { unsigned u = Saig_SynchRandomTernary(); @@ -585,7 +585,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords, } // synchronize the first design - clk = clock(); + clk = Abc_Clock(); vSeq1 = Saig_SynchSequence( pAig1, nWords ); if ( vSeq1 == NULL ) printf( "Design 1: Synchronizing sequence is not found. " ); @@ -593,13 +593,13 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords, printf( "Design 1: Synchronizing sequence of length %4d is found. ", Vec_StrSize(vSeq1) / Saig_ManPiNum(pAig1) ); if ( fVerbose ) { - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } else printf( "\n" ); // synchronize the first design - clk = clock(); + clk = Abc_Clock(); vSeq2 = Saig_SynchSequence( pAig2, nWords ); if ( vSeq2 == NULL ) printf( "Design 2: Synchronizing sequence is not found. " ); @@ -607,7 +607,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords, printf( "Design 2: Synchronizing sequence of length %4d is found. ", Vec_StrSize(vSeq2) / Saig_ManPiNum(pAig2) ); if ( fVerbose ) { - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } else printf( "\n" ); @@ -620,7 +620,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords, if ( vSeq2 ) Vec_StrFree( vSeq2 ); return NULL; } - clk = clock(); + clk = Abc_Clock(); vSimInfo = Vec_PtrAllocSimInfo( Abc_MaxInt( Aig_ManObjNumMax(pAig1), Aig_ManObjNumMax(pAig2) ), 1 ); // process Design 1 @@ -651,7 +651,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords, if ( fVerbose ) { printf( "Miter of the synchronized designs is constructed. " ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } return pMiter; } diff --git a/src/aig/saig/saigTrans.c b/src/aig/saig/saigTrans.c index 5e7b719b..217d3269 100644 --- a/src/aig/saig/saigTrans.c +++ b/src/aig/saig/saigTrans.c @@ -379,18 +379,18 @@ Aig_Man_t * Saig_ManTimeframeSimplify( Aig_Man_t * pAig, int nFrames, int nFrame { // extern Aig_Man_t * Fra_FraigEquivence( Aig_Man_t * pManAig, int nConfMax, int fProve ); Aig_Man_t * pFrames, * pFraig, * pRes1, * pRes2; - clock_t clk; + abctime clk; // create uninitialized timeframes with map1 pFrames = Saig_ManFramesNonInitial( pAig, nFrames ); // perform fraiging for the unrolled timeframes -clk = clock(); +clk = Abc_Clock(); pFraig = Fra_FraigEquivence( pFrames, 1000, 0 ); // report the results if ( fVerbose ) { Aig_ManPrintStats( pFrames ); Aig_ManPrintStats( pFraig ); -ABC_PRT( "Fraiging", clock() - clk ); +ABC_PRT( "Fraiging", Abc_Clock() - clk ); } Aig_ManStop( pFraig ); assert( pFrames->pReprs != NULL ); @@ -399,14 +399,14 @@ ABC_PRT( "Fraiging", clock() - clk ); Aig_ManStop( pFrames ); Saig_ManStopMap1( pAig ); // create reduced initialized timeframes -clk = clock(); +clk = Abc_Clock(); pRes2 = Saig_ManFramesInitialMapped( pAig, nFrames, nFramesMax, fInit ); -ABC_PRT( "Mapped", clock() - clk ); +ABC_PRT( "Mapped", Abc_Clock() - clk ); // free mapping Saig_ManStopMap2( pAig ); -clk = clock(); +clk = Abc_Clock(); pRes1 = Saig_ManFramesInitialMapped( pAig, nFrames, nFramesMax, fInit ); -ABC_PRT( "Normal", clock() - clk ); +ABC_PRT( "Normal", Abc_Clock() - clk ); // report the results if ( fVerbose ) { |