From f39369a415ab3fc7d23b8a4994f31be2e3ebefe6 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 9 May 2014 19:01:22 +0700 Subject: Adding switch -C to 'amap' to control max number of cuts at a node. --- src/map/amap/amap.h | 1 + src/map/amap/amapCore.c | 1 + src/map/amap/amapMerge.c | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/map') diff --git a/src/map/amap/amap.h b/src/map/amap/amap.h index c897331c..7ea9d802 100644 --- a/src/map/amap/amap.h +++ b/src/map/amap/amap.h @@ -46,6 +46,7 @@ struct Amap_Par_t_ { int nIterFlow; // iterations of area flow int nIterArea; // iteratoins of exact area + int nCutsMax; // the maximum number of cuts at a node int fUseMuxes; // enables the use of MUXes int fUseXors; // enables the use of XORs int fFreeInvs; // assume inverters are free (area = 0) diff --git a/src/map/amap/amapCore.c b/src/map/amap/amapCore.c index 5a84669c..b1c9242b 100644 --- a/src/map/amap/amapCore.c +++ b/src/map/amap/amapCore.c @@ -48,6 +48,7 @@ void Amap_ManSetDefaultParams( Amap_Par_t * p ) memset( p, 0, sizeof(Amap_Par_t) ); p->nIterFlow = 1; // iterations of area flow p->nIterArea = 4; // iteratoins of exact area + p->nCutsMax = 500; // the maximum number of cuts at a node p->fUseMuxes = 0; // enables the use of MUXes p->fUseXors = 1; // enables the use of XORs p->fFreeInvs = 0; // assume inverters are free (area = 0) diff --git a/src/map/amap/amapMerge.c b/src/map/amap/amapMerge.c index 4b91f7ca..9b2977fa 100644 --- a/src/map/amap/amapMerge.c +++ b/src/map/amap/amapMerge.c @@ -173,7 +173,7 @@ Amap_Cut_t * Amap_ManCutCreate3( Amap_Man_t * p, ***********************************************************************/ void Amap_ManCutSaveStored( Amap_Man_t * p, Amap_Obj_t * pNode ) { - int nMaxCuts = 500; + int nMaxCuts = p->pPars->nCutsMax; int * pBuffer; Amap_Cut_t * pNext, * pCut; int i, nWords, Entry, nCuts, nCuts2; @@ -522,8 +522,8 @@ void Amap_ManMerge( Amap_Man_t * p ) if ( p->pPars->fVerbose ) { printf( "AIG object is %d bytes. ", (int)sizeof(Amap_Obj_t) ); - printf( "Internal AIG = %5.2f MB. Cuts = %5.2f MB.\n", - 1.0*Amap_ManObjNum(p)*sizeof(Amap_Obj_t)/(1<<20), 1.0*p->nBytesUsed/(1<<20) ); + printf( "Internal AIG = %5.2f MB. Cuts = %5.2f MB. CutsMax = %d.\n", + 1.0*Amap_ManObjNum(p)*sizeof(Amap_Obj_t)/(1<<20), 1.0*p->nBytesUsed/(1<<20), p->pPars->nCutsMax ); 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) ); -- cgit v1.2.3