diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-09-26 08:57:32 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-09-26 08:57:32 -0700 |
commit | 62e5ff900eebce673440713742a471089cfe25b8 (patch) | |
tree | 6417185e0a9b60e2bf873c86e0dc1cfd7bdbb5cc | |
parent | 78951b4c6f68af1423d29f6eaf96edb24f792ac3 (diff) | |
download | abc-62e5ff900eebce673440713742a471089cfe25b8.tar.gz abc-62e5ff900eebce673440713742a471089cfe25b8.tar.bz2 abc-62e5ff900eebce673440713742a471089cfe25b8.zip |
Bug fix in 'satclp'.
-rw-r--r-- | src/base/abci/abcCollapse.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/base/abci/abcCollapse.c b/src/base/abci/abcCollapse.c index 1536fe0c..c1a93dcf 100644 --- a/src/base/abci/abcCollapse.c +++ b/src/base/abci/abcCollapse.c @@ -346,9 +346,14 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f ProgressBar * pProgress; Abc_Ntk_t * pNtkNew; Abc_Obj_t * pNode, * pDriver, * pNodeNew; + Vec_Ptr_t * vDriverCopy; int i; // start the new network pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP ); + // collect driver copies + vDriverCopy = Vec_PtrAlloc( Abc_NtkCoNum(pNtk) ); + Abc_NtkForEachCo( pNtk, pNode, i ) + Vec_PtrPush( vDriverCopy, Abc_ObjFanin0(pNode)->pCopy ); // process the POs pProgress = Extra_ProgressBarStart( stdout, Abc_NtkCoNum(pNtk) ); Abc_NtkForEachCo( pNtk, pNode, i ) @@ -357,7 +362,7 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f pDriver = Abc_ObjFanin0(pNode); if ( Abc_ObjIsCi(pDriver) && !strcmp(Abc_ObjName(pNode), Abc_ObjName(pDriver)) ) { - Abc_ObjAddFanin( pNode->pCopy, pDriver->pCopy ); + Abc_ObjAddFanin( pNode->pCopy, (Abc_Obj_t *)Vec_PtrEntry(vDriverCopy, i) ); continue; } /* @@ -385,6 +390,7 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f } Abc_ObjAddFanin( pNode->pCopy, pNodeNew ); } + Vec_PtrFree( vDriverCopy ); Extra_ProgressBarStop( pProgress ); return pNtkNew; } |