21#ifndef ABC__opt__lpk__lpkInt_h
22#define ABC__opt__lpk__lpkInt_h
47#define LPK_SIZE_MAX 100
48#define LPK_CUTS_MAX 10000
178static inline int Lpk_LutNumVars(
int nLutsLim,
int nLutK ) {
return nLutsLim * (nLutK - 1) + 1; }
179static inline int Lpk_LutNumLuts(
int nVarsMax,
int nLutK ) {
return (nVarsMax - 1) / (nLutK - 1) + (
int)((nVarsMax - 1) % (nLutK - 1) > 0); }
180static inline unsigned * Lpk_FunTruth(
Lpk_Fun_t *
p,
int Num ) {
assert( Num < 3 );
return p->pTruth + Kit_TruthWordNum(
p->nVars) * Num; }
190#define Lpk_CutForEachLeaf( pNtk, pCut, pObj, i ) \
191 for ( i = 0; (i < (int)(pCut)->nLeaves) && (((pObj) = Abc_NtkObj(pNtk, (pCut)->pLeaves[i])), 1); i++ )
192#define Lpk_CutForEachNode( pNtk, pCut, pObj, i ) \
193 for ( i = 0; (i < (int)(pCut)->nNodes) && (((pObj) = Abc_NtkObj(pNtk, (pCut)->pNodes[i])), 1); i++ )
194#define Lpk_CutForEachNodeReverse( pNtk, pCut, pObj, i ) \
195 for ( i = (int)(pCut)->nNodes - 1; (i >= 0) && (((pObj) = Abc_NtkObj(pNtk, (pCut)->pNodes[i])), 1); i-- )
196#define Lpk_SuppForEachVar( Supp, Var )\
197 for ( Var = 0; Var < 16; Var++ )\
198 if ( !(Supp & (1<<Var)) ) {} else
struct Abc_Obj_t_ Abc_Obj_t
struct Abc_Ntk_t_ Abc_Ntk_t
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
struct If_Man_t_ If_Man_t
BASIC TYPES ///.
struct If_Obj_t_ If_Obj_t
struct Kit_DsdNtk_t_ Kit_DsdNtk_t
struct Kit_DsdMan_t_ Kit_DsdMan_t
Lpk_Res_t * Lpk_MuxAnalize(Lpk_Man_t *pMan, Lpk_Fun_t *p)
DECLARATIONS ///.
Lpk_Res_t * Lpk_DsdAnalize(Lpk_Man_t *pMan, Lpk_Fun_t *p, int nShared)
int Lpk_SuppToVars(unsigned uBoundSet, char *pVars)
Lpk_Man_t * Lpk_ManStart(Lpk_Par_t *pPars)
DECLARATIONS ///.
#define LPK_SIZE_MAX
INCLUDES ///.
If_Obj_t * Lpk_MapPrime(Lpk_Man_t *p, unsigned *pTruth, int nVars, If_Obj_t **ppLeaves)
Lpk_Fun_t * Lpk_MuxSplit(Lpk_Man_t *pMan, Lpk_Fun_t *p, int Var, int Pol)
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_MapTreeMux_rec(Lpk_Man_t *p, unsigned *pTruth, int nVars, If_Obj_t **ppLeaves)
void Lpk_FunFree(Lpk_Fun_t *p)
Lpk_Fun_t * Lpk_FunDup(Lpk_Fun_t *p, unsigned *pTruth)
int Lpk_SuppDelay(unsigned uSupp, int *pDelays)
unsigned Lpk_MapSuppRedDecSelect(Lpk_Man_t *p, unsigned *pTruth, int nVars, int *piVar, int *piVarReused)
Lpk_Fun_t * Lpk_FunAlloc(int nVars)
DECLARATIONS ///.
If_Obj_t * Lpk_MapSuppRedDec_rec(Lpk_Man_t *p, unsigned *pTruth, int nVars, If_Obj_t **ppLeaves)
int Lpk_NodeCuts(Lpk_Man_t *p)
struct Lpk_Fun_t_ Lpk_Fun_t
struct Lpk_Man_t_ Lpk_Man_t
int Lpk_FunSuppMinimize(Lpk_Fun_t *p)
void Lpk_ManStop(Lpk_Man_t *p)
unsigned * Lpk_CutTruth(Lpk_Man_t *p, Lpk_Cut_t *pCut, int fInv)
void Lpk_FunComputeCofSupps(Lpk_Fun_t *p)
If_Obj_t * Lpk_MapTree_rec(Lpk_Man_t *p, Kit_DsdNtk_t *pNtk, If_Obj_t **ppLeaves, int iLit, If_Obj_t *pResult)
struct Lpk_Res_t_ Lpk_Res_t
Lpk_Fun_t * Lpk_FunCreate(Abc_Ntk_t *pNtk, Vec_Ptr_t *vLeaves, unsigned *pTruth, int nLutK, int AreaLim, int DelayLim)
If_Obj_t * Lpk_MapTreeMulti(Lpk_Man_t *p, unsigned *pTruth, int nLeaves, If_Obj_t **ppLeaves)
Lpk_Fun_t * Lpk_DsdSplit(Lpk_Man_t *pMan, Lpk_Fun_t *p, char *pCofVars, int nCofVars, unsigned uBoundSet)
struct Lpk_Cut_t_ Lpk_Cut_t
typedefABC_NAMESPACE_HEADER_START struct Lpk_Par_t_ Lpk_Par_t
INCLUDES ///.
int pLeaves[LPK_SIZE_MAX]
unsigned * ppTruths[5][16]
Lpk_Cut_t pCuts[LPK_CUTS_MAX]
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.