mirror of https://github.com/YosysHQ/abc.git
Buf fixes and minor changes to the &if mapper.
This commit is contained in:
parent
eec022ea64
commit
a495163f74
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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) );
|
||||
|
|
|
|||
Loading…
Reference in New Issue