summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-05-09 19:01:22 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-05-09 19:01:22 +0700
commitf39369a415ab3fc7d23b8a4994f31be2e3ebefe6 (patch)
tree51520833e6329441a2b87fdf6c5b87b6e9298f92 /src/map
parent140fd9ad9fe78a7fde8168ddcc7750a8bbc03bfe (diff)
downloadabc-f39369a415ab3fc7d23b8a4994f31be2e3ebefe6.tar.gz
abc-f39369a415ab3fc7d23b8a4994f31be2e3ebefe6.tar.bz2
abc-f39369a415ab3fc7d23b8a4994f31be2e3ebefe6.zip
Adding switch -C <num> to 'amap' to control max number of cuts at a node.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/amap/amap.h1
-rw-r--r--src/map/amap/amapCore.c1
-rw-r--r--src/map/amap/amapMerge.c6
3 files changed, 5 insertions, 3 deletions
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) );