50 (*ppCut)->nLeaves = nLeaves;
52 (*ppCut)->fUseless = 0;
74 (*ppCut)->iFunc = pUni->
iFunc;
75 (*ppCut)->fCompl = pUni->
fCompl;
77 (*ppCut)->nLeaves = pUni->
nLeaves;
94 int hCut, iList = 0, * pList = &iList;
106 printf(
"%d : { ", pCut->
nLeaves );
107 for ( i = 0; i < (int)pCut->
nLeaves; i++ )
108 printf(
"%d ", pCut->
pLeaves[i] );
116 printf(
"%2d : ", i );
123 for ( i = 0; i < (int)pNew->
nLeaves; i++ )
131 for ( i = 0; i < (int)pCut->
nLeaves; i++ )
163 uSign |= ((
word)1 << (iLeaf & 0x3F));
170 int i, iLeaf, ArrTime = 0;
172 ArrTime =
Abc_MaxInt( ArrTime, pmTimes[iLeaf] + pDelays[i] );
185 pUnit->
mTime = ArrTime;
193 if ( p->
fMainRun && pMapRefs[iLeaf] == 0 )
195 pUnit->
mArea += pmArea[iLeaf];
196 pUnit->
mEdge += pmEdge[iLeaf];
200 assert( pEstRefs[iLeaf] > 0 );
205 pUnit->
uSign |= ((
word)1 << (iLeaf & 0x3F));
227 int fEnableContainment = 1;
252 for ( iPivot = p->
nCutStore - 1; iPivot >= 0; iPivot-- )
256 if ( fEnableContainment )
262 for ( k = 0; k <= iPivot; k++ )
287 for ( k = p->
nCutStore++; k > iPivot; k-- )
291 if ( fEnableContainment )
294 for ( k = last = iPivot+1; k < p->
nCutStore; k++ )
340 for ( c = 1; c < 3; c++ )
342 pTemp = (c == 1) ? pCut1 : pCut2;
347 for ( i = 0; i < (int)pTemp->
nLeaves; i++ )
350 if ( iPlace == (
int)pCut->
nLeaves )
356 p->
uPermMask[c] ^= (((i & 7) ^ 7) << (3*iPlace));
364 for ( c = 1; c < 3; c++ )
366 pTemp = (c == 1) ? pCut1 : pCut2;
369 for ( i = 0; i < (int)pTemp->
nLeaves; i++ )
372 if ( iPlace == (
int)pCut->
nLeaves )
449 if ( p->
fMainRun && ArrTime > Required )
516 p->
pCuts[i][nCuts] = pCut;
532 int hCut, hNext, ArrTime;
539 if ( ArrTime > ReqTime )
559 pList = &pCut->
hNext;
598 if ( Times > Required )
599 printf(
"Arrival time (%d) exceeds required time (%d) at object %d.\n", Times, Required,
Mig_ObjId(pObj) );
616 for ( c0 = 0; c0 < p->
nCuts[0] && (pCut0 = p->
pCuts[0][c0]); c0++ )
617 for ( c1 = 0; c1 < p->
nCuts[1] && (pCut1 = p->
pCuts[1][c1]); c1++ )
625 for ( c0 = 0; c0 < p->
nCuts[0] && (pCut0 = p->
pCuts[0][c0]); c0++ )
626 for ( c1 = 0; c1 < p->
nCuts[1] && (pCut1 = p->
pCuts[1][c1]); c1++ )
627 for ( c2 = 0; c2 < p->
nCuts[2] && (pCut2 = p->
pCuts[2][c2]); c2++ )
705 int Required = pRequired[
Mig_ObjId(pObj)];
713 pRequired[iLeaf] =
Abc_MinInt( pRequired[iLeaf], Required - pDelays[i] );
734 pEstRefs[i] = (1 * pEstRefs[i] +
MPM_UNIT_REFS * pMapRefs[i]) / 2;
826 printf(
"Del =%5d. Ar =%8d. Edge =%8d. Cut =%10d. Max =%8d. Tru =%8d. Small =%6d. ",
static void Mpm_ObjCollectFaninsAndSigns(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
#define Mig_ManForEachNode(p, pObj)
void Mpm_ObjTranslateCutsFromStore(Mpm_Man_t *p, Mig_Obj_t *pObj)
static int * Vec_IntArray(Vec_Int_t *p)
static int Mig_ObjMigRefDec(Mpm_Man_t *p, Mig_Obj_t *pObj)
static int Mig_ManObjNum(Mig_Man_t *p)
static int Mig_ManChoiceNum(Mig_Man_t *p)
static int Mpm_CutCopySet(Mpm_Man_t *p, Mig_Obj_t *pObj, int fCompl)
static void Mpm_CutPrintAll(Mpm_Man_t *p)
static int Mpm_ManExploreNewCut(Mpm_Man_t *p, Mig_Obj_t *pObj, Mpm_Cut_t *pCut0, Mpm_Cut_t *pCut1, Mpm_Cut_t *pCut2, int Required)
static int Mig_ObjIsNode3(Mig_Obj_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)
static void Mpm_ObjSetEstRef(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
static int Mig_ObjIsNode2(Mig_Obj_t *p)
static int Mpm_CutGetArea(Mpm_Man_t *p, Mpm_Cut_t *pCut)
int Mpm_CutCompareDelay2(Mpm_Uni_t *pOld, Mpm_Uni_t *pNew)
#define Mig_ManForEachObjReverse(p, pObj)
#define Mig_ManForEachCo(p, pObj, i)
static int Mig_ObjFaninC0(Mig_Obj_t *p)
static int Mig_ObjRefNum(Mig_Obj_t *p)
static int Mpm_CutCreate(Mpm_Man_t *p, Mpm_Cut_t *pUni, Mpm_Cut_t **ppCut)
static int Abc_Var2Lit(int Var, int fCompl)
static ABC_NAMESPACE_IMPL_START int Mpm_CutAlloc(Mpm_Man_t *p, int nLeaves, Mpm_Cut_t **ppCut)
DECLARATIONS ///.
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 Mig_ManCandNum(Mig_Man_t *p)
#define Mpm_CutForEachLeafId(pCut, iLeafId, i)
static int Mig_ObjIsNode(Mig_Obj_t *p)
static int Mpm_CutDup(Mpm_Man_t *p, Mpm_Cut_t *pCut, int fCompl)
static int Mpm_ObjCutBest(Mpm_Man_t *p, Mig_Obj_t *pObj)
MACRO DEFINITIONS ///.
static int Mpm_ObjCutList(Mpm_Man_t *p, Mig_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Mpm_ObjSetCutBest(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
static int Mig_ObjPhase(Mig_Obj_t *p)
int Mpm_CutCompareArea(Mpm_Uni_t *pOld, Mpm_Uni_t *pNew)
static Mig_Obj_t * Mig_ObjSibl(Mig_Obj_t *p)
static int Abc_TtCountOnes(word x)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
static int Mpm_CutGetArrTime(Mpm_Man_t *p, Mpm_Cut_t *pCut)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Mpm_ManFinalizeRound(Mpm_Man_t *p)
static void * Vec_PtrPop(Vec_Ptr_t *p)
static int Abc_LitNotCond(int Lit, int c)
static int Mig_ObjId(Mig_Obj_t *p)
#define Mig_ManForEachCand(p, pObj)
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 Abc_PrintTime(int level, const char *pStr, abctime time)
static void Vec_IntSelectSort(int *pArray, int nSize)
static int Abc_MinInt(int a, int b)
int Mpm_ObjAddCutToStore(Mpm_Man_t *p, Mpm_Cut_t *pCut, int ArrTime)
static void Mpm_ObjSetTime(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
static int Mig_ObjIsBuf(Mig_Obj_t *p)
void Mpm_ManPerformRound(Mpm_Man_t *p)
static int Mpm_CutCreateUnit(Mpm_Man_t *p, int Id)
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
static Mpm_Cut_t * Mpm_ManMergeCuts(Mpm_Man_t *p, Mpm_Cut_t *pCut0, Mpm_Cut_t *pCut1, Mpm_Cut_t *pCut2)
Mpm_Cut_t * pCuts[3][MPM_CUT_MAX+1]
static int Mmr_StepFetch(Mmr_Step_t *p, int nWords)
static void Mpm_ObjDerefFaninCuts(Mpm_Man_t *p, Mig_Obj_t *pObj)
static void Mpm_ManCleanRequired(Mpm_Man_t *p)
unsigned __int64 word
DECLARATIONS ///.
int Mpm_CutCompareArea2(Mpm_Uni_t *pOld, Mpm_Uni_t *pNew)
#define ABC_NAMESPACE_IMPL_END
#define Mig_ObjForEachFanin(p, pFanin, i)
static Mig_Obj_t * Mig_ObjFanin0(Mig_Obj_t *p)
static word * Mmr_StepEntry(Mmr_Step_t *p, int h)
static Mpm_Uni_t * Mpm_CutSetupInfo(Mpm_Man_t *p, Mpm_Cut_t *pCut, int ArrTime)
static int Mpm_ObjRequired(Mpm_Man_t *p, Mig_Obj_t *pObj)
static int Mpm_CutFindLeaf(Mpm_Cut_t *pNew, int iObj)
static int Mpm_CutCreateZero(Mpm_Man_t *p)
static int Mpm_CutIsContained(Mpm_Man_t *p, Mpm_Cut_t *pBase, Mpm_Cut_t *pCut)
int pLutDelays[MPM_VAR_MAX+1][MPM_VAR_MAX+1]
static void Mmr_StepRecycle(Mmr_Step_t *p, int h)
static int Mig_ObjSiblId(Mig_Obj_t *p)
static int Mig_ObjFaninC1(Mig_Obj_t *p)
static void Mpm_ObjSetEdge(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
#define ABC_NAMESPACE_IMPL_START
static void Mpm_ManCleanMapRefs(Mpm_Man_t *p)
#define Mpm_ObjForEachCutSafe(p, pObj, hCut, pCut, hNext)
void Mpm_ManPerform(Mpm_Man_t *p)
static void Mpm_ObjSetArea(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
void Mpm_ManPrepare(Mpm_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
word pSigns[3][MPM_CUT_MAX+1]
static int Mig_ObjFaninC2(Mig_Obj_t *p)
#define Mpm_ObjForEachCut(p, pObj, hCut, pCut)
static int Mig_ObjFaninId0(Mig_Obj_t *p)
static int Mig_ObjMigRefNum(Mpm_Man_t *p, Mig_Obj_t *pObj)
static int Mpm_ManFindArrivalMax(Mpm_Man_t *p)
void Mpm_CutPrint(Mpm_Cut_t *pCut)
static int Abc_Lit2Var(int Lit)
int Mpm_CutCompareDelay(Mpm_Uni_t *pOld, Mpm_Uni_t *pNew)
#define Mig_ManForEachCi(p, pObj, i)
static Mpm_Cut_t * Mpm_ObjCutBestP(Mpm_Man_t *p, Mig_Obj_t *pObj)
static void Mpm_ObjSetCutList(Mpm_Man_t *p, Mig_Obj_t *pObj, int i)
static void Mpm_ObjRecycleCuts(Mpm_Man_t *p, Mig_Obj_t *pObj)
static word Mpm_CutGetSign(Mpm_Cut_t *pCut)
int pLutAreas[MPM_VAR_MAX+1]
int Mpm_ManDeriveCuts(Mpm_Man_t *p, Mig_Obj_t *pObj)
static int Mig_ObjNodeType(Mig_Obj_t *p)
static int Mig_ObjIsCo(Mig_Obj_t *p)
static int Mpm_CutWordNum(int nLeaves)
static void Mpm_ManComputeEstRefs(Mpm_Man_t *p)
void Mpm_ObjAddChoiceCutsToStore(Mpm_Man_t *p, Mig_Obj_t *pRoot, Mig_Obj_t *pObj, int ReqTime)
static void Mpm_ObjPrepareFanins(Mpm_Man_t *p, Mig_Obj_t *pObj)