summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/if/ifUtil.c')
-rw-r--r--src/map/if/ifUtil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/if/ifUtil.c b/src/map/if/ifUtil.c
index 57e1ad13..06015b06 100644
--- a/src/map/if/ifUtil.c
+++ b/src/map/if/ifUtil.c
@@ -585,6 +585,7 @@ float If_ManMarkMapping_rec( If_Man_t * p, If_Obj_t * pObj )
{
If_Obj_t * pLeaf;
If_Cut_t * pCutBest;
+ float * pSwitching = p->vSwitching? (float*)p->vSwitching->pArray : NULL;
float aArea;
int i;
if ( pObj->nRefs++ || If_ObjIsCi(pObj) || If_ObjIsConst1(pObj) )
@@ -596,7 +597,10 @@ float If_ManMarkMapping_rec( If_Man_t * p, If_Obj_t * pObj )
p->nNets += pCutBest->nLeaves;
aArea = If_CutLutArea( p, pCutBest );
If_CutForEachLeaf( p, pCutBest, pLeaf, i )
+ {
+ p->dPower += pSwitching? pSwitching[pLeaf->Id] : 0.0;
aArea += If_ManMarkMapping_rec( p, pLeaf );
+ }
return aArea;
}
@@ -622,6 +626,7 @@ void If_ManMarkMapping( If_Man_t * p )
pObj->nRefs = 0;
}
p->nNets = 0;
+ p->dPower = 0.0;
p->AreaGlo = 0.0;
If_ManForEachCo( p, pObj, i )
p->AreaGlo += If_ManMarkMapping_rec( p, If_ObjFanin0(pObj) );