summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-03-28 20:09:08 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-03-28 20:09:08 -0700
commitb7cd22786ed2643d3730ec5d8a5f2fbb30393be6 (patch)
tree32b4b785c1bf4966198400af7a1a2f0f722ff01c /src/base
parentfdb8d83f7a249ecd4049d0a662052f241ee71b13 (diff)
downloadabc-b7cd22786ed2643d3730ec5d8a5f2fbb30393be6.tar.gz
abc-b7cd22786ed2643d3730ec5d8a5f2fbb30393be6.tar.bz2
abc-b7cd22786ed2643d3730ec5d8a5f2fbb30393be6.zip
Changed to 'print_level' to be less verbose by default.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abc.h2
-rw-r--r--src/base/abci/abc.c12
-rw-r--r--src/base/abci/abcPrint.c27
3 files changed, 25 insertions, 16 deletions
diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h
index fe8a116d..eef3663e 100644
--- a/src/base/abc/abc.h
+++ b/src/base/abc/abc.h
@@ -770,7 +770,7 @@ extern ABC_DLL void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t
extern ABC_DLL void Abc_NodePrintFanio( FILE * pFile, Abc_Obj_t * pNode );
extern ABC_DLL void Abc_NtkPrintFactor( FILE * pFile, Abc_Ntk_t * pNtk, int fUseRealNames );
extern ABC_DLL void Abc_NodePrintFactor( FILE * pFile, Abc_Obj_t * pNode, int fUseRealNames );
-extern ABC_DLL void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListNodes );
+extern ABC_DLL void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListNodes, int fVerbose );
extern ABC_DLL void Abc_NodePrintLevel( FILE * pFile, Abc_Obj_t * pNode );
extern ABC_DLL void Abc_NtkPrintSkews( FILE * pFile, Abc_Ntk_t * pNtk, int fPrintAll );
extern ABC_DLL void Abc_ObjPrint( FILE * pFile, Abc_Obj_t * pObj );
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 1763d165..adb3fe47 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -1463,12 +1463,14 @@ int Abc_CommandPrintLevel( Abc_Frame_t * pAbc, int argc, char ** argv )
int c;
int fListNodes;
int fProfile;
+ int fVerbose;
// set defaults
fListNodes = 0;
fProfile = 1;
+ fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "nph" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "npvh" ) ) != EOF )
{
switch ( c )
{
@@ -1478,6 +1480,9 @@ int Abc_CommandPrintLevel( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'p':
fProfile ^= 1;
break;
+ case 'v':
+ fVerbose ^= 1;
+ break;
case 'h':
goto usage;
default:
@@ -1515,14 +1520,15 @@ int Abc_CommandPrintLevel( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
}
// process all COs
- Abc_NtkPrintLevel( stdout, pNtk, fProfile, fListNodes );
+ Abc_NtkPrintLevel( stdout, pNtk, fProfile, fListNodes, fVerbose );
return 0;
usage:
- Abc_Print( -2, "usage: print_level [-nph] <node>\n" );
+ Abc_Print( -2, "usage: print_level [-npvh] <node>\n" );
Abc_Print( -2, "\t prints information about node level and cone size\n" );
Abc_Print( -2, "\t-n : toggles printing nodes by levels [default = %s]\n", fListNodes? "yes": "no" );
Abc_Print( -2, "\t-p : toggles printing level profile [default = %s]\n", fProfile? "yes": "no" );
+ Abc_Print( -2, "\t-v : enable verbose output [default = %s].\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
Abc_Print( -2, "\tnode : (optional) one node to consider\n");
return 1;
diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c
index 9f8c7e0d..38b21a13 100644
--- a/src/base/abci/abcPrint.c
+++ b/src/base/abci/abcPrint.c
@@ -811,7 +811,7 @@ void Abc_NodePrintFactor( FILE * pFile, Abc_Obj_t * pNode, int fUseRealNames )
SeeAlso []
***********************************************************************/
-void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListNodes )
+void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListNodes, int fVerbose )
{
Abc_Obj_t * pNode;
int i, k, Length;
@@ -901,18 +901,21 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN
}
assert( Abc_NtkIsStrash(pNtk) );
- // find the longest name
- Length = 0;
- Abc_NtkForEachCo( pNtk, pNode, i )
- if ( Length < (int)strlen(Abc_ObjName(pNode)) )
- Length = strlen(Abc_ObjName(pNode));
- if ( Length < 5 )
- Length = 5;
- // print stats for each output
- Abc_NtkForEachCo( pNtk, pNode, i )
+ if ( fVerbose )
{
- fprintf( pFile, "CO %4d : %*s ", i, Length, Abc_ObjName(pNode) );
- Abc_NodePrintLevel( pFile, pNode );
+ // find the longest name
+ Length = 0;
+ Abc_NtkForEachCo( pNtk, pNode, i )
+ if ( Length < (int)strlen(Abc_ObjName(pNode)) )
+ Length = strlen(Abc_ObjName(pNode));
+ if ( Length < 5 )
+ Length = 5;
+ // print stats for each output
+ Abc_NtkForEachCo( pNtk, pNode, i )
+ {
+ fprintf( pFile, "CO %4d : %*s ", i, Length, Abc_ObjName(pNode) );
+ Abc_NodePrintLevel( pFile, pNode );
+ }
}
}