summaryrefslogtreecommitdiffstats
path: root/src/map/if
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-03-14 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-03-14 08:01:00 -0700
commitff6f0943362c30176fd1f961bcbd19e188cee520 (patch)
treefc2b888c8403ee04fb7d473433c1eb3bcc5ef8c5 /src/map/if
parent6205eaaee3a840dd076f9baaac67720d85d6a680 (diff)
downloadabc-ff6f0943362c30176fd1f961bcbd19e188cee520.tar.gz
abc-ff6f0943362c30176fd1f961bcbd19e188cee520.tar.bz2
abc-ff6f0943362c30176fd1f961bcbd19e188cee520.zip
Version abc80314
Diffstat (limited to 'src/map/if')
-rw-r--r--src/map/if/ifTime.c2
-rw-r--r--src/map/if/ifTruth.c4
2 files changed, 4 insertions, 2 deletions
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 );
}