diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2021-11-30 15:23:20 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2021-11-30 15:23:20 -0800 |
commit | dfa34cc2e4fe408f4ec6046ba9c0834fd2eaafb4 (patch) | |
tree | 88450e86f6322512eabb435d4a34f8792eaa68df | |
parent | f26ea1eaea5b51a3aec8107636c9f88eadfdcee0 (diff) | |
download | abc-dfa34cc2e4fe408f4ec6046ba9c0834fd2eaafb4.tar.gz abc-dfa34cc2e4fe408f4ec6046ba9c0834fd2eaafb4.tar.bz2 abc-dfa34cc2e4fe408f4ec6046ba9c0834fd2eaafb4.zip |
Disabling choices when they are computed incorrectly.
-rw-r--r-- | src/base/abc/abcCheck.c | 5 | ||||
-rw-r--r-- | src/base/abci/abcDar.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/base/abc/abcCheck.c b/src/base/abc/abcCheck.c index a7448530..c492b709 100644 --- a/src/base/abc/abcCheck.c +++ b/src/base/abc/abcCheck.c @@ -177,7 +177,10 @@ int Abc_NtkDoCheck( Abc_Ntk_t * pNtk ) // check the nodes if ( Abc_NtkIsStrash(pNtk) ) - Abc_AigCheck( (Abc_Aig_t *)pNtk->pManFunc ); + { + if ( !Abc_AigCheck( (Abc_Aig_t *)pNtk->pManFunc ) ) + return 0; + } else { Abc_NtkForEachNode( pNtk, pNode, i ) diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c index 483f65b9..f6818010 100644 --- a/src/base/abci/abcDar.c +++ b/src/base/abci/abcDar.c @@ -1204,7 +1204,11 @@ Abc_Ntk_t * Abc_NtkFromDarChoices( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) Aig_ManForEachCo( pMan, pObj, i ) Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), (Abc_Obj_t *)Aig_ObjChild0Copy(pObj) ); if ( !Abc_NtkCheck( pNtkNew ) ) - Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed.\n" ); + { + Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed. Returning original network.\n" ); + Abc_NtkDelete( pNtkNew ); + pNtkNew = Abc_NtkDup( pNtkOld ); + } // verify topological order if ( 0 ) |