diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-07-16 07:28:20 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-07-16 07:28:20 -0700 |
commit | abdf39711f8c175840da90fd8531183c61691f68 (patch) | |
tree | 05787dea6fe366beec5c8e8b90d771963a3ee3f3 /src/aig/gia/giaDup.c | |
parent | 1343b8a80c7c59c7cc2b14490151de4e5d883734 (diff) | |
download | abc-abdf39711f8c175840da90fd8531183c61691f68.tar.gz abc-abdf39711f8c175840da90fd8531183c61691f68.tar.bz2 abc-abdf39711f8c175840da90fd8531183c61691f68.zip |
Several corner-case bugs in %read, &cec, and st.
Diffstat (limited to 'src/aig/gia/giaDup.c')
-rw-r--r-- | src/aig/gia/giaDup.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index d8a396a4..b5fd393e 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -3860,9 +3860,18 @@ Gia_Man_t * Gia_ManDemiterToDual( Gia_Man_t * p ) pObj->Value = Gia_ManAppendCi( pNew ); Gia_ManForEachObjVec( vNodes, p, pObj, i ) pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); - Gia_ManSetPhase( p ); - Gia_ManForEachObjVec( vOrder, p, pObj, i ) - Gia_ManAppendCo( pNew, Abc_LitNotCond(pObj->Value, pObj->fPhase) ); + pObj = Gia_ManCo(p, 0); + if ( Gia_ObjFanin0(pObj) == Gia_ManConst0(p) ) + { + Gia_ManAppendCo( pNew, 0 ); + Gia_ManAppendCo( pNew, Gia_ObjFaninC0(pObj) ); + } + else + { + Gia_ManSetPhase( p ); + Gia_ManForEachObjVec( vOrder, p, pObj, i ) + Gia_ManAppendCo( pNew, Abc_LitNotCond(pObj->Value, pObj->fPhase) ); + } Vec_IntFree( vNodes ); Vec_IntFree( vOrder ); return pNew; |