summaryrefslogtreecommitdiffstats
path: root/src/map/mapper
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mapper')
-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
6 files changed, 48 insertions, 48 deletions
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