summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-11-01 14:58:31 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-11-01 14:58:31 -0700
commit35c8d6a2fd47ea102e00133bf2d9b118d537db27 (patch)
treee25ff5abebeef7ec5a15e2f1e469c39a5dcce756 /src/base
parentd56570f23547fe6d14a6185ebf19e827ec8d8f61 (diff)
downloadabc-35c8d6a2fd47ea102e00133bf2d9b118d537db27.tar.gz
abc-35c8d6a2fd47ea102e00133bf2d9b118d537db27.tar.bz2
abc-35c8d6a2fd47ea102e00133bf2d9b118d537db27.zip
Improvements to the truth table computations.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abci/abcRec3.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/base/abci/abcRec3.c b/src/base/abci/abcRec3.c
index ed6148ab..4a9e12b3 100644
--- a/src/base/abci/abcRec3.c
+++ b/src/base/abci/abcRec3.c
@@ -23,11 +23,13 @@
#include "bool/kit/kit.h"
#include "aig/gia/giaAig.h"
#include "misc/vec/vecMem.h"
-#include "bool/lucky/lucky.h"
+#include "opt/dau/dau.h"
#include "misc/util/utilTruth.h"
ABC_NAMESPACE_IMPL_START
+//#define LMS_USE_OLD_FORM
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -488,8 +490,11 @@ p->timeCollect += clock() - clk;
// semi-canonicize
clk = clock();
memcpy( p->pTemp1, pTruth, p->nWords * sizeof(word) );
- // uCanonPhase = luckyCanonicizer_final_fast( p->pTemp1, nLeaves, pCanonPerm );
+#ifdef LMS_USE_OLD_FORM
uCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
+#else
+ uCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
+#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
p->timeCanon += clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
@@ -599,8 +604,11 @@ p->timeCollect += clock() - clk;
// semi-canonicize truth table
clk = clock();
memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
-// uCanonPhase = luckyCanonicizer_final_fast( p->pTemp1, nLeaves, pCanonPerm );
+#ifdef LMS_USE_OLD_FORM
uCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
+#else
+ uCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
+#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
p->timeCanon += clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
@@ -762,8 +770,11 @@ static inline int If_CutFindBestStruct( If_Man_t * pIfMan, If_Cut_t * pCut, char
// semicanonicize the function
clk = clock();
memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
-// uCanonPhase = luckyCanonicizer_final_fast( p->pTemp1, nLeaves, pCanonPerm );
+#ifdef LMS_USE_OLD_FORM
*puCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
+#else
+ *puCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
+#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
p->timeCanon += clock() - clk;