89 return pNode->
nRefAct[fPhase]++;
109 return --pNode->
nRefAct[fPhase];
130 for ( i = 0; i <
p->vMapObjs->nSize; i++ )
132 pNode =
p->vMapObjs->pArray[i];
155 for ( i = 0; i <
p->vMapObjs->nSize; i++ )
157 pNode =
p->vMapObjs->pArray[i];
185 float aFlowRes, aFlowFanin, nRefs;
189 aFlowRes = pSuper->
Area;
191 for ( i = 0; i < pCut->
nLeaves; i++ )
194 fPinPhasePos = ((uPhaseTot & (1 << i)) == 0);
198 if ( pCutFanin == NULL )
200 fPinPhasePos = !fPinPhasePos;
203 aFlowFanin = pCutFanin->
M[fPinPhasePos].
AreaFlow;
207 if ( nRefs == (
float)0.0 )
210 aFlowRes += aFlowFanin / nRefs;
250 for ( i = 0; i < pCut->
nLeaves; i++ )
274 if ( pNodeChild->
nRefAct[fPhaseChild]++ > 0 )
281 if ( pNodeChild->
nRefAct[fPhaseChild]++ == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
282 aArea += pNodeChild->
p->pSuperLib->AreaInv;
284 if ( pNodeChild->
nRefAct[2]++ > 0 )
294 if ( --pNodeChild->
nRefAct[fPhaseChild] > 0 )
301 if ( --pNodeChild->
nRefAct[fPhaseChild] == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
302 aArea += pNodeChild->
p->pSuperLib->AreaInv;
304 if ( --pNodeChild->
nRefAct[2] > 0 )
311 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
313 if ( pCutChild == NULL )
315 fPhaseChild = !fPhaseChild;
316 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
319 aArea +=
Map_CutRefDeref( pCutChild, fPhaseChild, fReference, fUpdateProf );
337 float aResult, aResult2;
357 float aResult, aResult2;
415 int i, fPhase, fInvPin;
421 if ( pNodeR->
nRefAct[fPhase]++ )
440 if ( pMan->fUseProfile )
444 for ( i = 0; i < pCut->
nLeaves; i++ )
446 fInvPin = ((uPhase & (1 << i)) > 0);
454 if ( pMan->fUseProfile )
457 for ( i = 0; i < pMan->vMapObjs->nSize; i++ )
459 pNode = pMan->vMapObjs->pArray[i];
465 for ( i = 0; i < pMan->nOutputs; i++ )
467 pNode = pMan->pOutputs[i];
490 if ( pMan->fUseProfile )
492 for ( i = 0; i < pMan->vMapObjs->nSize; i++ )
494 pNode = pMan->vMapObjs->pArray[i];
510 if ( pMan->fUseProfile )
517 if ( pMan->fUseProfile )
524 Area += pMan->pSuperLib->AreaInv;
527 for ( i = 0; i < pMan->nOutputs; i++ )
529 Area += pMan->pSuperLib->AreaBuf;
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
int Map_CutGetLeafPhase(Map_Cut_t *pCut, int fPhase, int iLeaf)
float Map_CutGetRootArea(Map_Cut_t *pCut, int fPhase)
float Map_CutGetAreaRefed(Map_Cut_t *pCut, int fPhase)
int Map_NodeDecRefPhaseAct(Map_Node_t *pNode, int fPhase)
int Map_NodeIncRefPhaseAct(Map_Node_t *pNode, int fPhase)
void Map_MappingSetRefs(Map_Man_t *pMan)
ABC_NAMESPACE_IMPL_START int Map_NodeReadRefPhaseAct(Map_Node_t *pNode, int fPhase)
DECLARATIONS ///.
float Map_CutGetAreaDerefed(Map_Cut_t *pCut, int fPhase)
void Map_MappingEstimateRefsInit(Map_Man_t *p)
void Map_MappingSetRefs_rec(Map_Man_t *pMan, Map_Node_t *pNode)
float Map_NodeReadRefPhaseEst(Map_Node_t *pNode, int fPhase)
float Map_CutDeref(Map_Cut_t *pCut, int fPhase, int fProfile)
float Map_CutRefDeref(Map_Cut_t *pCut, int fPhase, int fReference, int fUpdateProf)
void Map_MappingEstimateRefs(Map_Man_t *p)
float Map_CutRef(Map_Cut_t *pCut, int fPhase, int fProfile)
float Map_CutGetAreaFlow(Map_Cut_t *pCut, int fPhase)
float Map_MappingGetArea(Map_Man_t *pMan)
#define Map_NotCond(p, c)
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
int Map_NodeIsBuf(Map_Node_t *p)
int Map_NodeIsConst(Map_Node_t *p)
struct Map_MatchStruct_t_ Map_Match_t
struct Map_CutStruct_t_ Map_Cut_t
struct Map_SuperStruct_t_ Map_Super_t
int Map_NodeIsVar(Map_Node_t *p)
int Map_NodeIsAnd(Map_Node_t *p)
#define Map_IsComplement(p)
GLOBAL VARIABLES ///.
struct Map_NodeStruct_t_ Map_Node_t
void Mio_GateDecProfile2(Mio_Gate_t *pGate)
void Mio_LibraryCleanProfile2(Mio_Library_t *pLib)
void Mio_GateIncProfile2(Mio_Gate_t *pGate)