diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-06-03 17:54:12 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-06-03 17:54:12 -0700 |
commit | 3bdce84c5bae9aedcc6e6e982d72841a5dea82e0 (patch) | |
tree | f6cc880407e674d323ce046aeb9ea82bb5ed19ca | |
parent | 31360734b70730e449f67cc60a96a533c7f5082d (diff) | |
download | abc-3bdce84c5bae9aedcc6e6e982d72841a5dea82e0.tar.gz abc-3bdce84c5bae9aedcc6e6e982d72841a5dea82e0.tar.bz2 abc-3bdce84c5bae9aedcc6e6e982d72841a5dea82e0.zip |
Bug fix in 'swappos'.
-rw-r--r-- | src/base/abc/abcNtk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/base/abc/abcNtk.c b/src/base/abc/abcNtk.c index 3ec261a8..1b59a295 100644 --- a/src/base/abc/abcNtk.c +++ b/src/base/abc/abcNtk.c @@ -1495,6 +1495,15 @@ void Abc_NtkSwapOneOutput( Abc_Ntk_t * pNtk, int iOutput ) return; pObj1 = Abc_NtkPo( pNtk, 0 ); pObj2 = Abc_NtkPo( pNtk, iOutput ); + if ( Abc_ObjFanin0(pObj1) == Abc_ObjFanin0(pObj2) ) + { + if ( Abc_ObjFaninC0(pObj1) ^ Abc_ObjFaninC0(pObj2) ) + { + Abc_ObjXorFaninC( pObj1, 0 ); + Abc_ObjXorFaninC( pObj2, 0 ); + } + return; + } pChild1Old = Abc_ObjChild0( pObj1 ); pChild2Old = Abc_ObjChild0( pObj2 ); pChild1 = Abc_ObjNotCond( pChild1Old, Abc_ObjFaninC0(pObj2) ); |