21 #ifndef ABC__opt__lpk__lpkInt_h
22 #define ABC__opt__lpk__lpkInt_h
47 #define LPK_SIZE_MAX 24 // the largest size of the function
48 #define LPK_CUTS_MAX 512 // the largest number of cuts considered
177 static inline int Lpk_LutNumVars(
int nLutsLim,
int nLutK ) {
return nLutsLim * (nLutK - 1) + 1; }
178 static inline int Lpk_LutNumLuts(
int nVarsMax,
int nLutK ) {
return (nVarsMax - 1) / (nLutK - 1) + (
int)((nVarsMax - 1) % (nLutK - 1) > 0); }
189 #define Lpk_CutForEachLeaf( pNtk, pCut, pObj, i ) \
190 for ( i = 0; (i < (int)(pCut)->nLeaves) && (((pObj) = Abc_NtkObj(pNtk, (pCut)->pLeaves[i])), 1); i++ )
191 #define Lpk_CutForEachNode( pNtk, pCut, pObj, i ) \
192 for ( i = 0; (i < (int)(pCut)->nNodes) && (((pObj) = Abc_NtkObj(pNtk, (pCut)->pNodes[i])), 1); i++ )
193 #define Lpk_CutForEachNodeReverse( pNtk, pCut, pObj, i ) \
194 for ( i = (int)(pCut)->nNodes - 1; (i >= 0) && (((pObj) = Abc_NtkObj(pNtk, (pCut)->pNodes[i])), 1); i-- )
195 #define Lpk_SuppForEachVar( Supp, Var )\
196 for ( Var = 0; Var < 16; Var++ )\
197 if ( !(Supp & (1<<Var)) ) {} else
void Lpk_FunFree(Lpk_Fun_t *p)
int pLeaves[LPK_SIZE_MAX]
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Kit_TruthWordNum(int nVars)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
If_Obj_t * Lpk_MapTree_rec(Lpk_Man_t *p, Kit_DsdNtk_t *pNtk, If_Obj_t **ppLeaves, int iLit, If_Obj_t *pResult)
Lpk_Fun_t * Lpk_FunCreate(Abc_Ntk_t *pNtk, Vec_Ptr_t *vLeaves, unsigned *pTruth, int nLutK, int AreaLim, int DelayLim)
int Lpk_NodeCuts(Lpk_Man_t *p)
Lpk_Fun_t * Lpk_FunDup(Lpk_Fun_t *p, unsigned *pTruth)
If_Obj_t * Lpk_MapPrime(Lpk_Man_t *p, unsigned *pTruth, int nVars, If_Obj_t **ppLeaves)
Lpk_Man_t * Lpk_ManStart(Lpk_Par_t *pPars)
DECLARATIONS ///.
Lpk_Fun_t * Lpk_DsdSplit(Lpk_Man_t *pMan, Lpk_Fun_t *p, char *pCofVars, int nCofVars, unsigned uBoundSet)
void Lpk_FunComputeCofSupps(Lpk_Fun_t *p)
static unsigned * Lpk_FunTruth(Lpk_Fun_t *p, int Num)
Lpk_Res_t * Lpk_MuxAnalize(Lpk_Man_t *pMan, Lpk_Fun_t *p)
DECLARATIONS ///.
Lpk_Cut_t pCuts[LPK_CUTS_MAX]
int Lpk_SuppDelay(unsigned uSupp, char *pDelays)
static int Lpk_LutNumVars(int nLutsLim, int nLutK)
Abc_Obj_t * Lpk_Decompose(Lpk_Man_t *pMan, Abc_Ntk_t *pNtk, Vec_Ptr_t *vLeaves, unsigned *pTruth, unsigned *puSupps, int nLutK, int AreaLim, int DelayLim)
FUNCTION DECLARATIONS ///.
If_Obj_t * Lpk_MapTreeMulti(Lpk_Man_t *p, unsigned *pTruth, int nLeaves, If_Obj_t **ppLeaves)
If_Obj_t * Lpk_MapTreeMux_rec(Lpk_Man_t *p, unsigned *pTruth, int nVars, If_Obj_t **ppLeaves)
unsigned * Lpk_CutTruth(Lpk_Man_t *p, Lpk_Cut_t *pCut, int fInv)
unsigned * ppTruths[5][16]
int Lpk_FunSuppMinimize(Lpk_Fun_t *p)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Lpk_Res_t * Lpk_DsdAnalize(Lpk_Man_t *pMan, Lpk_Fun_t *p, int nShared)
#define ABC_NAMESPACE_HEADER_END
void Lpk_ManStop(Lpk_Man_t *p)
Lpk_Fun_t * Lpk_FunAlloc(int nVars)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Lpk_Par_t_ Lpk_Par_t
INCLUDES ///.
int Lpk_SuppToVars(unsigned uBoundSet, char *pVars)
static int Lpk_LutNumLuts(int nVarsMax, int nLutK)
unsigned Lpk_MapSuppRedDecSelect(Lpk_Man_t *p, unsigned *pTruth, int nVars, int *piVar, int *piVarReused)
Lpk_Fun_t * Lpk_MuxSplit(Lpk_Man_t *pMan, Lpk_Fun_t *p, int Var, int Pol)
#define LPK_SIZE_MAX
INCLUDES ///.
If_Obj_t * Lpk_MapSuppRedDec_rec(Lpk_Man_t *p, unsigned *pTruth, int nVars, If_Obj_t **ppLeaves)