Commit bbf4b8bc by Alan Mishchenko

Improving printouts in 'stime'.

parent 8b2b4fb6
...@@ -298,9 +298,10 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -298,9 +298,10 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv )
int c; int c;
int fShowAll = 0; int fShowAll = 0;
int fUseWireLoads = 1; int fUseWireLoads = 1;
int fShort = 0;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "cah" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "cash" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -310,6 +311,9 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -310,6 +311,9 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv )
case 'a': case 'a':
fShowAll ^= 1; fShowAll ^= 1;
break; break;
case 's':
fShort ^= 1;
break;
case 'h': case 'h':
goto usage; goto usage;
default: default:
...@@ -338,14 +342,15 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -338,14 +342,15 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv )
return 1; return 1;
} }
Abc_SclTimePerform( pAbc->pLibScl, Abc_FrameReadNtk(pAbc), fShowAll, fUseWireLoads ); Abc_SclTimePerform( pAbc->pLibScl, Abc_FrameReadNtk(pAbc), fUseWireLoads, fShowAll, fShort );
return 0; return 0;
usage: usage:
fprintf( pAbc->Err, "usage: stime [-cah]\n" ); fprintf( pAbc->Err, "usage: stime [-cash]\n" );
fprintf( pAbc->Err, "\t performs STA using Liberty library\n" ); fprintf( pAbc->Err, "\t performs STA using Liberty library\n" );
fprintf( pAbc->Err, "\t-c : toggle using wire-loads if specified [default = %s]\n", fUseWireLoads? "yes": "no" ); fprintf( pAbc->Err, "\t-c : toggle using wire-loads if specified [default = %s]\n", fUseWireLoads? "yes": "no" );
fprintf( pAbc->Err, "\t-a : display timing information for all nodes [default = %s]\n", fShowAll? "yes": "no" ); fprintf( pAbc->Err, "\t-a : display timing information for all nodes [default = %s]\n", fShowAll? "yes": "no" );
fprintf( pAbc->Err, "\t-s : display timing information without critical path [default = %s]\n", fShort? "yes": "no" );
fprintf( pAbc->Err, "\t-h : print the help massage\n" ); fprintf( pAbc->Err, "\t-h : print the help massage\n" );
return 1; return 1;
} }
......
...@@ -432,7 +432,7 @@ extern void Abc_SclWriteText( char * pFileName, SC_Lib * p ); ...@@ -432,7 +432,7 @@ extern void Abc_SclWriteText( char * pFileName, SC_Lib * p );
extern void Abc_SclLoad( char * pFileName, SC_Lib ** ppScl ); extern void Abc_SclLoad( char * pFileName, SC_Lib ** ppScl );
extern void Abc_SclSave( char * pFileName, SC_Lib * pScl ); extern void Abc_SclSave( char * pFileName, SC_Lib * pScl );
/*=== sclTime.c =============================================================*/ /*=== sclTime.c =============================================================*/
extern void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fShowAll, int fUseWireLoads ); extern void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads, int fShowAll, int fShort );
/*=== sclSize.c =============================================================*/ /*=== sclSize.c =============================================================*/
extern void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * p ); extern void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * p );
/*=== sclUpsize.c =============================================================*/ /*=== sclUpsize.c =============================================================*/
......
...@@ -235,7 +235,7 @@ static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fU ...@@ -235,7 +235,7 @@ static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fU
/*=== sclTime.c =============================================================*/ /*=== sclTime.c =============================================================*/
extern Abc_Obj_t * Abc_SclFindCriticalCo( SC_Man * p, int * pfRise ); extern Abc_Obj_t * Abc_SclFindCriticalCo( SC_Man * p, int * pfRise );
extern Abc_Obj_t * Abc_SclFindMostCriticalFanin( SC_Man * p, int * pfRise, Abc_Obj_t * pNode ); extern Abc_Obj_t * Abc_SclFindMostCriticalFanin( SC_Man * p, int * pfRise, Abc_Obj_t * pNode );
extern void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll ); extern void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fShort );
extern SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads ); extern SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads );
extern void Abc_SclTimeCone( SC_Man * p, Vec_Int_t * vCone ); extern void Abc_SclTimeCone( SC_Man * p, Vec_Int_t * vCone );
extern void Abc_SclTimeNtkRecompute( SC_Man * p, float * pArea, float * pDelay ); extern void Abc_SclTimeNtkRecompute( SC_Man * p, float * pArea, float * pDelay );
......
...@@ -367,7 +367,7 @@ void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars ...@@ -367,7 +367,7 @@ void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
int r, i, nNodes, nCones = 0, nDownSize = 0; int r, i, nNodes, nCones = 0, nDownSize = 0;
p = Abc_SclManStart( pLib, pNtk, pPars->fUseWireLoads ); p = Abc_SclManStart( pLib, pNtk, pPars->fUseWireLoads );
if ( pPars->fPrintCP ) if ( pPars->fPrintCP )
Abc_SclTimeNtkPrint( p, 0 ); Abc_SclTimeNtkPrint( p, 0, 0 );
if ( pPars->fVerbose ) if ( pPars->fVerbose )
printf( "Iterative gate-sizing of network \"%s\" with library \"%s\":\n", Abc_NtkName(pNtk), pLib->pName ); printf( "Iterative gate-sizing of network \"%s\" with library \"%s\":\n", Abc_NtkName(pNtk), pLib->pName );
if ( pPars->fVerbose ) if ( pPars->fVerbose )
...@@ -459,7 +459,7 @@ void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars ...@@ -459,7 +459,7 @@ void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
p->MaxDelay = Abc_SclGetMaxDelay(p); p->MaxDelay = Abc_SclGetMaxDelay(p);
if ( pPars->fPrintCP ) if ( pPars->fPrintCP )
Abc_SclTimeNtkPrint( p, 0 ); Abc_SclTimeNtkPrint( p, 0, 0 );
if ( nRuntimeLimit && clock() > nRuntimeLimit ) if ( nRuntimeLimit && clock() > nRuntimeLimit )
printf( "Timeout was reached after %d seconds.\n", pPars->nTimeOut ); printf( "Timeout was reached after %d seconds.\n", pPars->nTimeOut );
// print cumulative statistics // print cumulative statistics
......
...@@ -96,7 +96,7 @@ static inline void Abc_SclTimeGatePrint( SC_Man * p, Abc_Obj_t * pObj, int fRise ...@@ -96,7 +96,7 @@ static inline void Abc_SclTimeGatePrint( SC_Man * p, Abc_Obj_t * pObj, int fRise
printf( "slew =%6.1f ps ", Abc_SclObjSlewPs(p, pObj, fRise >= 0 ? fRise : 0 ) ); printf( "slew =%6.1f ps ", Abc_SclObjSlewPs(p, pObj, fRise >= 0 ? fRise : 0 ) );
printf( "\n" ); printf( "\n" );
} }
void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll ) void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fShort )
{ {
int i, nLength = 0, fRise = 0; int i, nLength = 0, fRise = 0;
Abc_Obj_t * pObj, * pPivot = Abc_SclFindCriticalCo( p, &fRise ); Abc_Obj_t * pObj, * pPivot = Abc_SclFindCriticalCo( p, &fRise );
...@@ -105,6 +105,8 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll ) ...@@ -105,6 +105,8 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll )
printf( "Gates = %d. ", Abc_NtkNodeNum(p->pNtk) ); printf( "Gates = %d. ", Abc_NtkNodeNum(p->pNtk) );
printf( "Area = %.2f. ", Abc_SclGetTotalArea( p ) ); printf( "Area = %.2f. ", Abc_SclGetTotalArea( p ) );
printf( "Critical delay = %.1f ps\n", Abc_SclObjTimePs(p, pPivot, fRise) ); printf( "Critical delay = %.1f ps\n", Abc_SclObjTimePs(p, pPivot, fRise) );
if ( fShort )
return;
if ( fShowAll ) if ( fShowAll )
{ {
...@@ -299,11 +301,11 @@ SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads ) ...@@ -299,11 +301,11 @@ SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fShowAll, int fUseWireLoads ) void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads, int fShowAll, int fShort )
{ {
SC_Man * p; SC_Man * p;
p = Abc_SclManStart( pLib, pNtk, fUseWireLoads ); p = Abc_SclManStart( pLib, pNtk, fUseWireLoads );
Abc_SclTimeNtkPrint( p, fShowAll ); Abc_SclTimeNtkPrint( p, fShowAll, fShort );
Abc_SclManFree( p ); Abc_SclManFree( p );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment