Commit 76f2adb5 by Alan Mishchenko

Adding color to sizing stats.

parent ed2f0ef3
...@@ -384,8 +384,15 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p ) ...@@ -384,8 +384,15 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p )
void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars ) void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
{ {
extern float Gia_ManLevelAve( Gia_Man_t * p ); extern float Gia_ManLevelAve( Gia_Man_t * p );
#ifdef WIN32
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 15 ); // bright
if ( p->pName ) if ( p->pName )
Abc_Print( 1, "%-8s : ", p->pName ); Abc_Print( 1, "%-8s : ", p->pName );
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 ); // normal
#else
if ( p->pName )
Abc_Print( 1, "%s%-8s%s : ", "\033[1;37m", p->pName, "\033[0m" ); // bright
#endif
Abc_Print( 1, "i/o =%7d/%7d", Gia_ManPiNum(p), Gia_ManPoNum(p) ); Abc_Print( 1, "i/o =%7d/%7d", Gia_ManPiNum(p), Gia_ManPoNum(p) );
if ( Gia_ManConstrNum(p) ) if ( Gia_ManConstrNum(p) )
Abc_Print( 1, "(c=%d)", Gia_ManConstrNum(p) ); Abc_Print( 1, "(c=%d)", Gia_ManConstrNum(p) );
......
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
#include "map/if/if.h" #include "map/if/if.h"
#include "misc/extra/extraBdd.h" #include "misc/extra/extraBdd.h"
#ifdef WIN32
#include <windows.h>
#endif
ABC_NAMESPACE_IMPL_START ABC_NAMESPACE_IMPL_START
...@@ -229,7 +233,13 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum ...@@ -229,7 +233,13 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
// if ( Abc_NtkIsStrash(pNtk) ) // if ( Abc_NtkIsStrash(pNtk) )
// Abc_AigCountNext( pNtk->pManFunc ); // Abc_AigCountNext( pNtk->pManFunc );
Abc_Print( 1,"%-13s:", pNtk->pName ); #ifdef WIN32
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 15 ); // bright
Abc_Print( 1,"%-13s:", pNtk->pName );
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 ); // normal
#else
Abc_Print( 1,"%s%-13s:%s", "\033[1;37m", pNtk->pName, "\033[0m" ); // bright
#endif
Abc_Print( 1," i/o =%5d/%5d", Abc_NtkPiNum(pNtk), Abc_NtkPoNum(pNtk) ); Abc_Print( 1," i/o =%5d/%5d", Abc_NtkPiNum(pNtk), Abc_NtkPoNum(pNtk) );
if ( Abc_NtkConstrNum(pNtk) ) if ( Abc_NtkConstrNum(pNtk) )
Abc_Print( 1,"(c=%d)", Abc_NtkConstrNum(pNtk) ); Abc_Print( 1,"(c=%d)", Abc_NtkConstrNum(pNtk) );
......
...@@ -162,13 +162,13 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath ) ...@@ -162,13 +162,13 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath )
printf( " \n" ); printf( " \n" );
#else #else
Abc_Print( 1, "WireLoad = \"%s\" ", p->pWLoadUsed ? p->pWLoadUsed->pName : "none" ); Abc_Print( 1, "WireLoad = \"%s\" ", p->pWLoadUsed ? p->pWLoadUsed->pName : "none" );
Abc_Print( 1, "%sGates =%7d%s ", "\033[1;33m", Abc_NtkNodeNum(p->pNtk), "\033[1;36m" ); // yellow Abc_Print( 1, "%sGates =%7d%s ", "\033[1;33m", Abc_NtkNodeNum(p->pNtk), "\033[0m" ); // yellow
Abc_Print( 1, "(%5.1f %%) ", 100.0 * Abc_SclGetBufInvCount(p->pNtk) / Abc_NtkNodeNum(p->pNtk) ); Abc_Print( 1, "(%5.1f %%) ", 100.0 * Abc_SclGetBufInvCount(p->pNtk) / Abc_NtkNodeNum(p->pNtk) );
Abc_Print( 1, "%sCap =%5.1f ff%s ", "\033[1;32m", p->EstLoadAve, "\033[1;36m" ); // green Abc_Print( 1, "%sCap =%5.1f ff%s ", "\033[1;32m", p->EstLoadAve, "\033[0m" ); // green
Abc_Print( 1, "(%5.1f %%) ", Abc_SclGetAverageSize(p->pNtk) ); Abc_Print( 1, "(%5.1f %%) ", Abc_SclGetAverageSize(p->pNtk) );
Abc_Print( 1, "%sArea =%12.2f%s ", "\033[1;36m", Abc_SclGetTotalArea(p->pNtk), "\033[1;35m" ); // blue Abc_Print( 1, "%sArea =%12.2f%s ", "\033[1;36m", Abc_SclGetTotalArea(p->pNtk), "\033[0m" ); // blue
Abc_Print( 1, "(%5.1f %%) ", 100.0 * Abc_SclCountMinSize(p->pLib, p->pNtk, 0) / Abc_NtkNodeNum(p->pNtk) ); Abc_Print( 1, "(%5.1f %%) ", 100.0 * Abc_SclCountMinSize(p->pLib, p->pNtk, 0) / Abc_NtkNodeNum(p->pNtk) );
Abc_Print( 1, "%sDelay =%9.2f ps%s ", "\033[1;35m", maxDelay, "\033[1;35m" ); // magenta Abc_Print( 1, "%sDelay =%9.2f ps%s ", "\033[1;35m", maxDelay, "\033[0m" ); // magenta
Abc_Print( 1, "(%5.1f %%) ", 100.0 * Abc_SclCountNearCriticalNodes(p) / Abc_NtkNodeNum(p->pNtk) ); Abc_Print( 1, "(%5.1f %%) ", 100.0 * Abc_SclCountNearCriticalNodes(p) / Abc_NtkNodeNum(p->pNtk) );
Abc_Print( 1, " \n" ); Abc_Print( 1, " \n" );
#endif #endif
......
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