From 46532e6c2f3d0dabdb03daad5c55f6f732311797 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 16 Feb 2014 19:30:38 -0800 Subject: Significant improvement to LUT mappers (if, &if). --- src/map/if/ifDec16.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'src/map/if/ifDec16.c') diff --git a/src/map/if/ifDec16.c b/src/map/if/ifDec16.c index df98a916..e1339222 100644 --- a/src/map/if/ifDec16.c +++ b/src/map/if/ifDec16.c @@ -1752,7 +1752,7 @@ If_Grp_t If_CluCheck( If_Man_t * p, word * pTruth0, int nVars, int iVarStart, in return G1; } - +/* static inline word Abc_Tt6Cofactor0( word t, int iVar ) { assert( iVar >= 0 && iVar < 6 ); @@ -1763,6 +1763,7 @@ static inline word Abc_Tt6Cofactor1( word t, int iVar ) assert( iVar >= 0 && iVar < 6 ); return (t & Truth6[iVar]) | ((t & Truth6[iVar]) >> (1<pPars->fCutMin && If_CluSupportSize((word *)pTruth, nVars) < nLeaves ) - { - If_Cut_t * pCut = p->pCutTemp; - pCut->nLimit = nVars; - pCut->nLeaves = nLeaves; - pCut->pLeaves = (int *)(pCut + 1); - for ( i = 0; i < nLeaves; i++ ) - pCut->pLeaves[i] = i; - pCut->pTruth = (unsigned *)pCut->pLeaves + pCut->nLimit + p->nPermWords; - If_CluCopy( (word *)If_CutTruth(pCut), (word *)pTruth, nVars ); - if ( If_CutTruthMinimize( p, pCut ) >= 2 ) - return 0; - nLeaves = pCut->nLeaves; -// If_CluCopy( (word *)pTruth, (word *)If_CutTruth(pCut), nVars ); - pTruth = If_CutTruth(pCut); - } + // if cutmin is disabled, minimize the function + if ( !p->pPars->fCutMin ) + nLeaves = Abc_TtMinBase( (word *)pTruth, NULL, nLeaves, nVars ); // quit if parameters are wrong Length = strlen(pStr); -- cgit v1.2.3