From 70a3474849b049c149ac1b5c4ec34dee731859d5 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 25 Aug 2014 20:47:11 -0500 Subject: Improvements to the timing manager. --- src/misc/tim/timMan.c | 5 ++++- src/misc/tim/timTime.c | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/misc/tim') diff --git a/src/misc/tim/timMan.c b/src/misc/tim/timMan.c index 0900b7ae..93c69146 100644 --- a/src/misc/tim/timMan.c +++ b/src/misc/tim/timMan.c @@ -128,7 +128,10 @@ Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fUnitDelay ) pDelayTableNew[1] = (int)pDelayTable[1]; pDelayTableNew[2] = (int)pDelayTable[2]; for ( k = 0; k < nInputs * nOutputs; k++ ) - pDelayTableNew[3+k] = fUnitDelay ? (float)fUnitDelay : pDelayTable[3+k]; + if ( pDelayTable[3+k] == -ABC_INFINITY ) + pDelayTableNew[3+k] = -ABC_INFINITY; + else + pDelayTableNew[3+k] = fUnitDelay ? (float)fUnitDelay : pDelayTable[3+k]; // assert( (int)pDelayTableNew[0] == Vec_PtrSize(pNew->vDelayTables) ); assert( Vec_PtrEntry(pNew->vDelayTables, i) == NULL ); Vec_PtrWriteEntry( pNew->vDelayTables, i, pDelayTableNew ); diff --git a/src/misc/tim/timTime.c b/src/misc/tim/timTime.c index 7d3dd082..c766fb7f 100644 --- a/src/misc/tim/timTime.c +++ b/src/misc/tim/timTime.c @@ -200,7 +200,8 @@ float Tim_ManGetCiArrival( Tim_Man_t * p, int iCi ) pDelays = pTable + 3 + i * pBox->nInputs; DelayBest = -TIM_ETERNITY; Tim_ManBoxForEachInput( p, pBox, pObj, k ) - DelayBest = Abc_MaxInt( DelayBest, pObj->timeArr + pDelays[k] ); + if ( pDelays[k] != -ABC_INFINITY ) + DelayBest = Abc_MaxInt( DelayBest, pObj->timeArr + pDelays[k] ); pObjRes->timeArr = DelayBest; pObjRes->TravId = p->nTravIds; } @@ -248,7 +249,8 @@ float Tim_ManGetCoRequired( Tim_Man_t * p, int iCo ) Tim_ManBoxForEachOutput( p, pBox, pObj, k ) { pDelays = pTable + 3 + k * pBox->nInputs; - DelayBest = Abc_MinFloat( DelayBest, pObj->timeReq - pDelays[i] ); + if ( pDelays[k] != -ABC_INFINITY ) + DelayBest = Abc_MinFloat( DelayBest, pObj->timeReq - pDelays[i] ); } pObjRes->timeReq = DelayBest; pObjRes->TravId = p->nTravIds; -- cgit v1.2.3