Commit 6730e21e by Alan Mishchenko

Improvements in technology mapping.

parent 02cf8693
...@@ -268,11 +268,10 @@ struct If_Man_t_ ...@@ -268,11 +268,10 @@ struct If_Man_t_
// priority cut // priority cut
struct If_Cut_t_ struct If_Cut_t_
{ {
float Delay; // delay of the cut
float Area; // area (or area-flow) of the cut float Area; // area (or area-flow) of the cut
float AveRefs; // the average number of leaf references
float Edge; // the edge flow float Edge; // the edge flow
float Power; // the power flow float Power; // the power flow
float Delay; // delay of the cut
int iCutFunc; // TT ID of the cut int iCutFunc; // TT ID of the cut
int uMaskFunc; // polarity bitmask int uMaskFunc; // polarity bitmask
unsigned uSign; // cut signature unsigned uSign; // cut signature
......
...@@ -473,10 +473,10 @@ int If_CutCompareArea( If_Man_t * p, If_Cut_t ** ppC0, If_Cut_t ** ppC1 ) ...@@ -473,10 +473,10 @@ int If_CutCompareArea( If_Man_t * p, If_Cut_t ** ppC0, If_Cut_t ** ppC1 )
return -1; return -1;
if ( pC0->Area > pC1->Area + p->fEpsilon ) if ( pC0->Area > pC1->Area + p->fEpsilon )
return 1; return 1;
if ( pC0->AveRefs > pC1->AveRefs ) // if ( pC0->AveRefs > pC1->AveRefs )
return -1; // return -1;
if ( pC0->AveRefs < pC1->AveRefs ) // if ( pC0->AveRefs < pC1->AveRefs )
return 1; // return 1;
if ( pC0->nLeaves < pC1->nLeaves ) if ( pC0->nLeaves < pC1->nLeaves )
return -1; return -1;
if ( pC0->nLeaves > pC1->nLeaves ) if ( pC0->nLeaves > pC1->nLeaves )
...@@ -519,10 +519,10 @@ static inline int If_ManSortCompare( If_Man_t * p, If_Cut_t * pC0, If_Cut_t * pC ...@@ -519,10 +519,10 @@ static inline int If_ManSortCompare( If_Man_t * p, If_Cut_t * pC0, If_Cut_t * pC
return -1; return -1;
if ( pC0->Edge > pC1->Edge + p->fEpsilon ) if ( pC0->Edge > pC1->Edge + p->fEpsilon )
return 1; return 1;
if ( pC0->AveRefs > pC1->AveRefs ) // if ( pC0->AveRefs > pC1->AveRefs )
return -1; // return -1;
if ( pC0->AveRefs < pC1->AveRefs ) // if ( pC0->AveRefs < pC1->AveRefs )
return 1; // return 1;
if ( pC0->nLeaves < pC1->nLeaves ) if ( pC0->nLeaves < pC1->nLeaves )
return -1; return -1;
if ( pC0->nLeaves > pC1->nLeaves ) if ( pC0->nLeaves > pC1->nLeaves )
...@@ -596,10 +596,10 @@ static inline int If_ManSortCompare( If_Man_t * p, If_Cut_t * pC0, If_Cut_t * pC ...@@ -596,10 +596,10 @@ static inline int If_ManSortCompare( If_Man_t * p, If_Cut_t * pC0, If_Cut_t * pC
return -1; return -1;
if ( pC0->Power > pC1->Power + p->fEpsilon ) if ( pC0->Power > pC1->Power + p->fEpsilon )
return 1; return 1;
if ( pC0->AveRefs > pC1->AveRefs ) // if ( pC0->AveRefs > pC1->AveRefs )
return -1; // return -1;
if ( pC0->AveRefs < pC1->AveRefs ) // if ( pC0->AveRefs < pC1->AveRefs )
return 1; // return 1;
if ( pC0->nLeaves < pC1->nLeaves ) if ( pC0->nLeaves < pC1->nLeaves )
return -1; return -1;
if ( pC0->nLeaves > pC1->nLeaves ) if ( pC0->nLeaves > pC1->nLeaves )
...@@ -678,10 +678,10 @@ static inline int If_ManSortCompare_old( If_Man_t * p, If_Cut_t * pC0, If_Cut_t ...@@ -678,10 +678,10 @@ static inline int If_ManSortCompare_old( If_Man_t * p, If_Cut_t * pC0, If_Cut_t
return -1; return -1;
if ( pC0->Area > pC1->Area + p->fEpsilon ) if ( pC0->Area > pC1->Area + p->fEpsilon )
return 1; return 1;
if ( pC0->AveRefs > pC1->AveRefs ) // if ( pC0->AveRefs > pC1->AveRefs )
return -1; // return -1;
if ( pC0->AveRefs < pC1->AveRefs ) // if ( pC0->AveRefs < pC1->AveRefs )
return 1; // return 1;
if ( pC0->nLeaves < pC1->nLeaves ) if ( pC0->nLeaves < pC1->nLeaves )
return -1; return -1;
if ( pC0->nLeaves > pC1->nLeaves ) if ( pC0->nLeaves > pC1->nLeaves )
......
...@@ -292,7 +292,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep ...@@ -292,7 +292,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
pCut->Edge = (Mode == 2)? If_CutEdgeDerefed( p, pCut ) : If_CutEdgeFlow( p, pCut ); pCut->Edge = (Mode == 2)? If_CutEdgeDerefed( p, pCut ) : If_CutEdgeFlow( p, pCut );
if ( p->pPars->fPower ) if ( p->pPars->fPower )
pCut->Power = (Mode == 2)? If_CutPowerDerefed( p, pCut, pObj ) : If_CutPowerFlow( p, pCut, pObj ); pCut->Power = (Mode == 2)? If_CutPowerDerefed( p, pCut, pObj ) : If_CutPowerFlow( p, pCut, pObj );
pCut->AveRefs = (Mode == 0)? (float)0.0 : If_CutAverageRefs( p, pCut ); // pCut->AveRefs = (Mode == 0)? (float)0.0 : If_CutAverageRefs( p, pCut );
// insert the cut into storage // insert the cut into storage
If_CutSort( p, pCutSet, pCut ); If_CutSort( p, pCutSet, pCut );
// If_CutTraverse( p, pObj, pCut ); // If_CutTraverse( p, pObj, pCut );
...@@ -391,7 +391,7 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP ...@@ -391,7 +391,7 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP
pCut->Edge = (Mode == 2)? If_CutEdgeDerefed( p, pCut ) : If_CutEdgeFlow( p, pCut ); pCut->Edge = (Mode == 2)? If_CutEdgeDerefed( p, pCut ) : If_CutEdgeFlow( p, pCut );
if ( p->pPars->fPower ) if ( p->pPars->fPower )
pCut->Power = (Mode == 2)? If_CutPowerDerefed( p, pCut, pObj ) : If_CutPowerFlow( p, pCut, pObj ); pCut->Power = (Mode == 2)? If_CutPowerDerefed( p, pCut, pObj ) : If_CutPowerFlow( p, pCut, pObj );
pCut->AveRefs = (Mode == 0)? (float)0.0 : If_CutAverageRefs( p, pCut ); // pCut->AveRefs = (Mode == 0)? (float)0.0 : If_CutAverageRefs( p, pCut );
// insert the cut into storage // insert the cut into storage
If_CutSort( p, pCutSet, pCut ); If_CutSort( p, pCutSet, pCut );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment