summaryrefslogtreecommitdiffstats
path: root/src/opt/dau
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-08-01 22:05:54 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2018-08-01 22:05:54 -0800
commit905a627758841c5dee5e1ce4a180badcaff303f1 (patch)
tree8d822d5b3de99abc5a1ca4b72f5c14e840e441f9 /src/opt/dau
parentcc4e0be71bb424839f8d5988a2e08a87b114922c (diff)
downloadabc-905a627758841c5dee5e1ce4a180badcaff303f1.tar.gz
abc-905a627758841c5dee5e1ce4a180badcaff303f1.tar.bz2
abc-905a627758841c5dee5e1ce4a180badcaff303f1.zip
Experiments with function enumeration.
Diffstat (limited to 'src/opt/dau')
-rw-r--r--src/opt/dau/dauNpn.c15
1 files changed, 8 insertions, 7 deletions
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();
}