mirror of https://github.com/YosysHQ/abc.git
Changed to 'print_level' to be less verbose by default.
This commit is contained in:
parent
fdb8d83f7a
commit
b7cd22786e
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue