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 | |
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')
-rw-r--r-- | src/aig/gia/giaDup.c | 15 | ||||
-rw-r--r-- | src/base/abc/abcFunc.c | 5 | ||||
-rw-r--r-- | src/base/wlc/wlcReadVer.c | 2 |
3 files changed, 16 insertions, 6 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; diff --git a/src/base/abc/abcFunc.c b/src/base/abc/abcFunc.c index 94706504..b44a272a 100644 --- a/src/base/abc/abcFunc.c +++ b/src/base/abc/abcFunc.c @@ -810,7 +810,7 @@ int Abc_NtkSopToAig( Abc_Ntk_t * pNtk ) { Abc_Obj_t * pNode; Hop_Man_t * pMan; - int i; + int i, Max; assert( Abc_NtkHasSop(pNtk) ); @@ -819,7 +819,8 @@ int Abc_NtkSopToAig( Abc_Ntk_t * pNtk ) // start the functionality manager pMan = Hop_ManStart(); - Hop_IthVar( pMan, Abc_NtkGetFaninMax(pNtk)-1 ); + Max = Abc_NtkGetFaninMax(pNtk); + if ( Max ) Hop_IthVar( pMan, Max-1 ); // convert each node from SOP to BDD Abc_NtkForEachNode( pNtk, pNode, i ) diff --git a/src/base/wlc/wlcReadVer.c b/src/base/wlc/wlcReadVer.c index 824cf80b..a44c4b6c 100644 --- a/src/base/wlc/wlcReadVer.c +++ b/src/base/wlc/wlcReadVer.c @@ -1265,10 +1265,10 @@ Wlc_Ntk_t * Wlc_ReadVer( char * pFileName ) // derive topological order pNtk = Wlc_NtkDupDfs( p->pNtk ); Wlc_NtkTransferNames( pNtk, p->pNtk ); + pNtk->pSpec = Abc_UtilStrsav( pFileName ); finish: Wlc_PrsPrintErrorMessage( p ); Wlc_PrsStop( p ); - pNtk->pSpec = Abc_UtilStrsav( pFileName ); return pNtk; } |