From 905a627758841c5dee5e1ce4a180badcaff303f1 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 1 Aug 2018 22:05:54 -0800 Subject: Experiments with function enumeration. --- src/opt/dau/dauNpn.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/opt') diff --git a/src/opt/dau/dauNpn.c b/src/opt/dau/dauNpn.c index ea33d518..1af758cb 100644 --- a/src/opt/dau/dauNpn.c +++ b/src/opt/dau/dauNpn.c @@ -28,7 +28,7 @@ ABC_NAMESPACE_IMPL_START /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -#define USE4VARS 1 +//#define USE4VARS 1 //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// @@ -154,13 +154,14 @@ void Dau_AddFunction( word tCur, int nVars, unsigned * pTable, Vec_Int_t * vNpns int Digit = (1 << nVars)-1; word tMask = Abc_Tt6Mask( 1 << nVars ); word tNorm = (tCur >> Digit) & 1 ? ~tCur : tCur; - unsigned t = (unsigned)tNorm & tMask; - unsigned tRep = pTable[t]; + unsigned t = (unsigned)(tNorm & tMask); + unsigned tRep = pTable[t]; + unsigned tRep2 = pTable[tRep & 0x7FFFFFFF]; assert( ((tNorm >> Digit) & 1) == 0 ); - if ( (tRep >> 31) == 0 ) // first time + if ( (tRep2 >> 31) == 0 ) // first time { - Vec_IntPush( vNpns, tRep ); - pTable[tRep] |= (1 << 31); + Vec_IntPush( vNpns, tRep2 ); + pTable[tRep & 0x7FFFFFFF] = tRep2 | (1 << 31); } } @@ -263,7 +264,7 @@ void Dau_NetworkEnum() } void Dau_NetworkEnumTest() { - Dau_TruthEnum(); + //Dau_TruthEnum(); Dau_NetworkEnum(); } -- cgit v1.2.3