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
d8c47d56
Commit
d8c47d56
authored
Sep 17, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing mismatch in exact NPN computation (by XueGong Zhou)
parent
677c984e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
13 deletions
+9
-13
src/opt/dau/dau.h
+4
-0
src/opt/dau/dauCanon.c
+0
-0
src/opt/dau/dauNpn.c
+5
-13
No files found.
src/opt/dau/dau.h
View file @
d8c47d56
...
...
@@ -60,6 +60,7 @@ typedef enum {
typedef
struct
Dss_Man_t_
Dss_Man_t
;
typedef
struct
Abc_TtHieMan_t_
Abc_TtHieMan_t
;
typedef
unsigned
(
*
TtCanonicizeFunc
)(
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
flag
);
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
...
...
@@ -83,6 +84,9 @@ extern int Abc_TtCountOnesInCofsSimple( word * pTruth, int nVars, int
extern
unsigned
Abc_TtCanonicizeHie
(
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
fExact
);
extern
Abc_TtHieMan_t
*
Abc_TtHieManStart
(
int
nVars
,
int
nLevels
);
extern
void
Abc_TtHieManStop
(
Abc_TtHieMan_t
*
p
);
extern
unsigned
Abc_TtCanonicizeWrap
(
TtCanonicizeFunc
func
,
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
flag
);
extern
unsigned
Abc_TtCanonicizeAda
(
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
iThres
);
extern
unsigned
Abc_TtCanonicizeHie
(
Abc_TtHieMan_t
*
p
,
word
*
pTruthInit
,
int
nVars
,
char
*
pCanonPerm
,
int
fExact
);
/*=== dauCount.c ==========================================================*/
extern
int
Abc_TtCountOnesInCofsQuick
(
word
*
pTruth
,
int
nVars
,
int
*
pStore
);
/*=== dauDsd.c ==========================================================*/
...
...
src/opt/dau/dauCanon.c
View file @
d8c47d56
This diff is collapsed.
Click to expand it.
src/opt/dau/dauNpn.c
View file @
d8c47d56
...
...
@@ -604,16 +604,8 @@ int Dau_PrintStats( int nNodes, int nInputs, int nVars, Vec_Int_t * vNodSup, int
fflush
(
stdout
);
return
nNew
;
}
int
Dau_RunNpn
(
Abc_TtHieMan_t
*
pMan
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
)
{
typedef
unsigned
(
*
TtCanonicizeFunc
)(
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
flag
);
unsigned
Abc_TtCanonicizeWrap
(
TtCanonicizeFunc
func
,
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
flag
);
unsigned
Abc_TtCanonicizeAda
(
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
iThres
);
if
(
nVars
<
6
)
return
Abc_TtCanonicizeWrap
(
Abc_TtCanonicizeAda
,
NULL
,
pTruth
,
nVars
,
pCanonPerm
,
99
);
else
return
Abc_TtCanonicizeWrap
(
Abc_TtCanonicizeAda
,
pMan
,
pTruth
,
nVars
,
pCanonPerm
,
99
);
}
int
Dau_InsertFunction
(
Abc_TtHieMan_t
*
pMan
,
word
*
pCur
,
int
nNodes
,
int
nInputs
,
int
nVars0
,
int
nVars
,
Vec_Mem_t
*
vTtMem
,
Vec_Int_t
*
vNodSup
,
int
nFronts
,
abctime
clk
)
{
...
...
@@ -621,7 +613,7 @@ int Dau_InsertFunction( Abc_TtHieMan_t * pMan, word * pCur, int nNodes, int nInp
char
Perm
[
16
]
=
{
0
};
int
nVarsNew
=
Abc_TtMinBase
(
pCur
,
NULL
,
nVars
,
nInputs
);
//unsigned Phase = Abc_TtCanonicizeHie( pMan, pCur, nVarsNew, Perm, 1 );
unsigned
Phase
=
Dau_RunNpn
(
pMan
,
pCur
,
nInputs
,
Perm
);
unsigned
Phase
=
Abc_TtCanonicizeWrap
(
Abc_TtCanonicizeAda
,
pMan
,
pCur
,
nVarsNew
,
Perm
,
99
);
int
nEntries
=
Vec_MemEntryNum
(
vTtMem
);
int
Entry
=
Vec_MemHashInsert
(
vTtMem
,
pCur
);
if
(
nEntries
==
Vec_MemEntryNum
(
vTtMem
)
)
// found in the table - not new
...
...
@@ -639,7 +631,7 @@ void Dau_FunctionEnum( int nInputs, int nVars, int nNodeMax, int fUseTwo, int fR
{
abctime
clk
=
Abc_Clock
();
int
nWords
=
Abc_TtWordNum
(
nInputs
);
word
nSteps
=
0
;
Abc_TtHieMan_t
*
pMan
=
Abc_TtHieManStart
(
nInputs
,
5
);
Abc_TtHieMan_t
*
pMan
=
Abc_TtHieManStart
(
nInputs
,
5
);
Vec_Mem_t
*
vTtMem
=
Vec_MemAlloc
(
nWords
,
16
);
Vec_Int_t
*
vNodSup
=
Vec_IntAlloc
(
1
<<
16
);
int
v
,
u
,
k
,
m
,
n
,
Entry
,
nNew
,
Limit
[
32
]
=
{
1
,
2
};
...
...
@@ -809,7 +801,7 @@ void Dau_FunctionEnum( int nInputs, int nVars, int nNodeMax, int fUseTwo, int fR
Abc_PrintTime
(
1
,
"Total time"
,
Abc_Clock
()
-
clk
);
//Dau_DumpFuncs( vTtMem, vNodSup, nVars, nNodeMax );
//Dau_ExactNpnPrint( vTtMem, vNodSup, nVars, nInputs, n );
Abc_TtHieManStop
(
pMan
);
Abc_TtHieManStop
(
pMan
);
Vec_MemHashFree
(
vTtMem
);
Vec_MemFreeP
(
&
vTtMem
);
Vec_IntFree
(
vNodSup
);
...
...
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