summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-08-29 14:41:01 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-08-29 14:41:01 -0700
commita495163f74ee677bf9199bd5be8118c32f65e66a (patch)
tree4a92dc7d96fd149d65a3bd2c5dd041ee7aa8c3bf /src/map
parenteec022ea644ce0430d3f7c5259c72f850338f987 (diff)
downloadabc-a495163f74ee677bf9199bd5be8118c32f65e66a.tar.gz
abc-a495163f74ee677bf9199bd5be8118c32f65e66a.tar.bz2
abc-a495163f74ee677bf9199bd5be8118c32f65e66a.zip
Buf fixes and minor changes to the &if mapper.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/if/ifMan.c3
-rw-r--r--src/map/if/ifMap.c15
2 files changed, 16 insertions, 2 deletions
diff --git a/src/map/if/ifMan.c b/src/map/if/ifMan.c
index 20c3f0f9..939e5a7b 100644
--- a/src/map/if/ifMan.c
+++ b/src/map/if/ifMan.c
@@ -151,8 +151,9 @@ void If_ManStop( If_Man_t * p )
if ( p->nCutsUseless[i] )
Abc_Print( 1, "Useless cuts %2d = %9d (out of %9d) (%6.2f %%)\n", i, p->nCutsUseless[i], p->nCutsCount[i], 100.0*p->nCutsUseless[i]/(p->nCutsCount[i]+1) );
Abc_Print( 1, "Useless cuts all = %9d (out of %9d) (%6.2f %%)\n", p->nCutsUselessAll, p->nCutsCountAll, 100.0*p->nCutsUselessAll/(p->nCutsCountAll+1) );
- Abc_Print( 1, "Statistics about 5-cuts: Total = %d Non-decomposable = %d (%.2f %%)\n", p->nCuts5, p->nCuts5-p->nCuts5a, 100.0*(p->nCuts5-p->nCuts5a)/p->nCuts5 );
}
+ if ( p->pPars->fVerbose && p->nCuts5 )
+ Abc_Print( 1, "Statistics about 5-cuts: Total = %d Non-decomposable = %d (%.2f %%)\n", p->nCuts5, p->nCuts5-p->nCuts5a, 100.0*(p->nCuts5-p->nCuts5a)/p->nCuts5 );
if ( p->pPars->fUseDsd )
{
/*
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 853e9cb0..5ac85807 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -273,7 +273,20 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
p->nCutsUseless[pCut->nLeaves] += pCut->fUseless;
p->nCutsCountAll++;
p->nCutsCount[pCut->nLeaves]++;
- if ( p->pPars->fVerbose && pCut->nLeaves == 5 )
+ // skip 5-input cuts, which cannot be decomposed
+ if ( (p->pPars->fEnableCheck75 || p->pPars->fEnableCheck75u) && pCut->nLeaves == 5 && pCut->nLimit == 5 )
+ {
+ extern int If_CluCheckDecIn( word t, int nVars );
+ extern int If_CluCheckDecOut( word t, int nVars );
+ unsigned TruthU = *If_CutTruth(pCut);
+ word Truth = (((word)TruthU << 32) | (word)TruthU);
+ p->nCuts5++;
+ if ( If_CluCheckDecIn( Truth, 5 ) || If_CluCheckDecOut( Truth, 5 ) )
+ p->nCuts5a++;
+ else
+ continue;
+ }
+ else if ( p->pPars->fVerbose && pCut->nLeaves == 5 )
{
extern int If_CluCheckDecIn( word t, int nVars );
extern int If_CluCheckDecOut( word t, int nVars );