summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/base/abci/abc.c2
-rw-r--r--src/map/if/ifMan.c3
-rw-r--r--src/map/if/ifMap.c15
-rw-r--r--src/misc/tim/timMan.c4
4 files changed, 19 insertions, 5 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 8eb896bc..55872a52 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -29476,7 +29476,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Switches -f and -u are not compatible.\n" );
return 1;
}
- if ( pPars->nLutSize < 6 || pPars->nLutSize > 8 )
+ if ( pPars->nLutSize < 5 || pPars->nLutSize > 8 )
{
Abc_Print( -1, "This feature only works for {6,7,8}-LUTs.\n" );
return 1;
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 );
diff --git a/src/misc/tim/timMan.c b/src/misc/tim/timMan.c
index 9aec1190..42f2fe1a 100644
--- a/src/misc/tim/timMan.c
+++ b/src/misc/tim/timMan.c
@@ -390,7 +390,7 @@ float * Tim_ManGetArrTimes( Tim_Man_t * p )
break;
if ( i == Tim_ManPiNum(p) )
return NULL;
- pTimes = ABC_ALLOC( float, Tim_ManPiNum(p) );
+ pTimes = ABC_FALLOC( float, Tim_ManCiNum(p) );
Tim_ManForEachPi( p, pObj, i )
pTimes[i] = pObj->timeArr;
return pTimes;
@@ -405,7 +405,7 @@ float * Tim_ManGetReqTimes( Tim_Man_t * p )
break;
if ( i == Tim_ManPoNum(p) )
return NULL;
- pTimes = ABC_ALLOC( float, Tim_ManPoNum(p) );
+ pTimes = ABC_FALLOC( float, Tim_ManCoNum(p) );
Tim_ManForEachPo( p, pObj, i )
pTimes[k++] = pObj->timeArr;
assert( k == Tim_ManPoNum(p) );