Commit 9fa827aa by Alan Mishchenko

Small improvement to SOP balancing.

parent ba292675
...@@ -122,12 +122,12 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep ...@@ -122,12 +122,12 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
// recompute the parameters of the best cut // recompute the parameters of the best cut
if ( p->pPars->fDelayOpt ) if ( p->pPars->fDelayOpt )
pCut->Delay = If_CutSopBalanceEval( p, pCut, NULL ); pCut->Delay = If_CutSopBalanceEval( p, pCut, NULL );
else if ( p->pPars->fDelayOptLut )
pCut->Delay = If_CutLutBalanceEval( p, pCut );
else if ( p->pPars->fDsdBalance ) else if ( p->pPars->fDsdBalance )
pCut->Delay = If_CutDsdBalanceEval( p, pCut, NULL ); pCut->Delay = If_CutDsdBalanceEval( p, pCut, NULL );
else if ( p->pPars->fUserRecLib ) else if ( p->pPars->fUserRecLib )
pCut->Delay = If_CutDelayRecCost3( p, pCut, pObj ); pCut->Delay = If_CutDelayRecCost3( p, pCut, pObj );
else if ( p->pPars->fDelayOptLut )
pCut->Delay = If_CutLutBalanceEval( p, pCut );
else if( p->pPars->nGateSize > 0 ) else if( p->pPars->nGateSize > 0 )
pCut->Delay = If_CutDelaySop( p, pCut ); pCut->Delay = If_CutDelaySop( p, pCut );
else else
...@@ -271,13 +271,25 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep ...@@ -271,13 +271,25 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
continue; continue;
// check if the cut satisfies the required times // check if the cut satisfies the required times
if ( p->pPars->fDelayOpt ) if ( p->pPars->fDelayOpt )
{
pCut->Delay = If_CutSopBalanceEval( p, pCut, NULL ); pCut->Delay = If_CutSopBalanceEval( p, pCut, NULL );
else if ( p->pPars->fDelayOptLut ) if ( pCut->Delay >= pObj->Level && pCut->nLeaves > 2 )
pCut->Delay = If_CutLutBalanceEval( p, pCut ); pCut->Delay += 1;
}
else if ( p->pPars->fDsdBalance ) else if ( p->pPars->fDsdBalance )
{
pCut->Delay = If_CutDsdBalanceEval( p, pCut, NULL ); pCut->Delay = If_CutDsdBalanceEval( p, pCut, NULL );
if ( pCut->Delay >= pObj->Level && pCut->nLeaves > 2 )
pCut->Delay += 1;
}
else if ( p->pPars->fUserRecLib ) else if ( p->pPars->fUserRecLib )
{
pCut->Delay = If_CutDelayRecCost3( p, pCut, pObj ); pCut->Delay = If_CutDelayRecCost3( p, pCut, pObj );
if ( pCut->Delay >= pObj->Level && pCut->nLeaves > 2 )
pCut->Delay += 1;
}
else if ( p->pPars->fDelayOptLut )
pCut->Delay = If_CutLutBalanceEval( p, pCut );
else if( p->pPars->nGateSize > 0 ) else if( p->pPars->nGateSize > 0 )
pCut->Delay = If_CutDelaySop( p, pCut ); pCut->Delay = If_CutDelaySop( p, pCut );
else else
......
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