Go to the source code of this file.
|
ABC_NAMESPACE_IMPL_START void | Kit_SopCreate (Kit_Sop_t *cResult, Vec_Int_t *vInput, int nVars, Vec_Int_t *vMemory) |
| DECLARATIONS ///. More...
|
|
void | Kit_SopCreateInverse (Kit_Sop_t *cResult, Vec_Int_t *vInput, int nLits, Vec_Int_t *vMemory) |
|
void | Kit_SopDup (Kit_Sop_t *cResult, Kit_Sop_t *cSop, Vec_Int_t *vMemory) |
|
void | Kit_SopDivideByLiteralQuo (Kit_Sop_t *cSop, int iLit) |
|
void | Kit_SopDivideByCube (Kit_Sop_t *cSop, Kit_Sop_t *cDiv, Kit_Sop_t *vQuo, Kit_Sop_t *vRem, Vec_Int_t *vMemory) |
|
void | Kit_SopDivideInternal (Kit_Sop_t *cSop, Kit_Sop_t *cDiv, Kit_Sop_t *vQuo, Kit_Sop_t *vRem, Vec_Int_t *vMemory) |
|
static unsigned | Kit_SopCommonCube (Kit_Sop_t *cSop) |
|
void | Kit_SopMakeCubeFree (Kit_Sop_t *cSop) |
|
int | Kit_SopIsCubeFree (Kit_Sop_t *cSop) |
|
void | Kit_SopCommonCubeCover (Kit_Sop_t *cResult, Kit_Sop_t *cSop, Vec_Int_t *vMemory) |
|
int | Kit_SopAnyLiteral (Kit_Sop_t *cSop, int nLits) |
|
int | Kit_SopWorstLiteral (Kit_Sop_t *cSop, int nLits) |
|
int | Kit_SopBestLiteral (Kit_Sop_t *cSop, int nLits, unsigned uMask) |
|
void | Kit_SopDivisorZeroKernel_rec (Kit_Sop_t *cSop, int nLits) |
|
int | Kit_SopDivisor (Kit_Sop_t *cResult, Kit_Sop_t *cSop, int nLits, Vec_Int_t *vMemory) |
|
void | Kit_SopBestLiteralCover (Kit_Sop_t *cResult, Kit_Sop_t *cSop, unsigned uCube, int nLits, Vec_Int_t *vMemory) |
|
int Kit_SopAnyLiteral |
( |
Kit_Sop_t * |
cSop, |
|
|
int |
nLits |
|
) |
| |
Function*************************************************************
Synopsis [Find any literal that occurs more than once.]
Description []
SideEffects []
SeeAlso []
Definition at line 370 of file kitSop.c.
375 for ( i = 0; i < nLits; i++ )
static int Kit_CubeHasLit(unsigned uCube, int i)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
int Kit_SopBestLiteral |
( |
Kit_Sop_t * |
cSop, |
|
|
int |
nLits, |
|
|
unsigned |
uMask |
|
) |
| |
Function*************************************************************
Synopsis [Find the least often occurring literal.]
Description [Find the least often occurring literal among those that occur more than once.]
SideEffects []
SeeAlso []
Definition at line 454 of file kitSop.c.
457 int i, k, iMax, nLitsMax, nLitsCur;
463 for ( i = 0; i < nLits; i++ )
478 if ( nLitsMax < nLitsCur )
486 if ( nLitsMax <= nLitsCur )
static int Kit_CubeHasLit(unsigned uCube, int i)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
Function*************************************************************
Synopsis [Create the one-literal cover with the best literal from cSop.]
Description []
SideEffects []
SeeAlso []
Definition at line 560 of file kitSop.c.
int Kit_SopBestLiteral(Kit_Sop_t *cSop, int nLits, unsigned uMask)
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
static unsigned Kit_CubeSetLit(unsigned uCube, int i)
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
static unsigned Kit_SopCommonCube |
( |
Kit_Sop_t * |
cSop | ) |
|
|
inlinestatic |
Function*************************************************************
Synopsis [Returns the common cube.]
Description []
SideEffects []
SeeAlso []
Definition at line 290 of file kitSop.c.
292 unsigned uMask, uCube;
294 uMask = ~(unsigned)0;
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
Function*************************************************************
Synopsis [Creates SOP composes of the common cube of the given SOP.]
Description []
SideEffects []
SeeAlso []
Definition at line 350 of file kitSop.c.
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
static unsigned Kit_SopCommonCube(Kit_Sop_t *cSop)
static int Kit_SopCubeNum(Kit_Sop_t *cSop)
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
DECLARATIONS ///.
CFile****************************************************************
FileName [kitSop.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [Procedures involving SOPs.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
- Id:
- kitSop.c,v 1.00 2006/12/06 00:00:00 alanmi Exp
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Creates SOP from the cube array.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file kitSop.c.
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
static int Vec_IntSize(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
Function*************************************************************
Synopsis [Creates SOP from the cube array.]
Description []
SideEffects []
SeeAlso []
Definition at line 68 of file kitSop.c.
70 unsigned uCube, uMask = 0;
77 for ( i = 0; i < nCubes; i++ )
80 uMask = ((uCube | (uCube >> 1)) & 0x55555555);
81 uMask |= (uMask << 1);
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Vec_IntSize(Vec_Int_t *p)
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
Function*************************************************************
Synopsis [Divides cover by one cube.]
Description []
SideEffects []
SeeAlso []
Definition at line 145 of file kitSop.c.
147 unsigned uCube, uDiv;
static unsigned Kit_SopCube(Kit_Sop_t *cSop, int i)
static int Kit_CubeContains(unsigned uLarge, unsigned uSmall)
static unsigned Kit_CubeSharp(unsigned uCube, unsigned uMask)
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
static int Kit_SopCubeNum(Kit_Sop_t *cSop)
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
void Kit_SopDivideByLiteralQuo |
( |
Kit_Sop_t * |
cSop, |
|
|
int |
iLit |
|
) |
| |
Function*************************************************************
Synopsis [Derives the quotient of division by literal.]
Description [Reduces the cover to be equal to the result of division of the given cover by the literal.]
SideEffects []
SeeAlso []
Definition at line 121 of file kitSop.c.
static int Kit_CubeHasLit(unsigned uCube, int i)
static unsigned Kit_CubeRemLit(unsigned uCube, int i)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
static void Kit_SopWriteCube(Kit_Sop_t *cSop, unsigned uCube, int i)
static void Kit_SopShrink(Kit_Sop_t *cSop, int nCubesNew)
Function*************************************************************
Synopsis [Divides cover by one cube.]
Description []
SideEffects []
SeeAlso []
Definition at line 178 of file kitSop.c.
180 unsigned uCube, uDiv;
182 unsigned uDiv2, uQuo;
183 int i, i2, k, k2, nCubesRem;
static int Kit_CubeContains(unsigned uLarge, unsigned uSmall)
static unsigned Kit_CubeSharp(unsigned uCube, unsigned uMask)
static int Kit_CubeIsMarked(unsigned uCube)
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
static unsigned Kit_CubeMark(unsigned uCube)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
static void Kit_SopWriteCube(Kit_Sop_t *cSop, unsigned uCube, int i)
void Kit_SopDivideByCube(Kit_Sop_t *cSop, Kit_Sop_t *cDiv, Kit_Sop_t *vQuo, Kit_Sop_t *vRem, Vec_Int_t *vMemory)
static unsigned Kit_CubeUnmark(unsigned uCube)
static int Kit_SopCubeNum(Kit_Sop_t *cSop)
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
Function*************************************************************
Synopsis [Computes the quick divisor of the cover.]
Description [Returns 0, if there is no divisor other than trivial.]
SideEffects []
SeeAlso []
Definition at line 534 of file kitSop.c.
void Kit_SopDup(Kit_Sop_t *cResult, Kit_Sop_t *cSop, Vec_Int_t *vMemory)
int Kit_SopAnyLiteral(Kit_Sop_t *cSop, int nLits)
static int Kit_SopCubeNum(Kit_Sop_t *cSop)
void Kit_SopDivisorZeroKernel_rec(Kit_Sop_t *cSop, int nLits)
void Kit_SopDivisorZeroKernel_rec |
( |
Kit_Sop_t * |
cSop, |
|
|
int |
nLits |
|
) |
| |
Function*************************************************************
Synopsis [Computes a level-zero kernel.]
Description [Modifies the cover to contain one level-zero kernel.]
SideEffects []
SeeAlso []
Definition at line 509 of file kitSop.c.
void Kit_SopDivideByLiteralQuo(Kit_Sop_t *cSop, int iLit)
void Kit_SopMakeCubeFree(Kit_Sop_t *cSop)
int Kit_SopWorstLiteral(Kit_Sop_t *cSop, int nLits)
void Kit_SopDivisorZeroKernel_rec(Kit_Sop_t *cSop, int nLits)
Function*************************************************************
Synopsis [Duplicates SOP.]
Description []
SideEffects []
SeeAlso []
Definition at line 97 of file kitSop.c.
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
static int Kit_SopCubeNum(Kit_Sop_t *cSop)
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
Function*************************************************************
Synopsis [Checks if the cover is cube-free.]
Description []
SideEffects []
SeeAlso []
Definition at line 334 of file kitSop.c.
static unsigned Kit_SopCommonCube(Kit_Sop_t *cSop)
Function*************************************************************
Synopsis [Makes the cover cube-free.]
Description []
SideEffects []
SeeAlso []
Definition at line 311 of file kitSop.c.
313 unsigned uMask, uCube;
static unsigned Kit_CubeSharp(unsigned uCube, unsigned uMask)
static unsigned Kit_SopCommonCube(Kit_Sop_t *cSop)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.
static void Kit_SopWriteCube(Kit_Sop_t *cSop, unsigned uCube, int i)
int Kit_SopWorstLiteral |
( |
Kit_Sop_t * |
cSop, |
|
|
int |
nLits |
|
) |
| |
Function*************************************************************
Synopsis [Find the least often occurring literal.]
Description [Find the least often occurring literal among those that occur more than once.]
SideEffects []
SeeAlso []
Definition at line 400 of file kitSop.c.
403 int i, k, iMin, nLitsMin, nLitsCur;
409 for ( i = 0; i < nLits; i++ )
422 if ( nLitsMin > nLitsCur )
430 if ( nLitsMin >= nLitsCur )
437 if ( nLitsMin < 1000000 )
static int Kit_CubeHasLit(unsigned uCube, int i)
#define Kit_SopForEachCube(cSop, uCube, i)
ITERATORS ///.