Commit 62e5ff90 by Alan Mishchenko

Bug fix in 'satclp'.

parent 78951b4c
...@@ -346,9 +346,14 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f ...@@ -346,9 +346,14 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f
ProgressBar * pProgress; ProgressBar * pProgress;
Abc_Ntk_t * pNtkNew; Abc_Ntk_t * pNtkNew;
Abc_Obj_t * pNode, * pDriver, * pNodeNew; Abc_Obj_t * pNode, * pDriver, * pNodeNew;
Vec_Ptr_t * vDriverCopy;
int i; int i;
// start the new network // start the new network
pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP ); 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 // process the POs
pProgress = Extra_ProgressBarStart( stdout, Abc_NtkCoNum(pNtk) ); pProgress = Extra_ProgressBarStart( stdout, Abc_NtkCoNum(pNtk) );
Abc_NtkForEachCo( pNtk, pNode, i ) Abc_NtkForEachCo( pNtk, pNode, i )
...@@ -357,7 +362,7 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f ...@@ -357,7 +362,7 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f
pDriver = Abc_ObjFanin0(pNode); pDriver = Abc_ObjFanin0(pNode);
if ( Abc_ObjIsCi(pDriver) && !strcmp(Abc_ObjName(pNode), Abc_ObjName(pDriver)) ) 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; continue;
} }
/* /*
...@@ -385,6 +390,7 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f ...@@ -385,6 +390,7 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int f
} }
Abc_ObjAddFanin( pNode->pCopy, pNodeNew ); Abc_ObjAddFanin( pNode->pCopy, pNodeNew );
} }
Vec_PtrFree( vDriverCopy );
Extra_ProgressBarStop( pProgress ); Extra_ProgressBarStop( pProgress );
return pNtkNew; return pNtkNew;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment