From d0d7763ef8954ff2bd74a00545c986584a7666a2 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 21 Jun 2015 13:31:02 -0700 Subject: Supporting AND-gate cuts in 'if' and '&if' --- src/map/if/ifTime.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/map/if/ifTime.c') diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c index 4211b385..c2ba40e8 100644 --- a/src/map/if/ifTime.c +++ b/src/map/if/ifTime.c @@ -98,7 +98,15 @@ float If_CutDelay( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut ) float * pLutDelays; int i, Shift, Pin2PinDelay;//, iLeaf; Delay = -IF_FLOAT_LARGE; - if ( p->pPars->pLutLib ) + if ( pCut->fAndCut ) + { + If_CutForEachLeaf( p, pCut, pLeaf, i ) + { + DelayCur = If_ObjCutBest(pLeaf)->Delay + p->pPars->nAndDelay; + Delay = IF_MAX( Delay, DelayCur ); + } + } + else if ( p->pPars->pLutLib ) { assert( !p->pPars->fLiftLeaves ); pLutDelays = p->pPars->pLutLib->pLutDelays[pCut->nLeaves]; @@ -177,7 +185,12 @@ void If_CutPropagateRequired( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut, fl int i, Pin2PinDelay;//, iLeaf; assert( !p->pPars->fLiftLeaves ); // compute the pins - if ( p->pPars->pLutLib ) + if ( pCut->fAndCut ) + { + If_CutForEachLeaf( p, pCut, pLeaf, i ) + pLeaf->Required = IF_MIN( pLeaf->Required, ObjRequired - p->pPars->nAndDelay ); + } + else if ( p->pPars->pLutLib ) { pLutDelays = p->pPars->pLutLib->pLutDelays[pCut->nLeaves]; if ( p->pPars->pLutLib->fVarPinDelays ) -- cgit v1.2.3