summaryrefslogtreecommitdiffstats
path: root/src/map/mpm/mpmAbc.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-07-13 23:40:51 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-07-13 23:40:51 -0700
commitb3e0f5b2e94e5e0da72e1ec7a41f90a3f4d302d7 (patch)
treec4f8f72566b20bb3a20a296a5af2e94b4df58132 /src/map/mpm/mpmAbc.c
parent118e40b809712c88fe7ddc530a8b072c1d2649d3 (diff)
downloadabc-b3e0f5b2e94e5e0da72e1ec7a41f90a3f4d302d7.tar.gz
abc-b3e0f5b2e94e5e0da72e1ec7a41f90a3f4d302d7.tar.bz2
abc-b3e0f5b2e94e5e0da72e1ec7a41f90a3f4d302d7.zip
New technology mapper.
Diffstat (limited to 'src/map/mpm/mpmAbc.c')
-rw-r--r--src/map/mpm/mpmAbc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/mpm/mpmAbc.c b/src/map/mpm/mpmAbc.c
index 4824f08d..8ae7645a 100644
--- a/src/map/mpm/mpmAbc.c
+++ b/src/map/mpm/mpmAbc.c
@@ -183,6 +183,7 @@ void * Mpm_ManFromIfLogic( Mpm_Man_t * pMan )
Mig_Obj_t * pObj, * pFanin;
Vec_Int_t * vMapping, * vMapping2, * vPacking = NULL;
Vec_Int_t * vLeaves, * vLeaves2, * vCover;
+ word uTruth, * pTruth = &uTruth;
int i, k, Entry, iLitNew;
// assert( !pMan->pPars->fDeriveLuts || pMan->pPars->fTruth );
// start mapping and packing
@@ -211,11 +212,14 @@ void * Mpm_ManFromIfLogic( Mpm_Man_t * pMan )
pCutBest = Mpm_ObjCutBestP( pMan, pObj );
Mpm_CutForEachLeaf( pMan->pMig, pCutBest, pFanin, k )
Vec_IntPush( vLeaves, Mig_ObjCopy(pFanin) );
- if ( pMan->pPars->fDeriveLuts && pMan->pPars->fUseTruth )
+ if ( pMan->pPars->fDeriveLuts && (pMan->pPars->fUseTruth || pMan->pPars->fUseDsd) )
{
extern int Gia_ManFromIfLogicNode( Gia_Man_t * pNew, int iObj, Vec_Int_t * vLeaves, Vec_Int_t * vLeavesTemp,
word * pRes, char * pStr, Vec_Int_t * vCover, Vec_Int_t * vMapping, Vec_Int_t * vMapping2, Vec_Int_t * vPacking );
- word * pTruth = Mpm_CutTruth(pMan, Abc_Lit2Var(pCutBest->iFunc));
+ if ( pMan->pPars->fUseTruth )
+ pTruth = Mpm_CutTruth(pMan, Abc_Lit2Var(pCutBest->iFunc));
+ else
+ uTruth = Mpm_CutTruthFromDsd( pMan, pCutBest, Abc_Lit2Var(pCutBest->iFunc) );
// Kit_DsdPrintFromTruth( pTruth, Vec_IntSize(vLeaves) ); printf( "\n" );
// perform decomposition of the cut
iLitNew = Gia_ManFromIfLogicNode( pNew, Mig_ObjId(pObj), vLeaves, vLeaves2, pTruth, NULL, vCover, vMapping, vMapping2, vPacking );