summaryrefslogtreecommitdiffstats
path: root/src/map/if
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-07-22 10:13:40 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-07-22 10:13:40 -0700
commit9fa827aacf2d081d9762753929545507b7a6be89 (patch)
treefbf8fe6564e7062c3d6cc86faf60c7db28396736 /src/map/if
parentba292675635d32d231e0009fdde716779931ef8c (diff)
downloadabc-9fa827aacf2d081d9762753929545507b7a6be89.tar.gz
abc-9fa827aacf2d081d9762753929545507b7a6be89.tar.bz2
abc-9fa827aacf2d081d9762753929545507b7a6be89.zip
Small improvement to SOP balancing.
Diffstat (limited to 'src/map/if')
-rw-r--r--src/map/if/ifMap.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 9f709411..5fa95fc1 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -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
if ( p->pPars->fDelayOpt )
pCut->Delay = If_CutSopBalanceEval( p, pCut, NULL );
- else if ( p->pPars->fDelayOptLut )
- pCut->Delay = If_CutLutBalanceEval( p, pCut );
else if ( p->pPars->fDsdBalance )
pCut->Delay = If_CutDsdBalanceEval( p, pCut, NULL );
else if ( p->pPars->fUserRecLib )
pCut->Delay = If_CutDelayRecCost3( p, pCut, pObj );
+ else if ( p->pPars->fDelayOptLut )
+ pCut->Delay = If_CutLutBalanceEval( p, pCut );
else if( p->pPars->nGateSize > 0 )
pCut->Delay = If_CutDelaySop( p, pCut );
else
@@ -271,13 +271,25 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
continue;
// check if the cut satisfies the required times
if ( p->pPars->fDelayOpt )
+ {
pCut->Delay = If_CutSopBalanceEval( p, pCut, NULL );
- else if ( p->pPars->fDelayOptLut )
- pCut->Delay = If_CutLutBalanceEval( p, pCut );
+ if ( pCut->Delay >= pObj->Level && pCut->nLeaves > 2 )
+ pCut->Delay += 1;
+ }
else if ( p->pPars->fDsdBalance )
+ {
pCut->Delay = If_CutDsdBalanceEval( p, pCut, NULL );
+ if ( pCut->Delay >= pObj->Level && pCut->nLeaves > 2 )
+ pCut->Delay += 1;
+ }
else if ( p->pPars->fUserRecLib )
+ {
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 )
pCut->Delay = If_CutDelaySop( p, pCut );
else