summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abcAig.c6
-rw-r--r--src/base/abc/abcCheck.c4
-rw-r--r--src/base/abc/abcDfs.c4
-rw-r--r--src/base/abc/abcHieCec.c24
-rw-r--r--src/base/abc/abcHieNew.c40
-rw-r--r--src/base/abc/abcUtil.c8
-rw-r--r--src/base/abci/abc.c30
-rw-r--r--src/base/abci/abcAuto.c6
-rw-r--r--src/base/abci/abcBidec.c4
-rw-r--r--src/base/abci/abcBm.c26
-rw-r--r--src/base/abci/abcCas.c4
-rw-r--r--src/base/abci/abcCollapse.c4
-rw-r--r--src/base/abci/abcCut.c14
-rw-r--r--src/base/abci/abcDar.c116
-rw-r--r--src/base/abci/abcDebug.c8
-rw-r--r--src/base/abci/abcDec.c4
-rw-r--r--src/base/abci/abcDress2.c6
-rw-r--r--src/base/abci/abcFraig.c4
-rw-r--r--src/base/abci/abcFx.c12
-rw-r--r--src/base/abci/abcIf.c4
-rw-r--r--src/base/abci/abcIvy.c26
-rw-r--r--src/base/abci/abcLutmin.c4
-rw-r--r--src/base/abci/abcMap.c8
-rw-r--r--src/base/abci/abcMerge.c8
-rw-r--r--src/base/abci/abcMffc.c10
-rw-r--r--src/base/abci/abcNpn.c4
-rw-r--r--src/base/abci/abcNpnSave.c6
-rw-r--r--src/base/abci/abcNtbdd.c6
-rw-r--r--src/base/abci/abcOdc.c50
-rw-r--r--src/base/abci/abcPart.c22
-rw-r--r--src/base/abci/abcPrint.c10
-rw-r--r--src/base/abci/abcProve.c20
-rw-r--r--src/base/abci/abcQbf.c12
-rw-r--r--src/base/abci/abcQuant.c6
-rw-r--r--src/base/abci/abcReach.c4
-rw-r--r--src/base/abci/abcRec.c118
-rw-r--r--src/base/abci/abcRec2.c80
-rw-r--r--src/base/abci/abcRec3.c90
-rw-r--r--src/base/abci/abcRefactor.c56
-rw-r--r--src/base/abci/abcRestruct.c32
-rw-r--r--src/base/abci/abcResub.c94
-rw-r--r--src/base/abci/abcRewrite.c16
-rw-r--r--src/base/abci/abcRr.c44
-rw-r--r--src/base/abci/abcSat.c18
-rw-r--r--src/base/abci/abcStrash.c12
-rw-r--r--src/base/abci/abcSymm.c10
-rw-r--r--src/base/abci/abcUnate.c10
-rw-r--r--src/base/cmd/cmdPlugin.c6
-rw-r--r--src/base/cmd/cmdStarter.c4
-rw-r--r--src/base/io/ioReadBblif.c36
50 files changed, 575 insertions, 575 deletions
diff --git a/src/base/abc/abcAig.c b/src/base/abc/abcAig.c
index 5fc3ffd3..7bd44932 100644
--- a/src/base/abc/abcAig.c
+++ b/src/base/abc/abcAig.c
@@ -584,10 +584,10 @@ void Abc_AigResize( Abc_Aig_t * pMan )
Abc_Obj_t ** pBinsNew;
Abc_Obj_t * pEnt, * pEnt2;
int nBinsNew, Counter, i;
- clock_t clk;
+ abctime clk;
unsigned Key;
-clk = clock();
+clk = Abc_Clock();
// get the new table size
nBinsNew = Abc_PrimeCudd( 3 * pMan->nBins );
// allocate a new array
@@ -605,7 +605,7 @@ clk = clock();
}
assert( Counter == pMan->nEntries );
// printf( "Increasing the structural table size from %6d to %6d. ", pMan->nBins, nBinsNew );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( pMan->pBins );
pMan->pBins = pBinsNew;
diff --git a/src/base/abc/abcCheck.c b/src/base/abc/abcCheck.c
index 6dc06f19..99fcae4a 100644
--- a/src/base/abc/abcCheck.c
+++ b/src/base/abc/abcCheck.c
@@ -188,13 +188,13 @@ int Abc_NtkDoCheck( Abc_Ntk_t * pNtk )
return 0;
// finally, check for combinational loops
-// clk = clock();
+// clk = Abc_Clock();
if ( !Abc_NtkIsAcyclic( pNtk ) )
{
fprintf( stdout, "NetworkCheck: Network contains a combinational loop.\n" );
return 0;
}
-// ABC_PRT( "Acyclic ", clock() - clk );
+// ABC_PRT( "Acyclic ", Abc_Clock() - clk );
// check the EXDC network if present
if ( pNtk->pExdc )
diff --git a/src/base/abc/abcDfs.c b/src/base/abc/abcDfs.c
index a96263c1..8b168a9a 100644
--- a/src/base/abc/abcDfs.c
+++ b/src/base/abc/abcDfs.c
@@ -836,12 +836,12 @@ int Abc_NtkSuppSizeTest( Abc_Ntk_t * p )
{
Abc_Obj_t * pObj;
int i, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Abc_NtkForEachObj( p, pObj, i )
if ( Abc_ObjIsNode(pObj) )
Counter += (Abc_ObjSuppSize(pObj) <= 16);
printf( "Nodes with small support %d (out of %d)\n", Counter, Abc_NtkNodeNum(p) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return Counter;
}
diff --git a/src/base/abc/abcHieCec.c b/src/base/abc/abcHieCec.c
index ed4594cd..44958287 100644
--- a/src/base/abc/abcHieCec.c
+++ b/src/base/abc/abcHieCec.c
@@ -670,7 +670,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
Abc_Ntk_t * pNtk, * pModel;
Gia_Man_t * pGia;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// read hierarchical netlist
pNtk = Io_ReadBlifMv( pFileName, 0, fCheck );
@@ -685,16 +685,16 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
// Abc_NtkDelete( pNtk );
// return NULL;
}
- Abc_PrintTime( 1, "Reading file", clock() - clk );
+ Abc_PrintTime( 1, "Reading file", Abc_Clock() - clk );
assert( Abc_NtkIsNetlist(pNtk) );
assert( !Abc_NtkLatchNum(pNtk) );
/*
if ( pNtk->pDesign != NULL )
{
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkCountNodes( pNtk );
- Abc_PrintTime( 1, "Count nodes", clock() - clk );
+ Abc_PrintTime( 1, "Count nodes", Abc_Clock() - clk );
}
*/
// print stats
@@ -716,14 +716,14 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
if ( fUseNew )
{
- clk = clock();
+ clk = Abc_Clock();
vOrder = Abc_NtkCollectHie( pNtk );
- Abc_PrintTime( 1, "Collect DFS ", clock() - clk );
+ Abc_PrintTime( 1, "Collect DFS ", Abc_Clock() - clk );
// derive GIA
- clk = clock();
+ clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia2( pNtk, vOrder );
- Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
+ Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
Gia_ManPrintStats( pGia, 0, 0, 0 );
// Gia_ManStop( pGia );
@@ -737,9 +737,9 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
pModel->pData = Abc_NtkDfsBoxes( pModel );
// derive GIA
- clk = clock();
+ clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia( pNtk );
- Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
+ Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
Gia_ManPrintStats( pGia, 0, 0, 0 );
// clean nodes/boxes of all nodes
@@ -747,9 +747,9 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
Vec_PtrFree( (Vec_Ptr_t *)pModel->pData );
}
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkCountInst( pNtk );
- Abc_PrintTime( 1, "Gather stats", clock() - clk );
+ Abc_PrintTime( 1, "Gather stats", Abc_Clock() - clk );
Abc_NtkDelete( pNtk );
return pGia;
diff --git a/src/base/abc/abcHieNew.c b/src/base/abc/abcHieNew.c
index afea09c3..3e370431 100644
--- a/src/base/abc/abcHieNew.c
+++ b/src/base/abc/abcHieNew.c
@@ -493,7 +493,7 @@ void Au_ManCountThings( Au_Man_t * p )
{
Au_Ntk_t * pNtk, * pBoxModel;
Au_Obj_t * pBox;
- int i, k;//, clk = clock();
+ int i, k;//, clk = Abc_Clock();
Au_ManForEachNtkReverse( p, pNtk, i )
{
pNtk->nBoxes = Au_NtkBoxNum(pNtk);
@@ -533,7 +533,7 @@ void Au_ManCountThings( Au_Man_t * p )
printf( "Total ANDs = %15.0f.\n", pNtk->nNodeAnds );
printf( "Total XORs = %15.0f.\n", pNtk->nNodeXors );
printf( "Total MUXes = %15.0f.\n", pNtk->nNodeMuxs );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
int Au_NtkCompareNames( Au_Ntk_t ** p1, Au_Ntk_t ** p2 )
@@ -1494,24 +1494,24 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
Abc_Ntk_t * pMod;
Au_Man_t * pMan;
Au_Ntk_t * pNtk = NULL;
- clock_t clk1, clk2 = 0, clk3 = 0, clk = clock();
+ abctime clk1, clk2 = 0, clk3 = 0, clk = Abc_Clock();
int i;
- clk1 = clock();
+ clk1 = Abc_Clock();
pMan = Au_ManAlloc( pRoot->pDesign ? pRoot->pDesign->pName : pRoot->pName );
pMan->pFuncs = Abc_NamStart( 100, 16 );
- clk2 += clock() - clk1;
+ clk2 += Abc_Clock() - clk1;
vModels = Abc_NtkCollectHie( pRoot );
Vec_PtrForEachEntry( Abc_Ntk_t *, vModels, pMod, i )
{
vOrder = Abc_NtkDfsBoxes( pMod );
- clk1 = clock();
+ clk1 = Abc_Clock();
pNtk = Au_NtkDerive( pMan, pMod, vOrder );
pMod->iStep = pNtk->Id;
pMod->pData = pNtk;
- clk2 += clock() - clk1;
+ clk2 += Abc_Clock() - clk1;
Vec_PtrFree( vOrder );
}
@@ -1536,21 +1536,21 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
// if ( !Abc_NtkCheckRecursive(pRoot) )
{
- clk1 = clock();
+ clk1 = Abc_Clock();
pGia = Au_NtkDeriveFlatGia( pNtk );
- clk3 = clock() - clk1;
+ clk3 = Abc_Clock() - clk1;
// printf( "GIA objects max = %d.\n", pMan->nGiaObjMax );
}
-// clk1 = clock();
+// clk1 = Abc_Clock();
// Au_NtkSuppSizeTest( (Au_Ntk_t *)pRoot->pData );
-// clk4 = clock() - clk1;
+// clk4 = Abc_Clock() - clk1;
- clk1 = clock();
+ clk1 = Abc_Clock();
Au_ManDelete( pMan );
- clk2 += clock() - clk1;
+ clk2 += Abc_Clock() - clk1;
- Abc_PrintTime( 1, "Time all ", clock() - clk );
+ Abc_PrintTime( 1, "Time all ", Abc_Clock() - clk );
Abc_PrintTime( 1, "Time new ", clk2 );
Abc_PrintTime( 1, "Time GIA ", clk3 );
// Abc_PrintTime( 1, "Time supp", clk4 );
@@ -1573,7 +1573,7 @@ Gia_Man_t * Abc_NtkHieCecTest2( char * pFileName, char * pModelName, int fVerbos
int fSimulation = 0;
Gia_Man_t * pGia = NULL;
Au_Ntk_t * pNtk, * pNtkClp = NULL;
- clock_t clk1 = 0, clk = clock();
+ abctime clk1 = 0, clk = Abc_Clock();
// read hierarchical netlist
pNtk = Au_NtkParseCBlif( pFileName );
@@ -1588,7 +1588,7 @@ Gia_Man_t * Abc_NtkHieCecTest2( char * pFileName, char * pModelName, int fVerbos
Au_NtkFree( pNtk );
return NULL;
}
- Abc_PrintTime( 1, "Reading file", clock() - clk );
+ Abc_PrintTime( 1, "Reading file", Abc_Clock() - clk );
if ( fVerbose )
{
@@ -1608,21 +1608,21 @@ Gia_Man_t * Abc_NtkHieCecTest2( char * pFileName, char * pModelName, int fVerbos
Au_NtkCheckRecursive( pNtkClp );
// collapse
- clk1 = clock();
+ clk1 = Abc_Clock();
if ( fSimulation )
{
Au_NtkTerSimulate( pNtkClp );
- Abc_PrintTime( 1, "Time sim ", clock() - clk1 );
+ Abc_PrintTime( 1, "Time sim ", Abc_Clock() - clk1 );
}
else
{
pGia = Au_NtkDeriveFlatGia( pNtkClp );
- Abc_PrintTime( 1, "Time GIA ", clock() - clk1 );
+ Abc_PrintTime( 1, "Time GIA ", Abc_Clock() - clk1 );
}
// delete
Au_ManDelete( pNtk->pMan );
- Abc_PrintTime( 1, "Time all ", clock() - clk );
+ Abc_PrintTime( 1, "Time all ", Abc_Clock() - clk );
return pGia;
}
diff --git a/src/base/abc/abcUtil.c b/src/base/abc/abcUtil.c
index 8909a15d..20b18c4f 100644
--- a/src/base/abc/abcUtil.c
+++ b/src/base/abc/abcUtil.c
@@ -2543,7 +2543,7 @@ void Abc_NtkReverseTopoOrderTest( Abc_Ntk_t * p )
Vec_Int_t * vVisited;
Abc_Obj_t * pObj;
int i;//, k, iBeg, iEnd;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Abc_NtkReverseTopoOrder( p );
/*
printf( "Reverse topological order for nodes:\n" );
@@ -2558,9 +2558,9 @@ void Abc_NtkReverseTopoOrderTest( Abc_Ntk_t * p )
}
*/
Vec_IntFreeP( &p->vTopo );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// compute regular fanout orders
- clk = clock();
+ clk = Abc_Clock();
vVisited = Vec_IntAlloc( 1000 );
Abc_NtkForEachNode( p, pObj, i )
{
@@ -2569,7 +2569,7 @@ void Abc_NtkReverseTopoOrderTest( Abc_Ntk_t * p )
Abc_NtkReverse_rec( pObj, vVisited );
}
Vec_IntFree( vVisited );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index d5bcb48f..e02ee525 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -11692,7 +11692,7 @@ int Abc_CommandIProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Prove_Params_t Params, * pParams = &Params;
Abc_Ntk_t * pNtk, * pNtkTemp;
int c, RetValue, iOut = -1;
- clock_t clk;
+ abctime clk;
extern int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars );
@@ -11802,7 +11802,7 @@ int Abc_CommandIProve( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1;
}
- clk = clock();
+ clk = Abc_Clock();
if ( Abc_NtkIsStrash(pNtk) )
pNtkTemp = Abc_NtkDup( pNtk );
@@ -11836,7 +11836,7 @@ int Abc_CommandIProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// replace the current network
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkTemp );
// update counter example
@@ -20308,7 +20308,7 @@ int Abc_CommandSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int fVerbose;
int nConfLimit;
int nInsLimit;
- clock_t clk;
+ abctime clk;
// set defaults
fVerbose = 0;
nConfLimit = 0;
@@ -20361,7 +20361,7 @@ int Abc_CommandSat( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
if ( Abc_NtkIsStrash(pNtk) )
{
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, fVerbose, NULL, NULL );
@@ -20401,7 +20401,7 @@ int Abc_CommandSat( Abc_Frame_t * pAbc, int argc, char ** argv )
else
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 0;
usage:
@@ -20441,7 +20441,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int nLearnedDelta;
int nLearnedPerce;
int nInsLimit;
- clock_t clk;
+ abctime clk;
extern int Abc_NtkDSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int nLearnedStart, int nLearnedDelta, int nLearnedPerce, int fAlignPol, int fAndOuts, int fNewSolver, int fVerbose );
// set defaults
@@ -20556,7 +20556,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkDSat( pNtk, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, nLearnedStart, nLearnedDelta, nLearnedPerce, fAlignPol, fAndOuts, fNewSolver, fVerbose );
// verify that the pattern is correct
if ( RetValue == 0 && Abc_NtkPoNum(pNtk) == 1 )
@@ -20575,7 +20575,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
else
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 0;
usage:
@@ -20618,7 +20618,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int fAlignPol;
int fSynthesize;
int fVerbose;
- clock_t clk;
+ abctime clk;
extern int Abc_NtkPartitionedSat( Abc_Ntk_t * pNtk, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose );
// set defaults
@@ -20699,7 +20699,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkPartitionedSat( pNtk, nAlgo, nPartSize, nConfPart, nConfTotal, fAlignPol, fSynthesize, fVerbose );
// verify that the pattern is correct
if ( RetValue == 0 && Abc_NtkPoNum(pNtk) == 1 )
@@ -20729,7 +20729,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
else
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 0;
usage:
@@ -20770,7 +20770,7 @@ int Abc_CommandProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Ntk_t * pNtk, * pNtkTemp;
Prove_Params_t Params, * pParams = &Params;
int c, RetValue;
- clock_t clk;
+ abctime clk;
pNtk = Abc_FrameReadNtk(pAbc);
// set defaults
@@ -20880,7 +20880,7 @@ int Abc_CommandProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Currently can only solve the miter with one output.\n" );
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
if ( Abc_NtkIsStrash(pNtk) )
pNtkTemp = Abc_NtkDup( pNtk );
@@ -20906,7 +20906,7 @@ int Abc_CommandProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// replace the current network
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkTemp );
return 0;
diff --git a/src/base/abci/abcAuto.c b/src/base/abci/abcAuto.c
index 3d723b1c..390442fe 100644
--- a/src/base/abci/abcAuto.c
+++ b/src/base/abci/abcAuto.c
@@ -128,14 +128,14 @@ void Abc_NtkAutoPrintAll( DdManager * dd, int nInputs, DdNode * pbOutputs[], int
int nAutoSymsMaxSupp;
int nAutoSymOuts;
int nSuppSizeMax;
- clock_t clk;
+ abctime clk;
nAutoSymOuts = 0;
nAutoSyms = 0;
nAutoSymsMax = 0;
nAutoSymsMaxSupp = 0;
nSuppSizeMax = 0;
- clk = clock();
+ clk = Abc_Clock();
SigCounter = 0;
for ( o = 0; o < nOutputs; o++ )
@@ -196,7 +196,7 @@ void Abc_NtkAutoPrintAll( DdManager * dd, int nInputs, DdNode * pbOutputs[], int
printf( "SumK=%3d ", nAutoSyms );
printf( "KMax=%2d ", nAutoSymsMax );
printf( "Supp=%3d ", nAutoSymsMaxSupp );
- printf( "Time=%4.2f ", (float)(clock() - clk)/(float)(CLOCKS_PER_SEC) );
+ printf( "Time=%4.2f ", (float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC) );
printf( "\n" );
}
diff --git a/src/base/abci/abcBidec.c b/src/base/abci/abcBidec.c
index 22564195..c1d5270c 100644
--- a/src/base/abci/abcBidec.c
+++ b/src/base/abci/abcBidec.c
@@ -114,7 +114,7 @@ void Abc_NtkBidecResyn( Abc_Ntk_t * pNtk, int fVerbose )
Abc_Obj_t * pObj;
Vec_Int_t * vTruth;
int i, nGainTotal = 0, nNodes1, nNodes2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsLogic(pNtk) );
if ( !Abc_NtkToAig(pNtk) )
return;
@@ -142,7 +142,7 @@ void Abc_NtkBidecResyn( Abc_Ntk_t * pNtk, int fVerbose )
if ( fVerbose )
{
printf( "Total gain in AIG nodes = %d. ", nGainTotal );
- ABC_PRT( "Total runtime", clock() - clk );
+ ABC_PRT( "Total runtime", Abc_Clock() - clk );
}
}
diff --git a/src/base/abci/abcBm.c b/src/base/abci/abcBm.c
index 741c6a9e..e39ccf03 100644
--- a/src/base/abci/abcBm.c
+++ b/src/base/abci/abcBm.c
@@ -871,7 +871,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
static sat_solver * pSat = NULL;
lbool status;
int RetValue;
- clock_t clk;
+ abctime clk;
extern int Abc_NodeAddClausesTop( sat_solver * pSat, Abc_Obj_t * pNode, Vec_Int_t * vVars );
extern Vec_Int_t * Abc_NtkGetCiSatVarNums( Abc_Ntk_t * pNtk );
@@ -887,7 +887,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
// fprintf( stdout, "Warning: The miter has %d outputs. SAT will try to prove all of them.\n", Abc_NtkPoNum(pNtk) );
// load clauses into the sat_solver
- clk = clock();
+ clk = Abc_Clock();
@@ -900,13 +900,13 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
//return 1;
// printf( "Created SAT problem with %d variable and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// PRT( "Time", clock() - clk );
+// PRT( "Time", Abc_Clock() - clk );
// simplify the problem
- clk = clock();
+ clk = Abc_Clock();
status = sat_solver_simplify(pSat);
// printf( "Simplified the problem to %d variables and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// PRT( "Time", clock() - clk );
+// PRT( "Time", Abc_Clock() - clk );
if ( status == 0 )
{
sat_solver_delete( pSat );
@@ -915,7 +915,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
}
// solve the miter
- clk = clock();
+ clk = Abc_Clock();
if ( fVerbose )
pSat->verbosity = 1;
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
@@ -936,7 +936,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
}
else
assert( 0 );
-// PRT( "SAT sat_solver time", clock() - clk );
+// PRT( "SAT sat_solver time", Abc_Clock() - clk );
// printf( "The number of conflicts = %d.\n", (int)pSat->sat_solver_stats.conflicts );
// if the problem is SAT, get the counterexample
@@ -1583,7 +1583,7 @@ float refineBySAT(Abc_Ntk_t * pNtk1, Vec_Int_t ** iMatch1, int * iGroup1, Vec_In
Vec_Int_t * oMatchedGroups;
FILE *result;
int matchFound;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
float satTime = 0.0;
/*matchFile = fopen("satmatch.txt", "w");*/
@@ -1712,7 +1712,7 @@ float refineBySAT(Abc_Ntk_t * pNtk1, Vec_Int_t ** iMatch1, int * iGroup1, Vec_In
Abc_NtkDelete(subNtk2);
}
- satTime = (float)(clock() - clk)/(float)(CLOCKS_PER_SEC);
+ satTime = (float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC);
if( matchFound )
{
@@ -1788,7 +1788,7 @@ void bmGateWay( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int p_equivalence )
char * vPiValues1, * vPiValues2;
int * observability1, * observability2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
float initTime;
float simulTime;
float satTime;
@@ -1930,8 +1930,8 @@ void bmGateWay( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int p_equivalence )
printf(" done!\n");
- initTime = ((float)(clock() - clk)/(float)(CLOCKS_PER_SEC));
- clk = clock();
+ initTime = ((float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC));
+ clk = Abc_Clock();
topOrder1 = findTopologicalOrder(pNtk1);
topOrder2 = findTopologicalOrder(pNtk2);
@@ -1982,7 +1982,7 @@ void bmGateWay( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int p_equivalence )
printf(" done!\n");
- simulTime = (float)(clock() - clk)/(float)(CLOCKS_PER_SEC);
+ simulTime = (float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC);
printf("SAT-based search started ...\n");
satTime = refineBySAT(pNtk1, iMatch1, iGroup1, iDep1, &iLastItem1, oMatch1, oGroup1, oDep1, &oLastItem1, observability1,
diff --git a/src/base/abci/abcCas.c b/src/base/abci/abcCas.c
index f9fae27f..1ded2f27 100644
--- a/src/base/abci/abcCas.c
+++ b/src/base/abci/abcCas.c
@@ -61,7 +61,7 @@ Abc_Ntk_t * Abc_NtkCascade( Abc_Ntk_t * pNtk, int nLutSize, int fCheck, int fVer
char * pFileGeneric;
int fBddSizeMax = 500000;
int i, fReorder = 1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// compute the global BDDs
@@ -72,7 +72,7 @@ Abc_Ntk_t * Abc_NtkCascade( Abc_Ntk_t * pNtk, int nLutSize, int fCheck, int fVer
{
DdManager * dd = (DdManager *)Abc_NtkGlobalBddMan( pNtk );
printf( "Shared BDD size = %6d nodes. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
- ABC_PRT( "BDD construction time", clock() - clk );
+ ABC_PRT( "BDD construction time", Abc_Clock() - clk );
}
// collect global BDDs
diff --git a/src/base/abci/abcCollapse.c b/src/base/abci/abcCollapse.c
index 6d3fbbce..20fe04b5 100644
--- a/src/base/abci/abcCollapse.c
+++ b/src/base/abci/abcCollapse.c
@@ -49,7 +49,7 @@ static Abc_Obj_t * Abc_NodeFromGlobalBdds( Abc_Ntk_t * pNtkNew, DdManager * dd,
Abc_Ntk_t * Abc_NtkCollapse( Abc_Ntk_t * pNtk, int fBddSizeMax, int fDualRail, int fReorder, int fVerbose )
{
Abc_Ntk_t * pNtkNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// compute the global BDDs
@@ -59,7 +59,7 @@ Abc_Ntk_t * Abc_NtkCollapse( Abc_Ntk_t * pNtk, int fBddSizeMax, int fDualRail, i
{
DdManager * dd = (DdManager *)Abc_NtkGlobalBddMan( pNtk );
printf( "Shared BDD size = %6d nodes. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
- ABC_PRT( "BDD construction time", clock() - clk );
+ ABC_PRT( "BDD construction time", Abc_Clock() - clk );
}
// create the new network
diff --git a/src/base/abci/abcCut.c b/src/base/abci/abcCut.c
index bf64ce99..abf5b55a 100644
--- a/src/base/abci/abcCut.c
+++ b/src/base/abci/abcCut.c
@@ -128,7 +128,7 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
Vec_Ptr_t * vNodes;
Vec_Int_t * vChoices;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
extern void Abc_NtkBalanceAttach( Abc_Ntk_t * pNtk );
extern void Abc_NtkBalanceDetach( Abc_Ntk_t * pNtk );
@@ -201,10 +201,10 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
Vec_PtrFree( vNodes );
Vec_IntFree( vChoices );
Cut_ManPrintStats( p );
-ABC_PRT( "TOTAL", clock() - clk );
+ABC_PRT( "TOTAL", Abc_Clock() - clk );
// printf( "Area = %d.\n", Abc_NtkComputeArea( pNtk, p ) );
//Abc_NtkPrintCuts( p, pNtk, 0 );
-// Cut_ManPrintStatsToFile( p, pNtk->pSpec, clock() - clk );
+// Cut_ManPrintStatsToFile( p, pNtk->pSpec, Abc_Clock() - clk );
// temporary printout of stats
if ( nTotal )
@@ -229,7 +229,7 @@ void Abc_NtkCutsOracle( Abc_Ntk_t * pNtk, Cut_Oracle_t * p )
{
Abc_Obj_t * pObj;
Vec_Ptr_t * vNodes;
- int i; //, clk = clock();
+ int i; //, clk = Abc_Clock();
int fDrop = Cut_OracleReadDrop(p);
assert( Abc_NtkIsStrash(pNtk) );
@@ -268,7 +268,7 @@ void Abc_NtkCutsOracle( Abc_Ntk_t * pNtk, Cut_Oracle_t * p )
}
}
Vec_PtrFree( vNodes );
-//ABC_PRT( "Total", clock() - clk );
+//ABC_PRT( "Total", Abc_Clock() - clk );
//Abc_NtkPrintCuts_( p, pNtk, 0 );
}
@@ -291,7 +291,7 @@ Cut_Man_t * Abc_NtkSeqCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
Abc_Obj_t * pObj, * pNode;
int i, nIters, fStatus;
Vec_Int_t * vChoices;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsSeq(pNtk) );
assert( pParams->fSeq );
@@ -368,7 +368,7 @@ Cut_Man_t * Abc_NtkSeqCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
if ( pParams->fVerbose )
{
Cut_ManPrintStats( p );
-ABC_PRT( "TOTAL ", clock() - clk );
+ABC_PRT( "TOTAL ", Abc_Clock() - clk );
printf( "Converged after %d iterations.\n", nIters );
}
//Abc_NtkPrintCuts( p, pNtk, 1 );
diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c
index c351df45..de750146 100644
--- a/src/base/abci/abcDar.c
+++ b/src/base/abci/abcDar.c
@@ -1225,7 +1225,7 @@ Abc_Ntk_t * Abc_NtkDRewrite( Abc_Ntk_t * pNtk, Dar_RwrPar_t * pPars )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@@ -1243,10 +1243,10 @@ Abc_Ntk_t * Abc_NtkDRewrite( Abc_Ntk_t * pNtk, Dar_RwrPar_t * pPars )
// pMan = Dar_ManBalance( pTemp = pMan, pPars->fUpdateLevel );
// Aig_ManStop( pTemp );
-clk = clock();
+clk = Abc_Clock();
pMan = Aig_ManDupDfs( pTemp = pMan );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1269,7 +1269,7 @@ Abc_Ntk_t * Abc_NtkDRefactor( Abc_Ntk_t * pNtk, Dar_RefPar_t * pPars )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@@ -1280,10 +1280,10 @@ Abc_Ntk_t * Abc_NtkDRefactor( Abc_Ntk_t * pNtk, Dar_RefPar_t * pPars )
// pMan = Dar_ManBalance( pTemp = pMan, pPars->fUpdateLevel );
// Aig_ManStop( pTemp );
-clk = clock();
+clk = Abc_Clock();
pMan = Aig_ManDupDfs( pTemp = pMan );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1306,17 +1306,17 @@ Abc_Ntk_t * Abc_NtkDC2( Abc_Ntk_t * pNtk, int fBalance, int fUpdateLevel, int fF
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
// Aig_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Dar_ManCompress2( pTemp = pMan, fBalance, fUpdateLevel, fFanout, fPower, fVerbose );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1369,12 +1369,12 @@ Abc_Ntk_t * Abc_NtkDch( Abc_Ntk_t * pNtk, Dch_Pars_t * pPars )
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
Gia_Man_t * pGia;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
-clk = clock();
+clk = Abc_Clock();
if ( pPars->fSynthesis )
pGia = Dar_NewChoiceSynthesis( pMan, 1, 1, pPars->fPower, pPars->fLightSynth, pPars->fVerbose );
else
@@ -1382,7 +1382,7 @@ clk = clock();
pGia = Gia_ManFromAig( pMan );
Aig_ManStop( pMan );
}
-pPars->timeSynth = clock() - clk;
+pPars->timeSynth = Abc_Clock() - clk;
if ( pPars->fUseGia )
pMan = Cec_ComputeChoices( pGia, pPars );
else
@@ -1412,17 +1412,17 @@ Abc_Ntk_t * Abc_NtkDrwsat( Abc_Ntk_t * pNtk, int fBalance, int fVerbose )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
// Aig_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Dar_ManRwsat( pTemp = pMan, fBalance, fVerbose );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1520,7 +1520,7 @@ Abc_Ntk_t * Abc_NtkDarToCnf( Abc_Ntk_t * pNtk, char * pFileName, int fFastAlgo,
// Cnf_Man_t * pManCnf = NULL;
Cnf_Dat_t * pCnf;
Abc_Ntk_t * pNtkNew = NULL;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// convert to the AIG manager
@@ -1551,7 +1551,7 @@ Abc_Ntk_t * Abc_NtkDarToCnf( Abc_Ntk_t * pNtk, char * pFileName, int fFastAlgo,
if ( fVerbose )
{
Abc_Print( 1, "Vars = %6d. Clauses = %7d. Literals = %8d. ", pCnf->nVars, pCnf->nClauses, pCnf->nLiterals );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/*
@@ -1584,7 +1584,7 @@ Abc_Ntk_t * Abc_NtkDarToCnf( Abc_Ntk_t * pNtk, char * pFileName, int fFastAlgo,
int Abc_NtkDSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int nLearnedStart, int nLearnedDelta, int nLearnedPerce, int fAlignPol, int fAndOuts, int fNewSolver, int fVerbose )
{
Aig_Man_t * pMan;
- int RetValue;//, clk = clock();
+ int RetValue;//, clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
assert( Abc_NtkLatchNum(pNtk) == 0 );
// assert( Abc_NtkPoNum(pNtk) == 1 );
@@ -1610,7 +1610,7 @@ int Abc_NtkPartitionedSat( Abc_Ntk_t * pNtk, int nAlgo, int nPartSize, int nConf
{
extern int Aig_ManPartitionedSat( Aig_Man_t * pNtk, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose );
Aig_Man_t * pMan;
- int RetValue;//, clk = clock();
+ int RetValue;//, clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
assert( Abc_NtkLatchNum(pNtk) == 0 );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
@@ -1636,7 +1636,7 @@ int Abc_NtkDarCec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConfLimit, int fPa
Aig_Man_t * pMan, * pMan1, * pMan2;
Abc_Ntk_t * pMiter;
int RetValue;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
/*
{
extern void Cec_ManVerifyTwoAigs( Aig_Man_t * pAig0, Aig_Man_t * pAig1, int fVerbose );
@@ -1721,17 +1721,17 @@ finish:
if ( RetValue == 1 )
{
Abc_Print( 1, "Networks are equivalent. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else if ( RetValue == 0 )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else
{
Abc_Print( 1, "Networks are UNDECIDED. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
fflush( stdout );
return RetValue;
@@ -1753,7 +1753,7 @@ Abc_Ntk_t * Abc_NtkDarSeqSweep( Abc_Ntk_t * pNtk, Fra_Ssw_t * pPars )
Fraig_Params_t Params;
Abc_Ntk_t * pNtkAig = NULL, * pNtkFraig;
Aig_Man_t * pMan, * pTemp;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// preprocess the miter by fraiging it
// (note that for each functional class, fraiging leaves one representative;
@@ -1765,7 +1765,7 @@ Abc_Ntk_t * Abc_NtkDarSeqSweep( Abc_Ntk_t * pNtk, Fra_Ssw_t * pPars )
pNtkFraig = Abc_NtkFraig( pNtk, &Params, 0, 0 );
if ( pPars->fVerbose )
{
-ABC_PRT( "Initial fraiging time", clock() - clk );
+ABC_PRT( "Initial fraiging time", Abc_Clock() - clk );
}
}
else
@@ -2037,8 +2037,8 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
Aig_Man_t * pMan;
Vec_Int_t * vMap = NULL;
int status, RetValue = -1;
- clock_t clk = clock();
- clock_t nTimeLimit = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clk = Abc_Clock();
+ abctime nTimeLimit = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
// derive the AIG manager
if ( fOrDecomp )
pMan = Abc_NtkToDarBmc( pNtk, &vMap );
@@ -2069,7 +2069,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
else if ( RetValue == -1 )
{
Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(iFrame,0) );
- if ( nTimeLimit && clock() > nTimeLimit )
+ if ( nTimeLimit && Abc_Clock() > nTimeLimit )
Abc_Print( 1, "(timeout %d sec). ", nTimeLimit );
else
Abc_Print( 1, "(conf limit %d). ", nBTLimit );
@@ -2079,7 +2079,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
Abc_Cex_t * pCex = pNtk->pSeqModel;
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pCex->iPo, pNtk->pName, pCex->iFrame );
}
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
else
{
@@ -2119,8 +2119,8 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
Aig_Man_t * pMan;
Vec_Int_t * vMap = NULL;
int status, RetValue = -1;
- clock_t clk = clock();
- clock_t nTimeOut = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clk = Abc_Clock();
+ abctime nTimeOut = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
if ( fOrDecomp && !pPars->fSolveAll )
pMan = Abc_NtkToDarBmc( pNtk, &vMap );
else
@@ -2147,7 +2147,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
if ( pPars->nFailOuts == 0 )
{
Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(pPars->iFrame,0) );
- if ( nTimeOut && clock() > nTimeOut )
+ if ( nTimeOut && Abc_Clock() > nTimeOut )
Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
else
Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
@@ -2155,7 +2155,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
else
{
Abc_Print( 1, "The total of %d outputs asserted in %d frames. Resource limit reached ", pPars->nFailOuts, pPars->iFrame );
- if ( clock() > nTimeOut )
+ if ( Abc_Clock() > nTimeOut )
Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
else
Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
@@ -2187,7 +2187,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
pNtk->vSeqModelVec = pMan->vSeqModelVec; pMan->vSeqModelVec = NULL;
}
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pNtk->pSeqModel )
{
status = Saig_ManVerifyCex( pMan, pNtk->pSeqModel );
@@ -2216,7 +2216,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
int Abc_NtkDarBmcInter_int( Aig_Man_t * pMan, Inter_ManParams_t * pPars, Aig_Man_t ** ppNtkRes )
{
int RetValue = -1, iFrame;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int nTotalProvedSat = 0;
assert( pMan->nRegs > 0 );
if ( ppNtkRes )
@@ -2307,7 +2307,7 @@ int Abc_NtkDarBmcInter_int( Aig_Man_t * pMan, Inter_ManParams_t * pPars, Aig_Man
Abc_Print( 1, "Property UNDECIDED. " );
else
assert( 0 );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
return RetValue;
}
@@ -2541,13 +2541,13 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
{
Aig_Man_t * pMan;
int iFrame = -1, RetValue = -1;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
if ( pSecPar->fTryComb || Abc_NtkLatchNum(pNtk) == 0 )
{
Prove_Params_t Params, * pParams = &Params;
Abc_Ntk_t * pNtkComb;
int RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkLatchNum(pNtk) == 0 )
Abc_Print( 1, "The network has no latches. Running CEC.\n" );
// create combinational network
@@ -2563,11 +2563,11 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
{
pNtk->pModel = pNtkComb->pModel; pNtkComb->pModel = NULL;
Abc_Print( 1, "Networks are not equivalent.\n" );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pSecPar->fReportSolution )
{
Abc_Print( 1, "SOLUTION: FAIL " );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
return RetValue;
}
@@ -2576,11 +2576,11 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
if ( RetValue == 1 )
{
Abc_Print( 1, "Networks are equivalent after CEC. " );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pSecPar->fReportSolution )
{
Abc_Print( 1, "SOLUTION: PASS " );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
return RetValue;
}
@@ -2603,7 +2603,7 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
if ( pSecPar->fReportSolution )
{
Abc_Print( 1, "SOLUTION: FAIL " );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
// return the counter-example generated
ABC_FREE( pNtk->pModel );
@@ -2738,7 +2738,7 @@ int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * pSecPar )
int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Pdr_Par_t * pPars )
{
int RetValue = -1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Aig_Man_t * pMan;
pMan = Abc_NtkToDar( pNtk, 0, 1 );
if ( pMan == NULL )
@@ -2773,7 +2773,7 @@ int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Pdr_Par_t * pPars )
else
assert( 0 );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
/*
Abc_Print( 1, "Status: " );
if ( pPars->pOutMap )
@@ -3219,7 +3219,7 @@ int Abc_NtkDarSeqSim( Abc_Ntk_t * pNtk, int nFrames, int nWords, int TimeOut, in
Aig_Man_t * pMan;
Abc_Cex_t * pCex;
int status, RetValue = -1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum(pNtk) )
{
Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
@@ -3296,7 +3296,7 @@ int Abc_NtkDarSeqSim( Abc_Ntk_t * pNtk, int nFrames, int nWords, int TimeOut, in
}
Fra_SmlStop( pSml );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
Aig_ManStop( pMan );
return RetValue;
}
@@ -3316,7 +3316,7 @@ int Abc_NtkDarSeqSim3( Abc_Ntk_t * pNtk, Ssw_RarPars_t * pPars )
{
Aig_Man_t * pMan;
int status, RetValue = -1;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum(pNtk) )
{
Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
@@ -3346,7 +3346,7 @@ int Abc_NtkDarSeqSim3( Abc_Ntk_t * pNtk, Ssw_RarPars_t * pPars )
if ( pNtk->vSeqModelVec )
Vec_PtrFreeFree( pNtk->vSeqModelVec );
pNtk->vSeqModelVec = pMan->vSeqModelVec; pMan->vSeqModelVec = NULL;
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
pNtk->pData = pMan->pData; pMan->pData = NULL;
Aig_ManStop( pMan );
return RetValue;
@@ -3454,7 +3454,7 @@ Abc_Ntk_t * Abc_NtkDarTempor( Abc_Ntk_t * pNtk, int nFrames, int TimeOut, int nC
int Abc_NtkDarInduction( Abc_Ntk_t * pNtk, int nFramesMax, int nConfMax, int fUnique, int fUniqueAll, int fGetCex, int fVerbose, int fVeryVerbose )
{
Aig_Man_t * pMan;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int RetValue;
pMan = Abc_NtkToDar( pNtk, 0, 1 );
if ( pMan == NULL )
@@ -3463,17 +3463,17 @@ int Abc_NtkDarInduction( Abc_Ntk_t * pNtk, int nFramesMax, int nConfMax, int fUn
if ( RetValue == 1 )
{
Abc_Print( 1, "Networks are equivalent. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else if ( RetValue == 0 )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else
{
Abc_Print( 1, "Networks are UNDECIDED. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( fGetCex )
{
@@ -3568,9 +3568,9 @@ void Abc_NtkInterFast( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbose )
Aig_ManStop( pManOff );
}
-clock_t timeCnf;
-clock_t timeSat;
-clock_t timeInt;
+abctime timeCnf;
+abctime timeSat;
+abctime timeInt;
/**Function*************************************************************
@@ -3587,7 +3587,7 @@ Abc_Ntk_t * Abc_NtkInter( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fRelation
{
Abc_Ntk_t * pNtkOn1, * pNtkOff1, * pNtkInter1, * pNtkInter;
Abc_Obj_t * pObj;
- int i; //, clk = clock();
+ int i; //, clk = Abc_Clock();
if ( Abc_NtkCoNum(pNtkOn) != Abc_NtkCoNum(pNtkOff) )
{
Abc_Print( 1, "Currently works only for networks with equal number of POs.\n" );
@@ -3639,7 +3639,7 @@ timeInt = 0;
// ABC_PRT( "CNF", timeCnf );
// ABC_PRT( "SAT", timeSat );
// ABC_PRT( "Int", timeInt );
-// ABC_PRT( "Slow interpolation time", clock() - clk );
+// ABC_PRT( "Slow interpolation time", Abc_Clock() - clk );
// return the network
if ( !Abc_NtkCheck( pNtkInter ) )
diff --git a/src/base/abci/abcDebug.c b/src/base/abci/abcDebug.c
index 7dae346c..db795c60 100644
--- a/src/base/abci/abcDebug.c
+++ b/src/base/abci/abcDebug.c
@@ -52,7 +52,7 @@ void Abc_NtkAutoDebug( Abc_Ntk_t * pNtk, int (*pFuncError) (Abc_Ntk_t *) )
Abc_Ntk_t * pNtkMod;
char * pFileName = "bug_found.blif";
int i, nSteps, nIter, ModNum, RandNum = 1;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Abc_NtkIsLogic(pNtk) );
srand( 0x123123 );
// create internal copy of the network
@@ -66,7 +66,7 @@ void Abc_NtkAutoDebug( Abc_Ntk_t * pNtk, int (*pFuncError) (Abc_Ntk_t *) )
// perform incremental modifications
for ( nIter = 0; ; nIter++ )
{
- clk = clock();
+ clk = Abc_Clock();
// count how many ways of modifying the network exists
nSteps = 2 * Abc_NtkCountFaninsTotal(pNtk);
// try modifying the network as many times
@@ -91,14 +91,14 @@ void Abc_NtkAutoDebug( Abc_Ntk_t * pNtk, int (*pFuncError) (Abc_Ntk_t *) )
}
printf( "Iter %6d : Latches = %6d. Nodes = %6d. Steps = %6d. Error step = %3d. ",
nIter, Abc_NtkLatchNum(pNtk), Abc_NtkNodeNum(pNtk), nSteps, i );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( i == nSteps ) // could not modify it while preserving the bug
break;
}
// write out the final network
Io_WriteBlifLogic( pNtk, pFileName, 1 );
printf( "Final network written into file \"%s\". ", pFileName );
- ABC_PRT( "Total time", clock() - clkTotal );
+ ABC_PRT( "Total time", Abc_Clock() - clkTotal );
Abc_NtkDelete( pNtk );
}
diff --git a/src/base/abci/abcDec.c b/src/base/abci/abcDec.c
index d232d5aa..57a17ffe 100644
--- a/src/base/abci/abcDec.c
+++ b/src/base/abci/abcDec.c
@@ -464,7 +464,7 @@ void Abc_TtStoreTest( char * pFileName )
***********************************************************************/
void Abc_TruthDecPerform( Abc_TtStore_t * p, int DecType, int fVerbose )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i, nNodes = 0;
char * pAlgoName = NULL;
@@ -556,7 +556,7 @@ void Abc_TruthDecPerform( Abc_TtStore_t * p, int DecType, int fVerbose )
else assert( 0 );
printf( "AIG nodes =%9d ", nNodes );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abcDress2.c b/src/base/abci/abcDress2.c
index 9f8cc568..4aedf253 100644
--- a/src/base/abci/abcDress2.c
+++ b/src/base/abci/abcDress2.c
@@ -358,7 +358,7 @@ void Abc_NtkDressPrintEquivs( Vec_Ptr_t * vRes )
SeeAlso []
***********************************************************************/
-void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, clock_t Time )
+void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, abctime Time )
{
Vec_Int_t * vClass;
int i, k, Entry;
@@ -419,10 +419,10 @@ void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, clock_t
void Abc_NtkDress2( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConflictLimit, int fVerbose )
{
Vec_Ptr_t * vRes;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vRes = Abc_NtkDressComputeEquivs( pNtk1, pNtk2, nConflictLimit, fVerbose );
// Abc_NtkDressPrintEquivs( vRes );
- Abc_NtkDressPrintStats( vRes, Abc_NtkNodeNum(pNtk1), Abc_NtkNodeNum(pNtk1), clock() - clk );
+ Abc_NtkDressPrintStats( vRes, Abc_NtkNodeNum(pNtk1), Abc_NtkNodeNum(pNtk1), Abc_Clock() - clk );
Vec_VecFree( (Vec_Vec_t *)vRes );
}
diff --git a/src/base/abci/abcFraig.c b/src/base/abci/abcFraig.c
index 60b8d662..4621f508 100644
--- a/src/base/abci/abcFraig.c
+++ b/src/base/abci/abcFraig.c
@@ -698,7 +698,7 @@ Abc_Ntk_t * Abc_NtkFraigRestore()
Vec_Ptr_t * vStore;
Abc_Ntk_t * pNtk, * pFraig;
int nWords1, nWords2, nWordsMin;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
// get the stored network
vStore = Abc_FrameReadStore();
@@ -744,7 +744,7 @@ Abc_Ntk_t * Abc_NtkFraigRestore()
// perform partitioned computation of structural choices
pFraig = Abc_NtkFraigPartitioned( vStore, &Params );
Abc_NtkFraigStoreClean();
-//ABC_PRT( "Total choicing time", clock() - clk );
+//ABC_PRT( "Total choicing time", Abc_Clock() - clk );
return pFraig;
}
diff --git a/src/base/abci/abcFx.c b/src/base/abci/abcFx.c
index 83136118..be6192f0 100644
--- a/src/base/abci/abcFx.c
+++ b/src/base/abci/abcFx.c
@@ -102,7 +102,7 @@ struct Fx_Man_t_
Vec_Int_t * vCubeFree; // cube-free divisor
Vec_Int_t * vDiv; // selected divisor
// statistics
- clock_t timeStart; // starting time
+ abctime timeStart; // starting time
int nVars; // original problem variables
int nLits; // the number of SOP literals
int nDivs; // the number of extracted divisors
@@ -435,7 +435,7 @@ static inline void Fx_PrintDiv( Fx_Man_t * p, int iDiv )
printf( " " );
printf( "Lits =%7d ", p->nLits );
printf( "Divs =%8d ", Hsh_VecSize(p->pHash) );
- Abc_PrintTime( 1, "Time", clock() - p->timeStart );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - p->timeStart );
}
static void Fx_PrintDivisors( Fx_Man_t * p )
{
@@ -480,7 +480,7 @@ static void Fx_PrintMatrix( Fx_Man_t * p )
Fx_PrintLiterals( p );
Fx_PrintDivisors( p );
}
-static void Fx_PrintStats( Fx_Man_t * p, clock_t clk )
+static void Fx_PrintStats( Fx_Man_t * p, abctime clk )
{
printf( "Cubes =%7d ", Vec_WecSizeUsed(p->vCubes) );
printf( "Lits =%7d ", Vec_WecSizeUsed(p->vLits) );
@@ -1116,7 +1116,7 @@ int Fx_FastExtract( Vec_Wec_t * vCubes, int ObjIdMax, int nNewNodesMax, int LitC
int fVeryVerbose = 0;
int i, iDiv;
Fx_Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// initialize the data-structure
p = Fx_ManStart( vCubes );
p->LitCountMax = LitCountMax;
@@ -1125,9 +1125,9 @@ int Fx_FastExtract( Vec_Wec_t * vCubes, int ObjIdMax, int nNewNodesMax, int LitC
if ( fVeryVerbose )
Fx_PrintMatrix( p );
if ( fVerbose )
- Fx_PrintStats( p, clock() - clk );
+ Fx_PrintStats( p, Abc_Clock() - clk );
// perform extraction
- p->timeStart = clock();
+ p->timeStart = Abc_Clock();
for ( i = 0; i < nNewNodesMax && Vec_QueTopCost(p->vPrio) > 0.0; i++ )
{
iDiv = Vec_QuePop(p->vPrio);
diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c
index 926f3e74..82b45248 100644
--- a/src/base/abci/abcIf.c
+++ b/src/base/abci/abcIf.c
@@ -71,7 +71,7 @@ void Abc_NtkIfComputeSwitching( Abc_Ntk_t * pNtk, If_Man_t * pIfMan )
Aig_Man_t * pAig;
If_Obj_t * pObjIf;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// map IF objects into old network
Abc_NtkForEachObj( pNtk, pObjAbc, i )
if ( (pObjIf = (If_Obj_t *)pObjAbc->pTemp) )
@@ -99,7 +99,7 @@ void Abc_NtkIfComputeSwitching( Abc_Ntk_t * pNtk, If_Man_t * pIfMan )
pSwitching[i] = pObjAbc->dTemp;
if ( pIfMan->pPars->fVerbose )
{
- ABC_PRT( "Computing switching activity", clock() - clk );
+ ABC_PRT( "Computing switching activity", Abc_Clock() - clk );
}
}
diff --git a/src/base/abci/abcIvy.c b/src/base/abci/abcIvy.c
index ae75e9fc..fd4f7d1c 100644
--- a/src/base/abci/abcIvy.c
+++ b/src/base/abci/abcIvy.c
@@ -84,7 +84,7 @@ extern int timeRetime;
Ivy_Man_t * Abc_NtkIvyBefore( Abc_Ntk_t * pNtk, int fSeq, int fUseDc )
{
Ivy_Man_t * pMan;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
assert( !Abc_NtkIsNetlist(pNtk) );
if ( Abc_NtkIsBddLogic(pNtk) )
{
@@ -119,7 +119,7 @@ Ivy_Man_t * Abc_NtkIvyBefore( Abc_Ntk_t * pNtk, int fSeq, int fUseDc )
Vec_IntFree( vInit );
// Ivy_ManPrintStats( pMan );
}
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
return pMan;
}
@@ -197,7 +197,7 @@ Abc_Ntk_t * Abc_NtkIvyHaig( Abc_Ntk_t * pNtk, int nIters, int fUseZeroCost, int
{
Abc_Ntk_t * pNtkAig;
Ivy_Man_t * pMan;
- clock_t clk;
+ abctime clk;
// int i;
/*
extern int nMoves;
@@ -213,9 +213,9 @@ timeInv = 0;
pMan = Abc_NtkIvyBefore( pNtk, 1, 1 );
if ( pMan == NULL )
return NULL;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
-clk = clock();
+clk = Abc_Clock();
Ivy_ManHaigStart( pMan, fVerbose );
// Ivy_ManRewriteSeq( pMan, 0, 0 );
// for ( i = 0; i < nIters; i++ )
@@ -227,7 +227,7 @@ clk = clock();
Ivy_ManRewriteSeq( pMan, 1, 0 );
//printf( "%d ", Ivy_ManNodeNum(pMan) );
//printf( "%d ", Ivy_ManNodeNum(pMan->pHaig) );
-//ABC_PRT( " ", clock() - clk );
+//ABC_PRT( " ", Abc_Clock() - clk );
//printf( "\n" );
/*
printf( "Moves = %d. ", nMoves );
@@ -238,7 +238,7 @@ clk = clock();
// Ivy_ManRewriteSeq( pMan, 1, 0 );
//printf( "Haig size = %d.\n", Ivy_ManNodeNum(pMan->pHaig) );
// Ivy_ManHaigPostprocess( pMan, fVerbose );
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// write working AIG into the current network
// pNtkAig = Abc_NtkIvyAfter( pNtk, pMan, 1, 0 );
@@ -289,9 +289,9 @@ Abc_Ntk_t * Abc_NtkIvyRewrite( Abc_Ntk_t * pNtk, int fUpdateLevel, int fUseZeroC
pMan = Abc_NtkIvyBefore( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
Ivy_ManRewritePre( pMan, fUpdateLevel, fUseZeroCost, fVerbose );
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
pNtkAig = Abc_NtkIvyAfter( pNtk, pMan, 0, 0 );
Ivy_ManStop( pMan );
return pNtkAig;
@@ -315,9 +315,9 @@ Abc_Ntk_t * Abc_NtkIvyRewriteSeq( Abc_Ntk_t * pNtk, int fUseZeroCost, int fVerbo
pMan = Abc_NtkIvyBefore( pNtk, 1, 1 );
if ( pMan == NULL )
return NULL;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
Ivy_ManRewriteSeq( pMan, fUseZeroCost, fVerbose );
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// Ivy_ManRewriteSeq( pMan, 1, 0 );
// Ivy_ManRewriteSeq( pMan, 1, 0 );
pNtkAig = Abc_NtkIvyAfter( pNtk, pMan, 1, 0 );
@@ -543,7 +543,7 @@ int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars )
// apply AIG rewriting
if ( pParams->fUseRewriting && Abc_NtkNodeNum(pNtk) > 500 )
{
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
//printf( "Before rwsat = %d. ", Abc_NtkNodeNum(pNtk) );
pParams->fUseRewriting = 0;
pNtk = Abc_NtkBalance( pNtkTemp = pNtk, 0, 0, 0 );
@@ -554,7 +554,7 @@ int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars )
Abc_NtkRewrite( pNtk, 0, 0, 0, 0, 0 );
Abc_NtkRefactor( pNtk, 10, 16, 0, 0, 0, 0 );
//printf( "After rwsat = %d. ", Abc_NtkNodeNum(pNtk) );
-//ABC_PRT( "Time", clock() - clk );
+//ABC_PRT( "Time", Abc_Clock() - clk );
}
// convert ABC network into IVY network
diff --git a/src/base/abci/abcLutmin.c b/src/base/abci/abcLutmin.c
index b4856779..acbeee70 100644
--- a/src/base/abci/abcLutmin.c
+++ b/src/base/abci/abcLutmin.c
@@ -86,7 +86,7 @@ void Abc_NtkCheckAbsorb( Abc_Ntk_t * pNtk, int nLutSize )
Vec_Ptr_t * vFanins;
Abc_Obj_t * pObj, * pFanin;
int i, k, Counter = 0, Counter2 = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vCounts = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
vFanins = Vec_PtrAlloc( 100 );
Abc_NtkForEachNode( pNtk, pObj, i )
@@ -106,7 +106,7 @@ void Abc_NtkCheckAbsorb( Abc_Ntk_t * pNtk, int nLutSize )
printf( "Absorted = %6d. (%6.2f %%) Fully = %6d. (%6.2f %%) ",
Counter, 100.0 * Counter / Abc_NtkNodeNum(pNtk),
Counter2, 100.0 * Counter2 / Abc_NtkNodeNum(pNtk) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abcMap.c b/src/base/abci/abcMap.c
index 0476ec92..8ceb463e 100644
--- a/src/base/abci/abcMap.c
+++ b/src/base/abci/abcMap.c
@@ -65,7 +65,7 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti,
Map_Man_t * pMan;
Vec_Int_t * vSwitching = NULL;
float * pSwitching = NULL;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
assert( Abc_NtkIsStrash(pNtk) );
@@ -124,14 +124,14 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti,
if ( pSwitching ) Vec_IntFree( vSwitching );
if ( pMan == NULL )
return NULL;
-clk = clock();
+clk = Abc_Clock();
Map_ManSetSwitching( pMan, fSwitching );
if ( !Map_Mapping( pMan ) )
{
Map_ManFree( pMan );
return NULL;
}
-// Map_ManPrintStatsToFile( pNtk->pSpec, Map_ManReadAreaFinal(pMan), Map_ManReadRequiredGlo(pMan), clock()-clk );
+// Map_ManPrintStatsToFile( pNtk->pSpec, Map_ManReadAreaFinal(pMan), Map_ManReadRequiredGlo(pMan), Abc_Clock()-clk );
// reconstruct the network after mapping
pNtkNew = Abc_NtkFromMap( pMan, pNtk );
@@ -143,7 +143,7 @@ clk = clock();
pNtkNew->pExdc = Abc_NtkDup( pNtk->pExdc );
if ( fVerbose )
{
-ABC_PRT( "Total runtime", clock() - clkTotal );
+ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
}
// make sure that everything is okay
diff --git a/src/base/abci/abcMerge.c b/src/base/abci/abcMerge.c
index 52fa817b..d5b58340 100644
--- a/src/base/abci/abcMerge.c
+++ b/src/base/abci/abcMerge.c
@@ -286,7 +286,7 @@ Vec_Int_t * Abc_NtkLutMerge( Abc_Ntk_t * pNtk, Nwk_LMPars_t * pPars )
Vec_Ptr_t * vStart, * vNext, * vCands1, * vCands2;
Abc_Obj_t * pLut, * pCand;
int i, k, nVertsMax, nCands;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// count the number of vertices
nVertsMax = 0;
Abc_NtkForEachNode( pNtk, pLut, i )
@@ -326,16 +326,16 @@ Vec_Int_t * Abc_NtkLutMerge( Abc_Ntk_t * pNtk, Nwk_LMPars_t * pPars )
if ( pPars->fVerbose )
{
printf( "Mergable LUTs = %6d. Total cands = %6d. ", p->nVertsMax, nCands );
- ABC_PRT( "Deriving graph", clock() - clk );
+ ABC_PRT( "Deriving graph", Abc_Clock() - clk );
}
// solve the graph problem
- clk = clock();
+ clk = Abc_Clock();
Nwk_ManGraphSolve( p );
if ( pPars->fVerbose )
{
printf( "GRAPH: Nodes = %6d. Edges = %6d. Pairs = %6d. ",
p->nVerts, p->nEdges, Vec_IntSize(p->vPairs)/2 );
- ABC_PRT( "Solving", clock() - clk );
+ ABC_PRT( "Solving", Abc_Clock() - clk );
Nwk_ManGraphReportMemoryUsage( p );
}
vResult = p->vPairs; p->vPairs = NULL;
diff --git a/src/base/abci/abcMffc.c b/src/base/abci/abcMffc.c
index f55b3b52..ad55ce04 100644
--- a/src/base/abci/abcMffc.c
+++ b/src/base/abci/abcMffc.c
@@ -546,7 +546,7 @@ void Abc_NktMffcTestSuper( Abc_Ntk_t * pNtk )
Vec_Int_t * vCounts, * vNumbers, * vSizes, * vMarks;
Vec_Int_t * vNode1, * vNode2;
int i, k, Entry, nSizes;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vRoots = Abc_NktMffcMarkRoots( pNtk, 1 );
vFanins = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) );
vFanouts = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) );
@@ -658,7 +658,7 @@ if ( Entry == 2 )
if ( Vec_IntEntry(vNumbers,31) )
printf( " n > 1000 %6d\n", Vec_IntEntry(vNumbers,30) );
printf( "Total MFFCs = %d. ", Vec_PtrSize(vRoots) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
Vec_IntFree( vNumbers );
Vec_PtrFree( vNodes );
Vec_PtrFree( vLeaves );
@@ -894,7 +894,7 @@ Vec_Ptr_t * Abc_NktMffcDerive( Abc_Ntk_t * pNtk, Vec_Ptr_t ** pvFanins, Vec_Ptr_
Vec_Ptr_t * vRoots, * vFanins, * vFanouts, * vVolumes, * vNodes, * vLeaves;
Abc_Obj_t * pObj, * pFanin;
int i, k;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// create roots
vRoots = Abc_NktMffcMarkRoots( pNtk, 0 );
// create fanins/fanouts/volumes
@@ -1208,7 +1208,7 @@ void Abc_NktMffcServerTest( Abc_Ntk_t * pNtk )
Vec_Int_t * vGlob, * vLeaves, * vRoots;
double Cost, CostAll = 0.0;
int i, k, Entry, nNodes = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vGlobs = Abc_NktMffcServer( pNtk, 18, 3 );
vLeaves = Vec_IntAlloc( 100 );
vRoots = Vec_IntAlloc( 100 );
@@ -1240,7 +1240,7 @@ void Abc_NktMffcServerTest( Abc_Ntk_t * pNtk )
Vec_PtrFree( vGlobs );
printf( "Total = %6d. Nodes = %6d. ", Abc_NtkNodeNum(pNtk), nNodes );
printf( "Cost = %6.2f ", CostAll );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
ABC_NAMESPACE_IMPL_END
diff --git a/src/base/abci/abcNpn.c b/src/base/abci/abcNpn.c
index ffcf00f7..7157b856 100644
--- a/src/base/abci/abcNpn.c
+++ b/src/base/abci/abcNpn.c
@@ -177,7 +177,7 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
word pAuxWord[1024], pAuxWord1[1024];
char pCanonPerm[16];
unsigned uCanonPhase=0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
char * pAlgoName = NULL;
@@ -274,7 +274,7 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
}
}
else assert( 0 );
- clk = clock() - clk;
+ clk = Abc_Clock() - clk;
printf( "Classes =%9d ", Abc_TruthNpnCountUnique(p) );
Abc_PrintTime( 1, "Time", clk );
}
diff --git a/src/base/abci/abcNpnSave.c b/src/base/abci/abcNpnSave.c
index 80ce10bc..a96b578e 100644
--- a/src/base/abci/abcNpnSave.c
+++ b/src/base/abci/abcNpnSave.c
@@ -393,9 +393,9 @@ void Npn_ManResize( Npn_Man_t * p )
Npn_Obj_t * pEntry, * pNext;
int * 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;
@@ -420,7 +420,7 @@ clk = clock();
}
assert( Counter == p->nEntries );
ABC_FREE( pBinsOld );
-//ABC_PRT( "Hash table resizing time", clock() - clk );
+//ABC_PRT( "Hash table resizing time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abcNtbdd.c b/src/base/abci/abcNtbdd.c
index 3fe42053..9eedfde6 100644
--- a/src/base/abci/abcNtbdd.c
+++ b/src/base/abci/abcNtbdd.c
@@ -572,8 +572,8 @@ void Abc_NtkBddImplicationTest()
int nVars = 200;
int nImps = 200;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
dd = Cudd_Init( nVars, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 );
Cudd_AutodynEnable( dd, CUDD_REORDER_SIFT );
bSum = b0; Cudd_Ref( bSum );
@@ -588,7 +588,7 @@ clk = clock();
printf( "The BDD before = %d.\n", Cudd_DagSize(bSum) );
Cudd_ReduceHeap( dd, CUDD_REORDER_SIFT, 1 );
printf( "The BDD after = %d.\n", Cudd_DagSize(bSum) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
Cudd_RecursiveDeref( dd, bSum );
Cudd_Quit( dd );
}
diff --git a/src/base/abci/abcOdc.c b/src/base/abci/abcOdc.c
index 31f64732..b66592f6 100644
--- a/src/base/abci/abcOdc.c
+++ b/src/base/abci/abcOdc.c
@@ -86,14 +86,14 @@ struct Odc_Man_t_
int nTotalDcs; // total percentage of DCs
// runtime
- clock_t timeClean; // windowing
- clock_t timeWin; // windowing
- clock_t timeMiter; // computing the miter
- clock_t timeSim; // simulation
- clock_t timeQuant; // quantification
- clock_t timeTruth; // truth table
- clock_t timeTotal; // useful runtime
- clock_t timeAbort; // aborted runtime
+ abctime timeClean; // windowing
+ abctime timeWin; // windowing
+ abctime timeMiter; // computing the miter
+ abctime timeSim; // simulation
+ abctime timeQuant; // quantification
+ abctime timeTruth; // truth table
+ abctime timeTotal; // useful runtime
+ abctime timeAbort; // aborted runtime
};
@@ -241,7 +241,7 @@ Odc_Man_t * Abc_NtkDontCareAlloc( int nVarsMax, int nLevels, int fVerbose, int f
***********************************************************************/
void Abc_NtkDontCareClear( Odc_Man_t * p )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// clean the structural hashing table
if ( Vec_IntSize(p->vUsedSpots) > p->nTableSize/3 ) // more than one third
memset( p->pTable, 0, sizeof(Odc_Lit_t) * p->nTableSize );
@@ -257,7 +257,7 @@ void Abc_NtkDontCareClear( Odc_Man_t * p )
// reset the root node
p->iRoot = 0xffff;
-p->timeClean += clock() - clk;
+p->timeClean += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -1033,7 +1033,7 @@ int Abc_NtkDontCareSimulateBefore( Odc_Man_t * p, unsigned * puTruth )
int Abc_NtkDontCareCompute( Odc_Man_t * p, Abc_Obj_t * pNode, Vec_Ptr_t * vLeaves, unsigned * puTruth )
{
int nMints, RetValue;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
p->nWins++;
@@ -1045,12 +1045,12 @@ int Abc_NtkDontCareCompute( Odc_Man_t * p, Abc_Obj_t * pNode, Vec_Ptr_t * vLeave
p->pNode = pNode;
// compute the window
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkDontCareWindow( p );
-p->timeWin += clock() - clk;
+p->timeWin += Abc_Clock() - clk;
if ( !RetValue )
{
-p->timeAbort += clock() - clkTotal;
+p->timeAbort += Abc_Clock() - clkTotal;
Abc_InfoFill( puTruth, p->nWords );
p->nWinsEmpty++;
return 0;
@@ -1066,14 +1066,14 @@ p->timeAbort += clock() - clkTotal;
}
// transfer the window into the AIG package
-clk = clock();
+clk = Abc_Clock();
Abc_NtkDontCareTransfer( p );
-p->timeMiter += clock() - clk;
+p->timeMiter += Abc_Clock() - clk;
// simulate to estimate the amount of don't-cares
-clk = clock();
+clk = Abc_Clock();
nMints = Abc_NtkDontCareSimulateBefore( p, puTruth );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
if ( p->fVeryVerbose )
{
printf( "AIG = %5d ", Odc_NodeNum(p) );
@@ -1083,7 +1083,7 @@ p->timeSim += clock() - clk;
// if there is less then the given percentage of don't-cares, skip
if ( 100.0 * (p->nBits - nMints) / p->nBits < 1.0 * p->nPercCutoff )
{
-p->timeAbort += clock() - clkTotal;
+p->timeAbort += Abc_Clock() - clkTotal;
if ( p->fVeryVerbose )
printf( "Simulation cutoff.\n" );
Abc_InfoFill( puTruth, p->nWords );
@@ -1092,12 +1092,12 @@ p->timeAbort += clock() - clkTotal;
}
// quantify external variables
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkDontCareQuantify( p );
-p->timeQuant += clock() - clk;
+p->timeQuant += Abc_Clock() - clk;
if ( !RetValue )
{
-p->timeAbort += clock() - clkTotal;
+p->timeAbort += Abc_Clock() - clkTotal;
if ( p->fVeryVerbose )
printf( "=== Overflow! ===\n" );
Abc_InfoFill( puTruth, p->nWords );
@@ -1106,17 +1106,17 @@ p->timeAbort += clock() - clkTotal;
}
// get the truth table
-clk = clock();
+clk = Abc_Clock();
Abc_NtkDontCareSimulateSetElem( p );
nMints = Abc_NtkDontCareSimulate( p, puTruth );
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
if ( p->fVeryVerbose )
{
printf( "AIG = %5d ", Odc_NodeNum(p) );
printf( "%6.2f %% ", 100.0 * (p->nBits - nMints) / p->nBits );
printf( "\n" );
}
-p->timeTotal += clock() - clkTotal;
+p->timeTotal += Abc_Clock() - clkTotal;
p->nWinsFinish++;
p->nTotalDcs += (int)(100.0 * (p->nBits - nMints) / p->nBits);
return nMints;
diff --git a/src/base/abci/abcPart.c b/src/base/abci/abcPart.c
index c68e0729..fc654bc9 100644
--- a/src/base/abci/abcPart.c
+++ b/src/base/abci/abcPart.c
@@ -726,21 +726,21 @@ Vec_Ptr_t * Abc_NtkPartitionSmart( Abc_Ntk_t * pNtk, int nSuppSizeLimit, int fVe
Vec_Ptr_t * vSupps, * vPartsAll, * vPartsAll2, * vPartSuppsAll;
Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp;
int i, iPart, iOut, timeFind = 0;
- clock_t clk, clk2;
+ abctime clk, clk2;
// compute the supports for all outputs
-clk = clock();
+clk = Abc_Clock();
// vSupps = Abc_NtkComputeSupportsNaive( pNtk );
vSupps = Abc_NtkComputeSupportsSmart( pNtk );
if ( fVerbose )
{
-ABC_PRT( "Supps", clock() - clk );
+ABC_PRT( "Supps", Abc_Clock() - clk );
}
// start char-based support representation
vPartSuppsChar = Vec_PtrAlloc( 1000 );
// create partitions
-clk = clock();
+clk = Abc_Clock();
vPartsAll = Vec_PtrAlloc( 256 );
vPartSuppsAll = Vec_PtrAlloc( 256 );
pProgress = Extra_ProgressBarStart( stdout, Vec_PtrSize(vSupps) );
@@ -753,9 +753,9 @@ clk = clock();
// get the output number
iOut = Vec_IntPop(vOne);
// find closely matching part
-clk2 = clock();
+clk2 = Abc_Clock();
iPart = Abc_NtkPartitionSmartFindPart( vPartSuppsAll, vPartsAll, vPartSuppsChar, nSuppSizeLimit, vOne );
-timeFind += clock() - clk2;
+timeFind += Abc_Clock() - clk2;
if ( iPart == -1 )
{
// create new partition
@@ -794,11 +794,11 @@ timeFind += clock() - clk2;
//printf( "\n" );
if ( fVerbose )
{
-ABC_PRT( "Parts", clock() - clk );
+ABC_PRT( "Parts", Abc_Clock() - clk );
//ABC_PRT( "Find ", timeFind );
}
-clk = clock();
+clk = Abc_Clock();
// remember number of supports
Vec_PtrForEachEntry( Vec_Int_t *, vPartSuppsAll, vOne, i )
Vec_IntPush( vOne, i );
@@ -817,7 +817,7 @@ clk = clock();
if ( fVerbose )
{
-ABC_PRT( "Comps", clock() - clk );
+ABC_PRT( "Comps", Abc_Clock() - clk );
}
if ( fVerbose )
printf( "Created %d partitions.\n", Vec_PtrSize(vPartsAll) );
@@ -1163,7 +1163,7 @@ void Abc_NtkFraigPartitionedTime( Abc_Ntk_t * pNtk, void * pParams )
Vec_Int_t * vOne;
Abc_Ntk_t * pNtkAig, * pNtkFraig;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// perform partitioning
assert( Abc_NtkIsStrash(pNtk) );
@@ -1194,7 +1194,7 @@ void Abc_NtkFraigPartitionedTime( Abc_Ntk_t * pNtk, void * pParams )
Abc_NtkDelete( pNtkAig );
Vec_PtrFree( vFraigs );
Vec_PtrFree( vOnePtr );
- ABC_PRT( "Partitioned fraiging time", clock() - clk );
+ ABC_PRT( "Partitioned fraiging time", Abc_Clock() - clk );
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c
index e27ae492..1ee30aad 100644
--- a/src/base/abci/abcPrint.c
+++ b/src/base/abci/abcPrint.c
@@ -37,10 +37,10 @@ ABC_NAMESPACE_IMPL_START
//extern int s_TotalNodes = 0;
//extern int s_TotalChanges = 0;
-clock_t s_MappingTime = 0;
+abctime s_MappingTime = 0;
int s_MappingMem = 0;
-clock_t s_ResubTime = 0;
-clock_t s_ResynTime = 0;
+abctime s_ResubTime = 0;
+abctime s_ResynTime = 0;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -1303,7 +1303,7 @@ void Abc_NtkPrintMiter( Abc_Ntk_t * pNtk )
{
Abc_Obj_t * pObj, * pChild, * pConst1 = Abc_AigConst1(pNtk);
int i, iOut = -1;
- clock_t Time = clock();
+ abctime Time = Abc_Clock();
int nUnsat = 0;
int nSat = 0;
int nUndec = 0;
@@ -1345,7 +1345,7 @@ void Abc_NtkPrintMiter( Abc_Ntk_t * pNtk )
printf( " ? =%7d", nUndec );
printf( " U =%6d", nUnsat );
printf( " S =%6d", nSat );
- Time = clock() - Time;
+ Time = Abc_Clock() - Time;
printf(" %7.2f sec\n", (float)(Time)/(float)(CLOCKS_PER_SEC));
if ( iOut >= 0 )
printf( "The first satisfiable output is number %d (%s).\n", iOut, Abc_ObjName( Abc_NtkPo(pNtk, iOut) ) );
diff --git a/src/base/abci/abcProve.c b/src/base/abci/abcProve.c
index c61777fa..909cc46b 100644
--- a/src/base/abci/abcProve.c
+++ b/src/base/abci/abcProve.c
@@ -35,7 +35,7 @@ extern int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMa
extern Abc_Ntk_t * Abc_NtkFromFraig( Fraig_Man_t * pMan, Abc_Ntk_t * pNtk );
static Abc_Ntk_t * Abc_NtkMiterFraig( Abc_Ntk_t * pNtk, int nBTLimit, ABC_INT64_T nInspLimit, int * pRetValue, int * pNumFails, ABC_INT64_T * pNumConfs, ABC_INT64_T * pNumInspects );
-static void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, clock_t clk, int fVerbose );
+static void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, abctime clk, int fVerbose );
////////////////////////////////////////////////////////////////////////
@@ -61,7 +61,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
Prove_Params_t * pParams = (Prove_Params_t *)pPars;
Abc_Ntk_t * pNtk, * pNtkTemp;
int RetValue = -1, nIter, nSatFails, Counter;
- clock_t clk; //, timeStart = clock();
+ abctime clk; //, timeStart = Abc_Clock();
ABC_INT64_T nSatConfs, nSatInspects, nInspectLimit;
// get the starting network
@@ -82,7 +82,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
// if SAT only, solve without iteration
if ( !pParams->fUseRewriting && !pParams->fUseFraiging )
{
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)pParams->nMiteringLimitLast, (ABC_INT64_T)0, 0, NULL, NULL );
Abc_NtkMiterPrint( pNtk, "SAT solving", clk, pParams->fVerbose );
*ppNtk = pNtk;
@@ -101,7 +101,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
}
// try brute-force SAT
- clk = clock();
+ clk = Abc_Clock();
nInspectLimit = pParams->nTotalInspectLimit? pParams->nTotalInspectLimit - pParams->nTotalInspectsMade : 0;
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)(pParams->nMiteringLimitStart * pow(pParams->nMiteringLimitMulti,nIter)), (ABC_INT64_T)nInspectLimit, 0, &nSatConfs, &nSatInspects );
Abc_NtkMiterPrint( pNtk, "SAT solving", clk, pParams->fVerbose );
@@ -123,7 +123,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
// try rewriting
if ( pParams->fUseRewriting )
{
- clk = clock();
+ clk = Abc_Clock();
Counter = (int)(pParams->nRewritingLimitStart * pow(pParams->nRewritingLimitMulti,nIter));
// Counter = 1;
while ( 1 )
@@ -165,7 +165,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
if ( pParams->fUseFraiging )
{
// try FRAIGing
- clk = clock();
+ clk = Abc_Clock();
nInspectLimit = pParams->nTotalInspectLimit? pParams->nTotalInspectLimit - pParams->nTotalInspectsMade : 0;
pNtk = Abc_NtkMiterFraig( pNtkTemp = pNtk, (int)(pParams->nFraigingLimitStart * pow(pParams->nFraigingLimitMulti,nIter)), nInspectLimit, &RetValue, &nSatFails, &nSatConfs, &nSatInspects ); Abc_NtkDelete( pNtkTemp );
Abc_NtkMiterPrint( pNtk, "FRAIGing ", clk, pParams->fVerbose );
@@ -196,7 +196,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
printf( "Attempting BDDs with node limit %d ...\n", pParams->nBddSizeLimit );
fflush( stdout );
}
- clk = clock();
+ clk = Abc_Clock();
pNtk = Abc_NtkCollapse( pNtkTemp = pNtk, pParams->nBddSizeLimit, 0, pParams->fBddReorder, 0 );
if ( pNtk )
{
@@ -215,7 +215,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
printf( "Attempting SAT with conflict limit %d ...\n", pParams->nMiteringLimitLast );
fflush( stdout );
}
- clk = clock();
+ clk = Abc_Clock();
nInspectLimit = pParams->nTotalInspectLimit? pParams->nTotalInspectLimit - pParams->nTotalInspectsMade : 0;
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)pParams->nMiteringLimitLast, (ABC_INT64_T)nInspectLimit, 0, NULL, NULL );
Abc_NtkMiterPrint( pNtk, "SAT solving", clk, pParams->fVerbose );
@@ -308,13 +308,13 @@ Abc_Ntk_t * Abc_NtkMiterFraig( Abc_Ntk_t * pNtk, int nBTLimit, ABC_INT64_T nInsp
SeeAlso []
***********************************************************************/
-void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, clock_t clk, int fVerbose )
+void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, abctime clk, int fVerbose )
{
if ( !fVerbose )
return;
printf( "Nodes = %7d. Levels = %4d. ", Abc_NtkNodeNum(pNtk),
Abc_NtkIsStrash(pNtk)? Abc_AigLevel(pNtk) : Abc_NtkLevel(pNtk) );
- ABC_PRT( pString, clock() - clk );
+ ABC_PRT( pString, Abc_Clock() - clk );
}
diff --git a/src/base/abci/abcQbf.c b/src/base/abci/abcQbf.c
index e64871ff..81c80b13 100644
--- a/src/base/abci/abcQbf.c
+++ b/src/base/abci/abcQbf.c
@@ -65,7 +65,7 @@ void Abc_NtkQbf( Abc_Ntk_t * pNtk, int nPars, int nItersMax, int fDumpCnf, int f
{
Abc_Ntk_t * pNtkVer, * pNtkSyn, * pNtkSyn2, * pNtkTemp;
Vec_Int_t * vPiValues;
- clock_t clkTotal = clock(), clkS, clkV;
+ abctime clkTotal = Abc_Clock(), clkS, clkV;
int nIters, nInputs, RetValue, fFound = 0;
assert( Abc_NtkIsStrash(pNtk) );
@@ -136,10 +136,10 @@ void Abc_NtkQbf( Abc_Ntk_t * pNtk, int nPars, int nItersMax, int fDumpCnf, int f
for ( nIters = 0; nIters < nItersMax; nIters++ )
{
// solve the synthesis instance
-clkS = clock();
+clkS = Abc_Clock();
// RetValue = Abc_NtkMiterSat( pNtkSyn, 0, 0, 0, NULL, NULL );
RetValue = Abc_NtkDSat( pNtkSyn, (ABC_INT64_T)0, (ABC_INT64_T)0, 0, 0, 0, 1, 0, 0, 0 );
-clkS = clock() - clkS;
+clkS = Abc_Clock() - clkS;
if ( RetValue == 0 )
Abc_NtkModelToVector( pNtkSyn, vPiValues );
if ( RetValue == 1 )
@@ -160,9 +160,9 @@ clkS = clock() - clkS;
Abc_ObjXorFaninC( Abc_NtkPo(pNtkVer,0), 0 );
// solve the verification instance
-clkV = clock();
+clkV = Abc_Clock();
RetValue = Abc_NtkMiterSat( pNtkVer, 0, 0, 0, NULL, NULL );
-clkV = clock() - clkV;
+clkV = Abc_Clock() - clkV;
if ( RetValue == 0 )
Abc_NtkModelToVector( pNtkVer, vPiValues );
Abc_NtkDelete( pNtkVer );
@@ -213,7 +213,7 @@ clkV = clock() - clkV;
printf( "Quit after %d interatios. ", nItersMax );
else
printf( "Implementation does not exist. " );
- ABC_PRT( "Total runtime", clock() - clkTotal );
+ ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
Vec_IntFree( vPiValues );
}
diff --git a/src/base/abci/abcQuant.c b/src/base/abci/abcQuant.c
index e6f0ccea..02f7b838 100644
--- a/src/base/abci/abcQuant.c
+++ b/src/base/abci/abcQuant.c
@@ -331,7 +331,7 @@ Abc_Ntk_t * Abc_NtkReachability( Abc_Ntk_t * pNtkRel, int nIters, int fVerbose )
int fFixedPoint = 0;
int fSynthesis = 1;
int fMoreEffort = 1;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtkRel) );
assert( Abc_NtkLatchNum(pNtkRel) == 0 );
@@ -350,7 +350,7 @@ Abc_Ntk_t * Abc_NtkReachability( Abc_Ntk_t * pNtkRel, int nIters, int fVerbose )
nVars = Abc_NtkPiNum(pNtkRel)/2;
for ( i = 0; i < nIters; i++ )
{
- clk = clock();
+ clk = Abc_Clock();
// get the set of next states
pNtkNext = Abc_NtkMiterAnd( pNtkRel, pNtkFront, 0, 0 );
Abc_NtkDelete( pNtkFront );
@@ -399,7 +399,7 @@ Abc_Ntk_t * Abc_NtkReachability( Abc_Ntk_t * pNtkRel, int nIters, int fVerbose )
{
printf( "I = %3d : Reach = %6d Fr = %6d FrM = %6d %7.2f %% ",
i + 1, Abc_NtkNodeNum(pNtkReached), nNodesOld, nNodesNew, 100.0*(nNodesNew-nNodesPrev)/nNodesPrev );
- ABC_PRT( "T", clock() - clk );
+ ABC_PRT( "T", Abc_Clock() - clk );
}
nNodesPrev = Abc_NtkNodeNum(pNtkFront);
}
diff --git a/src/base/abci/abcReach.c b/src/base/abci/abcReach.c
index e0fb4e51..e91a1d5a 100644
--- a/src/base/abci/abcReach.c
+++ b/src/base/abci/abcReach.c
@@ -259,7 +259,7 @@ void Abc_NtkVerifyUsingBdds( Abc_Ntk_t * pNtk, int nBddMax, int nIterMax, int fP
DdNode ** pbParts;
DdNode * bOutput, * bReached, * bInitial;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
assert( Abc_NtkPoNum(pNtk) == 1 );
@@ -307,7 +307,7 @@ void Abc_NtkVerifyUsingBdds( Abc_Ntk_t * pNtk, int nBddMax, int nIterMax, int fP
Extra_StopManager( dd );
// report the runtime
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
diff --git a/src/base/abci/abcRec.c b/src/base/abci/abcRec.c
index c39dc35a..b86b7b04 100644
--- a/src/base/abci/abcRec.c
+++ b/src/base/abci/abcRec.c
@@ -106,23 +106,23 @@ struct Abc_ManRec_t_
int nFunsDelayComput; // the times delay computed, just for statistics
int nNoBetter; // the number of functions found but no better than the current structures.
// rewriting runtime
- clock_t timeIfTotal; // time used on the whole process of rewriting a structure.
- clock_t timeIfComputDelay; // time used on the structure's delay computation.
- clock_t timeIfCanonicize; // time used on canonicize the function
- clock_t timeIfDerive; // time used on derive the final network;
- clock_t timeIfCopmutCur; // time used on compute the current structures info
- clock_t timeIfOther; // time used on other things
+ abctime timeIfTotal; // time used on the whole process of rewriting a structure.
+ abctime timeIfComputDelay; // time used on the structure's delay computation.
+ abctime timeIfCanonicize; // time used on canonicize the function
+ abctime timeIfDerive; // time used on derive the final network;
+ abctime timeIfCopmutCur; // time used on compute the current structures info
+ abctime timeIfOther; // time used on other things
// record runtime
- clock_t timeTrim; // the runtime to filter the library
- clock_t timeCollect; // the runtime to collect the node of a structure.
- clock_t timeTruth; // the runtime to compute truth table.
- clock_t timeCanon; // the runtime to canonicize
- clock_t timeInsert; // the runtime to insert a structure.
- clock_t timeBuild; // the runtime to build a new structure in the library.
- clock_t timeMerge; // the runtime to merge libraries;
- clock_t timeReHash; // the runtime to resize the hash table.
- clock_t timeOther; // the runtime of other
- clock_t timeTotal; // the runtime to total.
+ abctime timeTrim; // the runtime to filter the library
+ abctime timeCollect; // the runtime to collect the node of a structure.
+ abctime timeTruth; // the runtime to compute truth table.
+ abctime timeCanon; // the runtime to canonicize
+ abctime timeInsert; // the runtime to insert a structure.
+ abctime timeBuild; // the runtime to build a new structure in the library.
+ abctime timeMerge; // the runtime to merge libraries;
+ abctime timeReHash; // the runtime to resize the hash table.
+ abctime timeOther; // the runtime of other
+ abctime timeTotal; // the runtime to total.
};
@@ -859,7 +859,7 @@ Hop_Obj_t * Abc_RecToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
char pCanonPerm[16];
unsigned *pInOut = s_pMan->pTemp1;
unsigned *pTemp = s_pMan->pTemp2;
- clock_t time = clock();
+ abctime time = Abc_Clock();
int fCompl;
int * pCompl = &fCompl;
nLeaves = If_CutLeaveNum(pCut);
@@ -895,8 +895,8 @@ Hop_Obj_t * Abc_RecToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
Abc_NtkIncrementTravId(pAig);
//derive the best structure in the library.
pHopObj = Abc_NtkRecBuildUp_rec(pMan, pCandMin->obj, s_pMan->vLabels);
- s_pMan->timeIfDerive += clock() - time;
- s_pMan->timeIfTotal += clock() - time;
+ s_pMan->timeIfDerive += Abc_Clock() - time;
+ s_pMan->timeIfTotal += Abc_Clock() - time;
return Hop_NotCond(pHopObj, (pCut->fCompl)^(((uCanonPhase & (1 << nLeaves)) > 0)) ^ fCompl);
}
@@ -1007,7 +1007,7 @@ void Abc_NtkRecFilter(int nLimit)
Rec_Obj_t * previous = NULL, * entry = NULL, * pTemp;
int i;
Abc_Ntk_t * pNtk = s_pMan->pNtk;
- clock_t time = clock();
+ abctime time = Abc_Clock();
if (nLimit > 0)
{
for ( i = 0; i < s_pMan->nBins; i++ )
@@ -1048,8 +1048,8 @@ void Abc_NtkRecFilter(int nLimit)
Abc_NtkDelete( pNtk );
// collect runtime stats
- s_pMan->timeTrim += clock() - time;
- s_pMan->timeTotal += clock() - time;
+ s_pMan->timeTrim += Abc_Clock() - time;
+ s_pMan->timeTotal += Abc_Clock() - time;
}
@@ -1134,7 +1134,7 @@ void Abc_NtkRecLibMerge(Abc_Ntk_t* pNtk)
int i;
Abc_Obj_t * pObj;
Abc_ManRec_t * p = s_pMan;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkPiNum(pNtk) > s_pMan->nVars )
{
printf( "The library has more inputs than the record.\n");
@@ -1162,8 +1162,8 @@ void Abc_NtkRecLibMerge(Abc_Ntk_t* pNtk)
{
Abc_ObjClearMax( pObj );
}
- s_pMan->timeMerge += clock() - clk;
- s_pMan->timeTotal += clock() - clk;
+ s_pMan->timeMerge += Abc_Clock() - clk;
+ s_pMan->timeTotal += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -1182,7 +1182,7 @@ void Abc_NtkRecRezieHash(Abc_ManRec_t* p)
Rec_Obj_t ** pBinsNew, **ppSpot;
Rec_Obj_t * pEntry, * pTemp;
int nBinsNew, Counter, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// get the new table size
nBinsNew = Cudd_Prime( 3 * p->nBins );
printf("Hash table resize from %d to %d.\n", p->nBins, nBinsNew);
@@ -1206,8 +1206,8 @@ void Abc_NtkRecRezieHash(Abc_ManRec_t* p)
ABC_FREE( p->pBins );
p->pBins = pBinsNew;
p->nBins = nBinsNew;
- p->timeReHash += clock() - clk;
- p->timeTotal += clock() - clk;
+ p->timeReHash += Abc_Clock() - clk;
+ p->timeTotal += Abc_Clock() - clk;
}
@@ -1231,7 +1231,7 @@ void Abc_NtkRecStart( Abc_Ntk_t * pNtk, int nVars, int nCuts, int fTrim )
char Buffer[10];
unsigned * pTruth;
int i, RetValue;
- clock_t clkTotal = clock(), clk, timeInsert;
+ abctime clkTotal = Abc_Clock(), clk, timeInsert;
//int testNum = 0;
assert( s_pMan == NULL );
@@ -1308,14 +1308,14 @@ void Abc_NtkRecStart( Abc_Ntk_t * pNtk, int nVars, int nCuts, int fTrim )
Kit_TruthCopy( (unsigned *)Vec_PtrEntry(p->vTtNodes, pObj->Id), (unsigned *)Vec_PtrEntry(p->vTtElems, i), p->nVars );
// compute the tables
-clk = clock();
+clk = Abc_Clock();
Abc_AigForEachAnd( pNtk, pObj, i )
{
RetValue = Abc_NtkRecComputeTruth( pObj, p->vTtNodes, p->nVars );
assert( RetValue );
}
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
Abc_NtkForEachPi( pNtk, pObj, i )
Abc_ObjSetMax( pObj, i+1 );
@@ -1323,7 +1323,7 @@ p->timeTruth += clock() - clk;
Abc_ObjSetMax( pObj, Abc_MaxInt( Abc_ObjGetMax(Abc_ObjFanin0(pObj)), Abc_ObjGetMax(Abc_ObjFanin1(pObj)) ) );
// insert the PO nodes into the table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
Abc_NtkForEachPo( pNtk, pObj, i )
{
p->nTried++;
@@ -1341,7 +1341,7 @@ p->timeTruth += clock() - clk;
ppSpot = Abc_NtkRecTableLookup(p, p->pBins, p->nBins, pTruth, p->nVars );
Abc_NtkRecInsertToLookUpTable(p, ppSpot, pObj, Abc_ObjGetMax(pObj), p->fTrim);
}
- p->timeInsert += clock() - timeInsert;
+ p->timeInsert += Abc_Clock() - timeInsert;
Abc_NtkForEachObj( pNtk, pObj, i )
{
Abc_ObjClearMax( pObj );
@@ -1361,7 +1361,7 @@ p->timeTruth += clock() - clk;
// set the manager
s_pMan = p;
- p->timeTotal += clock() - clkTotal;
+ p->timeTotal += Abc_Clock() - clkTotal;
}
/**Function*************************************************************
@@ -1688,7 +1688,7 @@ void Abc_NtkRecAdd( Abc_Ntk_t * pNtk, int fUseSOPB)
If_Par_t Pars, * pPars = &Pars;
Abc_Ntk_t * pNtkNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Performing renoding with choices.\n" );
@@ -1739,7 +1739,7 @@ void Abc_NtkRecAdd( Abc_Ntk_t * pNtk, int fUseSOPB)
// perform recording
pNtkNew = Abc_NtkIf( pNtk, pPars );
Abc_NtkDelete( pNtkNew );
-s_pMan->timeTotal += clock() - clk;
+s_pMan->timeTotal += Abc_Clock() - clk;
// if ( !Abc_NtkCheck( s_pMan->pNtk ) )
// printf( "Abc_NtkRecAdd: The network check has failed.\n" );
@@ -2066,7 +2066,7 @@ void Abc_NtkRecAddSOPB( If_Man_t * pIfMan, If_Cut_t * pCut, unsigned* pInOut, ch
If_And_t This;
Rec_Obj_t ** ppSpot;
char Buffer[40], Name[20], Truth[20];
- clock_t timeBuild = clock();
+ abctime timeBuild = Abc_Clock();
unsigned * pTruth;
vAnds = If_CutDelaySopArray( pIfMan, pCut );
if(Vec_WrdSize(vAnds) > nLeaves + 3*(nLeaves-1) + s_MaxSize[nLeaves])
@@ -2129,7 +2129,7 @@ void Abc_NtkRecAddSOPB( If_Man_t * pIfMan, If_Cut_t * pCut, unsigned* pInOut, ch
printf( "F" );
return;
}
- s_pMan->timeBuild = clock() - timeBuild;
+ s_pMan->timeBuild = Abc_Clock() - timeBuild;
// Extra_PrintBinary( stdout, pInOut, 8 ); printf( "\n" );
// look up in the hash table and increase the hit number of the functional class
@@ -2164,11 +2164,11 @@ void Abc_NtkRecAddSOPB( If_Man_t * pIfMan, If_Cut_t * pCut, unsigned* pInOut, ch
Abc_ObjAssignName( pObjPo, Buffer, NULL );
// add the resulting truth table to the hash table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
ppSpot = Abc_NtkRecTableLookup(s_pMan, s_pMan->pBins, s_pMan->nBins, pTruth, s_pMan->nVars );
Abc_NtkRecInsertToLookUpTable(s_pMan, ppSpot, pObj, nLeaves, s_pMan->fTrim);
- s_pMan->timeInsert += clock() - timeInsert;
- s_pMan->timeTotal = clock() - timeBuild;
+ s_pMan->timeInsert += Abc_Clock() - timeInsert;
+ s_pMan->timeTotal = Abc_Clock() - timeBuild;
return;
}
@@ -2199,8 +2199,8 @@ int Abc_NtkRecAddCut( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
unsigned * pTruth;
int i, RetValue, nNodes, nNodesBeg, nInputs = s_pMan->nVars, nLeaves = If_CutLeaveNum(pCut);
unsigned uCanonPhase;
- clock_t clk, timeInsert, timeBuild;
- //int begin = clock();
+ abctime clk, timeInsert, timeBuild;
+ //int begin = Abc_Clock();
assert( nInputs <= 16 );
assert( nInputs == (int)pCut->nLimit );
s_pMan->nTried++;
@@ -2212,10 +2212,10 @@ int Abc_NtkRecAddCut( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
}
// collect internal nodes and skip redundant cuts
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCollectNodes( pIfMan, pRoot, pCut, vNodes );
-s_pMan->timeCollect += clock() - clk;
+s_pMan->timeCollect += Abc_Clock() - clk;
if ( !RetValue )
{
s_pMan->nFilterRedund++;
@@ -2230,9 +2230,9 @@ s_pMan->timeCollect += clock() - clk;
}
// compute truth table and skip the redundant structures
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCutTruth( vNodes, nLeaves, s_pMan->vTtTemps, s_pMan->vTtElems );
- s_pMan->timeTruth += clock() - clk;
+ s_pMan->timeTruth += Abc_Clock() - clk;
if ( !RetValue )
{
//fprintf(file,"redundant structures\n");
@@ -2249,14 +2249,14 @@ clk = clock();
pCanonPerm[i] = i;
// semi-canonicize the truth table
-clk = clock();
+clk = Abc_Clock();
uCanonPhase = Kit_TruthSemiCanonicize( pInOut, pTemp, nLeaves, pCanonPerm );
If_CutTruthStretch(pInOut, nLeaves, s_pMan->nVars);
- s_pMan->timeCanon += clock() - clk;
+ s_pMan->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
// go through the variables in the new truth table
- timeBuild = clock();
+ timeBuild = Abc_Clock();
for ( i = 0; i < nLeaves; i++ )
{
// get hold of the corresponding leaf
@@ -2300,7 +2300,7 @@ clk = clock();
}
}
assert(pObj);
- s_pMan->timeBuild += clock() - timeBuild;
+ s_pMan->timeBuild += Abc_Clock() - timeBuild;
pTruth = (unsigned *)Vec_PtrEntry( s_pMan->vTtNodes, pObj->Id );
if ( Kit_TruthSupport(pTruth, nInputs) != Kit_BitMask(nLeaves) )
{
@@ -2350,9 +2350,9 @@ clk = clock();
Abc_ObjAssignName( pObjPo, Buffer, NULL );
// add the resulting truth table to the hash table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
Abc_NtkRecInsertToLookUpTable(s_pMan, ppSpot, pObj, nLeaves, s_pMan->fTrim);
- s_pMan->timeInsert += clock() - timeInsert;
+ s_pMan->timeInsert += Abc_Clock() - timeInsert;
if (pIfMan->pPars->fDelayOpt)
Abc_NtkRecAddSOPB(pIfMan, pCut, pTruth, pCanonPerm, uCanonPhase );
return 1;
@@ -2776,7 +2776,7 @@ void SetUseCut(If_Cut_t* pCut, Rec_Obj_t * pRecObj, char * pCanonPerm)
int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
//int fVerbose = 0;
- clock_t timeDelayComput, timeTotal = clock(), timeCanonicize;
+ abctime timeDelayComput, timeTotal = Abc_Clock(), timeCanonicize;
int nLeaves, i, DelayMin = ABC_INFINITY , * pDelayBest = &DelayMin;
char pCanonPerm[16];
unsigned uCanonPhase;
@@ -2813,17 +2813,17 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
return DelayMin;
}
- timeCanonicize = clock();
+ timeCanonicize = Abc_Clock();
//canonicize
for (i = 0; i < nLeaves; i++)
pCanonPerm[i] = i;
uCanonPhase = Kit_TruthSemiCanonicize(pInOut, pTemp, nLeaves, pCanonPerm);
If_CutTruthStretch(pInOut, nLeaves, nVars);
- s_pMan->timeIfCanonicize += clock() - timeCanonicize;
- timeDelayComput = clock();
+ s_pMan->timeIfCanonicize += Abc_Clock() - timeCanonicize;
+ timeDelayComput = Abc_Clock();
pCandMin = Abc_NtkRecLookUpBest(p, pCut, pInOut, pCanonPerm, NULL,pDelayBest);
assert (!(pCandMin == NULL && nLeaves == 2));
- s_pMan->timeIfComputDelay += clock() - timeDelayComput;
+ s_pMan->timeIfComputDelay += Abc_Clock() - timeDelayComput;
//functional class not found in the library.
if ( pCandMin == NULL )
{
@@ -2882,7 +2882,7 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
pCut->pPerm[(int)pCanonPerm[i]] = pCandMin->pinToPinDelay[i];
}
- s_pMan->timeIfTotal += clock() - timeTotal;
+ s_pMan->timeIfTotal += Abc_Clock() - timeTotal;
pCut->Cost = pCandMin->cost;
return DelayMin;
diff --git a/src/base/abci/abcRec2.c b/src/base/abci/abcRec2.c
index 385ec520..66e1e8a6 100644
--- a/src/base/abci/abcRec2.c
+++ b/src/base/abci/abcRec2.c
@@ -538,7 +538,7 @@ void Abc_NtkRecFilter2(int nLimit)
int previous = REC_EMPTY_ID, entry = REC_EMPTY_ID, pTemp;
int i;
Gia_Man_t * pGia = s_pMan->pGia, *newPGia;
- //int time = clock();
+ //int time = Abc_Clock();
Abc_ManRec_t2 *p = s_pMan;
// Gia_Obj_t * pObj;
char fileName[256];
@@ -588,8 +588,8 @@ void Abc_NtkRecFilter2(int nLimit)
Abc_NtkRecStop2();
Abc_Print(1, "Record stopped.");
// collect runtime stats
- //s_pMan->timeTrim += clock() - time;
- //s_pMan->timeTotal += clock() - time;
+ //s_pMan->timeTrim += Abc_Clock() - time;
+ //s_pMan->timeTotal += Abc_Clock() - time;
}
@@ -652,7 +652,7 @@ static void Abc_NtkRecResizeHash2(Abc_ManRec_t2* p)
int * pBinsNew, *ppSpot;
int pEntry, pTemp;
int nBinsNew, Counter, i;
- int clk = clock();
+ int clk = Abc_Clock();
// get the new table size
nBinsNew = Cudd_Prime( 2 * p->nBins );
printf("Hash table resize from %d to %d.\n", p->nBins, nBinsNew);
@@ -677,8 +677,8 @@ static void Abc_NtkRecResizeHash2(Abc_ManRec_t2* p)
ABC_FREE( p->pBins );
p->pBins = pBinsNew;
p->nBins = nBinsNew;
- p->timeReHash += clock() - clk;
- p->timeTotal += clock() - clk;
+ p->timeReHash += Abc_Clock() - clk;
+ p->timeTotal += Abc_Clock() - clk;
}
@@ -1032,7 +1032,7 @@ void Abc_NtkRecStart2( Gia_Man_t * pGia, int nVars, int nCuts, int fTrim )
int * ppSpot;
unsigned * pTruth;
int i;//, j = 0;
- int clkTotal = clock(), clk, timeInsert;
+ int clkTotal = Abc_Clock(), clk, timeInsert;
assert( s_pMan == NULL );
if ( pGia == NULL )
@@ -1104,7 +1104,7 @@ void Abc_NtkRecStart2( Gia_Man_t * pGia, int nVars, int nCuts, int fTrim )
p->pBins = ABC_ALLOC( int, p->nBins );
memset( p->pBins, -1, sizeof(int) * p->nBins );
-clk = clock();
+clk = Abc_Clock();
// Gia_ManForEachPo( pGia, pObj, i )
// {
// pTruthSrc = (unsigned *)Gia_ObjComputeTruthTable(pGia, pObj);
@@ -1112,10 +1112,10 @@ clk = clock();
// // Kit_TruthCopy(pTruthDst, pTruthSrc, p->nVars);
// Rec_MemSetEntry( p, Gia_ObjCioId(pObj), pTruthSrc );
// }
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
// insert the PO nodes into the table
-timeInsert = clock();
+timeInsert = Abc_Clock();
Abc_NtkRecMarkInputs(p, pGia);
Gia_ManForEachPo( pGia, pObj, i )
{
@@ -1134,7 +1134,7 @@ timeInsert = clock();
ppSpot = Abc_NtkRecTableLookup2(p, p->pBins, p->nBins, pTruth, p->nVars );
Abc_NtkRecInsertToLookUpTable2(p, ppSpot, pObj, Abc_ObjGetMax2(p->vInputs, pGia, pFanin), pTruth, p->fTrim);
}
-p->timeInsert += clock() - timeInsert;
+p->timeInsert += Abc_Clock() - timeInsert;
// temporaries
p->pBytes = ABC_ALLOC( int, 4*p->nWords );
@@ -1147,7 +1147,7 @@ p->timeInsert += clock() - timeInsert;
p->vLabelsInt = Vec_IntStart( 1000 );
- p->timeTotal += clock() - clkTotal;
+ p->timeTotal += Abc_Clock() - clkTotal;
}
/**Function*************************************************************
@@ -1482,7 +1482,7 @@ int Abc_NtkRecAddCut2( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
int i, RetValue, nNodes, nNodesBeg, nInputs = s_pMan->nVars, nLeaves = If_CutLeaveNum(pCut);
unsigned uCanonPhase;
int clk, timeInsert, timeBuild;
- //int begin = clock();
+ //int begin = Abc_Clock();
assert( nInputs <= 16 );
assert( nInputs == (int)pCut->nLimit );
s_pMan->nTried++;
@@ -1493,10 +1493,10 @@ int Abc_NtkRecAddCut2( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
return 1;
}
// collect internal nodes and skip redundant cuts
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCollectNodes( pIfMan, pRoot, pCut, vNodes );
-s_pMan->timeCollect += clock() - clk;
+s_pMan->timeCollect += Abc_Clock() - clk;
if ( !RetValue )
{
s_pMan->nFilterRedund++;
@@ -1512,9 +1512,9 @@ s_pMan->timeCollect += clock() - clk;
// compute truth table and skip the redundant structures
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCutTruth( vNodes, nLeaves, s_pMan->vTtTemps, s_pMan->vTtElems );
- s_pMan->timeTruth += clock() - clk;
+ s_pMan->timeTruth += Abc_Clock() - clk;
if ( !RetValue )
{
//fprintf(file,"redundant structures\n");
@@ -1531,15 +1531,15 @@ clk = clock();
pCanonPerm[i] = i;
// semi-canonicize the truth table
-clk = clock();
+clk = Abc_Clock();
//uCanonPhase = Kit_TruthSemiCanonicize( pInOut, pTemp, nLeaves, pCanonPerm );
uCanonPhase = Kit_TruthSemiCanonicize_new( pInOut, pTemp, nLeaves, pCanonPerm );
If_CutTruthStretch(pInOut, nLeaves, s_pMan->nVars);
- s_pMan->timeCanon += clock() - clk;
+ s_pMan->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
// go through the variables in the new truth table
-timeBuild = clock();
+timeBuild = Abc_Clock();
for ( i = 0; i < nLeaves; i++ )
{
// get hold of the corresponding leaf
@@ -1570,7 +1570,7 @@ timeBuild = clock();
//assert(pObj);
pObj = Gia_ManObj(pAig, Abc_Lit2Var(iRecObj));
pTruth = (unsigned *)Gia_ObjComputeTruthTable(pAig, pObj);
-s_pMan->timeBuild += clock() - timeBuild;
+s_pMan->timeBuild += Abc_Clock() - timeBuild;
if ( Kit_TruthSupport(pTruth, nInputs) != Kit_BitMask(nLeaves) )
{
@@ -1620,9 +1620,9 @@ s_pMan->timeBuild += clock() - timeBuild;
//Rec_MemSetEntry( s_pMan, Gia_ObjCioId(pPO), pTruthSrc );
// add the resulting truth table to the hash table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
Abc_NtkRecInsertToLookUpTable2(s_pMan, ppSpot, pPO, nLeaves, pTruth, s_pMan->fTrim);
- s_pMan->timeInsert += clock() - timeInsert;
+ s_pMan->timeInsert += Abc_Clock() - timeInsert;
// if (pIfMan->pPars->fDelayOpt)
// Abc_NtkRecAddSOPB(pIfMan, pCut, pTruth, pCanonPerm, uCanonPhase );
return 1;
@@ -1646,7 +1646,7 @@ void Abc_NtkRecAdd2( Abc_Ntk_t * pNtk, int fUseSOPB)
If_Par_t Pars, * pPars = &Pars;
Abc_Ntk_t * pNtkNew;
- int clk = clock();
+ int clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Performing recoding structures with choices.\n" );
@@ -1701,7 +1701,7 @@ void Abc_NtkRecAdd2( Abc_Ntk_t * pNtk, int fUseSOPB)
// perform recording
pNtkNew = Abc_NtkIf( pNtk, pPars );
Abc_NtkDelete( pNtkNew );
-s_pMan->timeTotal += clock() - clk;
+s_pMan->timeTotal += Abc_Clock() - clk;
// if ( !Abc_NtkCheck( s_pMan->pNtk ) )
// printf( "Abc_NtkRecAdd: The network check has failed.\n" );
@@ -1843,7 +1843,7 @@ static inline int If_CutComputDelay(If_Man_t* p, Rec_Obj_t2* entry, If_Cut_t* pC
int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
//int fVerbose = 0;
- int timeDelayComput, timeTotal = clock(), timeCanonicize;
+ int timeDelayComput, timeTotal = Abc_Clock(), timeCanonicize;
int nLeaves, i, DelayMin = ABC_INFINITY , * pDelayBest = &DelayMin;
char pCanonPerm[16];
unsigned uCanonPhase;
@@ -1880,17 +1880,17 @@ int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
return DelayMin;
}
- timeCanonicize = clock();
+ timeCanonicize = Abc_Clock();
//canonicize
for (i = 0; i < nLeaves; i++)
pCanonPerm[i] = i;
uCanonPhase = Kit_TruthSemiCanonicize_new(pInOut, pTemp, nLeaves, pCanonPerm);
If_CutTruthStretch(pInOut, nLeaves, nVars);
- s_pMan->timeIfCanonicize += clock() - timeCanonicize;
- timeDelayComput = clock();
+ s_pMan->timeIfCanonicize += Abc_Clock() - timeCanonicize;
+ timeDelayComput = Abc_Clock();
pCandMin = Abc_NtkRecLookUpBest(p, pCut, pInOut, pCanonPerm, NULL,pDelayBest);
assert (!(pCandMin == NULL && nLeaves == 2));
- s_pMan->timeIfComputDelay += clock() - timeDelayComput;
+ s_pMan->timeIfComputDelay += Abc_Clock() - timeDelayComput;
//functional class not found in the library.
if ( pCandMin == NULL )
{
@@ -1918,7 +1918,7 @@ int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
pCut->pPerm[(int)pCanonPerm[i]] = pCandMin->pinToPinDelay[i];
}
- s_pMan->timeIfTotal += clock() - timeTotal;
+ s_pMan->timeIfTotal += Abc_Clock() - timeTotal;
pCut->Cost = pCandMin->cost;
return DelayMin;
@@ -1974,7 +1974,7 @@ Hop_Obj_t * Abc_RecToHop2( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
char pCanonPerm[16];
unsigned *pInOut = s_pMan->pTemp1;
unsigned *pTemp = s_pMan->pTemp2;
- int time = clock();
+ int time = Abc_Clock();
int fCompl;
int * pCompl = &fCompl;
nLeaves = If_CutLeaveNum(pCut);
@@ -2058,8 +2058,8 @@ Hop_Obj_t * Abc_RecToHop2( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
else assert( 0 );
- s_pMan->timeIfDerive += clock() - time;
- s_pMan->timeIfTotal += clock() - time;
+ s_pMan->timeIfDerive += Abc_Clock() - time;
+ s_pMan->timeIfTotal += Abc_Clock() - time;
// complement the result if needed
return Hop_NotCond(pHopObj, (pCut->fCompl)^(((uCanonPhase & (1 << nLeaves)) > 0)) ^ fCompl);
}
@@ -2087,7 +2087,7 @@ int Abc_RecToGia2( Gia_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_
char pCanonPerm[16];
unsigned *pInOut = s_pMan->pTemp1;
unsigned *pTemp = s_pMan->pTemp2;
- int time = clock();
+ int time = Abc_Clock();
int fCompl;
int * pCompl = &fCompl;
nLeaves = If_CutLeaveNum(pCut);
@@ -2157,8 +2157,8 @@ int Abc_RecToGia2( Gia_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_
pHopObj = Vec_IntEntry(s_pMan->vLabelsInt, Gia_ObjCioId(pGiaObj));
else assert( 0 );
- s_pMan->timeIfDerive += clock() - time;
- s_pMan->timeIfTotal += clock() - time;
+ s_pMan->timeIfDerive += Abc_Clock() - time;
+ s_pMan->timeIfTotal += Abc_Clock() - time;
// complement the result if needed
return Abc_LitNotCond(pHopObj, (pCut->fCompl)^(((uCanonPhase & (1 << nLeaves)) > 0)) ^ fCompl);
}
@@ -2405,7 +2405,7 @@ void Abc_NtkRecLibMerge2(Gia_Man_t* pGia2)
int i;
Gia_Obj_t * pObj;
Abc_ManRec_t2 * p = s_pMan;
- int clk = clock();
+ int clk = Abc_Clock();
if ( Gia_ManPiNum(pGia2) > s_pMan->nVars )
{
printf( "The library has more inputs than the record.\n");
@@ -2432,8 +2432,8 @@ void Abc_NtkRecLibMerge2(Gia_Man_t* pGia2)
}
ABC_FREE(pGia2->pCopies);
- s_pMan->timeMerge += clock() - clk;
- s_pMan->timeTotal += clock() - clk;
+ s_pMan->timeMerge += Abc_Clock() - clk;
+ s_pMan->timeTotal += Abc_Clock() - clk;
}
diff --git a/src/base/abci/abcRec3.c b/src/base/abci/abcRec3.c
index 689f73f2..68bb8cdc 100644
--- a/src/base/abci/abcRec3.c
+++ b/src/base/abci/abcRec3.c
@@ -84,13 +84,13 @@ struct Lms_Man_t_
int nAddedFuncs;
int nHoleInTheWall;
// runtime
- clock_t timeTruth;
- clock_t timeCanon;
- clock_t timeBuild;
- clock_t timeCheck;
- clock_t timeInsert;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeTruth;
+ abctime timeCanon;
+ abctime timeBuild;
+ abctime timeCheck;
+ abctime timeInsert;
+ abctime timeOther;
+ abctime timeTotal;
};
static Lms_Man_t * s_pMan3 = NULL;
@@ -305,7 +305,7 @@ void Lms_GiaPrintSubgraph( Gia_Man_t * p, Gia_Obj_t * pObj )
Lms_Man_t * Lms_ManStart( Gia_Man_t * pGia, int nVars, int nCuts, int fFuncOnly, int fVerbose )
{
Lms_Man_t * p;
- clock_t clk, clk2 = clock();
+ abctime clk, clk2 = Abc_Clock();
// if GIA is given, use the number of variables from GIA
nVars = pGia ? Gia_ManCiNum(pGia) : nVars;
assert( nVars >= 6 && nVars <= LMS_VAR_MAX );
@@ -342,12 +342,12 @@ Lms_Man_t * Lms_ManStart( Gia_Man_t * pGia, int nVars, int nCuts, int fFuncOnly,
p->nAdded = Gia_ManCoNum( p->pGia );
Gia_ManForEachCo( p->pGia, pObj, i )
{
- clk = clock();
+ clk = Abc_Clock();
pTruth = Gia_ObjComputeTruthTable( p->pGia, pObj );
- p->timeTruth += clock() - clk;
- clk = clock();
+ p->timeTruth += Abc_Clock() - clk;
+ clk = Abc_Clock();
Index = Vec_MemHashInsert( p->vTtMem, pTruth );
- p->timeInsert += clock() - clk;
+ p->timeInsert += Abc_Clock() - clk;
assert( Index == Prev || Index == Prev + 1 ); // GIA subgraphs should be ordered
Vec_IntPush( p->vTruthIds, Index );
Prev = Index;
@@ -357,7 +357,7 @@ Lms_Man_t * Lms_ManStart( Gia_Man_t * pGia, int nVars, int nCuts, int fFuncOnly,
p->vNodes = Vec_PtrAlloc( 1000 );
p->vLabelsP = Vec_PtrAlloc( 1000 );
p->vLabels = Vec_IntAlloc( 1000 );
-p->timeTotal += clock() - clk2;
+p->timeTotal += Abc_Clock() - clk2;
return p;
}
void Lms_ManStop( Lms_Man_t * p )
@@ -575,7 +575,7 @@ void Abc_NtkRecLibMerge3( Gia_Man_t * pLib )
word * pTruth;
int i, k, Index, iFanin0, iFanin1, nLeaves;
Gia_Obj_t * pObjPo, * pDriver, * pTemp = NULL;
- clock_t clk, clk2 = clock();
+ abctime clk, clk2 = Abc_Clock();
if ( Gia_ManCiNum(pLib) != Gia_ManCiNum(pGia) )
{
@@ -597,11 +597,11 @@ void Abc_NtkRecLibMerge3( Gia_Man_t * pLib )
assert( nLeaves > 1 );
// compute the truth table
-clk = clock();
+clk = Abc_Clock();
pTruth = Gia_ObjComputeTruthTable( pLib, Gia_ObjFanin0(pObjPo) );
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
// semi-canonicize
-clk = clock();
+clk = Abc_Clock();
memcpy( p->pTemp1, pTruth, p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
uCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
@@ -609,12 +609,12 @@ clk = clock();
uCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
-p->timeCanon += clock() - clk;
+p->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
if ( nLeaves == 2 && Abc_TtSupportSize(pTruth, 2) != 2 )
continue;
-clk = clock();
+clk = Abc_Clock();
// map cut leaves into elementary variables of GIA
for ( i = 0; i < nLeaves; i++ )
Gia_ManCi( pLib, pCanonPerm[i] )->Value = Abc_Var2Lit( Gia_ObjId(pGia, Gia_ManPi(pGia, i)), (uCanonPhase >> i) & 1 );
@@ -626,7 +626,7 @@ clk = clock();
iFanin1 = Abc_LitNotCond( Gia_ObjFanin1(pTemp)->Value, Gia_ObjFaninC1(pTemp) );
pTemp->Value = Gia_ManHashAnd( pGia, iFanin0, iFanin1 );
}
-p->timeBuild += clock() - clk;
+p->timeBuild += Abc_Clock() - clk;
// check if this node is already driving a PO
assert( Gia_ObjIsAnd(pTemp) );
@@ -643,10 +643,10 @@ p->timeBuild += clock() - clk;
// verify truth table
if ( fCheck )
{
-clk = clock();
+clk = Abc_Clock();
pTemp = Gia_ManCo(pGia, Gia_ManCoNum(pGia)-1);
pTruth = Gia_ObjComputeTruthTable( pGia, Gia_ManCo(pGia, Gia_ManCoNum(pGia)-1) );
-p->timeCheck += clock() - clk;
+p->timeCheck += Abc_Clock() - clk;
if ( memcmp( p->pTemp1, pTruth, p->nWords * sizeof(word) ) != 0 )
{
@@ -663,17 +663,17 @@ p->timeCheck += clock() - clk;
}
}
-clk = clock();
+clk = Abc_Clock();
// add the resulting truth table to the hash table
Index = Vec_MemHashInsert( p->vTtMem, p->pTemp1 );
// save truth table ID
Vec_IntPush( p->vTruthIds, Index );
assert( Gia_ManCoNum(pGia) == Vec_IntSize(p->vTruthIds) );
p->nAdded++;
-p->timeInsert += clock() - clk;
+p->timeInsert += Abc_Clock() - clk;
}
Vec_StrFree( vSupps );
-p->timeTotal += clock() - clk2;
+p->timeTotal += Abc_Clock() - clk2;
}
@@ -700,7 +700,7 @@ int Abc_NtkRecAddCut3( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
Gia_Obj_t * pDriver;
If_Obj_t * pIfObj = NULL;
word * pTruth;
- clock_t clk;
+ abctime clk;
p->nTried++;
// skip small cuts
@@ -715,7 +715,7 @@ int Abc_NtkRecAddCut3( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
// Vec_MemHashInsert( p->vTtMem2, If_CutTruthW(pCut) );
// semi-canonicize truth table
-clk = clock();
+clk = Abc_Clock();
memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
uCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
@@ -723,12 +723,12 @@ clk = clock();
uCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
-p->timeCanon += clock() - clk;
+p->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
if ( p->pGia == NULL )
{
-clk = clock();
+clk = Abc_Clock();
// add the resulting truth table to the hash table
Index = Vec_MemHashInsert( p->vTtMem, p->pTemp1 );
/*
@@ -741,21 +741,21 @@ clk = clock();
Vec_IntPush( p->vTruthFreqs, 1 );
*/
p->nAdded++;
-p->timeInsert += clock() - clk;
+p->timeInsert += Abc_Clock() - clk;
return 1;
}
// collect internal nodes and skip redundant cuts
-clk = clock();
+clk = Abc_Clock();
If_CutTraverse( pIfMan, pRoot, pCut, vNodes );
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
if ( Vec_PtrSize(vNodes) > 253 )
{
p->nFilterSize++;
return 1;
}
-clk = clock();
+clk = Abc_Clock();
// map cut leaves into elementary variables of GIA
for ( i = 0; i < nLeaves; i++ )
If_ManObj( pIfMan, pCut->pLeaves[(int)pCanonPerm[i]] )->iCopy = Abc_Var2Lit( Gia_ObjId(pGia, Gia_ManPi(pGia, i)), (uCanonPhase >> i) & 1 );
@@ -775,7 +775,7 @@ clk = clock();
pIfObj->iCopy = Gia_ManHashAnd( pGia, iFanin0, iFanin1 );
}
p->nHoleInTheWall += fHole;
-p->timeBuild += clock() - clk;
+p->timeBuild += Abc_Clock() - clk;
// check if this node is already driving a PO
assert( If_ObjIsAnd(pIfObj) );
@@ -790,9 +790,9 @@ p->timeBuild += clock() - clk;
Gia_ManAppendCo( pGia, Abc_LitNotCond( pIfObj->iCopy, (uCanonPhase >> nLeaves) & 1 ) );
// verify truth table
-clk = clock();
+clk = Abc_Clock();
pTruth = Gia_ObjComputeTruthTable( pGia, Gia_ManCo(pGia, Gia_ManCoNum(pGia)-1) );
-p->timeCheck += clock() - clk;
+p->timeCheck += Abc_Clock() - clk;
if ( memcmp( p->pTemp1, pTruth, p->nWords * sizeof(word) ) != 0 )
{
/*
@@ -808,14 +808,14 @@ p->timeCheck += clock() - clk;
return 1;
}
-clk = clock();
+clk = Abc_Clock();
// add the resulting truth table to the hash table
Index = Vec_MemHashInsert( p->vTtMem, p->pTemp1 );
// save truth table ID
Vec_IntPush( p->vTruthIds, Index );
assert( Gia_ManCoNum(pGia) == Vec_IntSize(p->vTruthIds) );
p->nAdded++;
-p->timeInsert += clock() - clk;
+p->timeInsert += Abc_Clock() - clk;
return 1;
}
@@ -835,7 +835,7 @@ void Abc_NtkRecAdd3( Abc_Ntk_t * pNtk, int fUseSOPB )
extern Abc_Ntk_t * Abc_NtkIf( Abc_Ntk_t * pNtk, If_Par_t * pPars );
If_Par_t Pars, * pPars = &Pars;
Abc_Ntk_t * pNtkNew;
- int clk = clock();
+ int clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Performing recoding structures with choices.\n" );
// remember that the manager was used for library construction
@@ -873,7 +873,7 @@ void Abc_NtkRecAdd3( Abc_Ntk_t * pNtk, int fUseSOPB )
// perform recording
pNtkNew = Abc_NtkIf( pNtk, pPars );
Abc_NtkDelete( pNtkNew );
-s_pMan3->timeTotal += clock() - clk;
+s_pMan3->timeTotal += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -907,7 +907,7 @@ static inline int If_CutFindBestStruct( If_Man_t * pIfMan, If_Cut_t * pCut, char
int BestDelay = ABC_INFINITY, BestArea = ABC_INFINITY, Delay, Area;
int uSupport, nLeaves = If_CutLeaveNum( pCut );
word DelayProfile;
- clock_t clk;
+ abctime clk;
assert( nLeaves > 1 );
pCut->fUser = 1;
// compute support
@@ -931,7 +931,7 @@ static inline int If_CutFindBestStruct( If_Man_t * pIfMan, If_Cut_t * pCut, char
assert( Gia_WordCountOnes(uSupport) == nLeaves );
// semicanonicize the function
-clk = clock();
+clk = Abc_Clock();
memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
*puCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
@@ -939,7 +939,7 @@ clk = clock();
*puCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
-p->timeCanon += clock() - clk;
+p->timeCanon += Abc_Clock() - clk;
// get TT ID for the given class
pTruthId = Vec_MemHashLookup( p->vTtMem, p->pTemp1 );
@@ -1381,13 +1381,13 @@ int Abc_NtkRecIsRunning3()
}
Gia_Man_t * Abc_NtkRecGetGia3()
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
printf( "Before normalizing: Library has %d classes and %d AIG subgraphs with %d AND nodes.\n",
Vec_MemEntryNum(s_pMan3->vTtMem), Gia_ManPoNum(s_pMan3->pGia), Gia_ManAndNum(s_pMan3->pGia) );
Lms_GiaNormalize( s_pMan3 );
printf( "After normalizing: Library has %d classes and %d AIG subgraphs with %d AND nodes.\n",
Vec_MemEntryNum(s_pMan3->vTtMem), Gia_ManPoNum(s_pMan3->pGia), Gia_ManAndNum(s_pMan3->pGia) );
- Abc_PrintTime( 1, "Normalization runtime", clock() - clk );
+ Abc_PrintTime( 1, "Normalization runtime", Abc_Clock() - clk );
s_pMan3->fLibConstr = 0;
return s_pMan3->pGia;
}
diff --git a/src/base/abci/abcRefactor.c b/src/base/abci/abcRefactor.c
index cfc7bd39..891deff9 100644
--- a/src/base/abci/abcRefactor.c
+++ b/src/base/abci/abcRefactor.c
@@ -50,15 +50,15 @@ struct Abc_ManRef_t_
int nNodesBeg;
int nNodesEnd;
// runtime statistics
- clock_t timeCut;
- clock_t timeBdd;
- clock_t timeDcs;
- clock_t timeSop;
- clock_t timeFact;
- clock_t timeEval;
- clock_t timeRes;
- clock_t timeNtk;
- clock_t timeTotal;
+ abctime timeCut;
+ abctime timeBdd;
+ abctime timeDcs;
+ abctime timeSop;
+ abctime timeFact;
+ abctime timeEval;
+ abctime timeRes;
+ abctime timeNtk;
+ abctime timeTotal;
};
static void Abc_NtkManRefPrintStats( Abc_ManRef_t * p );
@@ -95,7 +95,7 @@ int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMax, int f
Dec_Graph_t * pFForm;
Vec_Ptr_t * vFanins;
Abc_Obj_t * pNode;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
int i, nNodes;
assert( Abc_NtkIsStrash(pNtk) );
@@ -129,19 +129,19 @@ int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMax, int f
if ( i >= nNodes )
break;
// compute a reconvergence-driven cut
-clk = clock();
+clk = Abc_Clock();
vFanins = Abc_NodeFindCut( pManCut, pNode, fUseDcs );
-pManRef->timeCut += clock() - clk;
+pManRef->timeCut += Abc_Clock() - clk;
// evaluate this cut
-clk = clock();
+clk = Abc_Clock();
pFForm = Abc_NodeRefactor( pManRef, pNode, vFanins, fUpdateLevel, fUseZeros, fUseDcs, fVerbose );
-pManRef->timeRes += clock() - clk;
+pManRef->timeRes += Abc_Clock() - clk;
if ( pFForm == NULL )
continue;
// acceptable replacement found, update the graph
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pFForm, fUpdateLevel, pManRef->nLastGain );
-pManRef->timeNtk += clock() - clk;
+pManRef->timeNtk += Abc_Clock() - clk;
Dec_GraphFree( pFForm );
// {
// extern int s_TotalChanges;
@@ -149,7 +149,7 @@ pManRef->timeNtk += clock() - clk;
// }
}
Extra_ProgressBarStop( pProgress );
-pManRef->timeTotal = clock() - clkStart;
+pManRef->timeTotal = Abc_Clock() - clkStart;
pManRef->nNodesEnd = Abc_NtkNodeNum(pNtk);
// print statistics of the manager
@@ -197,7 +197,7 @@ Dec_Graph_t * Abc_NodeRefactor( Abc_ManRef_t * p, Abc_Obj_t * pNode, Vec_Ptr_t *
Dec_Graph_t * pFForm;
DdNode * bNodeFunc;
int nNodesSaved, nNodesAdded, i;
- clock_t clk;
+ abctime clk;
char * pSop;
int Required;
@@ -206,16 +206,16 @@ Dec_Graph_t * Abc_NodeRefactor( Abc_ManRef_t * p, Abc_Obj_t * pNode, Vec_Ptr_t *
p->nNodesConsidered++;
// get the function of the cut
-clk = clock();
+clk = Abc_Clock();
bNodeFunc = Abc_NodeConeBdd( p->dd, p->dd->vars, pNode, vFanins, p->vVisited ); Cudd_Ref( bNodeFunc );
-p->timeBdd += clock() - clk;
+p->timeBdd += Abc_Clock() - clk;
// if don't-care are used, transform the function into ISOP
if ( fUseDcs )
{
DdNode * bNodeDc, * bNodeOn, * bNodeOnDc;
int nMints, nMintsDc;
-clk = clock();
+clk = Abc_Clock();
// get the don't-cares
bNodeDc = Abc_NodeConeDcs( p->dd, p->dd->vars + vFanins->nSize, p->dd->vars, p->vLeaves, vFanins, p->vVisited ); Cudd_Ref( bNodeDc );
nMints = (1 << vFanins->nSize);
@@ -230,7 +230,7 @@ clk = clock();
bNodeFunc = Cudd_bddIsop( p->dd, bNodeOn, bNodeOnDc ); Cudd_Ref( bNodeFunc );
Cudd_RecursiveDeref( p->dd, bNodeOn );
Cudd_RecursiveDeref( p->dd, bNodeOnDc );
-p->timeDcs += clock() - clk;
+p->timeDcs += Abc_Clock() - clk;
}
// always accept the case of constant node
@@ -246,15 +246,15 @@ p->timeDcs += clock() - clk;
}
// get the SOP of the cut
-clk = clock();
+clk = Abc_Clock();
pSop = Abc_ConvertBddToSop( NULL, p->dd, bNodeFunc, bNodeFunc, vFanins->nSize, 0, p->vCube, -1 );
-p->timeSop += clock() - clk;
+p->timeSop += Abc_Clock() - clk;
// get the factored form
-clk = clock();
+clk = Abc_Clock();
pFForm = Dec_Factor( pSop );
ABC_FREE( pSop );
-p->timeFact += clock() - clk;
+p->timeFact += Abc_Clock() - clk;
// mark the fanin boundary
// (can mark only essential fanins, belonging to bNodeFunc!)
@@ -271,9 +271,9 @@ p->timeFact += clock() - clk;
}
// detect how many new nodes will be added (while taking into account reused nodes)
-clk = clock();
+clk = Abc_Clock();
nNodesAdded = Dec_GraphToNetworkCount( pNode, pFForm, nNodesSaved, Required );
-p->timeEval += clock() - clk;
+p->timeEval += Abc_Clock() - clk;
// quit if there is no improvement
if ( nNodesAdded == -1 || (nNodesAdded == nNodesSaved && !fUseZeros) )
{
diff --git a/src/base/abci/abcRestruct.c b/src/base/abci/abcRestruct.c
index 51af25c6..1863c629 100644
--- a/src/base/abci/abcRestruct.c
+++ b/src/base/abci/abcRestruct.c
@@ -107,7 +107,7 @@ int Abc_NtkRestructure( Abc_Ntk_t * pNtk, int nCutMax, int fUpdateLevel, int fUs
Cut_Cut_t * pCutList;
Dec_Graph_t * pGraph;
Abc_Obj_t * pNode;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
int fMulti = 1;
int fResub = 0;
int i, nNodes;
@@ -125,9 +125,9 @@ int Abc_NtkRestructure( Abc_Ntk_t * pNtk, int nCutMax, int fUpdateLevel, int fUs
pManRst = Abc_NtkManRstStart( nCutMax, fUpdateLevel, fUseZeros, fVerbose );
pManRst->pNtk = pNtk;
// start the cut manager
-clk = clock();
+clk = Abc_Clock();
pManCut = Abc_NtkStartCutManForRestruct( pNtk, nCutMax, fMulti );
-pManRst->timeCut += clock() - clk;
+pManRst->timeCut += Abc_Clock() - clk;
// pNtk->pManCut = pManCut;
// resynthesize each node once
@@ -152,28 +152,28 @@ pManRst->timeCut += clock() - clk;
if ( i >= nNodes )
break;
// get the cuts for the given node
-clk = clock();
+clk = Abc_Clock();
pCutList = (Cut_Cut_t *)Abc_NodeGetCutsRecursive( pManCut, pNode, fMulti, 0 );
-pManRst->timeCut += clock() - clk;
+pManRst->timeCut += Abc_Clock() - clk;
// perform restructuring
-clk = clock();
+clk = Abc_Clock();
if ( fResub )
pGraph = Abc_NodeResubstitute( pManRst, pNode, pCutList );
else
pGraph = Abc_NodeRestructure( pManRst, pNode, pCutList );
-pManRst->timeRes += clock() - clk;
+pManRst->timeRes += Abc_Clock() - clk;
if ( pGraph == NULL )
continue;
// acceptable replacement found, update the graph
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pGraph, fUpdateLevel, pManRst->nLastGain );
-pManRst->timeNtk += clock() - clk;
+pManRst->timeNtk += Abc_Clock() - clk;
Dec_GraphFree( pGraph );
}
Extra_ProgressBarStop( pProgress );
-pManRst->timeTotal = clock() - clkStart;
+pManRst->timeTotal = Abc_Clock() - clkStart;
// print statistics of the manager
// if ( fVerbose )
@@ -342,12 +342,12 @@ Dec_Graph_t * Abc_NodeRestructureCut( Abc_ManRst_t * p, Abc_Obj_t * pRoot, Cut_C
Vec_PtrPush( p->vLeaves, pLeaf );
}
-clk = clock();
+clk = Abc_Clock();
// collect the internal nodes of the cut
// Abc_NodeConeCollect( &pRoot, 1, p->vLeaves, p->vVisited, 0 );
// derive the BDD of the cut
bFunc = Abc_NodeConeBdd( p->dd, p->dd->vars, pRoot, p->vLeaves, p->vVisited ); Cudd_Ref( bFunc );
-p->timeBdd += clock() - clk;
+p->timeBdd += Abc_Clock() - clk;
// consider the special case, when the function is a constant
if ( Cudd_IsConstant(bFunc) )
@@ -361,10 +361,10 @@ p->timeBdd += clock() - clk;
return Dec_GraphCreateConst1();
}
-clk = clock();
+clk = Abc_Clock();
// try disjoint support decomposition
pNodeDsd = Dsd_DecomposeOne( p->pManDsd, bFunc );
-p->timeDsd += clock() - clk;
+p->timeDsd += Abc_Clock() - clk;
// skip nodes with non-decomposable blocks
Dsd_TreeNodeGetInfoOne( pNodeDsd, NULL, &nMaxSize );
@@ -421,13 +421,13 @@ p->timeDsd += clock() - clk;
// detect how many new nodes will be added (while taking into account reused nodes)
-clk = clock();
+clk = Abc_Clock();
if ( nMaxSize > 3 )
pGraph = NULL;
else
pGraph = Abc_NodeEvaluateDsd( p, pNodeDsd, pRoot, Required, nNodesSaved, &nNodesAdded );
// pGraph = NULL;
-p->timeEval += clock() - clk;
+p->timeEval += Abc_Clock() - clk;
// quit if there is no improvement
if ( pGraph == NULL || nNodesAdded == -1 || (nNodesAdded == nNodesSaved && !p->fUseZeros) )
diff --git a/src/base/abci/abcResub.c b/src/base/abci/abcResub.c
index 3c970c9f..9323f9e7 100644
--- a/src/base/abci/abcResub.c
+++ b/src/base/abci/abcResub.c
@@ -62,18 +62,18 @@ struct Abc_ManRes_t_
// other data
Vec_Ptr_t * vTemp; // temporary array of nodes
// runtime statistics
- clock_t timeCut;
- clock_t timeTruth;
- clock_t timeRes;
- clock_t timeDiv;
- clock_t timeMffc;
- clock_t timeSim;
- clock_t timeRes1;
- clock_t timeResD;
- clock_t timeRes2;
- clock_t timeRes3;
- clock_t timeNtk;
- clock_t timeTotal;
+ abctime timeCut;
+ abctime timeTruth;
+ abctime timeRes;
+ abctime timeDiv;
+ abctime timeMffc;
+ abctime timeSim;
+ abctime timeRes1;
+ abctime timeResD;
+ abctime timeRes2;
+ abctime timeRes3;
+ abctime timeNtk;
+ abctime timeTotal;
// improvement statistics
int nUsedNodeC;
int nUsedNode0;
@@ -117,7 +117,7 @@ static Dec_Graph_t * Abc_ManResubDivs3( Abc_ManRes_t * p, int Required );
static Vec_Ptr_t * Abc_CutFactorLarge( Abc_Obj_t * pNode, int nLeavesMax );
static int Abc_CutVolumeCheck( Abc_Obj_t * pNode, Vec_Ptr_t * vLeaves );
-extern clock_t s_ResubTime;
+extern abctime s_ResubTime;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -144,7 +144,7 @@ int Abc_NtkResubstitute( Abc_Ntk_t * pNtk, int nCutMax, int nStepsMax, int nLeve
Dec_Graph_t * pFForm;
Vec_Ptr_t * vLeaves;
Abc_Obj_t * pNode;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
int i, nNodes;
assert( Abc_NtkIsStrash(pNtk) );
@@ -187,10 +187,10 @@ int Abc_NtkResubstitute( Abc_Ntk_t * pNtk, int nCutMax, int nStepsMax, int nLeve
break;
// compute a reconvergence-driven cut
-clk = clock();
+clk = Abc_Clock();
vLeaves = Abc_NodeFindCut( pManCut, pNode, 0 );
// vLeaves = Abc_CutFactorLarge( pNode, nCutMax );
-pManRes->timeCut += clock() - clk;
+pManRes->timeCut += Abc_Clock() - clk;
/*
if ( fVerbose && vLeaves )
printf( "Node %6d : Leaves = %3d. Volume = %3d.\n", pNode->Id, Vec_PtrSize(vLeaves), Abc_CutVolumeCheck(pNode, vLeaves) );
@@ -200,18 +200,18 @@ pManRes->timeCut += clock() - clk;
// get the don't-cares
if ( pManOdc )
{
-clk = clock();
+clk = Abc_Clock();
Abc_NtkDontCareClear( pManOdc );
Abc_NtkDontCareCompute( pManOdc, pNode, vLeaves, pManRes->pCareSet );
-pManRes->timeTruth += clock() - clk;
+pManRes->timeTruth += Abc_Clock() - clk;
}
// evaluate this cut
-clk = clock();
+clk = Abc_Clock();
pFForm = Abc_ManResubEval( pManRes, pNode, vLeaves, nStepsMax, fUpdateLevel, fVerbose );
// Vec_PtrFree( vLeaves );
// Abc_ManResubCleanup( pManRes );
-pManRes->timeRes += clock() - clk;
+pManRes->timeRes += Abc_Clock() - clk;
if ( pFForm == NULL )
continue;
pManRes->nTotalGain += pManRes->nLastGain;
@@ -225,13 +225,13 @@ pManRes->timeRes += clock() - clk;
}
*/
// acceptable replacement found, update the graph
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pFForm, fUpdateLevel, pManRes->nLastGain );
-pManRes->timeNtk += clock() - clk;
+pManRes->timeNtk += Abc_Clock() - clk;
Dec_GraphFree( pFForm );
}
Extra_ProgressBarStop( pProgress );
-pManRes->timeTotal = clock() - clkStart;
+pManRes->timeTotal = Abc_Clock() - clkStart;
pManRes->nNodesEnd = Abc_NtkNodeNum(pNtk);
// print statistics
@@ -266,7 +266,7 @@ pManRes->timeTotal = clock() - clkStart;
printf( "Abc_NtkRefactor: The network check has failed.\n" );
return 0;
}
-s_ResubTime = clock() - clkStart;
+s_ResubTime = Abc_Clock() - clkStart;
return 1;
}
@@ -1624,7 +1624,7 @@ Dec_Graph_t * Abc_ManResubEval( Abc_ManRes_t * p, Abc_Obj_t * pRoot, Vec_Ptr_t *
extern int Abc_NodeMffcInside( Abc_Obj_t * pNode, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vInside );
Dec_Graph_t * pGraph;
int Required;
- clock_t clk;
+ abctime clk;
Required = fUpdateLevel? Abc_ObjRequiredLevel(pRoot) : ABC_INFINITY;
@@ -1635,26 +1635,26 @@ Dec_Graph_t * Abc_ManResubEval( Abc_ManRes_t * p, Abc_Obj_t * pRoot, Vec_Ptr_t *
p->nLastGain = -1;
// collect the MFFC
-clk = clock();
+clk = Abc_Clock();
p->nMffc = Abc_NodeMffcInside( pRoot, vLeaves, p->vTemp );
-p->timeMffc += clock() - clk;
+p->timeMffc += Abc_Clock() - clk;
assert( p->nMffc > 0 );
// collect the divisor nodes
-clk = clock();
+clk = Abc_Clock();
if ( !Abc_ManResubCollectDivs( p, pRoot, vLeaves, Required ) )
return NULL;
- p->timeDiv += clock() - clk;
+ p->timeDiv += Abc_Clock() - clk;
p->nTotalDivs += p->nDivs;
p->nTotalLeaves += p->nLeaves;
// simulate the nodes
-clk = clock();
+clk = Abc_Clock();
Abc_ManResubSimulate( p->vDivs, p->nLeaves, p->vSims, p->nLeavesMax, p->nWords );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
-clk = clock();
+clk = Abc_Clock();
// consider constants
if ( (pGraph = Abc_ManResubQuit( p )) )
{
@@ -1666,14 +1666,14 @@ clk = clock();
// consider equal nodes
if ( (pGraph = Abc_ManResubDivs0( p )) )
{
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
p->nUsedNode0++;
p->nLastGain = p->nMffc;
return pGraph;
}
if ( nSteps == 0 || p->nMffc == 1 )
{
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
return NULL;
}
@@ -1683,50 +1683,50 @@ p->timeRes1 += clock() - clk;
// consider one node
if ( (pGraph = Abc_ManResubDivs1( p, Required )) )
{
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 1;
return pGraph;
}
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
if ( nSteps == 1 || p->nMffc == 2 )
return NULL;
-clk = clock();
+clk = Abc_Clock();
// consider triples
if ( (pGraph = Abc_ManResubDivs12( p, Required )) )
{
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 2;
return pGraph;
}
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
// get the two level divisors
-clk = clock();
+clk = Abc_Clock();
Abc_ManResubDivsD( p, Required );
-p->timeResD += clock() - clk;
+p->timeResD += Abc_Clock() - clk;
// consider two nodes
-clk = clock();
+clk = Abc_Clock();
if ( (pGraph = Abc_ManResubDivs2( p, Required )) )
{
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 2;
return pGraph;
}
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
if ( nSteps == 2 || p->nMffc == 3 )
return NULL;
// consider two nodes
-clk = clock();
+clk = Abc_Clock();
if ( (pGraph = Abc_ManResubDivs3( p, Required )) )
{
-p->timeRes3 += clock() - clk;
+p->timeRes3 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 3;
return pGraph;
}
-p->timeRes3 += clock() - clk;
+p->timeRes3 += Abc_Clock() - clk;
if ( nSteps == 3 || p->nLeavesMax == 4 )
return NULL;
return NULL;
diff --git a/src/base/abci/abcRewrite.c b/src/base/abci/abcRewrite.c
index 9ce83e5f..0b0881a6 100644
--- a/src/base/abci/abcRewrite.c
+++ b/src/base/abci/abcRewrite.c
@@ -68,7 +68,7 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk, int fUpdateLevel, int fUseZeros, int fVerb
// Vec_Ptr_t * vAddedCells = NULL, * vUpdatedNets = NULL;
Dec_Graph_t * pGraph;
int i, nNodes, nGain, fCompl;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// cleanup the AIG
@@ -96,9 +96,9 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk, int fUpdateLevel, int fUseZeros, int fVerb
if ( fUpdateLevel )
Abc_NtkStartReverseLevels( pNtk, 0 );
// start the cut manager
-clk = clock();
+clk = Abc_Clock();
pManCut = Abc_NtkStartCutManForRewrite( pNtk );
-Rwr_ManAddTimeCuts( pManRwr, clock() - clk );
+Rwr_ManAddTimeCuts( pManRwr, Abc_Clock() - clk );
pNtk->pManCut = pManCut;
if ( fVeryVerbose )
@@ -137,9 +137,9 @@ Rwr_ManAddTimeCuts( pManRwr, clock() - clk );
// complement the FF if needed
if ( fCompl ) Dec_GraphComplement( pGraph );
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pGraph, fUpdateLevel, nGain );
-Rwr_ManAddTimeUpdate( pManRwr, clock() - clk );
+Rwr_ManAddTimeUpdate( pManRwr, Abc_Clock() - clk );
if ( fCompl ) Dec_GraphComplement( pGraph );
// use the array of changed nodes to update placement
@@ -147,7 +147,7 @@ Rwr_ManAddTimeUpdate( pManRwr, clock() - clk );
// Abc_PlaceUpdate( vAddedCells, vUpdatedNets );
}
Extra_ProgressBarStop( pProgress );
-Rwr_ManAddTimeTotal( pManRwr, clock() - clkStart );
+Rwr_ManAddTimeTotal( pManRwr, Abc_Clock() - clkStart );
// print stats
pManRwr->nNodesEnd = Abc_NtkNodeNum(pNtk);
if ( fVerbose )
@@ -169,9 +169,9 @@ Rwr_ManAddTimeTotal( pManRwr, clock() - clkStart );
// put the nodes into the DFS order and reassign their IDs
{
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
Abc_NtkReassignIds( pNtk );
-// ABC_PRT( "time", clock() - clk );
+// ABC_PRT( "time", Abc_Clock() - clk );
}
// Abc_AigCheckFaninOrder( pNtk->pManFunc );
// fix the levels
diff --git a/src/base/abci/abcRr.c b/src/base/abci/abcRr.c
index 86bc40ed..9a670b67 100644
--- a/src/base/abci/abcRr.c
+++ b/src/base/abci/abcRr.c
@@ -56,11 +56,11 @@ struct Abc_RRMan_t_
int nLevelsOld; // the old number of levels
int nEdgesTried; // the number of nodes tried
int nEdgesRemoved; // the number of nodes proved
- clock_t timeWindow; // the time to construct the window
- clock_t timeMiter; // the time to construct the miter
- clock_t timeProve; // the time to prove the miter
- clock_t timeUpdate; // the network update time
- clock_t timeTotal; // the total runtime
+ abctime timeWindow; // the time to construct the window
+ abctime timeMiter; // the time to construct the miter
+ abctime timeProve; // the time to prove the miter
+ abctime timeUpdate; // the network update time
+ abctime timeTotal; // the total runtime
};
static Abc_RRMan_t * Abc_RRManStart();
@@ -101,7 +101,7 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
Abc_RRMan_t * p;
Abc_Obj_t * pNode, * pFanin, * pFanout;
int i, k, m, nNodes, RetValue;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
// start the manager
p = Abc_RRManStart();
p->pNtk = pNtk;
@@ -152,9 +152,9 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
p->pFanin = pFanin;
p->pFanout = NULL;
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRWindow( p );
- p->timeWindow += clock() - clk;
+ p->timeWindow += Abc_Clock() - clk;
if ( !RetValue )
continue;
/*
@@ -163,16 +163,16 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
Abc_NtkShowAig( p->pWnd, 0 );
}
*/
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRProve( p );
- p->timeMiter += clock() - clk;
+ p->timeMiter += Abc_Clock() - clk;
if ( !RetValue )
continue;
//printf( "%d -> %d (%d)\n", pFanin->Id, pNode->Id, k );
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkRRUpdate( pNtk, p->pNode, p->pFanin, p->pFanout );
- p->timeUpdate += clock() - clk;
+ p->timeUpdate += Abc_Clock() - clk;
p->nEdgesRemoved++;
break;
@@ -193,21 +193,21 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
p->pFanin = pFanin;
p->pFanout = pFanout;
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRWindow( p );
- p->timeWindow += clock() - clk;
+ p->timeWindow += Abc_Clock() - clk;
if ( !RetValue )
continue;
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRProve( p );
- p->timeMiter += clock() - clk;
+ p->timeMiter += Abc_Clock() - clk;
if ( !RetValue )
continue;
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkRRUpdate( pNtk, p->pNode, p->pFanin, p->pFanout );
- p->timeUpdate += clock() - clk;
+ p->timeUpdate += Abc_Clock() - clk;
p->nEdgesRemoved++;
break;
@@ -215,7 +215,7 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
}
Abc_NtkRRSimulateStop(pNtk);
Extra_ProgressBarStop( pProgress );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Abc_RRManPrintStats( p );
Abc_RRManStop( p );
@@ -353,7 +353,7 @@ int Abc_NtkRRProve( Abc_RRMan_t * p )
{
Abc_Ntk_t * pWndCopy;
int RetValue;
- clock_t clk;
+ abctime clk;
// Abc_NtkShowAig( p->pWnd, 0 );
pWndCopy = Abc_NtkDup( p->pWnd );
Abc_NtkRRUpdate( pWndCopy, p->pNode->pCopy->pCopy, p->pFanin->pCopy->pCopy, p->pFanout? p->pFanout->pCopy->pCopy : NULL );
@@ -361,9 +361,9 @@ int Abc_NtkRRProve( Abc_RRMan_t * p )
Abc_NtkReassignIds(pWndCopy);
p->pMiter = Abc_NtkMiter( p->pWnd, pWndCopy, 1, 0, 0, 0 );
Abc_NtkDelete( pWndCopy );
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkMiterProve( &p->pMiter, p->pParams );
-p->timeProve += clock() - clk;
+p->timeProve += Abc_Clock() - clk;
if ( RetValue == 1 )
return 1;
return 0;
diff --git a/src/base/abci/abcSat.c b/src/base/abci/abcSat.c
index c9987d70..349ebc55 100644
--- a/src/base/abci/abcSat.c
+++ b/src/base/abci/abcSat.c
@@ -55,7 +55,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
sat_solver * pSat;
lbool status;
int RetValue;
- clock_t clk;
+ abctime clk;
if ( pNumConfs )
*pNumConfs = 0;
@@ -68,7 +68,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
// fprintf( stdout, "Warning: The miter has %d outputs. SAT will try to prove all of them.\n", Abc_NtkPoNum(pNtk) );
// load clauses into the sat_solver
- clk = clock();
+ clk = Abc_Clock();
pSat = (sat_solver *)Abc_NtkMiterSatCreate( pNtk, 0 );
if ( pSat == NULL )
return 1;
@@ -77,13 +77,13 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
//return 1;
// printf( "Created SAT problem with %d variable and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// simplify the problem
- clk = clock();
+ clk = Abc_Clock();
status = sat_solver_simplify(pSat);
// printf( "Simplified the problem to %d variables and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
if ( status == 0 )
{
sat_solver_delete( pSat );
@@ -92,7 +92,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
}
// solve the miter
- clk = clock();
+ clk = Abc_Clock();
if ( fVerbose )
pSat->verbosity = 1;
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
@@ -113,7 +113,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
}
else
assert( 0 );
-// ABC_PRT( "SAT sat_solver time", clock() - clk );
+// ABC_PRT( "SAT sat_solver time", Abc_Clock() - clk );
// printf( "The number of conflicts = %d.\n", (int)pSat->sat_solver_stats.conflicts );
// if the problem is SAT, get the counterexample
@@ -630,7 +630,7 @@ void * Abc_NtkMiterSatCreate( Abc_Ntk_t * pNtk, int fAllPrimes )
{
sat_solver * pSat;
Abc_Obj_t * pNode;
- int RetValue, i; //, clk = clock();
+ int RetValue, i; //, clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsBddLogic(pNtk) );
if ( Abc_NtkIsBddLogic(pNtk) )
@@ -651,7 +651,7 @@ sat_solver_store_mark_roots( pSat );
return NULL;
}
// printf( "Ands = %6d. Muxes = %6d (%5.2f %%). ", Abc_NtkNodeNum(pNtk), nMuxes, 300.0*nMuxes/Abc_NtkNodeNum(pNtk) );
-// ABC_PRT( "Creating sat_solver", clock() - clk );
+// ABC_PRT( "Creating sat_solver", Abc_Clock() - clk );
return pSat;
}
diff --git a/src/base/abci/abcStrash.c b/src/base/abci/abcStrash.c
index 2894003b..d428af38 100644
--- a/src/base/abci/abcStrash.c
+++ b/src/base/abci/abcStrash.c
@@ -54,7 +54,7 @@ Abc_Ntk_t * Abc_NtkRestrash( Abc_Ntk_t * pNtk, int fCleanup )
Abc_Obj_t * pObj;
int i, nNodes;//, RetValue;
assert( Abc_NtkIsStrash(pNtk) );
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
// print warning about choice nodes
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Warning: The choice nodes in the original AIG are removed by strashing.\n" );
@@ -85,7 +85,7 @@ Abc_Ntk_t * Abc_NtkRestrash( Abc_Ntk_t * pNtk, int fCleanup )
Abc_NtkDelete( pNtkAig );
return NULL;
}
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// if ( RetValue = Abc_NtkRemoveSelfFeedLatches(pNtkAig) )
// printf( "Modified %d self-feeding latches. The result may not verify.\n", RetValue );
return pNtkAig;
@@ -186,7 +186,7 @@ Abc_Ntk_t * Abc_NtkRestrashZero( Abc_Ntk_t * pNtk, int fCleanup )
int i, nNodes;//, RetValue;
int Counter = 0;
assert( Abc_NtkIsStrash(pNtk) );
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
// print warning about choice nodes
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Warning: The choice nodes in the original AIG are removed by strashing.\n" );
@@ -239,7 +239,7 @@ Abc_Ntk_t * Abc_NtkRestrashZero( Abc_Ntk_t * pNtk, int fCleanup )
Abc_NtkDelete( pNtkAig );
return NULL;
}
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// if ( RetValue = Abc_NtkRemoveSelfFeedLatches(pNtkAig) )
// printf( "Modified %d self-feeding latches. The result may not verify.\n", RetValue );
return pNtkAig;
@@ -407,13 +407,13 @@ void Abc_NtkStrashPerform( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtkNew, int fAllNod
// ProgressBar * pProgress;
Vec_Ptr_t * vNodes;
Abc_Obj_t * pNodeOld;
- int i; //, clk = clock();
+ int i; //, clk = Abc_Clock();
assert( Abc_NtkIsLogic(pNtkOld) );
assert( Abc_NtkIsStrash(pNtkNew) );
// vNodes = Abc_NtkDfs( pNtkOld, fAllNodes );
vNodes = Abc_NtkDfsIter( pNtkOld, fAllNodes );
//printf( "Nodes = %d. ", Vec_PtrSize(vNodes) );
-//ABC_PRT( "Time", clock() - clk );
+//ABC_PRT( "Time", Abc_Clock() - clk );
// pProgress = Extra_ProgressBarStart( stdout, vNodes->nSize );
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNodeOld, i )
{
diff --git a/src/base/abci/abcSymm.c b/src/base/abci/abcSymm.c
index bf6a987b..03226770 100644
--- a/src/base/abci/abcSymm.c
+++ b/src/base/abci/abcSymm.c
@@ -89,22 +89,22 @@ void Abc_NtkSymmetriesUsingSandS( Abc_Ntk_t * pNtk, int fVerbose )
void Abc_NtkSymmetriesUsingBdds( Abc_Ntk_t * pNtk, int fNaive, int fReorder, int fVerbose )
{
DdManager * dd;
- clock_t clk, clkBdd, clkSym;
+ abctime clk, clkBdd, clkSym;
int fGarbCollect = 1;
// compute the global functions
-clk = clock();
+clk = Abc_Clock();
dd = (DdManager *)Abc_NtkBuildGlobalBdds( pNtk, 10000000, 1, fReorder, fVerbose );
printf( "Shared BDD size = %d nodes.\n", Abc_NtkSizeOfGlobalBdds(pNtk) );
Cudd_AutodynDisable( dd );
if ( !fGarbCollect )
Cudd_DisableGarbageCollection( dd );
Cudd_zddVarsFromBddVars( dd, 2 );
-clkBdd = clock() - clk;
+clkBdd = Abc_Clock() - clk;
// create the collapsed network
-clk = clock();
+clk = Abc_Clock();
Ntk_NetworkSymmsBdd( dd, pNtk, fNaive, fVerbose );
-clkSym = clock() - clk;
+clkSym = Abc_Clock() - clk;
// undo the global functions
Abc_NtkFreeGlobalBdds( pNtk, 1 );
printf( "Statistics of BDD-based symmetry detection:\n" );
diff --git a/src/base/abci/abcUnate.c b/src/base/abci/abcUnate.c
index 1bd05cd6..01b9cf51 100644
--- a/src/base/abci/abcUnate.c
+++ b/src/base/abci/abcUnate.c
@@ -74,14 +74,14 @@ void Abc_NtkPrintUnateBdd( Abc_Ntk_t * pNtk, int fUseNaive, int fVerbose )
int TotalSupps = 0;
int TotalUnate = 0;
int i;
- clock_t clk = clock();
- clock_t clkBdd, clkUnate;
+ abctime clk = Abc_Clock();
+ abctime clkBdd, clkUnate;
// compute the global BDDs
dd = (DdManager *)Abc_NtkBuildGlobalBdds(pNtk, 10000000, 1, 1, fVerbose);
if ( dd == NULL )
return;
-clkBdd = clock() - clk;
+clkBdd = Abc_Clock() - clk;
// get information about the network
// dd = pNtk->pManGlob;
@@ -121,14 +121,14 @@ clkBdd = clock() - clk;
Extra_UnateInfoDissolve( p );
}
}
-clkUnate = clock() - clk - clkBdd;
+clkUnate = Abc_Clock() - clk - clkBdd;
// print stats
printf( "Ins/Outs = %4d/%4d. Total supp = %5d. Total unate = %5d.\n",
Abc_NtkCiNum(pNtk), Abc_NtkCoNum(pNtk), TotalSupps, TotalUnate );
ABC_PRT( "Glob BDDs", clkBdd );
ABC_PRT( "Unateness", clkUnate );
- ABC_PRT( "Total ", clock() - clk );
+ ABC_PRT( "Total ", Abc_Clock() - clk );
// deref the PO functions
// Abc_NtkFreeGlobalBdds( pNtk );
diff --git a/src/base/cmd/cmdPlugin.c b/src/base/cmd/cmdPlugin.c
index 2aa95e85..37a28e63 100644
--- a/src/base/cmd/cmdPlugin.c
+++ b/src/base/cmd/cmdPlugin.c
@@ -418,7 +418,7 @@ int Cmd_CommandAbcPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv )
FILE * pFile;
Gia_Man_t * pGia;
int i, fd;
- clock_t clk;
+ abctime clk;
int fLeaveFiles;
/*
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);
@@ -536,14 +536,14 @@ int Cmd_CommandAbcPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv )
// run the command line
//printf( "Running command line: %s\n", Vec_StrArray(vCommand) );
- clk = clock();
+ clk = Abc_Clock();
if ( Util_SignalSystem( Vec_StrArray(vCommand) ) )
{
Abc_Print( -1, "The following command has returned non-zero exit status:\n" );
Abc_Print( -1, "\"%s\"\n", Vec_StrArray(vCommand) );
return 1;
}
- clk = clock() - clk;
+ clk = Abc_Clock() - clk;
Vec_StrFree( vCommand );
// check if the output file exists
diff --git a/src/base/cmd/cmdStarter.c b/src/base/cmd/cmdStarter.c
index bfdd480c..16810baa 100644
--- a/src/base/cmd/cmdStarter.c
+++ b/src/base/cmd/cmdStarter.c
@@ -111,7 +111,7 @@ void Cmd_RunStarter( char * pFileName, char * pBinary, char * pCommand, int nCor
char * BufferCopy, * Buffer;
int nLines, LineMax, Line, Len;
int i, c, status, Counter;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// check the number of cores
if ( nCores < 2 )
@@ -244,7 +244,7 @@ void Cmd_RunStarter( char * pFileName, char * pBinary, char * pCommand, int nCor
// status = pthread_mutex_destroy(&mutex); assert(status == 0);
// mutex = PTHREAD_MUTEX_INITIALIZER;
fprintf( stdout, "Finished processing commands in file \"%s\". ", pFileName );
- Abc_PrintTime( 1, "Total wall time", clock() - clk );
+ Abc_PrintTime( 1, "Total wall time", Abc_Clock() - clk );
fflush( stdout );
}
diff --git a/src/base/io/ioReadBblif.c b/src/base/io/ioReadBblif.c
index b3a34cc1..2de62695 100644
--- a/src/base/io/ioReadBblif.c
+++ b/src/base/io/ioReadBblif.c
@@ -165,15 +165,15 @@ Abc_Ntk_t * Bbl_ManToAig( Bbl_Man_t * p )
Vec_Ptr_t * vCopy, * vNodes, * vFaninAigs;
Dec_Graph_t ** pFForms;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// map SOP handles into factored forms
pFForms = ABC_CALLOC( Dec_Graph_t *, Bbl_ManFncSize(p) );
Bbl_ManForEachObj( p, pObj )
if ( pFForms[Bbl_ObjFncHandle(pObj)] == NULL )
pFForms[Bbl_ObjFncHandle(pObj)] = Dec_Factor( Bbl_ObjSop(p, pObj) );
if ( fVerbose )
-ABC_PRT( "Fct", clock() - clk );
+ABC_PRT( "Fct", Abc_Clock() - clk );
// start the network
pNtk = Abc_NtkAlloc( ABC_NTK_STRASH, ABC_FUNC_AIG, 1 );
pNtk->pName = Extra_UtilStrsav( Bbl_ManName(p) );
@@ -185,7 +185,7 @@ ABC_PRT( "Fct", clock() - clk );
continue;
Vec_PtrSetEntry( vCopy, Bbl_ObjId(pObj), Abc_NtkCreatePi(pNtk) );
}
-clk = clock();
+clk = Abc_Clock();
// create internal nodes
vNodes = Bbl_ManDfs( p );
vFaninAigs = Vec_PtrAlloc( 100 );
@@ -202,7 +202,7 @@ clk = clock();
Vec_PtrFree( vFaninAigs );
Vec_PtrFree( vNodes );
if ( fVerbose )
-ABC_PRT( "AIG", clock() - clk );
+ABC_PRT( "AIG", Abc_Clock() - clk );
// create COs
Bbl_ManForEachObj( p, pObj )
{
@@ -218,12 +218,12 @@ ABC_PRT( "AIG", clock() - clk );
Dec_GraphFree( pFForms[i] );
ABC_FREE( pFForms );
// finalize
-clk = clock();
+clk = Abc_Clock();
Vec_PtrFree( vCopy );
Abc_NtkAddDummyPiNames( pNtk );
Abc_NtkAddDummyPoNames( pNtk );
if ( fVerbose )
-ABC_PRT( "Nam", clock() - clk );
+ABC_PRT( "Nam", Abc_Clock() - clk );
// if ( !Abc_NtkCheck( pNtk ) )
// printf( "Bbl_ManToAig(): Network check has failed.\n" );
return pNtk;
@@ -271,36 +271,36 @@ void Bbl_ManTest( Abc_Ntk_t * pNtk )
Abc_Ntk_t * pNtkNew;
Bbl_Man_t * p, * pNew;
char * pFileName = "test.bblif";
- clock_t clk, clk1, clk2, clk3, clk4, clk5;
-clk = clock();
+ abctime clk, clk1, clk2, clk3, clk4, clk5;
+clk = Abc_Clock();
p = Bbl_ManFromAbc( pNtk );
Bbl_ManPrintStats( p );
-clk1 = clock() - clk;
+clk1 = Abc_Clock() - clk;
//Bbl_ManDumpBlif( p, "test_bbl.blif" );
// write into file and back
-clk = clock();
+clk = Abc_Clock();
Bbl_ManDumpBinaryBlif( p, pFileName );
-clk2 = clock() - clk;
+clk2 = Abc_Clock() - clk;
// read from file
-clk = clock();
+clk = Abc_Clock();
pNew = Bbl_ManReadBinaryBlif( pFileName );
Bbl_ManStop( p ); p = pNew;
-clk3 = clock() - clk;
+clk3 = Abc_Clock() - clk;
// generate ABC network
-clk = clock();
+clk = Abc_Clock();
pNtkNew = Bbl_ManToAig( p );
// pNtkNew = Bbl_ManToAbc( p );
Bbl_ManStop( p );
-clk4 = clock() - clk;
+clk4 = Abc_Clock() - clk;
// equivalence check
-clk = clock();
+clk = Abc_Clock();
// Bbl_ManVerify( pNtk, pNtkNew );
Abc_NtkDelete( pNtkNew );
-clk5 = clock() - clk;
+clk5 = Abc_Clock() - clk;
printf( "Runtime stats:\n" );
ABC_PRT( "ABC to Man", clk1 );