summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/base/abci/abc.c6
-rw-r--r--src/misc/extra/extraUtilEnum.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index b47c4777..35467415 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -10321,7 +10321,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
int nCutMax = 1;
int nLeafMax = 10;
int nDivMax = 50;
- int nDecMax = 3;
+ int nDecMax = 20;
int fNewAlgo = 0;
int fNewOrder = 0;
int fVerbose = 0;
@@ -10461,8 +10461,8 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
}
*/
{
- extern void Abc_EnumerateFunctions();
- Abc_EnumerateFunctions();
+ extern void Abc_EnumerateFunctions( int nVars );
+ Abc_EnumerateFunctions( nDecMax );
}
if ( pNtk )
{
diff --git a/src/misc/extra/extraUtilEnum.c b/src/misc/extra/extraUtilEnum.c
index 8af700a7..e96e5445 100644
--- a/src/misc/extra/extraUtilEnum.c
+++ b/src/misc/extra/extraUtilEnum.c
@@ -249,7 +249,7 @@ static inline void Abc_DataXorBit( word * p, word i ) { p[(i)>>6] ^= (1<<((i) &
SeeAlso []
***********************************************************************/
-void Abc_EnumerateFunctions()
+void Abc_EnumerateFunctions( int nDecMax )
{
int nVars;
int nMints;
@@ -258,7 +258,7 @@ void Abc_EnumerateFunctions()
unsigned pMints[100] = {0};
unsigned pFuncs[100] = {0};
unsigned Truth;
- int FuncDone[100] = {0};
+ int FuncDone[100] = {0}, nFuncDone = 0;
int GateCount[100] = {0};
int i, k, n, a, b, v;
abctime clk = Abc_Clock();
@@ -289,7 +289,7 @@ void Abc_EnumerateFunctions()
GateCount[0] = 0;
GateCount[1] = nVars;
assert( Vec_IntSize(vTruths) == nVars );
- for ( n = 0; n < 10; n++ )
+ for ( n = 0; n < nDecMax && nFuncDone < nFuncs; n++ )
{
for ( a = 0; a <= n; a++ )
for ( b = a; b <= n; b++ )
@@ -316,6 +316,7 @@ void Abc_EnumerateFunctions()
printf( "Found function %d with %d gates: ", v, n+1 );
Abc_EnumPrint( vGates, Vec_IntSize(vTruths)-1, nVars );
FuncDone[v] = 1;
+ nFuncDone++;
}
}
Truth = Vec_IntEntry(vTruths, i) | Vec_IntEntry(vTruths, k);
@@ -334,6 +335,7 @@ void Abc_EnumerateFunctions()
printf( "Found function %d with %d gates: ", v, n+1 );
Abc_EnumPrint( vGates, Vec_IntSize(vTruths)-1, nVars );
FuncDone[v] = 1;
+ nFuncDone++;
}
}
}