abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mvcDivisor.c File Reference
#include "mvc.h"

Go to the source code of this file.

Functions

static
ABC_NAMESPACE_IMPL_START void 
Mvc_CoverDivisorZeroKernel (Mvc_Cover_t *pCover)
 DECLARATIONS ///. More...
 
Mvc_Cover_tMvc_CoverDivisor (Mvc_Cover_t *pCover)
 FUNCTION DEFINITIONS ///. More...
 

Function Documentation

Mvc_Cover_t* Mvc_CoverDivisor ( Mvc_Cover_t pCover)

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Returns the quick divisor of the cover.]

Description [Returns NULL, if there is not divisor other than trivial.]

SideEffects []

SeeAlso []

Definition at line 46 of file mvcDivisor.c.

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 }
static ABC_NAMESPACE_IMPL_START void Mvc_CoverDivisorZeroKernel(Mvc_Cover_t *pCover)
DECLARATIONS ///.
Definition: mvcDivisor.c:73
int Mvc_CoverReadCubeNum(Mvc_Cover_t *pCover)
Definition: mvcApi.c:45
#define assert(ex)
Definition: util_old.h:213
int Mvc_CoverAnyLiteral(Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
DECLARATIONS ///.
Definition: mvcLits.c:43
Mvc_Cover_t * Mvc_CoverDup(Mvc_Cover_t *pCover)
Definition: mvcCover.c:112
void Mvc_CoverDivisorZeroKernel ( Mvc_Cover_t pCover)
static

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcDivisor.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Procedures for compute the quick divisor.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id:
mvcDivisor.c,v 1.1 2003/04/03 15:34:08 alanmi Exp

]

Function*************************************************************

Synopsis [Computes a level-zero kernel.]

Description [Modifies the cover to contain one level-zero kernel.]

SideEffects []

SeeAlso []

Definition at line 73 of file mvcDivisor.c.

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 }
static ABC_NAMESPACE_IMPL_START void Mvc_CoverDivisorZeroKernel(Mvc_Cover_t *pCover)
DECLARATIONS ///.
Definition: mvcDivisor.c:73
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
void Mvc_CoverDivideByLiteralQuo(Mvc_Cover_t *pCover, int iLit)
Definition: mvcDivide.c:374