diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-01-07 14:42:47 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-01-07 14:42:47 +0700 |
commit | a2813847318bf22e0c36c7141047eaa82657f60d (patch) | |
tree | ce13faa0313eaa1b5fdf63df6af94eb231898b11 | |
parent | 3dd2325aa8572bbe0689a537101f138a0c7b8c87 (diff) | |
download | abc-a2813847318bf22e0c36c7141047eaa82657f60d.tar.gz abc-a2813847318bf22e0c36c7141047eaa82657f60d.tar.bz2 abc-a2813847318bf22e0c36c7141047eaa82657f60d.zip |
Bug fix in delay-opt framework.
-rw-r--r-- | src/opt/sbd/sbdCore.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opt/sbd/sbdCore.c b/src/opt/sbd/sbdCore.c index 179977fb..4f560a0a 100644 --- a/src/opt/sbd/sbdCore.c +++ b/src/opt/sbd/sbdCore.c @@ -1964,7 +1964,7 @@ void Sbd_ManDeriveMapping_rec( Sbd_Man_t * p, Gia_Man_t * pNew, int iObj ) void Sbd_ManDeriveMapping( Sbd_Man_t * p, Gia_Man_t * pNew ) { Gia_Obj_t * pObj, * pFan; - int i, k, iFan, iObjNew, * pCut, * pCutNew; + int i, k, iFan, iObjNew, iFanNew, * pCut, * pCutNew; Vec_Int_t * vLeaves = Vec_IntAlloc( 100 ); // derive cuts for the new manager p->vLutCuts2 = Vec_IntStart( Gia_ManObjNum(pNew) * (p->pPars->nLutSize + 1) ); @@ -1986,10 +1986,10 @@ void Sbd_ManDeriveMapping( Sbd_Man_t * p, Gia_Man_t * pNew ) pFan = Gia_ManObj( p->pGia, iFan ); if ( pFan->Value == ~0 ) continue; - iObjNew = Abc_Lit2Var( pFan->Value ); - if ( iObjNew == 0 ) + iFanNew = Abc_Lit2Var( pFan->Value ); + if ( iFanNew == 0 || iFanNew == iObjNew ) continue; - Vec_IntPushUniqueOrder( vLeaves, iObjNew ); + Vec_IntPushUniqueOrder( vLeaves, iFanNew ); } assert( Vec_IntSize(vLeaves) <= p->pPars->nLutSize ); //assert( Vec_IntSize(vLeaves) > 1 ); |