From 6aa1c94ea50b9357205c033c4e6240ba277890b6 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 25 Sep 2014 20:33:29 -0700 Subject: Enabling print-out, for each operator, of the percetage of AND nodes after bit-blasting. --- src/base/wlc/wlcBlast.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/base/wlc/wlcBlast.c') diff --git a/src/base/wlc/wlcBlast.c b/src/base/wlc/wlcBlast.c index bb781145..538154c4 100644 --- a/src/base/wlc/wlcBlast.c +++ b/src/base/wlc/wlcBlast.c @@ -352,9 +352,12 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p ) pNew = Gia_ManStart( 5 * Wlc_NtkObjNum(p) + 1000 ); pNew->pName = Abc_UtilStrsav( p->pName ); Gia_ManHashAlloc( pNew ); + // clean AND-gate counters + memset( p->nAnds, 0, sizeof(int) * WLC_OBJ_NUMBER ); // create primary inputs Wlc_NtkForEachObj( p, pObj, i ) { + int nAndPrev = Gia_ManObjNum(pNew); // char * pName = Wlc_ObjName(p, i); nRange = Wlc_ObjRange( pObj ); nRange0 = Wlc_ObjFaninNum(pObj) > 0 ? Wlc_ObjRange( Wlc_ObjFanin0(p, pObj) ) : -1; @@ -564,7 +567,10 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p ) assert( Vec_IntSize(vBits) == Wlc_ObjCopy(p, i) ); Vec_IntAppend( vBits, vRes ); pPrev = pObj; + if ( pObj->Type != WLC_OBJ_PI && pObj->Type != WLC_OBJ_PO ) + p->nAnds[pObj->Type] += Gia_ManObjNum(pNew) - nAndPrev; } + p->nAnds[0] = Gia_ManAndNum(pNew); assert( nBits == Vec_IntSize(vBits) ); Vec_IntFree( vTemp0 ); Vec_IntFree( vTemp1 ); -- cgit v1.2.3