49 if ( pCover0 == NULL || pCover1 == NULL )
57 if ( Min_CubesDisjoint( pCube0, pCube1 ) )
59 pCube = Min_CubesProduct(
p, pCube0, pCube1 );
65 assert(
p->nCubes == Min_CoverCountCubes(pCover) );
84 if ( pCover0 == NULL || pCover1 == NULL )
91 pCube = Min_CubeDup(
p, pThis );
96 pCube = Min_CubeDup(
p, pThis );
101 assert(
p->nCubes == Min_CoverCountCubes(pCover) );
121 int i, nCubes, fCompl0, fCompl1;
134 fCompl0 = Abc_ObjFaninC0(pObj);
135 fCompl1 = Abc_ObjFaninC1(pObj);
137 pCov0[0] = (
Min_Cube_t *)Abc_ObjFanin0(pObj)->pCopy;
139 pCov1[0] = (
Min_Cube_t *)Abc_ObjFanin1(pObj)->pCopy;
149 nCubes = ABC_MIN( Min_CoverCountCubes(pCoverN), Min_CoverCountCubes(pCoverP) );
204 assert( Abc_NtkIsStrash(pNtk) );
210 if ( !Abc_ObjIsNode(Abc_ObjFanin0(pObj)) )
219 printf(
"%20s : Cone = %5d. Supp = %5d. ",
225 printf(
"Cubes = %5d. ", nCubes );
231 Vec_PtrFree( vNodes );
232 Vec_PtrFree( vSupp );
257 else if ( pCov0 && pCov0->
nLits == 0 )
258 pCover0 = pCov0->
pNext;
260 pCover0 =
p->pOne0,
p->pOne0->pNext = pCov0;
265 else if ( pCov1 && pCov1->
nLits == 0 )
266 pCover1 = pCov1->
pNext;
268 pCover1 =
p->pOne1,
p->pOne1->pNext = pCov1;
270 if ( pCover0 == NULL || pCover1 == NULL )
279 if ( Min_CubesDisjoint( pCube0, pCube1 ) )
281 pCube = Min_CubesProduct(
p, pCube0, pCube1 );
286 if (
p->nCubes > 10 )
294 assert(
p->nCubes == Min_CoverCountCubes(pCover) );
328 Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) );
330 if (
p->nCubes > 3000 )
335 if ( Abc_ObjFaninC0(pRoot) )
337 if ( pCover && pCover->
nLits == 0 )
340 pCover = pCover->
pNext;
341 Min_CubeRecycle(
p, pCube );
346 pCube = Min_CubeAlloc(
p );
347 pCube->
pNext = pCover;
384 assert( Abc_NtkIsStrash(pNtk) );
389 if ( !Abc_ObjIsNode(Abc_ObjFanin0(pObj)) )
398 printf(
"%20s : Cone = %5d. Supp = %5d. ",
404 printf(
"Cubes = %5d. ", nCubes );
410 Vec_PtrFree( vNodes );
411 Vec_PtrFree( vSupp );
struct Abc_Obj_t_ Abc_Obj_t
#define Abc_NtkForEachCo(pNtk, pCo, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_DLL void Abc_NtkCleanNext(Abc_Ntk_t *pNtk)
ABC_DLL Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Min_Cube_t * Min_CoverCollect(Min_Man_t *p, int nSuppSize)
void Min_ManFree(Min_Man_t *p)
struct Min_Cube_t_ Min_Cube_t
#define Min_CoverForEachCube(pCover, pCube)
Min_Man_t * Min_ManAlloc(int nVars)
DECLARATIONS ///.
void Min_ManClean(Min_Man_t *p, int nSupp)
void Min_EsopAddCube(Min_Man_t *p, Min_Cube_t *pCube)
void Min_SopMinimize(Min_Man_t *p)
FUNCTION DEFINITIONS ///.
void Min_SopAddCube(Min_Man_t *p, Min_Cube_t *pCube)
void Min_EsopMinimize(Min_Man_t *p)
FUNCTION DEFINITIONS ///.
ABC_NAMESPACE_IMPL_START Min_Cube_t * Abc_NodeDeriveCoverPro(Min_Man_t *p, Min_Cube_t *pCover0, Min_Cube_t *pCover1)
DECLARATIONS ///.
int Abc_NodeDeriveSops(Min_Man_t *p, Abc_Obj_t *pRoot, Vec_Ptr_t *vSupp, Vec_Ptr_t *vNodes)
Min_Cube_t * Abc_NodeDeriveCoverSum(Min_Man_t *p, Min_Cube_t *pCover0, Min_Cube_t *pCover1)
Min_Cube_t * Abc_NodeDeriveCover(Min_Man_t *p, Min_Cube_t *pCov0, Min_Cube_t *pCov1, int fComp0, int fComp1)
int Abc_NodeDeriveEsops(Min_Man_t *p, Abc_Obj_t *pRoot, Vec_Ptr_t *vSupp, Vec_Ptr_t *vNodes)
void Abc_NtkTestEsop(Abc_Ntk_t *pNtk)
void Abc_NtkTestSop(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_IMPL_START struct Min_Man_t_ Min_Man_t
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.