From 79d5e7658153760a9774f96eea03f21abb668521 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 8 Mar 2008 08:01:00 -0800 Subject: Version abc80308 --- src/base/abci/abc.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/base/abci') diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 368ee2a8..f311686d 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -445,6 +445,7 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv ) int fSaveBest; int fDumpResult; int fUseLutLib; + int fPrintTime; int c; pNtk = Abc_FrameReadNtk(pAbc); @@ -456,8 +457,9 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv ) fSaveBest = 0; fDumpResult = 0; fUseLutLib = 0; + fPrintTime = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "fbdlh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "fbdlth" ) ) != EOF ) { switch ( c ) { @@ -473,6 +475,9 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'l': fUseLutLib ^= 1; break; + case 't': + fPrintTime ^= 1; + break; case 'h': goto usage; default: @@ -486,15 +491,23 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv ) return 1; } Abc_NtkPrintStats( pOut, pNtk, fFactor, fSaveBest, fDumpResult, fUseLutLib ); + if ( fPrintTime ) + { + pAbc->TimeTotal += pAbc->TimeCommand; + fprintf( pAbc->Out, "elapse: %3.2f seconds, total: %3.2f seconds\n", + pAbc->TimeCommand, pAbc->TimeTotal ); + pAbc->TimeCommand = 0.0; + } return 0; usage: - fprintf( pErr, "usage: print_stats [-fbdlh]\n" ); + fprintf( pErr, "usage: print_stats [-fbdlth]\n" ); fprintf( pErr, "\t prints the network statistics\n" ); fprintf( pErr, "\t-f : toggles printing the literal count in the factored forms [default = %s]\n", fFactor? "yes": "no" ); fprintf( pErr, "\t-b : toggles saving the best logic network in \"best.blif\" [default = %s]\n", fSaveBest? "yes": "no" ); fprintf( pErr, "\t-d : toggles dumping network into file \"_dump.blif\" [default = %s]\n", fDumpResult? "yes": "no" ); fprintf( pErr, "\t-l : toggles printing delay of LUT mapping using LUT library [default = %s]\n", fSaveBest? "yes": "no" ); + fprintf( pErr, "\t-t : toggles printing runtime statistics [default = %s]\n", fPrintTime? "yes": "no" ); fprintf( pErr, "\t-h : print the command usage\n"); return 1; } -- cgit v1.2.3