mirror of https://github.com/YosysHQ/abc.git
Adding color to mapping stats.
This commit is contained in:
parent
472fb39f16
commit
eb960a91d5
|
|
@ -338,7 +338,7 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile )
|
|||
Abc_Print( 1, "lut =%7d ", nLuts );
|
||||
SetConsoleTextAttribute( hConsole, 10 ); // green
|
||||
Abc_Print( 1, "edge =%8d ", nFanins );
|
||||
SetConsoleTextAttribute( hConsole, 11 ); // blue
|
||||
SetConsoleTextAttribute( hConsole, 12 ); // red
|
||||
Abc_Print( 1, "lev =%5d ", LevelMax );
|
||||
Abc_Print( 1, "(%.2f) ", (float)Ave / Gia_ManCoNum(p) );
|
||||
SetConsoleTextAttribute( hConsole, 7 ); // normal
|
||||
|
|
@ -350,8 +350,8 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile )
|
|||
Abc_Print( 1, "Mapping (K=%d) : ", nLutSize );
|
||||
Abc_Print( 1, "%slut =%7d%s ", "\033[1;33m", nLuts, "\033[0m" ); // yellow
|
||||
Abc_Print( 1, "%sedge =%8d%s ", "\033[1;32m", nFanins, "\033[0m" ); // green
|
||||
Abc_Print( 1, "%slev =%5d%s ", "\033[1;36m", LevelMax, "\033[0m" ); // blue
|
||||
Abc_Print( 1, "%s(%.2f)%s ", "\033[1;36m", (float)Ave / Gia_ManCoNum(p), "\033[0m" );
|
||||
Abc_Print( 1, "%slev =%5d%s ", "\033[1;31m", LevelMax, "\033[0m" ); // red
|
||||
Abc_Print( 1, "%s(%.2f)%s ", "\033[1;31m", (float)Ave / Gia_ManCoNum(p), "\033[0m" );
|
||||
Abc_Print( 1, "over =%5.1f %% ", 100.0 * Gia_ManComputeOverlap(p) / Gia_ManAndNum(p) );
|
||||
Abc_Print( 1, "mem =%5.2f MB", 4.0*(Gia_ManObjNum(p) + 2*nLuts + nFanins)/(1<<20) );
|
||||
Abc_Print( 1, "\n" );
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@
|
|||
#include "proof/abs/abs.h"
|
||||
#include "opt/dar/dar.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
|
||||
|
|
@ -387,9 +391,22 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
|
|||
Abc_Print( 1, "(c=%d)", Gia_ManConstrNum(p) );
|
||||
if ( Gia_ManRegNum(p) )
|
||||
Abc_Print( 1, " ff =%7d", Gia_ManRegNum(p) );
|
||||
|
||||
#ifdef WIN32
|
||||
{
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleTextAttribute( hConsole, 11 ); // blue
|
||||
Abc_Print( 1, " %s =%8d", p->pMuxes? "nod" : "and", Gia_ManAndNum(p) );
|
||||
SetConsoleTextAttribute( hConsole, 13 ); // magenta
|
||||
Abc_Print( 1, " lev =%5d", Gia_ManLevelNum(p) );
|
||||
Abc_Print( 1, " (%.2f)", Gia_ManLevelAve(p) );
|
||||
SetConsoleTextAttribute( hConsole, 7 ); // normal
|
||||
}
|
||||
#else
|
||||
Abc_Print( 1, " %s%s =%8d%s", "\033[1;36m", p->pMuxes? "nod" : "and", Gia_ManAndNum(p), "\033[0m" ); // blue
|
||||
Abc_Print( 1, " %slev =%5d%s", "\033[1;35m", Gia_ManLevelNum(p), "\033[0m" ); // magenta
|
||||
Abc_Print( 1, " %s(%.2f)%s", "\033[1;35m", Gia_ManLevelAve(p), "\033[0m" );
|
||||
#endif
|
||||
Vec_IntFreeP( &p->vLevels );
|
||||
if ( pPars && pPars->fCut )
|
||||
Abc_Print( 1, " cut = %d(%d)", Gia_ManCrossCut(p, 0), Gia_ManCrossCut(p, 1) );
|
||||
|
|
|
|||
Loading…
Reference in New Issue