21 #ifndef ABC__map__mpm_Int_h
22 #define ABC__map__mpm_Int_h
50 #define MPM_CUT_MAX 32
52 #define MPM_UNIT_TIME 1
53 #define MPM_UNIT_AREA 20
54 #define MPM_UNIT_EDGE 50
55 #define MPM_UNIT_REFS 100
208 static inline void Mpm_VarsClear(
int * V2P,
int * P2V,
int nVars ) {
int i;
for ( i = 0; i < nVars; i++ ) V2P[i] = P2V[i] = i; }
209 static inline void Mpm_VarsSwap(
int * V2P,
int * P2V,
int iVar,
int jVar ) { V2P[P2V[iVar]] = jVar; V2P[P2V[jVar]] = iVar; P2V[iVar] ^= P2V[jVar]; P2V[jVar] ^= P2V[iVar]; P2V[iVar] ^= P2V[jVar]; }
212 #define Mpm_ObjForEachCut( p, pObj, hCut, pCut ) \
213 for ( hCut = Mpm_ObjCutList(p, pObj); hCut && (pCut = Mpm_CutFetch(p, hCut)); hCut = pCut->hNext )
214 #define Mpm_ObjForEachCutSafe( p, pObj, hCut, pCut, hNext ) \
215 for ( hCut = Mpm_ObjCutList(p, pObj); hCut && (pCut = Mpm_CutFetch(p, hCut)) && ((hNext = pCut->hNext), 1); hCut = hNext )
218 #define Mpm_CutForEachLeafId( pCut, iLeafId, i ) \
219 for ( i = 0; i < (int)pCut->nLeaves && ((iLeafId = Abc_Lit2Var(pCut->pLeaves[i])), 1); i++ )
220 #define Mpm_CutForEachLeafLit( pCut, iLeafLit, i ) \
221 for ( i = 0; i < (int)pCut->nLeaves && ((iLeafLit = pCut->pLeaves[i]), 1); i++ )
222 #define Mpm_CutForEachLeaf( p, pCut, pLeaf, i ) \
223 for ( i = 0; i < (int)pCut->nLeaves && (pLeaf = Mig_ManObj(p, Abc_Lit2Var(pCut->pLeaves[i]))); i++ )
word Mpm_CutTruthFromDsd(Mpm_Man_t *pMan, Mpm_Cut_t *pCut, int iDsdLit)
static int Mig_ObjMigRefDec(Mpm_Man_t *p, Mig_Obj_t *pObj)
void Mpm_CutPrint(Mpm_Cut_t *pCut)
static int Mig_ManObjNum(Mig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
static void Mpm_ObjSetEstRef(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
void Mpm_LibLutFree(Mpm_LibLut_t *pLib)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Mpm_CutLeafNum(Mpm_Cut_t *pCut)
void Mpm_ManPrepare(Mpm_Man_t *p)
void Mpm_ManPrintPerm(unsigned s)
void Mpm_ManPrintDsdStats(Mpm_Man_t *p)
int Mpm_CutComputeTruth(Mpm_Man_t *p, Mpm_Cut_t *pCut, Mpm_Cut_t *pCut0, Mpm_Cut_t *pCut1, Mpm_Cut_t *pCutC, int fCompl0, int fCompl1, int fComplC, int Type)
static int Mpm_ObjCutBest(Mpm_Man_t *p, Mig_Obj_t *pObj)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Mem_t_ Vec_Mem_t
DECLARATIONS ///.
static int Mpm_ObjCutList(Mpm_Man_t *p, Mig_Obj_t *pObj)
static void Mpm_ObjSetCutBest(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
void Mpm_ManPrecomputePerms(Mpm_Man_t *p)
static int Mig_ObjId(Mig_Obj_t *p)
word Truth0[(1<< ((MPM_VAR_MAX)-6))]
int(* pCutCmp)(Mpm_Uni_t *, Mpm_Uni_t *)
static int * Mpm_ObjCutListP(Mpm_Man_t *p, Mig_Obj_t *pObj)
Mpm_Uni_t * pCutStore[MPM_CUT_MAX+1]
static Mpm_Cut_t * Mpm_CutFetch(Mpm_Man_t *p, int h)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static void Mpm_ObjSetMapRef(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
Mig_Man_t * Mig_ManCreate(void *pGia)
FUNCTION DECLARATIONS ///.
static void Mpm_ObjSetTime(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
static int Mpm_ObjTime(Mpm_Man_t *p, Mig_Obj_t *pObj)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
Mpm_Cut_t * pCuts[3][MPM_CUT_MAX+1]
static void Mpm_ManCleanRequired(Mpm_Man_t *p)
static int Vec_IntEntry(Vec_Int_t *p, int i)
word TruthC[(1<< ((MPM_VAR_MAX)-6))]
unsigned __int64 word
DECLARATIONS ///.
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
static word * Mmr_StepEntry(Mmr_Step_t *p, int h)
word Truth[(1<< ((MPM_VAR_MAX)-6))]
Vec_Wec_t * Mpm_ManFindDsdMatches(Mpm_Man_t *p, void *pScl)
DECLARATIONS ///.
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
static int Mpm_ObjRequired(Mpm_Man_t *p, Mig_Obj_t *pObj)
void Mpm_ManStop(Mpm_Man_t *p)
int Mpm_CutComputeDsd6(Mpm_Man_t *p, Mpm_Cut_t *pCut, Mpm_Cut_t *pCut0, Mpm_Cut_t *pCut1, Mpm_Cut_t *pCutC, int fCompl0, int fCompl1, int fComplC, int Type)
void Mpm_ManPrintStats(Mpm_Man_t *p)
static word * Mpm_CutTruth(Mpm_Man_t *p, int iFunc)
#define ABC_NAMESPACE_HEADER_END
static void Mpm_ObjSetEdge(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
static void Mpm_ManCleanMapRefs(Mpm_Man_t *p)
Mpm_Man_t * Mpm_ManStart(Mig_Man_t *pMig, Mpm_Par_t *pPars)
DECLARATIONS ///.
static void Mpm_ObjSetArea(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
#define MPM_CUT_MAX
INCLUDES ///.
static int Mpm_ObjEstRef(Mpm_Man_t *p, Mig_Obj_t *pObj)
static int Mpm_ObjArea(Mpm_Man_t *p, Mig_Obj_t *pObj)
Mpm_LibLut_t * Mpm_LibLutSetSimple(int nLutSize)
DECLARATIONS ///.
static void Mpm_ObjSetRequired(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
word pSigns[3][MPM_CUT_MAX+1]
static int Mpm_ObjMapRef(Mpm_Man_t *p, Mig_Obj_t *pObj)
static int Mig_ObjMigRefNum(Mpm_Man_t *p, Mig_Obj_t *pObj)
void Mpm_ManPerform(Mpm_Man_t *p)
word Truth1[(1<< ((MPM_VAR_MAX)-6))]
#define MPM_VAR_MAX
INCLUDES ///.
static Mpm_Cut_t * Mpm_ObjCutBestP(Mpm_Man_t *p, Mig_Obj_t *pObj)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
static void Mpm_ObjSetCutList(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
Mpm_Uni_t pCutUnits[MPM_CUT_MAX+1]
void * Mpm_ManFromIfLogic(Mpm_Man_t *pMan)
static word * Vec_MemReadEntry(Vec_Mem_t *p, int i)
void Mpm_ManPrintStatsInit(Mpm_Man_t *p)
static int Mpm_ObjEdge(Mpm_Man_t *p, Mig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
int Mpm_CutCheckDsd6(Mpm_Man_t *p, word t)
static int Mpm_CutWordNum(int nLeaves)
static void Mpm_VarsSwap(int *V2P, int *P2V, int iVar, int jVar)
static void Mpm_VarsClear(int *V2P, int *P2V, int nVars)