diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-14 13:18:23 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-14 13:18:23 -0700 |
commit | 6e4ef76311923099a67df7dae5894dee574825c9 (patch) | |
tree | ca4b4fcb5d13f8502a04f1f9157524040b56b4a7 /src | |
parent | 17c32289e1e8f3b3e9c7f638e21887c6a897054c (diff) | |
download | abc-6e4ef76311923099a67df7dae5894dee574825c9.tar.gz abc-6e4ef76311923099a67df7dae5894dee574825c9.tar.bz2 abc-6e4ef76311923099a67df7dae5894dee574825c9.zip |
Bug with in signed MUX.
Diffstat (limited to 'src')
-rw-r--r-- | src/base/wlc/wlcBlast.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/base/wlc/wlcBlast.c b/src/base/wlc/wlcBlast.c index 5a374303..9a38567d 100644 --- a/src/base/wlc/wlcBlast.c +++ b/src/base/wlc/wlcBlast.c @@ -541,19 +541,22 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds ) } else if ( pObj->Type == WLC_OBJ_MUX ) { + int fSigned = 1; + assert( nRange0 >= 1 && Wlc_ObjFaninNum(pObj) >= 3 ); assert( 1 + (1 << nRange0) == Wlc_ObjFaninNum(pObj) ); + Wlc_ObjForEachFanin( pObj, iFanin, k ) + if ( k > 0 ) + fSigned &= Wlc_NtkObj(p, iFanin)->Signed; for ( b = 0; b < nRange; b++ ) { Vec_IntClear( vTemp0 ); Wlc_ObjForEachFanin( pObj, iFanin, k ) - { - if ( !k ) continue; - //assert( nRange == Wlc_ObjRange(Wlc_NtkObj(p, iFanin)) ); - pPrev = Wlc_NtkObj(p, iFanin); - nRange1 = Wlc_ObjRange(pPrev); - pFans1 = Vec_IntEntryP( vBits, Wlc_ObjCopy(p, iFanin) ); - Vec_IntPush( vTemp0, b < nRange1 ? pFans1[b] : (pPrev->Signed? pFans1[nRange1-1] : 0) ); - } + if ( k > 0 ) + { + nRange1 = Wlc_ObjRange( Wlc_NtkObj(p, iFanin) ); + pFans1 = Vec_IntEntryP( vBits, Wlc_ObjCopy(p, iFanin) ); + Vec_IntPush( vTemp0, b < nRange1 ? pFans1[b] : (fSigned? pFans1[nRange1-1] : 0) ); + } Vec_IntPush( vRes, Wlc_NtkMuxTree_rec(pNew, pFans0, nRange0, vTemp0, 0) ); } } |