diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-21 13:31:02 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-21 13:31:02 -0700 |
commit | d0d7763ef8954ff2bd74a00545c986584a7666a2 (patch) | |
tree | f6676cb7003d66cef2296c9e42ed2d81da9553f0 /src/map/if/ifMap.c | |
parent | ffcb4afbb50ccabad96ef3f102f32417b974c5de (diff) | |
download | abc-d0d7763ef8954ff2bd74a00545c986584a7666a2.tar.gz abc-d0d7763ef8954ff2bd74a00545c986584a7666a2.tar.bz2 abc-d0d7763ef8954ff2bd74a00545c986584a7666a2.zip |
Supporting AND-gate cuts in 'if' and '&if'
Diffstat (limited to 'src/map/if/ifMap.c')
-rw-r--r-- | src/map/if/ifMap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 89e94804..4f0372a6 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -100,6 +100,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep 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 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 ); @@ -189,6 +190,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep // check if this cut is contained in any of the available cuts if ( !p->pPars->fSkipCutFilter && If_CutFilter( pCutSet, pCut, fSave0 ) ) continue; + // check if the cut is a special AND-gate cut + pCut->fAndCut = fUseAndCut && pCut->nLeaves == 2 && pCut->pLeaves[0] == pObj->pFanin0->Id && pCut->pLeaves[1] == pObj->pFanin1->Id; + assert( pCut->nLeaves != 2 || pCut->pLeaves[0] < pCut->pLeaves[1] ); + assert( pCut->nLeaves != 2 || pObj->pFanin0->Id < pObj->pFanin1->Id ); // compute the truth table pCut->iCutFunc = -1; pCut->fCompl = 0; |