summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-07-07 17:46:54 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-07-07 17:46:54 -0700
commit3aab7245738a69f1dd4d898493d5dabf6596ea61 (patch)
tree16a23107ca27a250e82c492dcdd1a2bea640cff6 /src/map
parent16d96fcf533fb77ff4a45992991e38ac7ea74bb3 (diff)
downloadabc-3aab7245738a69f1dd4d898493d5dabf6596ea61.tar.gz
abc-3aab7245738a69f1dd4d898493d5dabf6596ea61.tar.bz2
abc-3aab7245738a69f1dd4d898493d5dabf6596ea61.zip
Fixing time primtouts throughout the code.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/amap/amapCore.c2
-rw-r--r--src/map/amap/amapLib.c2
-rw-r--r--src/map/amap/amapLiberty.c2
-rw-r--r--src/map/amap/amapMatch.c3
-rw-r--r--src/map/amap/amapMerge.c3
-rw-r--r--src/map/amap/amapParse.c2
-rw-r--r--src/map/cov/covCore.c6
-rw-r--r--src/map/fpga/fpga.h4
-rw-r--r--src/map/fpga/fpgaCore.c9
-rw-r--r--src/map/fpga/fpgaCreate.c7
-rw-r--r--src/map/fpga/fpgaCut.c2
-rw-r--r--src/map/fpga/fpgaInt.h18
-rw-r--r--src/map/fpga/fpgaMatch.c6
-rw-r--r--src/map/if/if.h4
-rw-r--r--src/map/if/ifCore.c2
-rw-r--r--src/map/if/ifCut.c2
-rw-r--r--src/map/if/ifMap.c3
-rw-r--r--src/map/if/ifReduce.c2
-rw-r--r--src/map/if/ifSeq.c5
-rw-r--r--src/map/if/ifTime.c4
-rw-r--r--src/map/mapper/mapper.h6
-rw-r--r--src/map/mapper/mapperCore.c2
-rw-r--r--src/map/mapper/mapperCreate.c9
-rw-r--r--src/map/mapper/mapperCut.c2
-rw-r--r--src/map/mapper/mapperInt.h22
-rw-r--r--src/map/mapper/mapperLib.c2
-rw-r--r--src/map/super/superAnd.c4
-rw-r--r--src/map/super/superGate.c10
28 files changed, 70 insertions, 75 deletions
diff --git a/src/map/amap/amapCore.c b/src/map/amap/amapCore.c
index ce1f61bd..507dcc5e 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;
- int clkTotal = clock();
+ clock_t clkTotal = clock();
pLib = (Amap_Lib_t *)Abc_FrameReadLibGen2();
if ( pLib == NULL )
{
diff --git a/src/map/amap/amapLib.c b/src/map/amap/amapLib.c
index b11e3222..cf087218 100644
--- a/src/map/amap/amapLib.c
+++ b/src/map/amap/amapLib.c
@@ -328,7 +328,7 @@ void Amap_LibPrintSelectedGates( Amap_Lib_t * p, int fAllGates )
Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, int fVerbose, int fVeryVerbose )
{
Amap_Lib_t * p;
- int clk = clock();
+ clock_t clk = clock();
p = Amap_LibReadFile( pFileName, fVerbose );
if ( fVerbose )
printf( "Read %d gates from file \"%s\".\n", Vec_PtrSize(p->vGates), pFileName );
diff --git a/src/map/amap/amapLiberty.c b/src/map/amap/amapLiberty.c
index 49b36848..c1798f09 100644
--- a/src/map/amap/amapLiberty.c
+++ b/src/map/amap/amapLiberty.c
@@ -888,7 +888,7 @@ int Amap_LibertyParse( char * pFileName, char * pFileGenlib, int fVerbose )
{
Amap_Tree_t * p;
char * pPos;
- int clk = clock();
+ clock_t clk = clock();
int RetValue;
p = Amap_LibertyStart( pFileName );
if ( p == NULL )
diff --git a/src/map/amap/amapMatch.c b/src/map/amap/amapMatch.c
index 4c213f9c..8903bf4e 100644
--- a/src/map/amap/amapMatch.c
+++ b/src/map/amap/amapMatch.c
@@ -484,7 +484,8 @@ void Amap_ManMatch( Amap_Man_t * p, int fFlow, int fRefs )
Aig_MmFlex_t * pMemOld;
Amap_Obj_t * pObj;
float Area;
- int i, nInvs, clk = clock();
+ int i, nInvs;
+ clock_t clk = clock();
pMemOld = p->pMemCutBest;
p->pMemCutBest = Aig_MmFlexStart();
Amap_ManForEachNode( p, pObj, i )
diff --git a/src/map/amap/amapMerge.c b/src/map/amap/amapMerge.c
index 19470d63..85a1713c 100644
--- a/src/map/amap/amapMerge.c
+++ b/src/map/amap/amapMerge.c
@@ -514,7 +514,8 @@ void Amap_ManMergeNodeCuts( Amap_Man_t * p, Amap_Obj_t * pNode )
void Amap_ManMerge( Amap_Man_t * p )
{
Amap_Obj_t * pObj;
- int i, clk = clock();
+ int i;
+ clock_t clk = clock();
p->pCutsPi = Amap_ManSetupPis( p );
Amap_ManForEachNode( p, pObj, i )
Amap_ManMergeNodeCuts( p, pObj );
diff --git a/src/map/amap/amapParse.c b/src/map/amap/amapParse.c
index 6fa469a9..2242fa7a 100644
--- a/src/map/amap/amapParse.c
+++ b/src/map/amap/amapParse.c
@@ -461,7 +461,7 @@ void Amap_LibParseTest( char * pFileName )
{
int fVerbose = 1;
Amap_Lib_t * p;
- int clk = clock();
+ clock_t clk = clock();
p = Amap_LibReadFile( pFileName, fVerbose );
if ( p == NULL )
return;
diff --git a/src/map/cov/covCore.c b/src/map/cov/covCore.c
index f40e908a..1a1d025f 100644
--- a/src/map/cov/covCore.c
+++ b/src/map/cov/covCore.c
@@ -108,7 +108,8 @@ Abc_Ntk_t * Abc_NtkSopEsopCover( Abc_Ntk_t * pNtk, int nFaninMax, int fUseEsop,
void Abc_NtkCovCovers( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
{
Abc_Obj_t * pObj;
- int i, clk = clock();
+ int i;
+ clock_t clk = clock();
// start the manager
p->vFanCounts = Abc_NtkFanoutCounts(pNtk);
@@ -154,7 +155,8 @@ int Abc_NtkCovCoversOne( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
ProgressBar * pProgress;
Abc_Obj_t * pObj;
Vec_Ptr_t * vBoundary;
- int i, clk = clock();
+ int i;
+ clock_t clk = clock();
int Counter = 0;
int fStop = 1;
diff --git a/src/map/fpga/fpga.h b/src/map/fpga/fpga.h
index b63d2448..22982b4e 100644
--- a/src/map/fpga/fpga.h
+++ b/src/map/fpga/fpga.h
@@ -83,15 +83,11 @@ extern int Fpga_ManReadVerbose( Fpga_Man_t * p );
extern int Fpga_ManReadVarMax( Fpga_Man_t * p );
extern float * Fpga_ManReadLutAreas( Fpga_Man_t * p );
extern Fpga_NodeVec_t* Fpga_ManReadMapping( Fpga_Man_t * p );
-extern void Fpga_ManSetTimeToMap( Fpga_Man_t * p, int Time );
-extern void Fpga_ManSetTimeToNet( Fpga_Man_t * p, int Time );
-extern void Fpga_ManSetTimeTotal( Fpga_Man_t * p, int Time );
extern void Fpga_ManSetOutputNames( Fpga_Man_t * p, char ** ppNames );
extern void Fpga_ManSetInputArrivals( Fpga_Man_t * p, float * pArrivals );
extern void Fpga_ManSetAreaRecovery( Fpga_Man_t * p, int fAreaRecovery );
extern void Fpga_ManSetDelayLimit( Fpga_Man_t * p, float DelayLimit );
extern void Fpga_ManSetAreaLimit( Fpga_Man_t * p, float AreaLimit );
-extern void Fpga_ManSetTimeLimit( Fpga_Man_t * p, float TimeLimit );
extern void Fpga_ManSetObeyFanoutLimits( Fpga_Man_t * p, int fObeyFanoutLimits );
extern void Fpga_ManSetNumIterations( Fpga_Man_t * p, int nNumIterations );
extern int Fpga_ManReadFanoutViolations( Fpga_Man_t * p );
diff --git a/src/map/fpga/fpgaCore.c b/src/map/fpga/fpgaCore.c
index 74739852..64b26689 100644
--- a/src/map/fpga/fpgaCore.c
+++ b/src/map/fpga/fpgaCore.c
@@ -27,8 +27,8 @@ ABC_NAMESPACE_IMPL_START
static int Fpga_MappingPostProcess( Fpga_Man_t * p );
-extern int s_MappingTime;
-extern int s_MappingMem;
+extern clock_t s_MappingTime;
+extern clock_t s_MappingMem;
////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ extern int s_MappingMem;
***********************************************************************/
int Fpga_Mapping( Fpga_Man_t * p )
{
- int clk, clkTotal = clock();
+ clock_t clk, clkTotal = clock();
// collect the nodes reachable from POs in the DFS order (including the choices)
p->vAnds = Fpga_MappingDfs( p, 1 );
@@ -112,7 +112,8 @@ int Fpga_MappingPostProcess( Fpga_Man_t * p )
int fRecoverAreaFlow = 1;
int fRecoverArea = 1;
float aAreaTotalCur, aAreaTotalCur2;
- int Iter, clk;
+ int Iter;
+ clock_t clk;
//if ( p->fVerbose )
// printf( "Best clock period = %5.2f\n", Fpga_TimeComputeArrivalMax(p) );
diff --git a/src/map/fpga/fpgaCreate.c b/src/map/fpga/fpgaCreate.c
index 64f6d750..e3079ad7 100644
--- a/src/map/fpga/fpgaCreate.c
+++ b/src/map/fpga/fpgaCreate.c
@@ -58,15 +58,11 @@ int Fpga_ManReadVerbose( Fpga_Man_t * p ) { retu
int Fpga_ManReadVarMax( Fpga_Man_t * p ) { return p->pLutLib->LutMax; }
float * Fpga_ManReadLutAreas( Fpga_Man_t * p ) { return p->pLutLib->pLutAreas; }
Fpga_NodeVec_t* Fpga_ManReadMapping( Fpga_Man_t * p ) { return p->vMapping; }
-void Fpga_ManSetTimeToMap( Fpga_Man_t * p, int Time ) { p->timeToMap = Time; }
-void Fpga_ManSetTimeToNet( Fpga_Man_t * p, int Time ) { p->timeToNet = Time; }
-void Fpga_ManSetTimeTotal( Fpga_Man_t * p, int Time ) { p->timeTotal = Time; }
void Fpga_ManSetOutputNames( Fpga_Man_t * p, char ** ppNames ) { p->ppOutputNames = ppNames; }
void Fpga_ManSetInputArrivals( Fpga_Man_t * p, float * pArrivals ) { p->pInputArrivals = pArrivals; }
void Fpga_ManSetAreaRecovery( Fpga_Man_t * p, int fAreaRecovery ) { p->fAreaRecovery = fAreaRecovery;}
void Fpga_ManSetDelayLimit( Fpga_Man_t * p, float DelayLimit ) { p->DelayLimit = DelayLimit; }
void Fpga_ManSetAreaLimit( Fpga_Man_t * p, float AreaLimit ) { p->AreaLimit = AreaLimit; }
-void Fpga_ManSetTimeLimit( Fpga_Man_t * p, float TimeLimit ) { p->TimeLimit = TimeLimit; }
void Fpga_ManSetChoiceNodeNum( Fpga_Man_t * p, int nChoiceNodes ) { p->nChoiceNodes = nChoiceNodes; }
void Fpga_ManSetChoiceNum( Fpga_Man_t * p, int nChoices ) { p->nChoices = nChoices; }
void Fpga_ManSetVerbose( Fpga_Man_t * p, int fVerbose ) { p->fVerbose = fVerbose; }
@@ -425,7 +421,8 @@ void Fpga_TableResize( Fpga_Man_t * pMan )
{
Fpga_Node_t ** pBinsNew;
Fpga_Node_t * pEnt, * pEnt2;
- int nBinsNew, Counter, i, clk;
+ int nBinsNew, Counter, i;
+ clock_t clk;
unsigned Key;
clk = clock();
diff --git a/src/map/fpga/fpgaCut.c b/src/map/fpga/fpgaCut.c
index 2e9ea77e..75007888 100644
--- a/src/map/fpga/fpgaCut.c
+++ b/src/map/fpga/fpgaCut.c
@@ -133,7 +133,7 @@ void Fpga_MappingCuts( Fpga_Man_t * p )
Fpga_CutTable_t * pTable;
Fpga_Node_t * pNode;
int nCuts, nNodes, i;
- int clk = clock();
+ clock_t clk = clock();
// set the elementary cuts for the PI variables
assert( p->nVarsMax > 1 && p->nVarsMax < 11 );
diff --git a/src/map/fpga/fpgaInt.h b/src/map/fpga/fpgaInt.h
index c9272154..f2c482af 100644
--- a/src/map/fpga/fpgaInt.h
+++ b/src/map/fpga/fpgaInt.h
@@ -155,15 +155,15 @@ struct Fpga_ManStruct_t_
float TimeLimit; // for resynthesis
// runtime statistics
- int timeToMap; // time to transfer to the mapping structure
- int timeCuts; // time to compute k-feasible cuts
- int timeTruth; // time to compute the truth table for each cut
- int timeMatch; // time to perform matching for each node
- int timeRecover; // time to perform area recovery
- int timeToNet; // time to transfer back to the network
- int timeTotal; // the total mapping time
- int time1; // time to transfer to the mapping structure
- int time2; // time to transfer to the mapping structure
+ 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 timeRecover; // time to perform area recovery
+ 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
};
// the LUT library
diff --git a/src/map/fpga/fpgaMatch.c b/src/map/fpga/fpgaMatch.c
index 08db4bb1..dd04e562 100644
--- a/src/map/fpga/fpgaMatch.c
+++ b/src/map/fpga/fpgaMatch.c
@@ -119,7 +119,7 @@ int Fpga_MappingMatches( Fpga_Man_t * p, int fDelayOriented )
int Fpga_MatchNode( Fpga_Man_t * p, Fpga_Node_t * pNode, int fDelayOriented )
{
Fpga_Cut_t * pCut, * pCutBestOld;
- int clk;
+ clock_t clk;
// make sure that at least one cut other than the trivial is present
if ( pNode->pCuts->pNext == NULL )
{
@@ -269,7 +269,7 @@ int Fpga_MatchNodeArea( Fpga_Man_t * p, Fpga_Node_t * pNode )
{
Fpga_Cut_t * pCut, * pCutBestOld;
float aAreaCutBest;
- int clk;
+ clock_t clk;
// make sure that at least one cut other than the trivial is present
if ( pNode->pCuts->pNext == NULL )
{
@@ -390,7 +390,7 @@ int Fpga_MatchNodeSwitch( Fpga_Man_t * p, Fpga_Node_t * pNode )
{
Fpga_Cut_t * pCut, * pCutBestOld;
float aAreaCutBest = FPGA_FLOAT_LARGE;
- int clk;
+ clock_t clk;
// make sure that at least one cut other than the trivial is present
if ( pNode->pCuts->pNext == NULL )
{
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 69878111..0654c05b 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -30,7 +30,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include <time.h>
+
#include "src/misc/vec/vec.h"
#include "src/misc/mem/mem.h"
#include "src/misc/tim/tim.h"
@@ -223,7 +223,7 @@ struct If_Man_t_
void ** pHashTable[2]; // hash table bins
Mem_Fixed_t * pMemEntries; // memory manager for hash table entries
// statistics
-// int timeTruth;
+// clock_t timeTruth;
};
// priority cut
diff --git a/src/map/if/ifCore.c b/src/map/if/ifCore.c
index 9cdddccd..0ddfafd6 100644
--- a/src/map/if/ifCore.c
+++ b/src/map/if/ifCore.c
@@ -80,7 +80,7 @@ int If_ManPerformMapping( If_Man_t * p )
int If_ManPerformMappingComb( If_Man_t * p )
{
If_Obj_t * pObj;
- int clkTotal = clock();
+ clock_t clkTotal = clock();
int i;
// set arrival times and fanout estimates
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index 36aa935d..c1d770fd 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -1354,7 +1354,7 @@ int If_CutGetCones( If_Man_t * p )
{
If_Obj_t * pObj;
int i, Counter = 0;
- int clk = clock();
+ clock_t clk = clock();
If_ManForEachObj( p, pObj, i )
{
if ( If_ObjIsAnd(pObj) && pObj->nRefs )
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 570fb4ae..ea1d5f33 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -389,7 +389,8 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
{
// ProgressBar * pProgress;
If_Obj_t * pObj;
- int i, clk = clock();
+ int i;
+ clock_t clk = clock();
float arrTime;
assert( Mode >= 0 && Mode <= 2 );
// set the sorting function
diff --git a/src/map/if/ifReduce.c b/src/map/if/ifReduce.c
index b45a9b25..65e321c0 100644
--- a/src/map/if/ifReduce.c
+++ b/src/map/if/ifReduce.c
@@ -51,7 +51,7 @@ static void If_ManImproveNodeFaninCompact( If_Man_t * p, If_Obj_t * pObj, int nL
***********************************************************************/
void If_ManImproveMapping( If_Man_t * p )
{
- int clk;
+ clock_t clk;
clk = clock();
If_ManImproveExpand( p, p->pPars->nLutSize );
diff --git a/src/map/if/ifSeq.c b/src/map/if/ifSeq.c
index 6cfb5131..d34cf538 100644
--- a/src/map/if/ifSeq.c
+++ b/src/map/if/ifSeq.c
@@ -123,7 +123,8 @@ Vec_Ptr_t * If_ManCollectLatches( If_Man_t * p )
int If_ManPerformMappingRoundSeq( If_Man_t * p, int nIter )
{
If_Obj_t * pObj;
- int i, clk = clock();
+ int i;
+ clock_t clk = clock();
int fVeryVerbose = 0;
int fChange = 0;
@@ -337,7 +338,7 @@ void If_ManPerformMappingSeqPost( If_Man_t * p )
***********************************************************************/
int If_ManPerformMappingSeq( If_Man_t * p )
{
- int clkTotal = clock();
+ clock_t clkTotal = clock();
int PeriodBest;
p->SortMode = 0;
diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c
index 5f7f8142..0b86093b 100644
--- a/src/map/if/ifTime.c
+++ b/src/map/if/ifTime.c
@@ -252,7 +252,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 )
{
- int clk;
+ clock_t clk;
Vec_Wrd_t * vAnds;
int RetValue;
if ( p->vCover == NULL )
@@ -493,7 +493,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 )
{
- int clk;
+ clock_t clk;
int RetValue;
if ( p->vCover == NULL )
p->vCover = Vec_IntAlloc(0);
diff --git a/src/map/mapper/mapper.h b/src/map/mapper/mapper.h
index 29bc98ef..0c8a8f42 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, int Time );
+extern void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, clock_t 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 );
@@ -89,10 +89,6 @@ extern Mio_Library_t * Map_ManReadGenLib ( Map_Man_t * p );
extern int Map_ManReadVerbose( Map_Man_t * p );
extern float Map_ManReadAreaFinal( Map_Man_t * p );
extern float Map_ManReadRequiredGlo( Map_Man_t * p );
-extern void Map_ManSetTimeToMap( Map_Man_t * p, int Time );
-extern void Map_ManSetTimeToNet( Map_Man_t * p, int Time );
-extern void Map_ManSetTimeSweep( Map_Man_t * p, int Time );
-extern void Map_ManSetTimeTotal( Map_Man_t * p, int Time );
extern void Map_ManSetOutputNames( Map_Man_t * p, char ** ppNames );
extern void Map_ManSetAreaRecovery( Map_Man_t * p, int fAreaRecovery );
extern void Map_ManSetDelayTarget( Map_Man_t * p, float DelayTarget );
diff --git a/src/map/mapper/mapperCore.c b/src/map/mapper/mapperCore.c
index 7a4f7c4e..9df22923 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;
- int clk;
+ clock_t clk;
//////////////////////////////////////////////////////////////////////
// perform pre-mapping computations
diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c
index 2b1663a4..42094477 100644
--- a/src/map/mapper/mapperCreate.c
+++ b/src/map/mapper/mapperCreate.c
@@ -58,10 +58,6 @@ Mio_Library_t * Map_ManReadGenLib ( Map_Man_t * p ) { return
int Map_ManReadVerbose( Map_Man_t * p ) { return p->fVerbose; }
float Map_ManReadAreaFinal( Map_Man_t * p ) { return p->AreaFinal; }
float Map_ManReadRequiredGlo( Map_Man_t * p ) { return p->fRequiredGlo; }
-void Map_ManSetTimeToMap( Map_Man_t * p, int Time ) { p->timeToMap = Time; }
-void Map_ManSetTimeToNet( Map_Man_t * p, int Time ) { p->timeToNet = Time; }
-void Map_ManSetTimeSweep( Map_Man_t * p, int Time ) { p->timeSweep = Time; }
-void Map_ManSetTimeTotal( Map_Man_t * p, int Time ) { p->timeTotal = Time; }
void Map_ManSetOutputNames( Map_Man_t * p, char ** ppNames ) { p->ppOutputNames = ppNames;}
void Map_ManSetAreaRecovery( Map_Man_t * p, int fAreaRecovery ) { p->fAreaRecovery = fAreaRecovery;}
void Map_ManSetDelayTarget( Map_Man_t * p, float DelayTarget ) { p->DelayTarget = DelayTarget;}
@@ -317,7 +313,7 @@ void Map_ManPrintTimeStats( Map_Man_t * p )
SeeAlso []
***********************************************************************/
-void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, int Time )
+void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, clock_t Time )
{
FILE * pTable;
pTable = fopen( "map_stats.txt", "a+" );
@@ -472,7 +468,8 @@ void Map_TableResize( Map_Man_t * pMan )
{
Map_Node_t ** pBinsNew;
Map_Node_t * pEnt, * pEnt2;
- int nBinsNew, Counter, i, clk;
+ int nBinsNew, Counter, i;
+ clock_t clk;
unsigned Key;
clk = clock();
diff --git a/src/map/mapper/mapperCut.c b/src/map/mapper/mapperCut.c
index 29861531..12ee5d92 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;
- int clk = clock();
+ clock_t clk = clock();
// set the elementary cuts for the PI variables
assert( p->nVarsMax > 1 && p->nVarsMax < 7 );
for ( i = 0; i < p->nInputs; i++ )
diff --git a/src/map/mapper/mapperInt.h b/src/map/mapper/mapperInt.h
index 8d1e3fb7..95c5b0c7 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
- int timeToMap; // time to transfer to the mapping structure
- int timeCuts; // time to compute k-feasible cuts
- int timeTruth; // time to compute the truth table for each cut
- int timeMatch; // time to perform matching for each node
- int timeArea; // time to recover area after delay oriented mapping
- int timeSweep; // time to perform technology dependent sweep
- int timeToNet; // time to transfer back to the network
- int timeTotal; // the total mapping time
- int time1; // time to transfer to the mapping structure
- int time2; // time to transfer to the mapping structure
- int time3; // time to transfer to the mapping structure
+ 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
};
// the supergate library
diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c
index c8b677bf..8b30f294 100644
--- a/src/map/mapper/mapperLib.c
+++ b/src/map/mapper/mapperLib.c
@@ -56,7 +56,7 @@ ABC_NAMESPACE_IMPL_START
Map_SuperLib_t * Map_SuperLibCreate( char * pFileName, char * pExcludeFile, int fAlgorithm, int fVerbose )
{
Map_SuperLib_t * p;
- int clk;
+ clock_t clk;
// start the supergate library
p = ABC_ALLOC( Map_SuperLib_t, 1 );
diff --git a/src/map/super/superAnd.c b/src/map/super/superAnd.c
index 17ba9771..b6a30025 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;
- int clk;
+ clock_t clk;
assert( nInputs < 6 );
@@ -463,7 +463,7 @@ void Super2_LibWrite( Super2_Lib_t * pLib )
Super2_Gate_t * pGate;
FILE * pFile;
char FileName[100];
- int clk;
+ clock_t clk;
if ( pLib->nLevels > 5 )
{
diff --git a/src/map/super/superGate.c b/src/map/super/superGate.c
index 840028c4..380065d3 100644
--- a/src/map/super/superGate.c
+++ b/src/map/super/superGate.c
@@ -70,7 +70,7 @@ struct Super_ManStruct_t_
int nAliases; // the number of hash table lookups thrown away due to aliasing
// runtime
- int Time; // the runtime of the generation procedure
+ clock_t Time; // the runtime of the generation procedure
int TimeLimit; // the runtime limit (in seconds)
int TimeSec; // the time passed (in seconds)
double TimeStop; // the time to stop computation (in miliseconds)
@@ -144,7 +144,8 @@ void Super_Precompute( Mio_Library_t * pLibGen, int nVarsMax, int nLevels, int n
{
Super_Man_t * pMan;
Mio_Gate_t ** ppGates;
- int nGates, Level, clk, clockStart;
+ int nGates, Level;
+ clock_t clk, clockStart;
assert( nVarsMax < 7 );
if ( nGatesMax < nVarsMax )
@@ -705,7 +706,7 @@ done:
***********************************************************************/
int Super_CheckTimeout( ProgressBar * pPro, Super_Man_t * pMan )
{
- int TimeNow = clock();
+ clock_t TimeNow = clock();
if ( TimeNow > pMan->TimePrint )
{
Extra_ProgressBarUpdate( pPro, ++pMan->TimeSec, NULL );
@@ -949,7 +950,8 @@ void Super_Write( Super_Man_t * pMan )
{
Super_Gate_t * pGateRoot, * pGate;
stmm_generator * gen;
- int fZeroFound, clk, v;
+ int fZeroFound, v;
+ clock_t clk;
ABC_PTRUINT_T Key;
if ( pMan->nGates < 1 )