diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-09-05 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-09-05 08:01:00 -0700 |
commit | 1260d20cc05fe2d21088cc047c460e85ccdb3b14 (patch) | |
tree | f10ccc3333f78b6e2e089a88c8cf61a47b2f2dcd /src/map/fpga/fpgaSwitch.c | |
parent | 33012d9530c40817e1fc5230b3e663f7690b2e94 (diff) | |
download | abc-1260d20cc05fe2d21088cc047c460e85ccdb3b14.tar.gz abc-1260d20cc05fe2d21088cc047c460e85ccdb3b14.tar.bz2 abc-1260d20cc05fe2d21088cc047c460e85ccdb3b14.zip |
Version abc50905
Diffstat (limited to 'src/map/fpga/fpgaSwitch.c')
-rw-r--r-- | src/map/fpga/fpgaSwitch.c | 39 |
1 files changed, 7 insertions, 32 deletions
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 |