diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-06-10 21:31:10 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-06-10 21:31:10 -0700 |
commit | 93d89eaaeb6f87d972d4ef29d7c858d2cceabe57 (patch) | |
tree | d2c75f745a00ebde565ae65090a3ba9f1b1c8ce2 /src/aig/gia/giaMan.c | |
parent | 9c8db2830f16b6deb50541c5693ed14a2240c659 (diff) | |
download | abc-93d89eaaeb6f87d972d4ef29d7c858d2cceabe57.tar.gz abc-93d89eaaeb6f87d972d4ef29d7c858d2cceabe57.tar.bz2 abc-93d89eaaeb6f87d972d4ef29d7c858d2cceabe57.zip |
Various modifications.
Diffstat (limited to 'src/aig/gia/giaMan.c')
-rw-r--r-- | src/aig/gia/giaMan.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c index 6d5a8e92..3b9e6d3b 100644 --- a/src/aig/gia/giaMan.c +++ b/src/aig/gia/giaMan.c @@ -423,9 +423,24 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars ) Abc_Print( 1, " ch =%5d", Gia_ManEquivCountClasses(p) ); if ( p->pMuxes ) { - Abc_Print( 1, " and =%5d", Gia_ManAndNum(p)-Gia_ManXorNum(p)-Gia_ManMuxNum(p) ); - Abc_Print( 1, " xor =%5d", Gia_ManXorNum(p) ); - Abc_Print( 1, " mux =%5d", Gia_ManMuxNum(p) ); + int nAnds = Gia_ManAndNum(p)-Gia_ManXorNum(p)-Gia_ManMuxNum(p); + int nXors = Gia_ManXorNum(p); + int nMuxes = Gia_ManMuxNum(p); + int nTotal = nAnds + 3*nXors + 3*nMuxes; + Abc_Print( 1, "\nXOR/MUX stats:" ); + Abc_Print( 1, " xor =%8d (%6.2f %%) ", nXors, 300.0*nXors/nTotal ); + Abc_Print( 1, " mux =%8d (%6.2f %%) ", nMuxes, 300.0*nMuxes/nTotal ); + Abc_Print( 1, " and =%8d (%6.2f %%) ", nAnds, 100.0*nAnds/nTotal ); + } + else if ( pPars->fMuxXor ) + { + int nAnds, nMuxes, nXors, nTotal = Gia_ManAndNum(p); + Gia_ManCountMuxXor( p, &nMuxes, &nXors ); + nAnds = Gia_ManAndNum(p)-3*nMuxes-3*nXors; + Abc_Print( 1, "\nXOR/MUX stats:" ); + Abc_Print( 1, " xor =%8d (%6.2f %%) ", nXors, 300.0*nXors/nTotal ); + Abc_Print( 1, " mux =%8d (%6.2f %%) ", nMuxes, 300.0*nMuxes/nTotal ); + Abc_Print( 1, " and =%8d (%6.2f %%) ", nAnds, 100.0*nAnds/nTotal ); } if ( pPars && pPars->fSwitch ) { |