summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abc.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-04-01 19:25:21 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-04-01 19:25:21 -0700
commit28f12c5f0610b7a229b1b4416e314998cee513d4 (patch)
tree4d336b42b9bd46c91b45aa6f354671a4f7197268 /src/base/abci/abc.c
parent5ec77b66e1ed399891b665f9f14e9f92ddf1c3d2 (diff)
downloadabc-28f12c5f0610b7a229b1b4416e314998cee513d4.tar.gz
abc-28f12c5f0610b7a229b1b4416e314998cee513d4.tar.bz2
abc-28f12c5f0610b7a229b1b4416e314998cee513d4.zip
Shrink for 6-LUTs.
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r--src/base/abci/abc.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index b41734ba..4851e8f4 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -26187,11 +26187,23 @@ int Abc_CommandAbc9Shrink( Abc_Frame_t * pAbc, int argc, char ** argv )
int nLutSize;
int c,fVerbose = 0;
int fKeepLevel = 0;
+ int nFanoutMax = 50;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "lvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "Nlvh" ) ) != EOF )
{
switch ( c )
{
+ case 'N':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( -1, "Command line switch \"-N\" should be followed by a char string.\n" );
+ goto usage;
+ }
+ nFanoutMax = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( nFanoutMax < 0 )
+ goto usage;
+ break;
case 'l':
fKeepLevel ^= 1;
break;
@@ -26218,7 +26230,7 @@ int Abc_CommandAbc9Shrink( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( nLutSize <= 4 )
pTemp = Gia_ManPerformMapShrink( pAbc->pGia, fKeepLevel, fVerbose );
else if ( nLutSize <= 6 )
- pTemp = Gia_ManMapShrink6( pAbc->pGia, fKeepLevel, fVerbose );
+ pTemp = Gia_ManMapShrink6( pAbc->pGia, nFanoutMax, fKeepLevel, fVerbose );
else
Abc_Print( -1, "Abc_CommandAbc9Shrink(): Works only for 4-LUTs and 6-LUTs.\n" );
if ( pTemp )
@@ -26226,8 +26238,9 @@ int Abc_CommandAbc9Shrink( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
usage:
- Abc_Print( -2, "usage: &shrink [-lvh]\n" );
+ Abc_Print( -2, "usage: &shrink [-N num] [-lvh]\n" );
Abc_Print( -2, "\t performs fast shrinking using current mapping\n" );
+ Abc_Print( -2, "\t-N num : the max fanout count to skip a divisor [default = %d]\n", nFanoutMax );
Abc_Print( -2, "\t-l : toggle level update during shrinking [default = %s]\n", fKeepLevel? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");