From a2813847318bf22e0c36c7141047eaa82657f60d Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 7 Jan 2017 14:42:47 +0700 Subject: Bug fix in delay-opt framework. --- src/opt/sbd/sbdCore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/opt/sbd') 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 ); -- cgit v1.2.3