diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-12-04 00:02:21 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-12-04 00:02:21 -0800 |
commit | ecdcfbba5c683056340f444b856b5a3bae24f832 (patch) | |
tree | fe043eb05d2f41c34d4a6eb1094d2fd89ca9cb58 /src/aig/saig | |
parent | 681483c9040dca151e2405949a8bf3c921d34175 (diff) | |
download | abc-ecdcfbba5c683056340f444b856b5a3bae24f832.tar.gz abc-ecdcfbba5c683056340f444b856b5a3bae24f832.tar.bz2 abc-ecdcfbba5c683056340f444b856b5a3bae24f832.zip |
Making 'fold' and 'unfold' skip constant POs (fixed).
Diffstat (limited to 'src/aig/saig')
-rw-r--r-- | src/aig/saig/saigConstr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/aig/saig/saigConstr.c b/src/aig/saig/saigConstr.c index f8782e5f..3045843d 100644 --- a/src/aig/saig/saigConstr.c +++ b/src/aig/saig/saigConstr.c @@ -283,7 +283,7 @@ Aig_Man_t * Saig_ManDupUnfoldConstrs( Aig_Man_t * pAig ) vConsAll = Vec_PtrAlloc( Saig_ManPoNum(pAig) ); Saig_ManForEachPo( pAig, pObj, i ) { - if ( Aig_ObjFanin0(pObj) == Aig_ManConst1(pAig) ) + if ( Aig_ObjChild0(pObj) == Aig_ManConst0(pAig) ) continue; RetValue = Saig_ManDetectConstr( pAig, i, &vOuts, &vCons ); if ( RetValue == 0 ) @@ -394,9 +394,10 @@ Aig_Man_t * Saig_ManDupFoldConstrs( Aig_Man_t * pAig, Vec_Int_t * vConstrs ) // create primary output Saig_ManForEachPo( pAig, pObj, i ) { - if ( Aig_ObjFanin0(pObj) == Aig_ManConst1(pAig) ) - continue; - pMiter = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_Not(pFlopIn) ); + if ( Aig_ObjChild0(pObj) == Aig_ManConst0(pAig) ) // the output is a constant 0 + pMiter = Aig_ObjChild0Copy(pObj); + else + pMiter = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_Not(pFlopIn) ); Aig_ObjCreateCo( pAigNew, pMiter ); } |