diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-04-26 19:28:12 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-04-26 19:28:12 -0700 |
commit | 37703eaaa867a0c108ebc0505e4d499084bb65d8 (patch) | |
tree | 2191e84667faf270a432f4bc93a86506e8685699 /src | |
parent | 857688b95e6a3eb60c06ccc24be21b6267a02f26 (diff) | |
download | abc-37703eaaa867a0c108ebc0505e4d499084bb65d8.tar.gz abc-37703eaaa867a0c108ebc0505e4d499084bb65d8.tar.bz2 abc-37703eaaa867a0c108ebc0505e4d499084bb65d8.zip |
Exploration of functions.
Diffstat (limited to 'src')
-rw-r--r-- | src/base/abci/abc.c | 6 | ||||
-rw-r--r-- | src/misc/extra/extraUtilEnum.c | 8 |
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++; } } } |