summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-04-19 18:09:31 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-04-19 18:09:31 -0700
commiteb960a91d570e3f1cba1010fd2edab2af299301e (patch)
tree6f490d066c8cd0409fa31b70dab460dabb8c99b9 /src
parent472fb39f1602e8764275b32aa0220a1e64467df9 (diff)
downloadabc-eb960a91d570e3f1cba1010fd2edab2af299301e.tar.gz
abc-eb960a91d570e3f1cba1010fd2edab2af299301e.tar.bz2
abc-eb960a91d570e3f1cba1010fd2edab2af299301e.zip
Adding color to mapping stats.
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaIf.c6
-rw-r--r--src/aig/gia/giaMan.c17
2 files changed, 20 insertions, 3 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c
index c11fa841..5f5a7c07 100644
--- a/src/aig/gia/giaIf.c
+++ b/src/aig/gia/giaIf.c
@@ -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" );
diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c
index 82d74e50..d0048f6a 100644
--- a/src/aig/gia/giaMan.c
+++ b/src/aig/gia/giaMan.c
@@ -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) );