diff options
Diffstat (limited to 'src/map/if/ifTruth.c')
-rw-r--r-- | src/map/if/ifTruth.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/map/if/ifTruth.c b/src/map/if/ifTruth.c index 9a20ac71..7dbb5144 100644 --- a/src/map/if/ifTruth.c +++ b/src/map/if/ifTruth.c @@ -44,7 +44,7 @@ ABC_NAMESPACE_IMPL_START SeeAlso [] ***********************************************************************/ -void If_CutTruthPermute( word * pTruth, int nLeaves, int nVars, int nWords, float * pDelays, int * pVars, char * pPerm ) +void If_CutTruthPermute( word * pTruth, int nLeaves, int nVars, int nWords, float * pDelays, int * pVars ) { while ( 1 ) { @@ -55,8 +55,6 @@ void If_CutTruthPermute( word * pTruth, int nLeaves, int nVars, int nWords, floa continue; ABC_SWAP( float, pDelays[i], pDelays[i+1] ); ABC_SWAP( int, pVars[i], pVars[i+1] ); - if ( pPerm ) - ABC_SWAP( char, pPerm[i], pPerm[i+1] ); if ( pTruth ) Abc_TtSwapAdjacent( pTruth, nWords, i ); fChange = 1; @@ -70,20 +68,16 @@ void If_CutRotatePins( If_Man_t * p, If_Cut_t * pCut ) If_Obj_t * pLeaf; float PinDelays[IF_MAX_LUTSIZE]; int i, truthId; + assert( !p->pPars->fUseTtPerm ); If_CutForEachLeaf( p, pCut, pLeaf, i ) PinDelays[i] = If_ObjCutBest(pLeaf)->Delay; if ( p->vTtMem == NULL ) { - If_CutTruthPermute( NULL, If_CutLeaveNum(pCut), pCut->nLimit, p->nTruth6Words, PinDelays, If_CutLeaves(pCut), NULL ); - return; - } - if ( p->pPars->fUseTtPerm ) - { - If_CutTruthPermute( NULL, If_CutLeaveNum(pCut), pCut->nLimit, p->nTruth6Words, PinDelays, If_CutLeaves(pCut), pCut->pPerm ); + If_CutTruthPermute( NULL, If_CutLeaveNum(pCut), pCut->nLimit, p->nTruth6Words, PinDelays, If_CutLeaves(pCut) ); return; } Abc_TtCopy( p->puTempW, If_CutTruthWR(p, pCut), p->nTruth6Words, 0 ); - If_CutTruthPermute( p->puTempW, If_CutLeaveNum(pCut), pCut->nLimit, p->nTruth6Words, PinDelays, If_CutLeaves(pCut), NULL ); + If_CutTruthPermute( p->puTempW, If_CutLeaveNum(pCut), pCut->nLimit, p->nTruth6Words, PinDelays, If_CutLeaves(pCut) ); truthId = Vec_MemHashInsert( p->vTtMem, p->puTempW ); pCut->iCutFunc = Abc_Var2Lit( truthId, If_CutTruthIsCompl(pCut) ); assert( (p->puTempW[0] & 1) == 0 ); @@ -102,7 +96,7 @@ void If_CutRotatePins( If_Man_t * p, If_Cut_t * pCut ) ***********************************************************************/ int If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 ) { - int fCompl, truthId, nLeavesNew; + int fCompl, truthId, nLeavesNew, RetValue = 0; int iFuncLit0 = pCut0->iCutFunc; int iFuncLit1 = pCut1->iCutFunc; int nWords = Abc_TtWordNum( pCut->nLimit ); @@ -124,6 +118,7 @@ int If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_ { pCut->nLeaves = nLeavesNew; pCut->uSign = If_ObjCutSignCompute( pCut ); + RetValue = 1; } } truthId = Vec_MemHashInsert( p->vTtMem, pTruth ); @@ -137,7 +132,7 @@ int If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_ Abc_TtCanonicize( pCopy, pCut->nLimit, pCanonPerm ); } #endif - return 1; + return RetValue; } /**Function************************************************************* |