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;
243 for ( i = 0; i < pCut->
nLeaves; i++ )
267 if ( pNodeChild->
nRefAct[fPhaseChild]++ > 0 )
274 if ( pNodeChild->
nRefAct[fPhaseChild]++ == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
275 aArea += pNodeChild->
p->pSuperLib->AreaInv;
277 if ( pNodeChild->
nRefAct[2]++ > 0 )
287 if ( --pNodeChild->
nRefAct[fPhaseChild] > 0 )
294 if ( --pNodeChild->
nRefAct[fPhaseChild] == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
295 aArea += pNodeChild->
p->pSuperLib->AreaInv;
297 if ( --pNodeChild->
nRefAct[2] > 0 )
304 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
306 if ( pCutChild == NULL )
308 fPhaseChild = !fPhaseChild;
309 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
330 float aResult, aResult2;
350 float aResult, aResult2;
408 int i, fPhase, fInvPin;
414 if ( pNodeR->
nRefAct[fPhase]++ )
435 for ( i = 0; i < pCut->
nLeaves; i++ )
437 fInvPin = ((uPhase & (1 << i)) > 0);
446 for ( i = 0; i < pMan->vMapObjs->nSize; i++ )
448 pNode = pMan->vMapObjs->pArray[i];
454 for ( i = 0; i < pMan->nOutputs; i++ )
456 pNode = pMan->pOutputs[i];
479 for ( i = 0; i < pMan->vMapObjs->nSize; i++ )
481 pNode = pMan->vMapObjs->pArray[i];
503 Area += pMan->pSuperLib->AreaInv;
506 for ( i = 0; i < pMan->nOutputs; i++ )
508 Area += pMan->pSuperLib->AreaBuf;
#define Map_NotCond(p, c)
ABC_NAMESPACE_IMPL_START int Map_NodeReadRefPhaseAct(Map_Node_t *pNode, int fPhase)
DECLARATIONS ///.
int Map_NodeIsAnd(Map_Node_t *p)
float Map_CutGetAreaDerefed(Map_Cut_t *pCut, int fPhase)
float Map_NodeReadRefPhaseEst(Map_Node_t *pNode, int fPhase)
int Map_NodeIsBuf(Map_Node_t *p)
int Map_NodeDecRefPhaseAct(Map_Node_t *pNode, int fPhase)
float Map_CutGetRootArea(Map_Cut_t *pCut, int fPhase)
int Map_NodeIsConst(Map_Node_t *p)
#define Map_IsComplement(p)
GLOBAL VARIABLES ///.
void Map_MappingEstimateRefs(Map_Man_t *p)
float Map_MappingGetArea(Map_Man_t *pMan)
void Map_MappingEstimateRefsInit(Map_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
float Map_CutRef(Map_Cut_t *pCut, int fPhase)
int Map_NodeIsVar(Map_Node_t *p)
void Map_MappingSetRefs(Map_Man_t *pMan)
void Map_MappingSetRefs_rec(Map_Man_t *pMan, Map_Node_t *pNode)
#define ABC_NAMESPACE_IMPL_START
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
int Map_CutGetLeafPhase(Map_Cut_t *pCut, int fPhase, int iLeaf)
float Map_CutDeref(Map_Cut_t *pCut, int fPhase)
float Map_CutGetAreaRefed(Map_Cut_t *pCut, int fPhase)
float Map_CutRefDeref(Map_Cut_t *pCut, int fPhase, int fReference)
int Map_NodeIncRefPhaseAct(Map_Node_t *pNode, int fPhase)
float Map_CutGetAreaFlow(Map_Cut_t *pCut, int fPhase)