diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-04 22:32:51 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-04 22:32:51 -0700 |
commit | 0489deb631099e725a83cfa92b251b4cc91bfc5e (patch) | |
tree | 6385d36cad542f4cd6c713e7730af83451e3d309 /src/base/wlc/wlcBlast.c | |
parent | f7939ee6b12d69587c546e532e91da485e63ba1b (diff) | |
download | abc-0489deb631099e725a83cfa92b251b4cc91bfc5e.tar.gz abc-0489deb631099e725a83cfa92b251b4cc91bfc5e.tar.bz2 abc-0489deb631099e725a83cfa92b251b4cc91bfc5e.zip |
Sequential word-level simulator for Wlc_Ntk_t.
Diffstat (limited to 'src/base/wlc/wlcBlast.c')
-rw-r--r-- | src/base/wlc/wlcBlast.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/base/wlc/wlcBlast.c b/src/base/wlc/wlcBlast.c index a4e5459e..c15c0fa8 100644 --- a/src/base/wlc/wlcBlast.c +++ b/src/base/wlc/wlcBlast.c @@ -412,13 +412,14 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds ) Tim_Man_t * pManTime = NULL; Gia_Man_t * pTemp, * pNew, * pExtra = NULL; Wlc_Obj_t * pObj, * pPrev = NULL; - Vec_Int_t * vBits, * vTemp0, * vTemp1, * vTemp2, * vRes; + Vec_Int_t * vBits = &p->vBits, * vTemp0, * vTemp1, * vTemp2, * vRes; int nBits = Wlc_NtkPrepareBits( p ); int nRange, nRange0, nRange1, nRange2; int i, k, b, iFanin, iLit, nAndPrev, * pFans0, * pFans1, * pFans2; int nFFins = 0, nFFouts = 0, curPi = 0, curPo = 0; int nBitCis = 0, nBitCos = 0; - vBits = Vec_IntAlloc( nBits ); + Vec_IntClear( vBits ); + Vec_IntGrow( vBits, nBits ); vTemp0 = Vec_IntAlloc( 1000 ); vTemp1 = Vec_IntAlloc( 1000 ); vTemp2 = Vec_IntAlloc( 1000 ); @@ -781,13 +782,14 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds ) } if ( fVerbose ) printf( "\n" ); - Vec_IntFree( vBits ); - Vec_IntErase( &p->vCopies ); + //Vec_IntErase( vBits ); + //Vec_IntErase( &p->vCopies ); // set the number of registers assert( nFFins == nFFouts ); Gia_ManSetRegNum( pNew, nFFins ); // finalize AIG pNew = Gia_ManCleanup( pTemp = pNew ); + Gia_ManDupRemapLiterals( vBits, pTemp ); Gia_ManStop( pTemp ); // transform AIG with init state if ( p->pInits ) @@ -800,6 +802,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds ) else { pNew = Gia_ManDupZeroUndc( pTemp = pNew, p->pInits, 1 ); + Gia_ManDupRemapLiterals( vBits, pTemp ); Gia_ManStop( pTemp ); } } |