diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-04-03 15:12:29 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-04-03 15:12:29 -0700 |
commit | 11bab8caf92416c6e9bf9dc7fb187a0d49d756b0 (patch) | |
tree | b9ccff39e5c368b1ccccc25b67132d2fa51474ac /src/map/if | |
parent | d82be1fd05d0a8300f2cbc8fa532647f6e8b40d5 (diff) | |
download | abc-11bab8caf92416c6e9bf9dc7fb187a0d49d756b0.tar.gz abc-11bab8caf92416c6e9bf9dc7fb187a0d49d756b0.tar.bz2 abc-11bab8caf92416c6e9bf9dc7fb187a0d49d756b0.zip |
Improvements to technology mapping.
Diffstat (limited to 'src/map/if')
-rw-r--r-- | src/map/if/ifDec16.c | 7 | ||||
-rw-r--r-- | src/map/if/ifMap.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/map/if/ifDec16.c b/src/map/if/ifDec16.c index e1339222..21346ffb 100644 --- a/src/map/if/ifDec16.c +++ b/src/map/if/ifDec16.c @@ -2212,10 +2212,15 @@ int If_TtMemCutNum2() { return Vec_MemEntryNum(s_vTtMem2); } SeeAlso [] ***********************************************************************/ -int If_CutPerformCheck16( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr ) +int If_CutPerformCheck16( If_Man_t * p, unsigned * pTruth0, int nVars, int nLeaves, char * pStr ) { + unsigned pTruth[IF_MAX_FUNC_LUTSIZE > 5 ? 1 << (IF_MAX_FUNC_LUTSIZE - 5) : 1]; If_Grp_t G1 = {0};//, G3 = {0}; int i, nLutLeaf, nLutLeaf2, nLutRoot, Length; + // stretch the truth table + assert( nVars >= 6 ); + memcpy( pTruth, pTruth0, sizeof(word) * Abc_TtWordNum(nVars) ); + Abc_TtStretch6( (word *)pTruth, nLeaves, p->pPars->nLutSize ); #ifdef IF_TRY_NEW { diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 70d3a854..e85e8d5f 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -239,7 +239,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep if ( p->pPars->fUseDsd ) pCut->fUseless = If_DsdManCheckDec( p->pIfDsdMan, pCut->iCutDsd ); else - pCut->fUseless = !p->pPars->pFuncCell( p, If_CutTruth(p, pCut), pCut->nLeaves, pCut->nLeaves, p->pPars->pLutStruct ); + pCut->fUseless = !p->pPars->pFuncCell( p, If_CutTruth(p, pCut), Abc_MaxInt(6, pCut->nLeaves), pCut->nLeaves, p->pPars->pLutStruct ); p->nCutsUselessAll += pCut->fUseless; p->nCutsUseless[pCut->nLeaves] += pCut->fUseless; p->nCutsCountAll++; |