ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mvcDivisor.c
Go to the documentation of this file.
1
18
19#include "mvc.h"
20
22
23
27
28static void Mvc_CoverDivisorZeroKernel( Mvc_Cover_t * pCover );
29
33
47{
48 Mvc_Cover_t * pKernel;
49 if ( Mvc_CoverReadCubeNum(pCover) <= 1 )
50 return NULL;
51 // allocate the literal array and count literals
52 if ( Mvc_CoverAnyLiteral( pCover, NULL ) == -1 )
53 return NULL;
54 // duplicate the cover
55 pKernel = Mvc_CoverDup(pCover);
56 // perform the kerneling
57 Mvc_CoverDivisorZeroKernel( pKernel );
58 assert( Mvc_CoverReadCubeNum(pKernel) );
59 return pKernel;
60}
61
73void Mvc_CoverDivisorZeroKernel( Mvc_Cover_t * pCover )
74{
75 int iLit;
76 // find any literal that occurs at least two times
77// iLit = Mvc_CoverAnyLiteral( pCover, NULL );
78 iLit = Mvc_CoverWorstLiteral( pCover, NULL );
79// iLit = Mvc_CoverBestLiteral( pCover, NULL );
80 if ( iLit == -1 )
81 return;
82 // derive the cube-free quotient
83 Mvc_CoverDivideByLiteralQuo( pCover, iLit ); // the same cover
84 Mvc_CoverMakeCubeFree( pCover ); // the same cover
85 // call recursively
86 Mvc_CoverDivisorZeroKernel( pCover ); // the same cover
87}
88
92
93
95
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Mvc_Cover_t * Mvc_CoverDivisor(Mvc_Cover_t *pCover)
FUNCTION DEFINITIONS ///.
Definition mvcDivisor.c:46
Mvc_Cover_t * Mvc_CoverDup(Mvc_Cover_t *pCover)
Definition mvcCover.c:112
int Mvc_CoverWorstLiteral(Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
Definition mvcLits.c:162
void Mvc_CoverMakeCubeFree(Mvc_Cover_t *pCover)
Definition mvcUtils.c:198
int Mvc_CoverAnyLiteral(Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
DECLARATIONS ///.
Definition mvcLits.c:43
struct MvcCoverStruct Mvc_Cover_t
Definition mvc.h:58
int Mvc_CoverReadCubeNum(Mvc_Cover_t *pCover)
Definition mvcApi.c:45
void Mvc_CoverDivideByLiteralQuo(Mvc_Cover_t *pCover, int iLit)
Definition mvcDivide.c:374
#define assert(ex)
Definition util_old.h:213