summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/amap/amapCore.c4
-rw-r--r--src/map/amap/amapLib.c10
-rw-r--r--src/map/amap/amapLiberty.c8
-rw-r--r--src/map/amap/amapMatch.c4
-rw-r--r--src/map/amap/amapMerge.c4
-rw-r--r--src/map/amap/amapParse.c4
-rw-r--r--src/map/amap/amapRule.c2
-rw-r--r--src/map/cov/covCore.c8
-rw-r--r--src/map/if/if.h2
-rw-r--r--src/map/if/ifCore.c8
-rw-r--r--src/map/if/ifCut.c8
-rw-r--r--src/map/if/ifMan.c2
-rw-r--r--src/map/if/ifMap.c8
-rw-r--r--src/map/if/ifReduce.c14
-rw-r--r--src/map/if/ifSeq.c12
-rw-r--r--src/map/if/ifTime.c12
-rw-r--r--src/map/mapper/mapper.h2
-rw-r--r--src/map/mapper/mapperCore.c42
-rw-r--r--src/map/mapper/mapperCreate.c8
-rw-r--r--src/map/mapper/mapperCut.c16
-rw-r--r--src/map/mapper/mapperInt.h22
-rw-r--r--src/map/mapper/mapperLib.c6
-rw-r--r--src/map/scl/sclMan.h12
-rw-r--r--src/map/scl/sclUpsize.c28
-rw-r--r--src/map/super/superAnd.c12
-rw-r--r--src/map/super/superGate.c40
26 files changed, 149 insertions, 149 deletions
diff --git a/src/map/amap/amapCore.c b/src/map/amap/amapCore.c
index c4ae817a..5a84669c 100644
--- a/src/map/amap/amapCore.c
+++ b/src/map/amap/amapCore.c
@@ -72,7 +72,7 @@ Vec_Ptr_t * Amap_ManTest( Aig_Man_t * pAig, Amap_Par_t * pPars )
Vec_Ptr_t * vRes;
Amap_Man_t * p;
Amap_Lib_t * pLib;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
pLib = (Amap_Lib_t *)Abc_FrameReadLibGen2();
if ( pLib == NULL )
{
@@ -94,7 +94,7 @@ Vec_Ptr_t * Amap_ManTest( Aig_Man_t * pAig, Amap_Par_t * pPars )
Amap_ManStop( p );
if ( pPars->fVerbose )
{
-ABC_PRT( "Total runtime", clock() - clkTotal );
+ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
}
return vRes;
}
diff --git a/src/map/amap/amapLib.c b/src/map/amap/amapLib.c
index de02c872..b6350fed 100644
--- a/src/map/amap/amapLib.c
+++ b/src/map/amap/amapLib.c
@@ -262,7 +262,7 @@ Vec_Ptr_t * Amap_LibSelectGates( Amap_Lib_t * p, int fVerbose )
{
Vec_Ptr_t * vSelect;
Amap_Gat_t * pGate, * pGate2;
- int i, k;//, clk = clock();
+ int i, k;//, clk = Abc_Clock();
p->pGate0 = Amap_LibFindGate( p, 0 );
p->pGate1 = Amap_LibFindGate( p, ~0 );
p->pGateBuf = Amap_LibFindGate( p, 0xAAAAAAAA );
@@ -329,7 +329,7 @@ void Amap_LibPrintSelectedGates( Amap_Lib_t * p, int fAllGates )
Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, char * pBuffer, int fVerbose, int fVeryVerbose )
{
Amap_Lib_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pBuffer == NULL )
p = Amap_LibReadFile( pFileName, fVerbose );
else
@@ -352,15 +352,15 @@ Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, char * pBuffer, int fVerb
if ( fVerbose )
{
printf( "Selected %d functionally unique gates. ", Vec_PtrSize(p->vSelect) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// Amap_LibPrintSelectedGates( p, 0 );
}
- clk = clock();
+ clk = Abc_Clock();
Amap_LibCreateRules( p, fVeryVerbose );
if ( fVerbose )
{
printf( "Created %d rules and %d matches. ", p->nNodes, p->nSets );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
return p;
}
diff --git a/src/map/amap/amapLiberty.c b/src/map/amap/amapLiberty.c
index 941abe50..13b18df5 100644
--- a/src/map/amap/amapLiberty.c
+++ b/src/map/amap/amapLiberty.c
@@ -1013,7 +1013,7 @@ int Amap_LibertyParse( char * pFileName, int fVerbose )
{
Amap_Tree_t * p;
char * pPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue;
p = Amap_LibertyStart( pFileName );
if ( p == NULL )
@@ -1039,7 +1039,7 @@ int Amap_LibertyParse( char * pFileName, int fVerbose )
if ( fVerbose )
{
printf( "Memory = %7.2f MB. ", 1.0*(p->nContents+p->nItermAlloc*sizeof(Amap_Item_t))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Amap_LibertyStop( p );
return RetValue;
@@ -1061,7 +1061,7 @@ Vec_Str_t * Amap_LibertyParseStr( char * pFileName, int fVerbose )
Amap_Tree_t * p;
Vec_Str_t * vStr = NULL;
char * pPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue;
p = Amap_LibertyStart( pFileName );
if ( p == NULL )
@@ -1087,7 +1087,7 @@ Vec_Str_t * Amap_LibertyParseStr( char * pFileName, int fVerbose )
if ( fVerbose )
{
printf( "Memory = %7.2f MB. ", 1.0*(p->nContents+p->nItermAlloc*sizeof(Amap_Item_t))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Amap_LibertyStop( p );
return vStr;
diff --git a/src/map/amap/amapMatch.c b/src/map/amap/amapMatch.c
index 8903bf4e..52e80c26 100644
--- a/src/map/amap/amapMatch.c
+++ b/src/map/amap/amapMatch.c
@@ -485,7 +485,7 @@ void Amap_ManMatch( Amap_Man_t * p, int fFlow, int fRefs )
Amap_Obj_t * pObj;
float Area;
int i, nInvs;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pMemOld = p->pMemCutBest;
p->pMemCutBest = Aig_MmFlexStart();
Amap_ManForEachNode( p, pObj, i )
@@ -500,7 +500,7 @@ if ( p->pPars->fVerbose )
Area + nInvs * p->fAreaInv,
Area, nInvs * p->fAreaInv, nInvs,
Amap_ManMaxDelay(p) );
-ABC_PRT( "Time ", clock() - clk );
+ABC_PRT( "Time ", Abc_Clock() - clk );
}
// test procedures
// Amap_ManForEachNode( p, pObj, i )
diff --git a/src/map/amap/amapMerge.c b/src/map/amap/amapMerge.c
index b4aaca9d..4b91f7ca 100644
--- a/src/map/amap/amapMerge.c
+++ b/src/map/amap/amapMerge.c
@@ -515,7 +515,7 @@ void Amap_ManMerge( Amap_Man_t * p )
{
Amap_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p->pCutsPi = Amap_ManSetupPis( p );
Amap_ManForEachNode( p, pObj, i )
Amap_ManMergeNodeCuts( p, pObj );
@@ -527,7 +527,7 @@ void Amap_ManMerge( Amap_Man_t * p )
printf( "Node =%6d. Try =%9d. Try3 =%10d. Used =%7d. R =%6.2f. ",
Amap_ManNodeNum(p), p->nCutsTried, p->nCutsTried3, p->nCutsUsed,
1.0*p->nCutsUsed/Amap_ManNodeNum(p) );
-ABC_PRT( "Time ", clock() - clk );
+ABC_PRT( "Time ", Abc_Clock() - clk );
}
}
diff --git a/src/map/amap/amapParse.c b/src/map/amap/amapParse.c
index f2a38db6..6d8b7520 100644
--- a/src/map/amap/amapParse.c
+++ b/src/map/amap/amapParse.c
@@ -462,13 +462,13 @@ void Amap_LibParseTest( char * pFileName )
{
int fVerbose = 0;
Amap_Lib_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Amap_LibReadFile( pFileName, fVerbose );
if ( p == NULL )
return;
Amap_LibParseEquations( p, fVerbose );
Amap_LibFree( p );
- ABC_PRT( "Total time", clock() - clk );
+ ABC_PRT( "Total time", Abc_Clock() - clk );
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/map/amap/amapRule.c b/src/map/amap/amapRule.c
index 772c346d..4ff3cacb 100644
--- a/src/map/amap/amapRule.c
+++ b/src/map/amap/amapRule.c
@@ -338,7 +338,7 @@ void Amap_LibCreateRules( Amap_Lib_t * pLib, int fVeryVerbose )
{
Amap_Gat_t * pGate;
int i, nGates = 0;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
pLib->fVerbose = fVeryVerbose;
pLib->vRules = Vec_PtrAlloc( 100 );
pLib->vRulesX = Vec_PtrAlloc( 100 );
diff --git a/src/map/cov/covCore.c b/src/map/cov/covCore.c
index 1a1d025f..5d7f52dd 100644
--- a/src/map/cov/covCore.c
+++ b/src/map/cov/covCore.c
@@ -109,7 +109,7 @@ void Abc_NtkCovCovers( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
{
Abc_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// start the manager
p->vFanCounts = Abc_NtkFanoutCounts(pNtk);
@@ -135,7 +135,7 @@ void Abc_NtkCovCovers( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
if ( fVerbose )
{
-ABC_PRT( "Total", clock() - clk );
+ABC_PRT( "Total", Abc_Clock() - clk );
}
}
@@ -156,7 +156,7 @@ int Abc_NtkCovCoversOne( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
Abc_Obj_t * pObj;
Vec_Ptr_t * vBoundary;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int Counter = 0;
int fStop = 1;
@@ -221,7 +221,7 @@ if ( fVerbose )
{
printf( "Outs = %4d (%4d) Node = %6d (%6d) Max = %6d Bound = %4d ",
Counter, Abc_NtkCoNum(pNtk), p->nSupps, Abc_NtkNodeNum(pNtk), p->nSuppsMax, p->nBoundary );
-ABC_PRT( "T", clock() - clk );
+ABC_PRT( "T", Abc_Clock() - clk );
}
return fStop;
}
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 578866cb..902754dd 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -235,7 +235,7 @@ struct If_Man_t_
void ** pHashTable[2]; // hash table bins
Mem_Fixed_t * pMemEntries; // memory manager for hash table entries
// statistics
-// clock_t timeTruth;
+// abctime timeTruth;
};
// priority cut
diff --git a/src/map/if/ifCore.c b/src/map/if/ifCore.c
index 95dc03bf..ff5c3654 100644
--- a/src/map/if/ifCore.c
+++ b/src/map/if/ifCore.c
@@ -27,7 +27,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-extern clock_t s_MappingTime;
+extern abctime s_MappingTime;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -80,7 +80,7 @@ int If_ManPerformMapping( If_Man_t * p )
int If_ManPerformMappingComb( If_Man_t * p )
{
If_Obj_t * pObj;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int i;
// set arrival times and fanout estimates
@@ -134,10 +134,10 @@ int If_ManPerformMappingComb( If_Man_t * p )
// Abc_Print( 1, "Total memory = %7.2f MB. Peak cut memory = %7.2f MB. ",
// 1.0 * (p->nObjBytes + 2*sizeof(void *)) * If_ManObjNum(p) / (1<<20),
// 1.0 * p->nSetBytes * Mem_FixedReadMaxEntriesUsed(p->pMemSet) / (1<<20) );
- Abc_PrintTime( 1, "Total time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Total time", Abc_Clock() - clkTotal );
}
// Abc_Print( 1, "Cross cut memory = %d.\n", Mem_FixedReadMaxEntriesUsed(p->pMemSet) );
- s_MappingTime = clock() - clkTotal;
+ s_MappingTime = Abc_Clock() - clkTotal;
// Abc_Print( 1, "Special POs = %d.\n", If_ManCountSpecialPos(p) );
/*
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index ace197fb..78f9ec68 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -1525,7 +1525,7 @@ int If_CutGetCones( If_Man_t * p )
{
If_Obj_t * pObj;
int i, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
If_ManForEachObj( p, pObj, i )
{
if ( If_ObjIsAnd(pObj) && pObj->nRefs )
@@ -1535,7 +1535,7 @@ int If_CutGetCones( If_Man_t * p )
}
}
Abc_Print( 1, "Cound not find boundary for %d nodes.\n", Counter );
- Abc_PrintTime( 1, "Cones", clock() - clk );
+ Abc_PrintTime( 1, "Cones", Abc_Clock() - clk );
return 1;
}
@@ -1578,7 +1578,7 @@ int If_CutCountTotalFanins( If_Man_t * p )
If_Obj_t * pObj;
Vec_Int_t * vLeaves;
int i, nFaninsTotal = 0, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vLeaves = Vec_IntAlloc( 100 );
If_ManForEachObj( p, pObj, i )
{
@@ -1592,7 +1592,7 @@ int If_CutCountTotalFanins( If_Man_t * p )
}
}
Abc_Print( 1, "Total cut inputs = %d. Total fanins incremental = %d.\n", nFaninsTotal, Counter );
- Abc_PrintTime( 1, "Fanins", clock() - clk );
+ Abc_PrintTime( 1, "Fanins", Abc_Clock() - clk );
Vec_IntFree( vLeaves );
return 1;
}
diff --git a/src/map/if/ifMan.c b/src/map/if/ifMan.c
index b0a70a32..e483a54d 100644
--- a/src/map/if/ifMan.c
+++ b/src/map/if/ifMan.c
@@ -32,7 +32,7 @@ static If_Obj_t * If_ManSetupObj( If_Man_t * p );
static void If_ManCutSetRecycle( If_Man_t * p, If_Set_t * pSet ) { pSet->pNext = p->pFreeList; p->pFreeList = pSet; }
static If_Set_t * If_ManCutSetFetch( If_Man_t * p ) { If_Set_t * pTemp = p->pFreeList; p->pFreeList = p->pFreeList->pNext; return pTemp; }
-extern clock_t s_TimeComp[4];
+extern abctime s_TimeComp[4];
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 8fb2962e..220570e1 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -259,10 +259,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
pCut->fCompl = 0;
if ( p->pPars->fTruth )
{
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
// int RetValue = If_CutComputeTruth( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
int RetValue = If_CutComputeTruth2( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
-// p->timeTruth += clock() - clk;
+// p->timeTruth += Abc_Clock() - clk;
pCut->fUseless = 0;
if ( p->pPars->pFuncCell && RetValue < 2 )
@@ -491,7 +491,7 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
// ProgressBar * pProgress;
If_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
float arrTime;
assert( Mode >= 0 && Mode <= 2 );
// set the sorting function
@@ -561,7 +561,7 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
char Symb = fPreprocess? 'P' : ((Mode == 0)? 'D' : ((Mode == 1)? 'F' : 'A'));
Abc_Print( 1, "%c: Del = %7.2f. Ar = %9.1f. Edge = %8d. Switch = %7.2f. Cut = %8d. ",
Symb, p->RequiredGlo, p->AreaGlo, p->nNets, p->dPower, p->nCutsMerged );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
// Abc_Print( 1, "Max number of cuts = %d. Average number of cuts = %5.2f.\n",
// p->nCutsMax, 1.0 * p->nCutsMerged / If_ManAndNum(p) );
}
diff --git a/src/map/if/ifReduce.c b/src/map/if/ifReduce.c
index 65e321c0..838a1b08 100644
--- a/src/map/if/ifReduce.c
+++ b/src/map/if/ifReduce.c
@@ -51,38 +51,38 @@ static void If_ManImproveNodeFaninCompact( If_Man_t * p, If_Obj_t * pObj, int nL
***********************************************************************/
void If_ManImproveMapping( If_Man_t * p )
{
- clock_t clk;
+ abctime clk;
- clk = clock();
+ clk = Abc_Clock();
If_ManImproveExpand( p, p->pPars->nLutSize );
If_ManComputeRequired( p );
if ( p->pPars->fVerbose )
{
Abc_Print( 1, "E: Del = %7.2f. Ar = %9.1f. Edge = %8d. Switch = %7.2f. Cut = %8d. ",
p->RequiredGlo, p->AreaGlo, p->nNets, p->dPower, p->nCutsMerged );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
/*
- clk = clock();
+ clk = Abc_Clock();
If_ManImproveReduce( p, p->pPars->nLutSize );
If_ManComputeRequired( p, 0 );
if ( p->pPars->fVerbose )
{
Abc_Print( 1, "R: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ",
p->RequiredGlo, p->AreaGlo, p->nNets, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
*/
/*
- clk = clock();
+ clk = Abc_Clock();
If_ManImproveExpand( p, p->pPars->nLutSize );
If_ManComputeRequired( p, 0 );
if ( p->pPars->fVerbose )
{
Abc_Print( 1, "E: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ",
p->RequiredGlo, p->AreaGlo, p->nNets, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
*/
}
diff --git a/src/map/if/ifSeq.c b/src/map/if/ifSeq.c
index d6037ce8..adb97b22 100644
--- a/src/map/if/ifSeq.c
+++ b/src/map/if/ifSeq.c
@@ -27,7 +27,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-extern clock_t s_MappingTime;
+extern abctime s_MappingTime;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -124,7 +124,7 @@ int If_ManPerformMappingRoundSeq( If_Man_t * p, int nIter )
{
If_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int fVeryVerbose = 0;
int fChange = 0;
@@ -179,7 +179,7 @@ int If_ManPerformMappingRoundSeq( If_Man_t * p, int nIter )
// p->AreaGlo = If_ManScanMapping(p);
Abc_Print( 1, "S%d: Fi = %6.2f. Del = %6.2f. Area = %8.2f. Cuts = %8d. ",
nIter, (float)p->Period, p->RequiredGlo, p->AreaGlo, p->nCutsMerged );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
return fChange;
}
@@ -339,7 +339,7 @@ void If_ManPerformMappingSeqPost( If_Man_t * p )
***********************************************************************/
int If_ManPerformMappingSeq( If_Man_t * p )
{
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int PeriodBest;
p->SortMode = 0;
@@ -384,13 +384,13 @@ int If_ManPerformMappingSeq( If_Man_t * p )
// if ( p->pPars->fVerbose )
{
Abc_Print( 1, "The best clock period is %3d. ", p->Period );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
p->RequiredGlo = (float)(PeriodBest);
// postprocess it using combinational mapping
If_ManPerformMappingSeqPost( p );
- s_MappingTime = clock() - clkTotal;
+ s_MappingTime = Abc_Clock() - clkTotal;
return 1;
}
diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c
index 6fba33f4..ca11b6fc 100644
--- a/src/map/if/ifTime.c
+++ b/src/map/if/ifTime.c
@@ -250,7 +250,7 @@ Vec_Wrd_t * If_CutDelaySopAnds( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vCove
***********************************************************************/
Vec_Wrd_t * If_CutDelaySopArray( If_Man_t * p, If_Cut_t * pCut )
{
- clock_t clk;
+ abctime clk;
Vec_Wrd_t * vAnds;
int RetValue;
if ( p->vCover == NULL )
@@ -266,9 +266,9 @@ Vec_Wrd_t * If_CutDelaySopArray( If_Man_t * p, If_Cut_t * pCut )
return NULL;
assert( RetValue == 0 || RetValue == 1 );
- clk = clock();
+ clk = Abc_Clock();
vAnds = If_CutDelaySopAnds( p, pCut, p->vCover, RetValue ^ pCut->fCompl );
- s_timeOld += clock() - clk;
+ s_timeOld += Abc_Clock() - clk;
/*
if ( pCut->nLeaves <= 5 )
{
@@ -491,7 +491,7 @@ int If_CutDelaySopAnds2( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vCover, int
}
int If_CutDelaySopArray2( If_Man_t * p, If_Cut_t * pCut, int * pArea )
{
- clock_t clk;
+ abctime clk;
int RetValue;
if ( p->vCover == NULL )
p->vCover = Vec_IntAlloc(0);
@@ -504,10 +504,10 @@ int If_CutDelaySopArray2( If_Man_t * p, If_Cut_t * pCut, int * pArea )
return -1;
assert( RetValue == 0 || RetValue == 1 );
- clk = clock();
+ clk = Abc_Clock();
RetValue = If_CutDelaySopAnds2( p, pCut, p->vCover, RetValue ^ pCut->fCompl, pArea );
// RetValue = If_CutDelaySopAnds2_( p, pCut, p->vCover, RetValue ^ pCut->fCompl, pArea );
- s_timeNew += clock() - clk;
+ s_timeNew += Abc_Clock() - clk;
return RetValue;
}
int If_CutDelaySopCost2( If_Man_t * p, If_Cut_t * pCut )
diff --git a/src/map/mapper/mapper.h b/src/map/mapper/mapper.h
index 24a07e17..e444b837 100644
--- a/src/map/mapper/mapper.h
+++ b/src/map/mapper/mapper.h
@@ -78,7 +78,7 @@ extern Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose );
extern Map_Node_t * Map_NodeCreate( Map_Man_t * p, Map_Node_t * p1, Map_Node_t * p2 );
extern void Map_ManFree( Map_Man_t * pMan );
extern void Map_ManPrintTimeStats( Map_Man_t * p );
-extern void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, clock_t Time );
+extern void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, abctime Time );
extern int Map_ManReadInputNum( Map_Man_t * p );
extern int Map_ManReadOutputNum( Map_Man_t * p );
extern Map_Node_t ** Map_ManReadInputs ( Map_Man_t * p );
diff --git a/src/map/mapper/mapperCore.c b/src/map/mapper/mapperCore.c
index 9df22923..2f3263b3 100644
--- a/src/map/mapper/mapperCore.c
+++ b/src/map/mapper/mapperCore.c
@@ -53,7 +53,7 @@ int Map_Mapping( Map_Man_t * p )
int fUseAreaFlow = 1;
int fUseExactArea = !p->fSwitching;
int fUseExactAreaWithPhase = !p->fSwitching;
- clock_t clk;
+ abctime clk;
//////////////////////////////////////////////////////////////////////
// perform pre-mapping computations
@@ -65,23 +65,23 @@ int Map_Mapping( Map_Man_t * p )
// return 1;
// compute the cuts of nodes in the DFS order
- clk = clock();
+ clk = Abc_Clock();
Map_MappingCuts( p );
- p->timeCuts = clock() - clk;
+ p->timeCuts = Abc_Clock() - clk;
// derive the truth tables
- clk = clock();
+ clk = Abc_Clock();
Map_MappingTruths( p );
- p->timeTruth = clock() - clk;
+ p->timeTruth = Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
-//ABC_PRT( "Truths", clock() - clk );
+//ABC_PRT( "Truths", Abc_Clock() - clk );
//////////////////////////////////////////////////////////////////////
// compute the minimum-delay mapping
- clk = clock();
+ clk = Abc_Clock();
p->fMappingMode = 0;
if ( !Map_MappingMatches( p ) )
return 0;
- p->timeMatch = clock() - clk;
+ p->timeMatch = Abc_Clock() - clk;
// compute the references and collect the nodes used in the mapping
Map_MappingSetRefs( p );
p->AreaBase = Map_MappingGetArea( p, p->vMapping );
@@ -104,7 +104,7 @@ ABC_PRT( "Time", p->timeMatch );
//////////////////////////////////////////////////////////////////////
// perform area recovery using area flow
- clk = clock();
+ clk = Abc_Clock();
if ( fUseAreaFlow )
{
// compute the required times
@@ -122,15 +122,15 @@ printf( "AreaFlow : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
Map_MappingGetAreaFlow(p), p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// perform area recovery using exact area
- clk = clock();
+ clk = Abc_Clock();
if ( fUseExactArea )
{
// compute the required times
@@ -148,15 +148,15 @@ printf( "Area : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// perform area recovery using exact area
- clk = clock();
+ clk = Abc_Clock();
if ( fUseExactAreaWithPhase )
{
// compute the required times
@@ -174,15 +174,15 @@ printf( "Area : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// perform area recovery using exact area
- clk = clock();
+ clk = Abc_Clock();
if ( p->fSwitching )
{
// compute the required times
@@ -200,7 +200,7 @@ printf( "Switching: %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// compute the required times
@@ -218,10 +218,10 @@ printf( "Switching: %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
// print the arrival times of the latest outputs
diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c
index 169e0b46..3d64bfee 100644
--- a/src/map/mapper/mapperCreate.c
+++ b/src/map/mapper/mapperCreate.c
@@ -313,7 +313,7 @@ void Map_ManPrintTimeStats( Map_Man_t * p )
SeeAlso []
***********************************************************************/
-void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, clock_t Time )
+void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, abctime Time )
{
FILE * pTable;
pTable = fopen( "map_stats.txt", "a+" );
@@ -469,10 +469,10 @@ void Map_TableResize( Map_Man_t * pMan )
Map_Node_t ** pBinsNew;
Map_Node_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(2 * pMan->nBins);
// allocate a new array
@@ -493,7 +493,7 @@ clk = clock();
if ( pMan->fVerbose )
{
// printf( "Increasing the unique 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 );
diff --git a/src/map/mapper/mapperCut.c b/src/map/mapper/mapperCut.c
index bec1870a..84580387 100644
--- a/src/map/mapper/mapperCut.c
+++ b/src/map/mapper/mapperCut.c
@@ -117,7 +117,7 @@ void Map_MappingCuts( Map_Man_t * p )
Map_Node_t * pNode;
Map_Cut_t * pCut;
int nCuts, nNodes, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// set the elementary cuts for the PI variables
assert( p->nVarsMax > 1 && p->nVarsMax < 7 );
for ( i = 0; i < p->nInputs; i++ )
@@ -154,7 +154,7 @@ void Map_MappingCuts( Map_Man_t * p )
nCuts = Map_MappingCountAllCuts(p);
printf( "Nodes = %6d. Total %d-feasible cuts = %10d. Per node = %.1f. ",
p->nNodes, p->nVarsMax, nCuts, ((float)nCuts)/p->nNodes );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// print the cuts for the first primary output
@@ -915,16 +915,16 @@ Map_Cut_t * Map_CutTableConsider( Map_Man_t * pMan, Map_CutTable_t * p, Map_Node
{
Map_Cut_t * pCut;
int Place, i;
-// clock_t clk;
+// abctime clk;
// check the cut
Place = Map_CutTableLookup( p, ppNodes, nNodes );
if ( Place == -1 )
return NULL;
assert( nNodes > 0 );
// create the new cut
-//clk = clock();
+//clk = Abc_Clock();
pCut = Map_CutAlloc( pMan );
-//pMan->time1 += clock() - clk;
+//pMan->time1 += Abc_Clock() - clk;
pCut->nLeaves = nNodes;
for ( i = 0; i < nNodes; i++ )
pCut->ppLeaves[i] = ppNodes[i];
@@ -996,15 +996,15 @@ Map_Cut_t * Map_CutSortCuts( Map_Man_t * pMan, Map_CutTable_t * p, Map_Cut_t * p
{
Map_Cut_t * pListNew;
int nCuts, i;
-// clock_t clk;
+// abctime clk;
// move the cuts from the list into the array
nCuts = Map_CutList2Array( p->pCuts1, pList );
assert( nCuts <= MAP_CUTS_MAX_COMPUTE );
// sort the cuts
-//clk = clock();
+//clk = Abc_Clock();
qsort( (void *)p->pCuts1, nCuts, sizeof(Map_Cut_t *),
(int (*)(const void *, const void *)) Map_CutSortCutsCompare );
-//pMan->time2 += clock() - clk;
+//pMan->time2 += Abc_Clock() - clk;
// move them back into the list
if ( nCuts > MAP_CUTS_MAX_USE - 1 )
{
diff --git a/src/map/mapper/mapperInt.h b/src/map/mapper/mapperInt.h
index 442ca5eb..24017103 100644
--- a/src/map/mapper/mapperInt.h
+++ b/src/map/mapper/mapperInt.h
@@ -149,17 +149,17 @@ struct Map_ManStruct_t_
int nFanoutViolations; // the number of nodes in mapped circuit violating fanout
// runtime statistics
- clock_t timeToMap; // time to transfer to the mapping structure
- clock_t timeCuts; // time to compute k-feasible cuts
- clock_t timeTruth; // time to compute the truth table for each cut
- clock_t timeMatch; // time to perform matching for each node
- clock_t timeArea; // time to recover area after delay oriented mapping
- clock_t timeSweep; // time to perform technology dependent sweep
- clock_t timeToNet; // time to transfer back to the network
- clock_t timeTotal; // the total mapping time
- clock_t time1; // time to transfer to the mapping structure
- clock_t time2; // time to transfer to the mapping structure
- clock_t time3; // time to transfer to the mapping structure
+ abctime timeToMap; // time to transfer to the mapping structure
+ abctime timeCuts; // time to compute k-feasible cuts
+ abctime timeTruth; // time to compute the truth table for each cut
+ abctime timeMatch; // time to perform matching for each node
+ abctime timeArea; // time to recover area after delay oriented mapping
+ abctime timeSweep; // time to perform technology dependent sweep
+ abctime timeToNet; // time to transfer back to the network
+ abctime timeTotal; // the total mapping time
+ abctime time1; // time to transfer to the mapping structure
+ abctime time2; // time to transfer to the mapping structure
+ abctime time3; // time to transfer to the mapping structure
};
// the supergate library
diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c
index 1d62bc32..80c2d610 100644
--- a/src/map/mapper/mapperLib.c
+++ b/src/map/mapper/mapperLib.c
@@ -58,7 +58,7 @@ ABC_NAMESPACE_IMPL_START
Map_SuperLib_t * Map_SuperLibCreate( Vec_Str_t * vStr, char * pFileName, char * pExcludeFile, int fAlgorithm, int fVerbose )
{
Map_SuperLib_t * p;
- clock_t clk;
+ abctime clk;
// start the supergate library
p = ABC_ALLOC( Map_SuperLib_t, 1 );
@@ -75,7 +75,7 @@ Map_SuperLib_t * Map_SuperLibCreate( Vec_Str_t * vStr, char * pFileName, char *
p->tTable = Map_SuperTableCreate( p );
// read the supergate library from file
-clk = clock();
+clk = Abc_Clock();
if ( vStr != NULL )
{
// read the supergate library from file
@@ -123,7 +123,7 @@ clk = clock();
{
printf( "Loaded %d unique %d-input supergates from \"%s\". ",
p->nSupersReal, p->nVarsMax, pFileName );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// assign the interver parameters
diff --git a/src/map/scl/sclMan.h b/src/map/scl/sclMan.h
index ebd14d6f..15afb6de 100644
--- a/src/map/scl/sclMan.h
+++ b/src/map/scl/sclMan.h
@@ -80,11 +80,11 @@ struct SC_Man_
float MaxDelay0; // max delay at the begining
float BestDelay; // best delay in the middle
// runtime statistics
- clock_t timeTotal; // starting/total time
- clock_t timeCone; // critical path selection
- clock_t timeSize; // incremental sizing
- clock_t timeTime; // timing update
- clock_t timeOther; // everything else
+ abctime timeTotal; // starting/total time
+ abctime timeCone; // critical path selection
+ abctime timeSize; // incremental sizing
+ abctime timeTime; // timing update
+ abctime timeOther; // everything else
};
////////////////////////////////////////////////////////////////////////
@@ -340,7 +340,7 @@ static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fU
SeeAlso []
***********************************************************************/
-static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, clock_t Time )
+static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, abctime Time )
{
FILE * pTable;
pTable = fopen( pFileName, "a+" );
diff --git a/src/map/scl/sclUpsize.c b/src/map/scl/sclUpsize.c
index 6c9a61bc..7e0f5a92 100644
--- a/src/map/scl/sclUpsize.c
+++ b/src/map/scl/sclUpsize.c
@@ -446,7 +446,7 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN
printf( "A: " );
printf( "%.2f ", p->SumArea );
printf( "(%+5.1f %%)", 100.0 * (p->SumArea - p->SumArea0)/ p->SumArea0 );
- printf( "%8.2f", 1.0*(clock() - p->timeTotal)/(CLOCKS_PER_SEC) );
+ printf( "%8.2f", 1.0*(Abc_Clock() - p->timeTotal)/(CLOCKS_PER_SEC) );
printf( " " );
printf( "%c", fVerbose ? '\n' : '\r' );
}
@@ -468,7 +468,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
Vec_Int_t * vPathPos = NULL; // critical POs
Vec_Int_t * vPathNodes = NULL; // critical nodes and PIs
Vec_Int_t * vTFO;
- clock_t clk, nRuntimeLimit = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + clock() : 0;
+ abctime clk, nRuntimeLimit = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + Abc_Clock() : 0;
int i, win, nUpsizes = -1, nFramesNoChange = 0;
int nAllPos, nAllNodes, nAllTfos, nAllUpsizes;
@@ -486,7 +486,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
// prepare the manager; collect init stats
p = Abc_SclManStart( pLib, pNtk, 1, pPars->fUseDept );
- p->timeTotal = clock();
+ p->timeTotal = Abc_Clock();
assert( p->vGatesBest == NULL );
p->vGatesBest = Vec_IntDup( p->vGates );
p->BestDelay = p->MaxDelay0;
@@ -498,21 +498,21 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
for ( win = pPars->Window; win <= 100; win *= 2 )
{
// detect critical path
- clk = clock();
+ clk = Abc_Clock();
vPathPos = Abc_SclFindCriticalCoWindow( p, win );
vPathNodes = Abc_SclFindCriticalNodeWindow( p, vPathPos, win, pPars->fUseDept );
- p->timeCone += clock() - clk;
+ p->timeCone += Abc_Clock() - clk;
// selectively upsize the nodes
- clk = clock();
+ clk = Abc_Clock();
nUpsizes = Abc_SclFindUpsizes( p, vPathNodes, pPars->Ratio, pPars->Notches, i );
- p->timeSize += clock() - clk;
+ p->timeSize += Abc_Clock() - clk;
// unmark critical path
- clk = clock();
+ clk = Abc_Clock();
Abc_SclUnmarkCriticalNodeWindow( p, vPathNodes );
Abc_SclUnmarkCriticalNodeWindow( p, vPathPos );
- p->timeCone += clock() - clk;
+ p->timeCone += Abc_Clock() - clk;
if ( nUpsizes > 0 )
break;
Vec_IntFree( vPathPos );
@@ -522,7 +522,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
break;
// update timing information
- clk = clock();
+ clk = Abc_Clock();
if ( pPars->fUseDept )
{
vTFO = Vec_IntAlloc( 0 );
@@ -533,7 +533,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
vTFO = Abc_SclFindTFO( p->pNtk, vPathNodes );
Abc_SclTimeCone( p, vTFO );
}
- p->timeTime += clock() - clk;
+ p->timeTime += Abc_Clock() - clk;
// Abc_SclUpsizePrintDiffs( p, pLib, pNtk );
// save the best network
@@ -564,7 +564,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
Vec_IntFree( vPathNodes );
Vec_IntFree( vTFO );
// check timeout
- if ( nRuntimeLimit && clock() > nRuntimeLimit )
+ if ( nRuntimeLimit && Abc_Clock() > nRuntimeLimit )
break;
}
// update for best gates and recompute timing
@@ -573,7 +573,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
if ( pPars->fVerbose )
Abc_SclUpsizePrint( p, i, pPars->Window, nAllPos/(i?i:1), nAllNodes/(i?i:1), nAllUpsizes/(i?i:1), nAllTfos/(i?i:1), 1 );
// report runtime
- p->timeTotal = clock() - p->timeTotal;
+ p->timeTotal = Abc_Clock() - p->timeTotal;
if ( pPars->fVerbose )
{
p->timeOther = p->timeTotal - p->timeCone - p->timeSize - p->timeTime;
@@ -585,7 +585,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
}
if ( pPars->fDumpStats )
Abc_SclDumpStats( p, "stats2.txt", p->timeTotal );
- if ( nRuntimeLimit && clock() > nRuntimeLimit )
+ if ( nRuntimeLimit && Abc_Clock() > nRuntimeLimit )
printf( "Gate sizing timed out at %d seconds.\n", pPars->TimeOut );
// save the result and quit
diff --git a/src/map/super/superAnd.c b/src/map/super/superAnd.c
index 774c4fc5..3e55d0f5 100644
--- a/src/map/super/superAnd.c
+++ b/src/map/super/superAnd.c
@@ -115,7 +115,7 @@ void Super2_Precompute( int nInputs, int nLevels, int fVerbose )
Super2_Man_t * pMan;
Super2_Lib_t * pLibCur, * pLibNext;
int Level;
- clock_t clk;
+ abctime clk;
assert( nInputs < 6 );
@@ -129,13 +129,13 @@ void Super2_Precompute( int nInputs, int nLevels, int fVerbose )
printf( "Computing supergates for %d inputs and %d levels:\n", nInputs, nLevels );
for ( Level = 1; Level <= nLevels; Level++ )
{
-clk = clock();
+clk = Abc_Clock();
pLibNext = Super2_LibCompute( pMan, pLibCur );
pLibNext->nLevels = Level;
Super2_LibStop( pLibCur );
pLibCur = pLibNext;
printf( "Level %d: Tried = %7d. Computed = %7d. ", Level, pMan->nTried, pLibCur->nGates );
-ABC_PRT( "Runtime", clock() - clk );
+ABC_PRT( "Runtime", Abc_Clock() - clk );
fflush( stdout );
}
@@ -463,7 +463,7 @@ void Super2_LibWrite( Super2_Lib_t * pLib )
Super2_Gate_t * pGate;
FILE * pFile;
char FileName[100];
- clock_t clk;
+ abctime clk;
if ( pLib->nLevels > 5 )
{
@@ -471,14 +471,14 @@ void Super2_LibWrite( Super2_Lib_t * pLib )
return;
}
-clk = clock();
+clk = Abc_Clock();
// sort the supergates by truth table
s_uMaskBit = pLib->uMaskBit;
s_uMaskAll = SUPER_MASK(pLib->nMints);
qsort( (void *)pLib->pGates, pLib->nGates, sizeof(Super2_Gate_t *),
(int (*)(const void *, const void *)) Super2_LibCompareGates );
assert( Super2_LibCompareGates( pLib->pGates, pLib->pGates + pLib->nGates - 1 ) < 0 );
-ABC_PRT( "Sorting", clock() - clk );
+ABC_PRT( "Sorting", Abc_Clock() - clk );
// start the file
diff --git a/src/map/super/superGate.c b/src/map/super/superGate.c
index ed47fb48..c96c9526 100644
--- a/src/map/super/superGate.c
+++ b/src/map/super/superGate.c
@@ -70,11 +70,11 @@ struct Super_ManStruct_t_
int nAliases; // the number of hash table lookups thrown away due to aliasing
// runtime
- clock_t Time; // the runtime of the generation procedure
+ abctime Time; // the runtime of the generation procedure
int TimeLimit; // the runtime limit (in seconds)
int TimeSec; // the time passed (in seconds)
- clock_t TimeStop; // the time to stop computation (in miliseconds)
- clock_t TimePrint; // the time to print message
+ abctime TimeStop; // the time to stop computation (in miliseconds)
+ abctime TimePrint; // the time to print message
};
struct Super_GateStruct_t_
@@ -175,7 +175,7 @@ Vec_Str_t * Super_PrecomputeStr( Mio_Library_t * pLibGen, int nVarsMax, int nLev
Super_Man_t * pMan;
Mio_Gate_t ** ppGates;
int nGates, Level;
- clock_t clk, clockStart;
+ abctime clk, clockStart;
assert( nVarsMax < 7 );
if ( nGatesMax && nGatesMax < nVarsMax )
@@ -201,7 +201,7 @@ Vec_Str_t * Super_PrecomputeStr( Mio_Library_t * pLibGen, int nVarsMax, int nLev
pMan->tDelayMax = tDelayMax;
pMan->tAreaMax = tAreaMax;
pMan->TimeLimit = TimeLimit; // in seconds
- pMan->TimeStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock() : 0; // in CPU ticks
+ pMan->TimeStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + Abc_Clock() : 0; // in CPU ticks
pMan->fVerbose = fVerbose;
if ( nGates == 0 )
@@ -221,7 +221,7 @@ Vec_Str_t * Super_PrecomputeStr( Mio_Library_t * pLibGen, int nVarsMax, int nLev
Super_First( pMan, nVarsMax );
// perform the computation of supergates
- clockStart = clock();
+ clockStart = Abc_Clock();
if ( fVerbose )
{
printf( "Computing supergates with %d inputs, %d levels, and %d max gates.\n",
@@ -232,20 +232,20 @@ if ( fVerbose )
for ( Level = 1; Level <= nLevels; Level++ )
{
- if ( pMan->TimeStop && clock() > pMan->TimeStop )
+ if ( pMan->TimeStop && Abc_Clock() > pMan->TimeStop )
break;
-clk = clock();
+clk = Abc_Clock();
Super_Compute( pMan, ppGates, nGates, nGatesMax, fSkipInv );
pMan->nLevels = Level;
if ( fVerbose )
{
printf( "Lev %d: Try =%12d. Add =%6d. Rem =%5d. Save =%6d. Lookups =%12d. Aliases =%12d. ",
Level, pMan->nTried, pMan->nAdded, pMan->nRemoved, pMan->nAdded - pMan->nRemoved, pMan->nLookups, pMan->nAliases );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
}
- pMan->Time = clock() - clockStart;
+ pMan->Time = Abc_Clock() - clockStart;
if ( fVerbose )
{
@@ -377,7 +377,7 @@ Super_Man_t * Super_Compute( Super_Man_t * pMan, Mio_Gate_t ** ppGates, int nGat
}
pProgress = Extra_ProgressBarStart( stdout, pMan->TimeLimit );
- pMan->TimePrint = clock() + CLOCKS_PER_SEC;
+ pMan->TimePrint = Abc_Clock() + CLOCKS_PER_SEC;
ppGatesLimit = ABC_ALLOC( Super_Gate_t *, pMan->nGates );
// go through the root gates
// the root gates are sorted in the increasing gelay
@@ -736,11 +736,11 @@ done:
***********************************************************************/
int Super_CheckTimeout( ProgressBar * pPro, Super_Man_t * pMan )
{
- clock_t TimeNow = clock();
+ abctime TimeNow = Abc_Clock();
if ( TimeNow > pMan->TimePrint )
{
Extra_ProgressBarUpdate( pPro, ++pMan->TimeSec, NULL );
- pMan->TimePrint = clock() + CLOCKS_PER_SEC;
+ pMan->TimePrint = Abc_Clock() + CLOCKS_PER_SEC;
}
if ( pMan->TimeStop && TimeNow > pMan->TimeStop )
{
@@ -982,7 +982,7 @@ Vec_Str_t * Super_Write( Super_Man_t * pMan )
Super_Gate_t * pGateRoot, * pGate;
stmm_generator * gen;
int fZeroFound, v;
- clock_t clk;
+ abctime clk;
ABC_PTRUINT_T Key;
if ( pMan->nGates < 1 )
@@ -1019,32 +1019,32 @@ Vec_Str_t * Super_Write( Super_Man_t * pMan )
}
}
-clk = clock();
+clk = Abc_Clock();
// sort the supergates by truth table
qsort( (void *)pMan->pGates, pMan->nGates, sizeof(Super_Gate_t *),
(int (*)(const void *, const void *)) Super_WriteCompare );
assert( Super_WriteCompare( pMan->pGates, pMan->pGates + pMan->nGates - 1 ) <= 0 );
if ( pMan->fVerbose )
{
-ABC_PRT( "Sorting", clock() - clk );
+ABC_PRT( "Sorting", Abc_Clock() - clk );
}
// write library in the old format
-clk = clock();
+clk = Abc_Clock();
if ( pMan->fWriteOldFormat )
Super_WriteLibrary( pMan );
if ( pMan->fVerbose )
{
-ABC_PRT( "Writing old format", clock() - clk );
+ABC_PRT( "Writing old format", Abc_Clock() - clk );
}
// write the tree-like structure of supergates
-clk = clock();
+clk = Abc_Clock();
vStr = Super_WriteLibraryTreeStr( pMan );
if ( pMan->fVerbose )
{
-ABC_PRT( "Writing new format", clock() - clk );
+ABC_PRT( "Writing new format", Abc_Clock() - clk );
}
return vStr;
}