summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-09-05 20:40:50 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-09-05 20:40:50 -0700
commit23879f92000601db485d2ea226711df88c6266b9 (patch)
tree6c8ffe04300dbbcae032cda66e372b40cef7c721 /src/base
parent9d14b0c094cc0509bf167166e6fbddeb0f8ba954 (diff)
downloadabc-23879f92000601db485d2ea226711df88c6266b9.tar.gz
abc-23879f92000601db485d2ea226711df88c6266b9.tar.bz2
abc-23879f92000601db485d2ea226711df88c6266b9.zip
Unifying parameters for the &ps command.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abcHieCec.c6
-rw-r--r--src/base/abci/abc.c27
2 files changed, 18 insertions, 15 deletions
diff --git a/src/base/abc/abcHieCec.c b/src/base/abc/abcHieCec.c
index 44958287..83683398 100644
--- a/src/base/abc/abcHieCec.c
+++ b/src/base/abc/abcHieCec.c
@@ -404,7 +404,7 @@ Gia_Man_t * Abc_NtkDeriveFlatGia2Derive( Abc_Ntk_t * pNtk, Vec_Ptr_t * vOrder )
Gia_ManStop( pGiaBox );
printf( "%8d -> ", Abc_NtkCountAndNodes(vOrder) );
- Gia_ManPrintStats( pGia, 0, 0, 0 );
+ Gia_ManPrintStats( pGia, NULL );
return pGia;
}
/*
@@ -724,7 +724,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia2( pNtk, vOrder );
Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
- Gia_ManPrintStats( pGia, 0, 0, 0 );
+ Gia_ManPrintStats( pGia, NULL );
// Gia_ManStop( pGia );
Vec_PtrFree( vOrder );
@@ -740,7 +740,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia( pNtk );
Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
- Gia_ManPrintStats( pGia, 0, 0, 0 );
+ Gia_ManPrintStats( pGia, NULL );
// clean nodes/boxes of all nodes
Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 122e5b38..bfa80315 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -25260,23 +25260,25 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
{
+ Gps_Par_t Pars, * pPars = &Pars;
int c;
- int fTents = 0;
- int fSwitch = 0;
- int fCut = 0;
+ memset( pPars, 0, sizeof(Gps_Par_t) );
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "tpch" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "tpcnh" ) ) != EOF )
{
switch ( c )
{
case 't':
- fTents ^= 1;
+ pPars->fTents ^= 1;
break;
case 'p':
- fSwitch ^= 1;
+ pPars->fSwitch ^= 1;
break;
case 'c':
- fCut ^= 1;
+ pPars->fCut ^= 1;
+ break;
+ case 'n':
+ pPars->fNpn ^= 1;
break;
case 'h':
goto usage;
@@ -25289,15 +25291,16 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Ps(): There is no AIG.\n" );
return 1;
}
- Gia_ManPrintStats( pAbc->pGia, fTents, fSwitch, fCut );
+ Gia_ManPrintStats( pAbc->pGia, pPars );
return 0;
usage:
- Abc_Print( -2, "usage: &ps [-tpch]\n" );
+ Abc_Print( -2, "usage: &ps [-tpcnh]\n" );
Abc_Print( -2, "\t prints stats of the current AIG\n" );
- Abc_Print( -2, "\t-t : toggle printing BMC tents [default = %s]\n", fTents? "yes": "no" );
- Abc_Print( -2, "\t-p : toggle printing switching activity [default = %s]\n", fSwitch? "yes": "no" );
- Abc_Print( -2, "\t-c : toggle printing the size of frontier cut [default = %s]\n", fCut? "yes": "no" );
+ Abc_Print( -2, "\t-t : toggle printing BMC tents [default = %s]\n", pPars->fTents? "yes": "no" );
+ Abc_Print( -2, "\t-p : toggle printing switching activity [default = %s]\n", pPars->fSwitch? "yes": "no" );
+ Abc_Print( -2, "\t-c : toggle printing the size of frontier cut [default = %s]\n", pPars->fCut? "yes": "no" );
+ Abc_Print( -2, "\t-n : toggle printing NPN classes of functions [default = %s]\n", pPars->fNpn? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}