summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcNpn.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-11-01 14:23:05 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-11-01 14:23:05 -0700
commitd56570f23547fe6d14a6185ebf19e827ec8d8f61 (patch)
tree823548fb9134fdcfd187759565c554e09114d376 /src/base/abci/abcNpn.c
parentce3f8cb1d11b7b39fa48f809baa1419e9984fe8c (diff)
downloadabc-d56570f23547fe6d14a6185ebf19e827ec8d8f61.tar.gz
abc-d56570f23547fe6d14a6185ebf19e827ec8d8f61.tar.bz2
abc-d56570f23547fe6d14a6185ebf19e827ec8d8f61.zip
Improvements to the truth table computations.
Diffstat (limited to 'src/base/abci/abcNpn.c')
-rw-r--r--src/base/abci/abcNpn.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/base/abci/abcNpn.c b/src/base/abci/abcNpn.c
index 759d91b3..ffcf00f7 100644
--- a/src/base/abci/abcNpn.c
+++ b/src/base/abci/abcNpn.c
@@ -23,6 +23,7 @@
#include "bool/kit/kit.h"
#include "bool/lucky/lucky.h"
+#include "opt/dau/dau.h"
ABC_NAMESPACE_IMPL_START
@@ -190,6 +191,8 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
pAlgoName = "Jake's hybrid fast ";
else if ( NpnType == 4 )
pAlgoName = "Jake's hybrid good ";
+ else if ( NpnType == 5 )
+ pAlgoName = "new hybrid fast ";
assert( p->nVars <= 16 );
if ( pAlgoName )
@@ -202,10 +205,8 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
{
for ( i = 0; i < p->nFuncs; i++ )
{
- extern void Abc_TtCofactorTest( word * pTruth, int nVars, int i );
if ( fVerbose )
printf( "%7d : ", i );
- Abc_TtCofactorTest( p->pFuncs[i], p->nVars, i );
if ( fVerbose )
Extra_PrintHex( stdout, (unsigned *)p->pFuncs[i], p->nVars ), printf( "\n" );
}
@@ -261,6 +262,17 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
Extra_PrintHex( stdout, (unsigned *)p->pFuncs[i], p->nVars ), Abc_TruthNpnPrint(pCanonPerm, uCanonPhase, p->nVars), printf( "\n" );
}
}
+ else if ( NpnType == 5 )
+ {
+ for ( i = 0; i < p->nFuncs; i++ )
+ {
+ if ( fVerbose )
+ printf( "%7d : ", i );
+ uCanonPhase = Abc_TtCanonicize( p->pFuncs[i], p->nVars, pCanonPerm );
+ if ( fVerbose )
+ Extra_PrintHex( stdout, (unsigned *)p->pFuncs[i], p->nVars ), Abc_TruthNpnPrint(pCanonPerm, uCanonPhase, p->nVars), printf( "\n" );
+ }
+ }
else assert( 0 );
clk = clock() - clk;
printf( "Classes =%9d ", Abc_TruthNpnCountUnique(p) );
@@ -324,7 +336,7 @@ int Abc_NpnTest( char * pFileName, int NpnType, int nVarNum, int fDumpRes, int f
{
if ( fVerbose )
printf( "Using truth tables from file \"%s\"...\n", pFileName );
- if ( NpnType >= 0 && NpnType <= 4 )
+ if ( NpnType >= 0 && NpnType <= 5 )
Abc_TruthNpnTest( pFileName, NpnType, nVarNum, fDumpRes, fBinary, fVerbose );
else
printf( "Unknown canonical form value (%d).\n", NpnType );