From ff6f0943362c30176fd1f961bcbd19e188cee520 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 14 Mar 2008 08:01:00 -0700 Subject: Version abc80314 --- src/map/if/ifTime.c | 2 +- src/map/if/ifTruth.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/map/if') diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c index 33bbdf74..59322cad 100644 --- a/src/map/if/ifTime.c +++ b/src/map/if/ifTime.c @@ -238,7 +238,7 @@ void If_CutRotatePins( If_Man_t * p, If_Cut_t * pCut ) float PinDelays[32]; // int PinPerm[32]; int i; - assert( p->pPars->pLutLib && p->pPars->pLutLib->fVarPinDelays && p->pPars->fTruth ); +// assert( p->pPars->pLutLib && p->pPars->pLutLib->fVarPinDelays && p->pPars->fTruth ); If_CutForEachLeaf( p, pCut, pLeaf, i ) PinDelays[i] = If_ObjCutBest(pLeaf)->Delay; If_CutTruthPermute( p->puTemp[0], If_CutTruth(pCut), If_CutLeaveNum(pCut), PinDelays, If_CutLeaves(pCut) ); diff --git a/src/map/if/ifTruth.c b/src/map/if/ifTruth.c index a3a7e1ee..637a42b4 100644 --- a/src/map/if/ifTruth.c +++ b/src/map/if/ifTruth.c @@ -146,16 +146,18 @@ void If_CutTruthPermute( unsigned * pOut, unsigned * pIn, int nVars, float * pDe for ( i = 0; i < nVars - 1; i++ ) { if ( pDelays[i] >= pDelays[i+1] ) +// if ( pDelays[i] <= pDelays[i+1] ) continue; tTemp = pDelays[i]; pDelays[i] = pDelays[i+1]; pDelays[i+1] = tTemp; Temp = pVars[i]; pVars[i] = pVars[i+1]; pVars[i+1] = Temp; + if ( pOut && pIn ) If_TruthSwapAdjacentVars( pOut, pIn, nVars, i ); pTemp = pOut; pOut = pIn; pIn = pTemp; fChange = 1; Counter++; } } - if ( Counter & 1 ) + if ( pOut && pIn && (Counter & 1) ) If_TruthCopy( pOut, pIn, nVars ); } -- cgit v1.2.3