From 1260d20cc05fe2d21088cc047c460e85ccdb3b14 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 5 Sep 2005 08:01:00 -0700 Subject: Version abc50905 --- src/map/fpga/fpgaSwitch.c | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) (limited to 'src/map/fpga/fpgaSwitch.c') diff --git a/src/map/fpga/fpgaSwitch.c b/src/map/fpga/fpgaSwitch.c index 0d2ec3fc..8cc77990 100644 --- a/src/map/fpga/fpgaSwitch.c +++ b/src/map/fpga/fpgaSwitch.c @@ -22,8 +22,6 @@ /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -static float Fpga_CutGetSwitching( Fpga_Cut_t * pCut ); - //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFITIONS /// //////////////////////////////////////////////////////////////////////// @@ -64,10 +62,10 @@ float Fpga_CutRefSwitch( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pC Fpga_Node_t * pNodeChild; float aArea; int i; - if ( pCut->nLeaves == 1 ) - return 0; // start the area of this cut - aArea = Fpga_CutGetSwitching( pCut ); + aArea = pNode->Switching; + if ( pCut->nLeaves == 1 ) + return aArea; // go through the children for ( i = 0; i < pCut->nLeaves; i++ ) { @@ -96,10 +94,10 @@ float Fpga_CutDerefSwitch( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * Fpga_Node_t * pNodeChild; float aArea; int i; - if ( pCut->nLeaves == 1 ) - return 0; // start the area of this cut - aArea = Fpga_CutGetSwitching( pCut ); + aArea = pNode->Switching; + if ( pCut->nLeaves == 1 ) + return aArea; // go through the children for ( i = 0; i < pCut->nLeaves; i++ ) { @@ -112,27 +110,6 @@ float Fpga_CutDerefSwitch( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * return aArea; } -/**function************************************************************* - - synopsis [Computes the exact area associated with the cut.] - - description [] - - sideeffects [] - - seealso [] - -***********************************************************************/ -float Fpga_CutGetSwitching( Fpga_Cut_t * pCut ) -{ - float Result; - int i; - Result = 0.0; - for ( i = 0; i < pCut->nLeaves; i++ ) - Result += pCut->ppLeaves[i]->Switching; - return Result; -} - /**Function************************************************************* Synopsis [Computes the array of mapping.] @@ -153,10 +130,8 @@ float Fpga_MappingGetSwitching( Fpga_Man_t * pMan, Fpga_NodeVec_t * vMapping ) for ( i = 0; i < vMapping->nSize; i++ ) { pNode = vMapping->pArray[i]; - if ( !Fpga_NodeIsAnd(pNode) ) - continue; // at least one phase has the best cut assigned - assert( pNode->pCutBest != NULL ); + assert( !Fpga_NodeIsAnd(pNode) || pNode->pCutBest != NULL ); // at least one phase is used in the mapping assert( pNode->nRefs > 0 ); // compute the array due to the supergate -- cgit v1.2.3