Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
fe3d3341
Commit
fe3d3341
authored
Apr 08, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with hashing.
parent
dd51c299
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
2 deletions
+83
-2
abclib.dsp
+8
-0
src/base/abci/abc.c
+1
-0
src/base/acb/acbSets.c
+54
-0
src/base/acb/acbUtil.c
+1
-1
src/base/acb/module.make
+1
-0
src/misc/vec/vecHsh.h
+18
-1
No files found.
abclib.dsp
View file @
fe3d3341
...
@@ -1083,6 +1083,10 @@ SOURCE=.\src\base\acb\acbPar.h
...
@@ -1083,6 +1083,10 @@ SOURCE=.\src\base\acb\acbPar.h
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\base\acb\acbSets.c
# End Source File
# Begin Source File
SOURCE=.\src\base\acb\acbUtil.c
SOURCE=.\src\base\acb\acbUtil.c
# End Source File
# End Source File
# End Group
# End Group
...
@@ -4551,6 +4555,10 @@ SOURCE=.\src\aig\gia\giaCTas.c
...
@@ -4551,6 +4555,10 @@ SOURCE=.\src\aig\gia\giaCTas.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaCut.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaDfs.c
SOURCE=.\src\aig\gia\giaDfs.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/base/abci/abc.c
View file @
fe3d3341
...
@@ -12385,6 +12385,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -12385,6 +12385,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
// Cba_PrsReadBlifTest();
// Cba_PrsReadBlifTest();
}
}
// Abc_NtkComputePaths( Abc_FrameReadNtk(pAbc) );
// Abc_NtkComputePaths( Abc_FrameReadNtk(pAbc) );
Acb_DataReadTest
();
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: test [-CKDNM] [-aovwh] <file_name>
\n
"
);
Abc_Print
(
-
2
,
"usage: test [-CKDNM] [-aovwh] <file_name>
\n
"
);
src/base/acb/acbSets.c
0 → 100644
View file @
fe3d3341
/**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
src/base/acb/acbUtil.c
View file @
fe3d3341
...
@@ -455,7 +455,7 @@ void Acb_NtkSaveSupport( Acb_Ntk_t * p, int iObj )
...
@@ -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
)
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_NtkSaveSupport
(
p
,
Pivot
);
//Acb_NtkPrintNode( p, Pivot );
//Acb_NtkPrintNode( p, Pivot );
Acb_NtkResetNode
(
p
,
Pivot
,
uTruth
,
vSupp
);
Acb_NtkResetNode
(
p
,
Pivot
,
uTruth
,
vSupp
);
...
...
src/base/acb/module.make
View file @
fe3d3341
...
@@ -3,4 +3,5 @@ SRC += src/base/acb/acbAbc.c \
...
@@ -3,4 +3,5 @@ SRC += src/base/acb/acbAbc.c \
src/base/acb/acbCom.c
\
src/base/acb/acbCom.c
\
src/base/acb/acbFunc.c
\
src/base/acb/acbFunc.c
\
src/base/acb/acbMfs.c
\
src/base/acb/acbMfs.c
\
src/base/acb/acbSets.c
\
src/base/acb/acbUtil.c
src/base/acb/acbUtil.c
src/misc/vec/vecHsh.h
View file @
fe3d3341
...
@@ -140,7 +140,24 @@ static inline int Hsh_IntManEntryNum( Hsh_IntMan_t * p )
...
@@ -140,7 +140,24 @@ static inline int Hsh_IntManEntryNum( Hsh_IntMan_t * p )
SeeAlso []
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
};
static
int
s_Primes
[
7
]
=
{
4177
,
5147
,
5647
,
6343
,
7103
,
7873
,
8147
};
unsigned
char
*
pDataC
=
(
unsigned
char
*
)
pData
;
unsigned
char
*
pDataC
=
(
unsigned
char
*
)
pData
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment