From 1afa8a2f38bacb9f2f8faaf06b4f01c70560a419 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 25 Jul 2008 08:01:00 -0700 Subject: Version abc80725 --- src/aig/ntl/ntlExtract.c | 4 ++-- src/aig/ntl/ntlFraig.c | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src/aig/ntl') diff --git a/src/aig/ntl/ntlExtract.c b/src/aig/ntl/ntlExtract.c index 79cd640a..3ef1d60e 100644 --- a/src/aig/ntl/ntlExtract.c +++ b/src/aig/ntl/ntlExtract.c @@ -803,8 +803,8 @@ Nwk_Man_t * Ntl_ManExtractNwk( Ntl_Man_t * p, Aig_Man_t * pAig, Tim_Man_t * pMan pNtk->pManTime = Tim_ManDup( pManTime, 0 ); else pNtk->pManTime = Tim_ManDup( p->pManTime, 0 ); -// Nwk_ManRemoveDupFanins( pNtk, 0 ); -// assert( Nwk_ManCheck( pNtk ) ); + Nwk_ManRemoveDupFanins( pNtk, 0 ); + assert( Nwk_ManCheck( pNtk ) ); return pNtk; } diff --git a/src/aig/ntl/ntlFraig.c b/src/aig/ntl/ntlFraig.c index bd39956e..38568d26 100644 --- a/src/aig/ntl/ntlFraig.c +++ b/src/aig/ntl/ntlFraig.c @@ -145,13 +145,20 @@ void Ntl_ManReduce( Ntl_Man_t * p, Aig_Man_t * pAig ) continue; assert( pObj != pObjRepr ); pNet = pObj->pData; - // do not reduce the net if it is driven by a multi-output box - if ( Ntl_ObjIsBox(pNet->pDriver) && Ntl_ObjFanoutNum(pNet->pDriver) > 1 ) - continue; - // do not reduce the net if it has no-merge attribute - if ( Ntl_ObjIsBox(pNet->pDriver) && pNet->pDriver->pImplem->attrNoMerge ) - continue; pNetRepr = pObjRepr->pData; + // consider special cases, when the net should not be reduced + if ( Ntl_ObjIsBox(pNet->pDriver) ) + { + // do not reduce the net if it is driven by a multi-output box + if ( Ntl_ObjFanoutNum(pNet->pDriver) > 1 ) + continue; + // do not reduce the net if it has no-merge attribute + if ( pNet->pDriver->pImplem->attrNoMerge ) + continue; + // do not reduce the net if the replacement net has no-merge attribute + if ( pNetRepr != NULL && pNetRepr->pDriver->pImplem->attrNoMerge ) + continue; + } if ( pNetRepr == NULL ) { // this is the constant node -- cgit v1.2.3