summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abc.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-02-01 03:57:17 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-02-01 03:57:17 +0700
commit30ec58fcda8c5227db6a03ed9c136967581d456c (patch)
tree1ab773bcbf37926be06671787e2be330db471eab /src/base/abci/abc.c
parente6be7ddfe69f74c658d04f822724bfdcf39ee412 (diff)
downloadabc-30ec58fcda8c5227db6a03ed9c136967581d456c.tar.gz
abc-30ec58fcda8c5227db6a03ed9c136967581d456c.tar.bz2
abc-30ec58fcda8c5227db6a03ed9c136967581d456c.zip
Added switch 'zeropo -s' to skip comb sweep after removing a PO.
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r--src/base/abci/abc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index e7a3991e..aca047c4 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -6295,11 +6295,12 @@ int Abc_CommandZeroPo( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);//, * pNtkRes = NULL;
int c, iOutput = -1;
- extern void Abc_NtkDropOneOutput( Abc_Ntk_t * pNtk, int iOutput );
+ int fSkipSweep = 0;
+ extern void Abc_NtkDropOneOutput( Abc_Ntk_t * pNtk, int iOutput, int fSkipSweep );
// set defaults
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "Nh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "Nsh" ) ) != EOF )
{
switch ( c )
{
@@ -6314,6 +6315,9 @@ int Abc_CommandZeroPo( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( iOutput < 0 )
goto usage;
break;
+ case 's':
+ fSkipSweep ^= 1;
+ break;
default:
goto usage;
}
@@ -6345,13 +6349,14 @@ int Abc_CommandZeroPo( Abc_Frame_t * pAbc, int argc, char ** argv )
// pNtkRes = Abc_NtkDup( pNtk );
// Abc_NtkDropOneOutput( pNtkRes, iOutput );
// Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes );
- Abc_NtkDropOneOutput( pNtk, iOutput );
+ Abc_NtkDropOneOutput( pNtk, iOutput, fSkipSweep );
return 0;
usage:
- Abc_Print( -2, "usage: zeropo [-N <num>] [-h]\n" );
+ Abc_Print( -2, "usage: zeropo [-N <num>] [-sh]\n" );
Abc_Print( -2, "\t replaces the PO driver by constant 0\n" );
Abc_Print( -2, "\t-N <num> : the zero-based index of the PO to replace [default = %d]\n", iOutput );
+ Abc_Print( -2, "\t-s : performs comb sweep after removimg a PO [default = %s]\n", !fSkipSweep? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}