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
9ff7134f
Commit
9ff7134f
authored
Mar 25, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding new NPN code developed by XueGong Zhou at Fudan University.
parent
a6d489e7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
8 deletions
+30
-8
src/base/abci/abc.c
+1
-0
src/base/abci/abcNpn.c
+28
-7
src/opt/dau/dau.h
+1
-1
src/opt/dau/dauCanon.c
+0
-0
No files found.
src/base/abci/abc.c
View file @
9ff7134f
...
@@ -6674,6 +6674,7 @@ usage:
...
@@ -6674,6 +6674,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
5: new fast hybrid semi-canonical form
\n
"
);
Abc_Print
(
-
2
,
"
\t
5: new fast hybrid semi-canonical form
\n
"
);
Abc_Print
(
-
2
,
"
\t
6: new phase canonical form
\n
"
);
Abc_Print
(
-
2
,
"
\t
6: new phase canonical form
\n
"
);
Abc_Print
(
-
2
,
"
\t
7: new hierarchical matching
\n
"
);
Abc_Print
(
-
2
,
"
\t
7: new hierarchical matching
\n
"
);
Abc_Print
(
-
2
,
"
\t
8: hierarchical matching by XueGong Zhou at Fudan University, Shanghai
\n
"
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the number of support variables (binary files only) [default = unused]
\n
"
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the number of support variables (binary files only) [default = unused]
\n
"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dumping resulting functions into a file [default = %s]
\n
"
,
fDumpRes
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dumping resulting functions into a file [default = %s]
\n
"
,
fDumpRes
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle dumping in binary format [default = %s]
\n
"
,
fBinary
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle dumping in binary format [default = %s]
\n
"
,
fBinary
?
"yes"
:
"no"
);
src/base/abci/abcNpn.c
View file @
9ff7134f
...
@@ -200,6 +200,8 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
...
@@ -200,6 +200,8 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
pAlgoName
=
"new phase flipping "
;
pAlgoName
=
"new phase flipping "
;
else
if
(
NpnType
==
7
)
else
if
(
NpnType
==
7
)
pAlgoName
=
"new hier. matching "
;
pAlgoName
=
"new hier. matching "
;
else
if
(
NpnType
==
8
)
pAlgoName
=
"new adap. matching "
;
assert
(
p
->
nVars
<=
16
);
assert
(
p
->
nVars
<=
16
);
if
(
pAlgoName
)
if
(
pAlgoName
)
...
@@ -293,13 +295,12 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
...
@@ -293,13 +295,12 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
}
}
else
if
(
NpnType
==
7
)
else
if
(
NpnType
==
7
)
{
{
extern
unsigned
Abc_TtCanonicizeHie
(
Abc_TtMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
fExact
);
extern
unsigned
Abc_TtCanonicizeHie
(
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
fExact
);
extern
Abc_TtMan_t
*
Abc_TtManStart
(
int
nVars
);
extern
Abc_TtHieMan_t
*
Abc_TtHieManStart
(
int
nVars
,
int
nLevels
);
extern
void
Abc_TtManStop
(
Abc_TtMan_t
*
p
);
extern
void
Abc_TtHieManStop
(
Abc_TtHieMan_t
*
p
);
extern
int
Abc_TtManNumClasses
(
Abc_TtMan_t
*
p
);
int
fExact
=
0
;
int
fExact
=
0
;
Abc_TtMan_t
*
pMan
=
Abc_TtManStart
(
p
->
nVars
);
Abc_TtHieMan_t
*
pMan
=
Abc_TtHieManStart
(
p
->
nVars
,
5
);
for
(
i
=
0
;
i
<
p
->
nFuncs
;
i
++
)
for
(
i
=
0
;
i
<
p
->
nFuncs
;
i
++
)
{
{
if
(
fVerbose
)
if
(
fVerbose
)
...
@@ -310,7 +311,27 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
...
@@ -310,7 +311,27 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
// nClasses = Abc_TtManNumClasses( pMan );
// nClasses = Abc_TtManNumClasses( pMan );
Abc_TtManStop
(
pMan
);
Abc_TtHieManStop
(
pMan
);
}
else
if
(
NpnType
==
8
)
{
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
);
Abc_TtHieMan_t
*
Abc_TtHieManStart
(
int
nVars
,
int
nLevels
);
void
Abc_TtHieManStop
(
Abc_TtHieMan_t
*
p
);
int
fHigh
=
1
,
iEnumThres
=
25
;
Abc_TtHieMan_t
*
pMan
=
Abc_TtHieManStart
(
p
->
nVars
,
5
);
for
(
i
=
0
;
i
<
p
->
nFuncs
;
i
++
)
{
if
(
fVerbose
)
printf
(
"%7d : "
,
i
);
uCanonPhase
=
Abc_TtCanonicizeWrap
(
Abc_TtCanonicizeAda
,
pMan
,
p
->
pFuncs
[
i
],
p
->
nVars
,
pCanonPerm
,
fHigh
*
100
+
iEnumThres
);
if
(
fVerbose
)
Extra_PrintHex
(
stdout
,
(
unsigned
*
)
p
->
pFuncs
[
i
],
p
->
nVars
),
Abc_TruthNpnPrint
(
pCanonPerm
,
uCanonPhase
,
p
->
nVars
),
printf
(
"
\n
"
);
}
Abc_TtHieManStop
(
pMan
);
}
}
else
assert
(
0
);
else
assert
(
0
);
clk
=
Abc_Clock
()
-
clk
;
clk
=
Abc_Clock
()
-
clk
;
...
@@ -375,7 +396,7 @@ int Abc_NpnTest( char * pFileName, int NpnType, int nVarNum, int fDumpRes, int f
...
@@ -375,7 +396,7 @@ int Abc_NpnTest( char * pFileName, int NpnType, int nVarNum, int fDumpRes, int f
{
{
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
"Using truth tables from file
\"
%s
\"
...
\n
"
,
pFileName
);
printf
(
"Using truth tables from file
\"
%s
\"
...
\n
"
,
pFileName
);
if
(
NpnType
>=
0
&&
NpnType
<=
7
)
if
(
NpnType
>=
0
&&
NpnType
<=
8
)
Abc_TruthNpnTest
(
pFileName
,
NpnType
,
nVarNum
,
fDumpRes
,
fBinary
,
fVerbose
);
Abc_TruthNpnTest
(
pFileName
,
NpnType
,
nVarNum
,
fDumpRes
,
fBinary
,
fVerbose
);
else
else
printf
(
"Unknown canonical form value (%d).
\n
"
,
NpnType
);
printf
(
"Unknown canonical form value (%d).
\n
"
,
NpnType
);
...
...
src/opt/dau/dau.h
View file @
9ff7134f
...
@@ -59,7 +59,7 @@ typedef enum {
...
@@ -59,7 +59,7 @@ typedef enum {
}
Dau_DsdType_t
;
}
Dau_DsdType_t
;
typedef
struct
Dss_Man_t_
Dss_Man_t
;
typedef
struct
Dss_Man_t_
Dss_Man_t
;
typedef
struct
Abc_Tt
Man_t_
Abc_Tt
Man_t
;
typedef
struct
Abc_Tt
HieMan_t_
Abc_TtHie
Man_t
;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
/// MACRO DEFINITIONS ///
...
...
src/opt/dau/dauCanon.c
View file @
9ff7134f
This diff is collapsed.
Click to expand it.
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