summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/base/abci/abc.c1
-rw-r--r--src/base/acb/acbSets.c54
-rw-r--r--src/base/acb/acbUtil.c2
-rw-r--r--src/base/acb/module.make1
-rw-r--r--src/misc/vec/vecHsh.h19
5 files changed, 75 insertions, 2 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index b7c9e0cd..55e14545 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -12385,6 +12385,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
// Cba_PrsReadBlifTest();
}
// Abc_NtkComputePaths( Abc_FrameReadNtk(pAbc) );
+ Acb_DataReadTest();
return 0;
usage:
Abc_Print( -2, "usage: test [-CKDNM] [-aovwh] <file_name>\n" );
diff --git a/src/base/acb/acbSets.c b/src/base/acb/acbSets.c
new file mode 100644
index 00000000..362910d9
--- /dev/null
+++ b/src/base/acb/acbSets.c
@@ -0,0 +1,54 @@
+/**CFile****************************************************************
+
+ FileName [acbSets.c]
+
+ SystemName [ABC: Logic synthesis and verification system.]
+
+ PackageName [Hierarchical word-level netlist.]
+
+ Synopsis [Reading data from file.]
+
+ Author [Alan Mishchenko]
+
+ Affiliation [UC Berkeley]
+
+ Date [Ver. 1.0. Started - July 21, 2015.]
+
+ Revision [$Id: acbSets.c,v 1.00 2014/11/29 00:00:00 alanmi Exp $]
+
+***********************************************************************/
+
+#include "acb.h"
+
+ABC_NAMESPACE_IMPL_START
+
+////////////////////////////////////////////////////////////////////////
+/// DECLARATIONS ///
+////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////
+/// FUNCTION DEFINITIONS ///
+////////////////////////////////////////////////////////////////////////
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Acb_DataReadTest()
+{
+}
+
+////////////////////////////////////////////////////////////////////////
+/// END OF FILE ///
+////////////////////////////////////////////////////////////////////////
+
+
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/base/acb/acbUtil.c b/src/base/acb/acbUtil.c
index 1c47bf65..2d56a553 100644
--- a/src/base/acb/acbUtil.c
+++ b/src/base/acb/acbUtil.c
@@ -455,7 +455,7 @@ void Acb_NtkSaveSupport( Acb_Ntk_t * p, int iObj )
}
void Acb_NtkUpdateNode( Acb_Ntk_t * p, int Pivot, word uTruth, Vec_Int_t * vSupp )
{
- int Level = Acb_ObjLevelD(p, Pivot);
+ //int Level = Acb_ObjLevelD(p, Pivot);
Acb_NtkSaveSupport( p, Pivot );
//Acb_NtkPrintNode( p, Pivot );
Acb_NtkResetNode( p, Pivot, uTruth, vSupp );
diff --git a/src/base/acb/module.make b/src/base/acb/module.make
index ce5dcaeb..06affeff 100644
--- a/src/base/acb/module.make
+++ b/src/base/acb/module.make
@@ -3,4 +3,5 @@ SRC += src/base/acb/acbAbc.c \
src/base/acb/acbCom.c \
src/base/acb/acbFunc.c \
src/base/acb/acbMfs.c \
+ src/base/acb/acbSets.c \
src/base/acb/acbUtil.c
diff --git a/src/misc/vec/vecHsh.h b/src/misc/vec/vecHsh.h
index de9a038a..4f15f6f0 100644
--- a/src/misc/vec/vecHsh.h
+++ b/src/misc/vec/vecHsh.h
@@ -140,7 +140,24 @@ static inline int Hsh_IntManEntryNum( Hsh_IntMan_t * p )
SeeAlso []
***********************************************************************/
-static inline int Hsh_IntManHash( unsigned * pData, int nSize, int nTableSize )
+// https://en.wikipedia.org/wiki/Jenkins_hash_function
+static inline int Hsh_IntManHash( unsigned * pData, int nSize, int nTableSize )
+{
+ int i = 0; unsigned hash = 0;
+ unsigned char * pDataC = (unsigned char *)pData;
+ nSize <<= 2;
+ while ( i != nSize )
+ {
+ hash += pDataC[i++];
+ hash += hash << 10;
+ hash ^= hash >> 6;
+ }
+ hash += hash << 3;
+ hash ^= hash >> 11;
+ hash += hash << 15;
+ return (int)(hash % nTableSize);
+}
+static inline int Hsh_IntManHash2( unsigned * pData, int nSize, int nTableSize )
{
static int s_Primes[7] = { 4177, 5147, 5647, 6343, 7103, 7873, 8147 };
unsigned char * pDataC = (unsigned char *)pData;