From 5daa0c347e436e49837c1196cecf3478d4684f78 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 16 May 2025 17:23:32 -0700 Subject: [PATCH] Small changes to "lutcasdec". --- src/base/abci/abc.c | 2 +- src/base/abci/abcCas.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 83f1e06ba..d0bf054ab 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -9299,7 +9299,7 @@ int Abc_CommandLutCasDec( Abc_Frame_t * pAbc, int argc, char ** argv ) return 1; } Abc_NtkLutCascadeFile( pFileName, nVarNum, nLutSize, nStages, nRails, nIters, nJRatio, Seed, fVerbose, fVeryVerbose, fPrintMyu ); - return 1; + return 0; } if ( fGen ) { diff --git a/src/base/abci/abcCas.c b/src/base/abci/abcCas.c index f4136f4ce..9eb682c62 100644 --- a/src/base/abci/abcCas.c +++ b/src/base/abci/abcCas.c @@ -726,7 +726,8 @@ word * Abc_LutCascadeDec( char * pGuide, word * pTruth, int nVarsOrig, Vec_Int_t for ( i = 0; Vec_IntSize(vVarIDs) > nLutSize; i++ ) { nRVars = Abc_LutCascadeDecStage( pGuide, i, vFuncs, vVarIDs, nRVars, nRails, nLutSize, nJRatio, fVerbose, vCas, i ? NULL : pMyu ); if ( i+2 > nStages ) { - printf( "The length of the cascade (%d) exceeds the max allowed number of stages (%d).\n", i+2, nStages ); + if ( fVerbose ) + printf( "The length of the cascade (%d) exceeds the max allowed number of stages (%d).\n", i+2, nStages ); nRVars = -1; } if ( nRVars == -1 ) @@ -1466,10 +1467,12 @@ void Abc_NtkLutCascadeFile( char * pFileName, int nVarsOrig, int nLutSize, int n if ( MyuStats[i] ) printf( " %2d Myu : Function count = %8d (%6.2f %%)\n", i, MyuStats[i], 100.0*MyuStats[i]/nFuncs/IterReal ); } - printf( "Level count statistics for %d-rail LUT cascade:\n", nRails ); - for ( i = 0; i < 50; i++ ) - if ( StageStats[i] ) - printf( " %2d level : Function count = %8d (%6.2f %%)\n", i, StageStats[i], 100.0*StageStats[i]/nFuncs ); + if ( nRails > 1 ) { + printf( "Level count statistics for %d-rail LUT cascade:\n", nRails ); + for ( i = 0; i < 50; i++ ) + if ( StageStats[i] ) + printf( " %2d level : Function count = %8d (%6.2f %%)\n", i, StageStats[i], 100.0*StageStats[i]/nFuncs ); + } printf( "LUT count statistics for %d-rail LUT cascade:\n", nRails ); for ( i = 0; i < 50; i++ ) if ( LutStats[i] )