diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-11-19 23:42:05 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-11-19 23:42:05 -0800 |
commit | ffbe3bc5767c597b3ca612a12e671749f23ca34f (patch) | |
tree | 5422b46e65aef95dea810fd82965a7301ba3397b /src/map/if/ifMap.c | |
parent | d671adbb86b241a71e15bcd67831b267d0de6abf (diff) | |
download | abc-ffbe3bc5767c597b3ca612a12e671749f23ca34f.tar.gz abc-ffbe3bc5767c597b3ca612a12e671749f23ca34f.tar.bz2 abc-ffbe3bc5767c597b3ca612a12e671749f23ca34f.zip |
DSD manager.
Diffstat (limited to 'src/map/if/ifMap.c')
-rw-r--r-- | src/map/if/ifMap.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 11b9449d..ad50e1cc 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -277,6 +277,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep } if ( p->pPars->fUseDsd ) { + int j, iDsd[2] = { Abc_LitNotCond(pCut0->iDsd, pObj->fCompl0), Abc_LitNotCond(pCut1->iDsd, pObj->fCompl1) }; + int nFans[2] = { pCut0->nLeaves, pCut1->nLeaves }; + int Fans[2][DAU_MAX_VAR], * pFans[2] = { Fans[0], Fans[1] }; +/* char * pName = Dau_DsdMerge( Abc_NamStr(p->pNamDsd, pCut0->iDsd), If_CutPerm0(pCut, pCut0), @@ -284,6 +288,21 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep If_CutPerm1(pCut, pCut1), pObj->fCompl0, pObj->fCompl1, pCut->nLimit ); pCut->iDsd = Abc_NamStrFindOrAdd( p->pNamDsd, pName, NULL ); +*/ + // create fanins + for ( j = 0; j < (int)pCut0->nLeaves; j++ ) + pFans[0][j] = Abc_Lit2Lit( p->pPerm[0], (int)pCut0->pPerm[j] ); + for ( j = 0; j < (int)pCut1->nLeaves; j++ ) + pFans[1][j] = Abc_Lit2Lit( p->pPerm[1], (int)pCut1->pPerm[j] ); + // canonicize + if ( iDsd[0] > iDsd[1] ) + { + ABC_SWAP( int, iDsd[0], iDsd[1] ); + ABC_SWAP( int, nFans[0], nFans[1] ); + ABC_SWAP( int *, pFans[0], pFans[1] ); + } + // derive new DSD + pCut->iDsd = Dss_ManMerge( p->pDsdMan, iDsd, nFans, pFans, p->uSharedMask, pCut->nLimit, pCut->pPerm ); } // compute the application-specific cost and depth |