diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/if/if.h | 1 | ||||
-rw-r--r-- | src/map/if/ifMap.c | 4 | ||||
-rw-r--r-- | src/map/if/ifPrepro.c | 4 | ||||
-rw-r--r-- | src/map/if/ifReduce.c | 16 | ||||
-rw-r--r-- | src/map/if/ifUtil.c | 2 |
5 files changed, 16 insertions, 11 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index eaa08a3a..80678cbf 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -125,6 +125,7 @@ struct If_Man_t_ float fEpsilon; // epsilon used for comparison float RequiredGlo; // global required times float AreaGlo; // global area + int nNets; // the sum total of fanins of all LUTs in the mapping int nCutsUsed; // the number of cuts currently used int nCutsMerged; // the total number of cuts merged unsigned * puTemp[4]; // used for the truth table computation diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 4cdd7a87..569f200b 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -277,8 +277,8 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fRequi if ( p->pPars->fVerbose ) { char Symb = (Mode == 0)? 'D' : ((Mode == 1)? 'F' : 'A'); - printf( "%c: Del = %6.2f. Area = %8.2f. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", - Symb, p->RequiredGlo, p->AreaGlo, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); + printf( "%c: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", + Symb, p->RequiredGlo, p->AreaGlo, p->nNets, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); PRT( "T", clock() - clk ); // printf( "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/ifPrepro.c b/src/map/if/ifPrepro.c index f331d917..32146e91 100644 --- a/src/map/if/ifPrepro.c +++ b/src/map/if/ifPrepro.c @@ -100,8 +100,8 @@ void If_ManPerformMappingPreprocess( If_Man_t * p ) If_ManComputeRequired( p, 1 ); if ( p->pPars->fVerbose ) { - printf( "S: Del = %6.2f. Area = %8.2f. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", - p->RequiredGlo, p->AreaGlo, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); + printf( "S: 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) ); PRT( "T", clock() - clk ); } } diff --git a/src/map/if/ifReduce.c b/src/map/if/ifReduce.c index 3e3256c3..2e2a6d81 100644 --- a/src/map/if/ifReduce.c +++ b/src/map/if/ifReduce.c @@ -55,28 +55,30 @@ void If_ManImproveMapping( If_Man_t * p ) If_ManComputeRequired( p, 0 ); if ( p->pPars->fVerbose ) { - printf( "E: Del = %6.2f. Area = %8.2f. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", - p->RequiredGlo, p->AreaGlo, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); + printf( "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) ); PRT( "T", clock() - clk ); } + /* clk = clock(); If_ManImproveReduce( p, p->pPars->nLutSize ); If_ManComputeRequired( p, 0 ); if ( p->pPars->fVerbose ) { - printf( "R: Del = %6.2f. Area = %8.2f. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", - p->RequiredGlo, p->AreaGlo, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); + printf( "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) ); PRT( "T", clock() - clk ); } - +*/ +/* clk = clock(); If_ManImproveExpand( p, p->pPars->nLutSize ); If_ManComputeRequired( p, 0 ); if ( p->pPars->fVerbose ) { - printf( "E: Del = %6.2f. Area = %8.2f. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", - p->RequiredGlo, p->AreaGlo, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); + printf( "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) ); PRT( "T", clock() - clk ); } */ diff --git a/src/map/if/ifUtil.c b/src/map/if/ifUtil.c index 797d853d..1fd3229d 100644 --- a/src/map/if/ifUtil.c +++ b/src/map/if/ifUtil.c @@ -147,6 +147,7 @@ void If_ManComputeRequired( If_Man_t * p, int fFirstTime ) If_Obj_t * pObj; int i; // compute area, clean required times, collect nodes used in the mapping + p->nNets = 0; p->AreaGlo = If_ManScanMapping( p ); // get the global required times p->RequiredGlo = If_ManDelayMax( p, 0 ); @@ -206,6 +207,7 @@ float If_ManScanMapping_rec( If_Man_t * p, If_Obj_t * pObj, If_Obj_t ** ppStore ppStore[pObj->Level] = pObj; // visit the transitive fanin of the selected cut pCutBest = If_ObjCutBest(pObj); + p->nNets += pCutBest->nLeaves; aArea = If_CutLutArea( p, pCutBest ); If_CutForEachLeaf( p, pCutBest, pLeaf, i ) aArea += If_ManScanMapping_rec( p, pLeaf, ppStore ); |