diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-08-23 20:38:55 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-08-23 20:38:55 -0700 |
commit | 0e4561ab9f4070841037a2ac87ef9aaef14d2b03 (patch) | |
tree | eb15298b900db1f28921deca5fbef1e2b3f6ab1d /src/map/if | |
parent | 033203b7bd2a55a60cb9321824e3c556f5ec999b (diff) | |
download | abc-0e4561ab9f4070841037a2ac87ef9aaef14d2b03.tar.gz abc-0e4561ab9f4070841037a2ac87ef9aaef14d2b03.tar.bz2 abc-0e4561ab9f4070841037a2ac87ef9aaef14d2b03.zip |
Experiments with mapping plus small changes.
Diffstat (limited to 'src/map/if')
-rw-r--r-- | src/map/if/if.h | 1 | ||||
-rw-r--r-- | src/map/if/ifCut.c | 2 | ||||
-rw-r--r-- | src/map/if/ifMap.c | 10 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index 9c891c3d..214eda88 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -125,6 +125,7 @@ struct If_Par_t_ int fDsdBalance; // special delay optimization int fUserRecLib; // use recorded library int fBidec; // use bi-decomposition + int fUse34Spec; // use specialized matching int fUseBat; // use one specialized feature int fUseBuffs; // use buffers to decouple outputs int fEnableCheck07;// enable additional checking diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c index adf00740..9e0c5a70 100644 --- a/src/map/if/ifCut.c +++ b/src/map/if/ifCut.c @@ -754,7 +754,7 @@ void If_CutSort( If_Man_t * p, If_Set_t * pCutSet, If_Cut_t * pCut ) if ( !pCut->fUseless && (p->pPars->fUseDsd || p->pPars->fUseBat || p->pPars->pLutStruct || p->pPars->fUserRecLib || - p->pPars->fEnableCheck07 || p->pPars->fUseCofVars || p->pPars->fUseAndVars || + p->pPars->fEnableCheck07 || p->pPars->fUseCofVars || p->pPars->fUseAndVars || p->pPars->fUse34Spec || p->pPars->fUseDsdTune || p->pPars->fEnableCheck75 || p->pPars->fEnableCheck75u) ) { If_Cut_t * pFirst = pCutSet->ppCuts[0]; diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 064494e0..c4053f52 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -99,7 +99,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep If_Cut_t * pCut0R, * pCut1R; int fFunc0R, fFunc1R; int i, k, v, iCutDsd, fChange; - int fSave0 = p->pPars->fDelayOpt || p->pPars->fDelayOptLut || p->pPars->fDsdBalance || p->pPars->fUserRecLib || p->pPars->fUseDsdTune || p->pPars->fUseCofVars || p->pPars->fUseAndVars || p->pPars->pLutStruct != NULL; + int fSave0 = p->pPars->fDelayOpt || p->pPars->fDelayOptLut || p->pPars->fDsdBalance || p->pPars->fUserRecLib || p->pPars->fUseDsdTune || p->pPars->fUseCofVars || p->pPars->fUseAndVars || p->pPars->fUse34Spec || p->pPars->pLutStruct != NULL; int fUseAndCut = (p->pPars->nAndDelay > 0) || (p->pPars->nAndArea > 0); assert( !If_ObjIsAnd(pObj->pFanin0) || pObj->pFanin0->pCutSet->nCuts > 0 ); assert( !If_ObjIsAnd(pObj->pFanin1) || pObj->pFanin1->pCutSet->nCuts > 0 ); @@ -275,6 +275,12 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep p->nCutsCountAll++; p->nCutsCount[pCut->nLeaves]++; } + else if ( p->pPars->fUse34Spec ) + { + assert( pCut->nLeaves <= 4 ); + if ( pCut->nLeaves == 4 && !Abc_Tt4Check( (int)(0xFFFF & *If_CutTruth(p, pCut)) ) ) + pCut->fUseless = 1; + } else { if ( p->pPars->fUseAndVars ) @@ -415,7 +421,7 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP If_Set_t * pCutSet; If_Obj_t * pTemp; If_Cut_t * pCutTemp, * pCut; - int i, fSave0 = p->pPars->fDelayOpt || p->pPars->fDelayOptLut || p->pPars->fDsdBalance || p->pPars->fUserRecLib; + int i, fSave0 = p->pPars->fDelayOpt || p->pPars->fDelayOptLut || p->pPars->fDsdBalance || p->pPars->fUserRecLib || p->pPars->fUse34Spec; assert( pObj->pEquiv != NULL ); // prepare |