Skip to content

Commit 5daa0c3

Browse files
committed
Small changes to "lutcasdec".
1 parent 57966de commit 5daa0c3

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/base/abci/abc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9299,7 +9299,7 @@ int Abc_CommandLutCasDec( Abc_Frame_t * pAbc, int argc, char ** argv )
92999299
return 1;
93009300
}
93019301
Abc_NtkLutCascadeFile( pFileName, nVarNum, nLutSize, nStages, nRails, nIters, nJRatio, Seed, fVerbose, fVeryVerbose, fPrintMyu );
9302-
return 1;
9302+
return 0;
93039303
}
93049304
if ( fGen )
93059305
{

src/base/abci/abcCas.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,8 @@ word * Abc_LutCascadeDec( char * pGuide, word * pTruth, int nVarsOrig, Vec_Int_t
726726
for ( i = 0; Vec_IntSize(vVarIDs) > nLutSize; i++ ) {
727727
nRVars = Abc_LutCascadeDecStage( pGuide, i, vFuncs, vVarIDs, nRVars, nRails, nLutSize, nJRatio, fVerbose, vCas, i ? NULL : pMyu );
728728
if ( i+2 > nStages ) {
729-
printf( "The length of the cascade (%d) exceeds the max allowed number of stages (%d).\n", i+2, nStages );
729+
if ( fVerbose )
730+
printf( "The length of the cascade (%d) exceeds the max allowed number of stages (%d).\n", i+2, nStages );
730731
nRVars = -1;
731732
}
732733
if ( nRVars == -1 )
@@ -1466,10 +1467,12 @@ void Abc_NtkLutCascadeFile( char * pFileName, int nVarsOrig, int nLutSize, int n
14661467
if ( MyuStats[i] )
14671468
printf( " %2d Myu : Function count = %8d (%6.2f %%)\n", i, MyuStats[i], 100.0*MyuStats[i]/nFuncs/IterReal );
14681469
}
1469-
printf( "Level count statistics for %d-rail LUT cascade:\n", nRails );
1470-
for ( i = 0; i < 50; i++ )
1471-
if ( StageStats[i] )
1472-
printf( " %2d level : Function count = %8d (%6.2f %%)\n", i, StageStats[i], 100.0*StageStats[i]/nFuncs );
1470+
if ( nRails > 1 ) {
1471+
printf( "Level count statistics for %d-rail LUT cascade:\n", nRails );
1472+
for ( i = 0; i < 50; i++ )
1473+
if ( StageStats[i] )
1474+
printf( " %2d level : Function count = %8d (%6.2f %%)\n", i, StageStats[i], 100.0*StageStats[i]/nFuncs );
1475+
}
14731476
printf( "LUT count statistics for %d-rail LUT cascade:\n", nRails );
14741477
for ( i = 0; i < 50; i++ )
14751478
if ( LutStats[i] )

0 commit comments

Comments
 (0)