31static int Abc_NtkFxuCheck(
Abc_Ntk_t * pNtk );
55 p->nSingleMax = 20000;
57 p->nNodesExt =1000000;
85 assert( Abc_NtkIsLogic(pNtk) );
88 if ( Abc_NtkIsSopLogic(pNtk) )
96 printf(
"Abc_NtkFastExtract(): Converting to SOPs has failed.\n" );
100 if ( !Abc_NtkFxuCheck(pNtk) )
102 printf(
"Abc_NtkFastExtract: Nodes have duplicated or complemented fanins. FXU is not performed.\n" );
108 Abc_NtkFxuCollectInfo( pNtk,
p );
113 Abc_NtkFxuReconstruct( pNtk,
p );
116 printf(
"Abc_NtkFastExtract: The network check has failed.\n" );
120 printf(
"Warning: The network has not been changed by \"fx\".\n" );
144 if ( i < 2 && Abc_ObjFaninC(pNode, i) )
150 if ( pFanin1 == pFanin2 )
175 p->vSops = Vec_PtrAlloc(0);
176 p->vFanins = Vec_PtrAlloc(0);
177 p->vSopsNew = Vec_PtrAlloc(0);
178 p->vFaninsNew = Vec_PtrAlloc(0);
179 Vec_PtrFill(
p->vSops, Abc_NtkObjNumMax(pNtk), NULL );
180 Vec_PtrFill(
p->vFanins, Abc_NtkObjNumMax(pNtk), NULL );
181 Vec_PtrFill(
p->vSopsNew, Abc_NtkObjNumMax(pNtk) +
p->nNodesExt, NULL );
182 Vec_PtrFill(
p->vFaninsNew, Abc_NtkObjNumMax(pNtk) +
p->nNodesExt, NULL );
190 p->vSops->pArray[i] = pNode->
pData;
191 p->vFanins->pArray[i] = &pNode->
vFanins;
193 p->nNodesOld = Abc_NtkObjNumMax(pNtk);
212 for ( i = 0; i <
p->vFaninsNew->nSize; i++ )
213 if (
p->vFaninsNew->pArray[i] )
214 Vec_IntFree( (
Vec_Int_t *)
p->vFaninsNew->pArray[i] );
216 if (
p->vSops ) Vec_PtrFree(
p->vSops );
217 if (
p->vSopsNew ) Vec_PtrFree(
p->vSopsNew );
218 if (
p->vFanins ) Vec_PtrFree(
p->vFanins );
219 if (
p->vFaninsNew ) Vec_PtrFree(
p->vFaninsNew );
240 assert(
p->vFanins->nSize <
p->vFaninsNew->nSize );
242 for ( i =
p->vFanins->nSize; i < p->vFanins->nSize +
p->nNodesNew; i++ )
245 pNode = Abc_NtkCreateNode( pNtk );
249 for ( i = 0; i <
p->vFanins->nSize; i++ )
252 vFanins = (
Vec_Int_t *)
p->vFaninsNew->pArray[i];
253 if ( vFanins == NULL )
256 pNode = Abc_NtkObj( pNtk, i );
259 vFanins = (
Vec_Int_t *)
p->vFaninsNew->pArray[i];
260 for ( k = 0; k < vFanins->nSize; k++ )
262 pFanin = Abc_NtkObj( pNtk, vFanins->pArray[k] );
265 pNode->
pData =
p->vSopsNew->pArray[i];
269 for ( i =
p->vFanins->nSize; i < p->vFanins->nSize +
p->nNodesNew; i++ )
272 pNode = Abc_NtkObj( pNtk, i );
274 vFanins = (
Vec_Int_t *)
p->vFaninsNew->pArray[i];
275 for ( k = 0; k < vFanins->nSize; k++ )
277 pFanin = Abc_NtkObj( pNtk, vFanins->pArray[k] );
280 pNode->
pData =
p->vSopsNew->pArray[i];
void Abc_NtkFxuFreeInfo(Fxu_Data_t *p)
void Abc_NtkSetDefaultFxParams(Fxu_Data_t *p)
FUNCTION DEFINITIONS ///.
int Abc_NtkFastExtract(Abc_Ntk_t *pNtk, Fxu_Data_t *p)
int Fxu_FastExtract(Fxu_Data_t *pData)
FUNCTION DEFINITIONS ///.
struct Abc_Obj_t_ Abc_Obj_t
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
ABC_DLL int Abc_NtkCleanup(Abc_Ntk_t *pNtk, int fVerbose)
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL int Abc_NtkToSop(Abc_Ntk_t *pNtk, int fMode, int nCubeLimit)
ABC_DLL int Abc_SopGetVarNum(char *pSop)
ABC_DLL void Abc_ObjRemoveFanins(Abc_Obj_t *pObj)
ABC_DLL int Abc_SopGetCubeNum(char *pSop)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct FxuDataStruct Fxu_Data_t
INCLUDES ///.
struct Mem_Flex_t_ Mem_Flex_t