summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r--src/base/abci/abc.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 0b1c6b23..6bac9542 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -27410,12 +27410,13 @@ usage:
int Abc_CommandAbc9Balance( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Gia_Man_t * pTemp = NULL;
- int c,fVerbose = 0;
- int fSimpleAnd = 0;
- int fKeepLevel = 0;
- int nFanoutMax = 50;
+ int nNewNodesMax = ABC_INFINITY;
+ int fMultiExt = 0;
+ int fSimpleAnd = 0;
+ int fKeepLevel = 0;
+ int c, fVerbose = 1;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "Nlavh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "Nealvh" ) ) != EOF )
{
switch ( c )
{
@@ -27425,17 +27426,20 @@ int Abc_CommandAbc9Balance( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Command line switch \"-N\" should be followed by a char string.\n" );
goto usage;
}
- nFanoutMax = atoi(argv[globalUtilOptind]);
+ nNewNodesMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++;
- if ( nFanoutMax < 0 )
+ if ( nNewNodesMax < 0 )
goto usage;
break;
- case 'l':
- fKeepLevel ^= 1;
+ case 'e':
+ fMultiExt ^= 1;
break;
case 'a':
fSimpleAnd ^= 1;
break;
+ case 'l':
+ fKeepLevel ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -27455,14 +27459,20 @@ int Abc_CommandAbc9Balance( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Balance(): The current AIG is mapped.\n" );
return 1;
}
- pTemp = Gia_ManBalance( pAbc->pGia, fSimpleAnd, fVerbose );
+ if ( fMultiExt )
+ pTemp = Gia_ManMultiExtract( pAbc->pGia, fSimpleAnd, nNewNodesMax, fVerbose );
+ else
+ pTemp = Gia_ManBalance( pAbc->pGia, fSimpleAnd, fVerbose );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
usage:
- Abc_Print( -2, "usage: &b [-avh]\n" );
+ Abc_Print( -2, "usage: &b [-N num] [-ealvh]\n" );
Abc_Print( -2, "\t performs AIG balancing to reduce delay\n" );
+ Abc_Print( -2, "\t-N num : the max fanout count to skip a divisor [default = %d]\n", nNewNodesMax );
+ Abc_Print( -2, "\t-e : toggle extacting shared logic while balancing [default = %s]\n", fMultiExt? "yes": "no" );
Abc_Print( -2, "\t-a : toggle using AND instead of AND/XOR/MUX [default = %s]\n", fSimpleAnd? "yes": "no" );
+ 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");
return 1;