28static float Map_SwitchCutRefDeref(
Map_Node_t * pNode,
Map_Cut_t * pCut,
int fPhase,
int fReference );
47 float aResult, aResult2;
49 aResult2 = Map_SwitchCutRefDeref( pNode, pCut, fPhase, 1 );
50 aResult = Map_SwitchCutRefDeref( pNode, pCut, fPhase, 0 );
68 return Map_SwitchCutRefDeref( pNode, pCut, fPhase, 1 );
84 return Map_SwitchCutRefDeref( pNode, pCut, fPhase, 0 );
99float Map_SwitchCutRefDeref(
Map_Node_t * pNode,
Map_Cut_t * pCut,
int fPhase,
int fReference )
103 float aSwitchActivity;
110 return aSwitchActivity;
114 for ( i = 0; i < pCut->
nLeaves; i++ )
126 if ( pNodeChild->
nRefAct[fPhaseChild]++ > 0 )
133 if ( pNodeChild->
nRefAct[fPhaseChild]++ == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
134 aSwitchActivity += pNodeChild->
Switching;
136 if ( pNodeChild->
nRefAct[2]++ > 0 )
146 if ( --pNodeChild->
nRefAct[fPhaseChild] > 0 )
153 if ( --pNodeChild->
nRefAct[fPhaseChild] == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
154 aSwitchActivity += pNodeChild->
Switching;
156 if ( --pNodeChild->
nRefAct[2] > 0 )
163 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
165 if ( pCutChild == NULL )
167 fPhaseChild = !fPhaseChild;
168 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
171 aSwitchActivity += Map_SwitchCutRefDeref( pNodeChild, pCutChild, fPhaseChild, fReference );
173 return aSwitchActivity;
192 for ( i = 0; i < pMan->vMapObjs->nSize; i++ )
194 pNode = pMan->vMapObjs->pArray[i];
217 for ( i = 0; i < pMan->nOutputs; i++ )
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
int Map_CutGetLeafPhase(Map_Cut_t *pCut, int fPhase, int iLeaf)
float Map_SwitchCutRef(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
float Map_SwitchCutGetDerefed(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
FUNCTION DEFINITIONS ///.
float Map_SwitchCutDeref(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
float Map_MappingGetSwitching(Map_Man_t *pMan)
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
struct Map_CutStruct_t_ Map_Cut_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