mirror of https://github.com/YosysHQ/abc.git
Improving printouts in 'stime'.
This commit is contained in:
parent
8b2b4fb6b8
commit
bbf4b8bc1e
|
|
@ -298,9 +298,10 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv )
|
|||
int c;
|
||||
int fShowAll = 0;
|
||||
int fUseWireLoads = 1;
|
||||
int fShort = 0;
|
||||
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "cah" ) ) != EOF )
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "cash" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
|
|
@ -310,6 +311,9 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv )
|
|||
case 'a':
|
||||
fShowAll ^= 1;
|
||||
break;
|
||||
case 's':
|
||||
fShort ^= 1;
|
||||
break;
|
||||
case 'h':
|
||||
goto usage;
|
||||
default:
|
||||
|
|
@ -338,14 +342,15 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv )
|
|||
return 1;
|
||||
}
|
||||
|
||||
Abc_SclTimePerform( pAbc->pLibScl, Abc_FrameReadNtk(pAbc), fShowAll, fUseWireLoads );
|
||||
Abc_SclTimePerform( pAbc->pLibScl, Abc_FrameReadNtk(pAbc), fUseWireLoads, fShowAll, fShort );
|
||||
return 0;
|
||||
|
||||
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-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-s : display timing information without critical path [default = %s]\n", fShort? "yes": "no" );
|
||||
fprintf( pAbc->Err, "\t-h : print the help massage\n" );
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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_SclSave( char * pFileName, SC_Lib * pScl );
|
||||
/*=== 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 =============================================================*/
|
||||
extern void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * p );
|
||||
/*=== sclUpsize.c =============================================================*/
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fU
|
|||
/*=== sclTime.c =============================================================*/
|
||||
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 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 void Abc_SclTimeCone( SC_Man * p, Vec_Int_t * vCone );
|
||||
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
|
|||
int r, i, nNodes, nCones = 0, nDownSize = 0;
|
||||
p = Abc_SclManStart( pLib, pNtk, pPars->fUseWireLoads );
|
||||
if ( pPars->fPrintCP )
|
||||
Abc_SclTimeNtkPrint( p, 0 );
|
||||
Abc_SclTimeNtkPrint( p, 0, 0 );
|
||||
if ( pPars->fVerbose )
|
||||
printf( "Iterative gate-sizing of network \"%s\" with library \"%s\":\n", Abc_NtkName(pNtk), pLib->pName );
|
||||
if ( pPars->fVerbose )
|
||||
|
|
@ -459,7 +459,7 @@ void Abc_SclSizingPerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
|
|||
|
||||
p->MaxDelay = Abc_SclGetMaxDelay(p);
|
||||
if ( pPars->fPrintCP )
|
||||
Abc_SclTimeNtkPrint( p, 0 );
|
||||
Abc_SclTimeNtkPrint( p, 0, 0 );
|
||||
if ( nRuntimeLimit && clock() > nRuntimeLimit )
|
||||
printf( "Timeout was reached after %d seconds.\n", pPars->nTimeOut );
|
||||
// print cumulative statistics
|
||||
|
|
|
|||
|
|
@ -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( "\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;
|
||||
Abc_Obj_t * pObj, * pPivot = Abc_SclFindCriticalCo( p, &fRise );
|
||||
|
|
@ -105,6 +105,8 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll )
|
|||
printf( "Gates = %d. ", Abc_NtkNodeNum(p->pNtk) );
|
||||
printf( "Area = %.2f. ", Abc_SclGetTotalArea( p ) );
|
||||
printf( "Critical delay = %.1f ps\n", Abc_SclObjTimePs(p, pPivot, fRise) );
|
||||
if ( fShort )
|
||||
return;
|
||||
|
||||
if ( fShowAll )
|
||||
{
|
||||
|
|
@ -299,11 +301,11 @@ SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads )
|
|||
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;
|
||||
p = Abc_SclManStart( pLib, pNtk, fUseWireLoads );
|
||||
Abc_SclTimeNtkPrint( p, fShowAll );
|
||||
Abc_SclTimeNtkPrint( p, fShowAll, fShort );
|
||||
Abc_SclManFree( p );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue