From 35c8d6a2fd47ea102e00133bf2d9b118d537db27 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 1 Nov 2012 14:58:31 -0700 Subject: Improvements to the truth table computations. --- src/base/abci/abcRec3.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/base') 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; -- cgit v1.2.3