diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-01-16 13:07:51 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-01-16 13:07:51 -0800 |
commit | 0695ec54736318a0fb76ee3df06e5d83719e1fc3 (patch) | |
tree | 1434e3511826e7b72c860fa7cd87020c5adbd243 /src/aig/gia | |
parent | ca28f77f3ac995ca5834b7ceef99ac0363f6ce8c (diff) | |
download | abc-0695ec54736318a0fb76ee3df06e5d83719e1fc3.tar.gz abc-0695ec54736318a0fb76ee3df06e5d83719e1fc3.tar.bz2 abc-0695ec54736318a0fb76ee3df06e5d83719e1fc3.zip |
New hierarchy manager plus additional printout in the GIA package.
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/gia.h | 5 | ||||
-rw-r--r-- | src/aig/gia/giaHash.c | 14 | ||||
-rw-r--r-- | src/aig/gia/giaMan.c | 1 |
3 files changed, 18 insertions, 2 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index d80c0963..6bf2918d 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -152,6 +152,7 @@ struct Gia_Man_t_ void * pLutLib; // LUT library word nHashHit; // hash table hit word nHashMiss; // hash table miss + int fVerbose; // verbose reports }; @@ -303,6 +304,7 @@ static inline int Gia_ManObjNum( Gia_Man_t * p ) { return p->nObjs static inline int Gia_ManAndNum( Gia_Man_t * p ) { return p->nObjs - Vec_IntSize(p->vCis) - Vec_IntSize(p->vCos) - 1; } static inline int Gia_ManCandNum( Gia_Man_t * p ) { return Gia_ManCiNum(p) + Gia_ManAndNum(p); } static inline int Gia_ManConstrNum( Gia_Man_t * p ) { return p->nConstrs; } +static inline void Gia_ManFlipVerbose( Gia_Man_t * p ) { p->fVerbose ^= 1; } static inline Gia_Obj_t * Gia_ManConst0( Gia_Man_t * p ) { return p->pObjs; } static inline Gia_Obj_t * Gia_ManConst1( Gia_Man_t * p ) { return Gia_Not(Gia_ManConst0(p)); } @@ -428,7 +430,8 @@ static inline Gia_Obj_t * Gia_ManAppendObj( Gia_Man_t * p ) { if ( p->nObjs == p->nObjsAlloc ) { -// printf("Reallocing %d.\n", 2 * p->nObjsAlloc ); + if ( p->fVerbose ) + printf("Extending GIA object storage: %d -> %d.\n", p->nObjsAlloc, 2 * p->nObjsAlloc ); assert( p->nObjsAlloc > 0 ); p->pObjs = ABC_REALLOC( Gia_Obj_t, p->pObjs, 2 * p->nObjsAlloc ); memset( p->pObjs + p->nObjsAlloc, 0, sizeof(Gia_Obj_t) * p->nObjsAlloc ); diff --git a/src/aig/gia/giaHash.c b/src/aig/gia/giaHash.c index c610bc9c..0437dfd9 100644 --- a/src/aig/gia/giaHash.c +++ b/src/aig/gia/giaHash.c @@ -151,6 +151,18 @@ void Gia_ManHashStart( Gia_Man_t * p ) ***********************************************************************/ void Gia_ManHashStop( Gia_Man_t * p ) { + int i, Ent, Counter; + printf( "Hash table hits = %12u. Hash table misses = %12u.\n", (int)p->nHashHit, (int)p->nHashMiss ); + printf( "Hash table size = %12u. Object count = %12u.\n", p->nHTable, p->nObjs ); + for ( i = 0; i < Abc_MinInt(p->nHTable, 1000); i++ ) + { + Counter = 0; + for ( Ent = Gia_Lit2Var(p->pHTable[i]); Ent; Ent = Gia_Lit2Var(Gia_ManObj(p, Ent)->Value) ) + Counter++; + printf( "%d ", Counter ); + } + printf( "\n" ); + ABC_FREE( p->pHTable ); p->nHTable = 0; } @@ -195,6 +207,8 @@ void Gia_ManHashResize( Gia_Man_t * p ) Counter2 = Gia_ManAndNum(p); assert( Counter == Counter2 ); ABC_FREE( pHTableOld ); + if ( p->fVerbose ) + printf( "Resizing GIA hash table: %d -> %d.\n", nHTableOld, p->nHTable ); } /**Function******************************************************************** diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c index 0acd547d..b787f713 100644 --- a/src/aig/gia/giaMan.c +++ b/src/aig/gia/giaMan.c @@ -70,7 +70,6 @@ Gia_Man_t * Gia_ManStart( int nObjsMax ) ***********************************************************************/ void Gia_ManStop( Gia_Man_t * p ) { -// printf( "Hash table hits = %12u. Hash table misses = %12u.\n", (int)p->nHashHit, (int)p->nHashMiss ); Tim_ManStopP( (Tim_Man_t **)&p->pManTime ); assert( p->pManTime == NULL ); Vec_PtrFreeFree( p->vNamesIn ); |