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
ee792bdd
Commit
ee792bdd
authored
Mar 05, 2019
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating canonical form computation procedures.
parent
3cce04c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
10 deletions
+42
-10
src/base/abci/abc.c
+3
-0
src/base/abci/abcNpn.c
+39
-10
src/opt/dau/dauCanon.c
+0
-0
No files found.
src/base/abci/abc.c
View file @
ee792bdd
...
...
@@ -6797,6 +6797,9 @@ usage:
Abc_Print
(
-
2
,
"
\t
6: new phase canonical form
\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
9: FPL2018 algorithm by XueGong Zhou at Fudan University, Shanghai
\n
"
);
Abc_Print
(
-
2
,
"
\t
10: TRETS algorithm by XueGong Zhou at Fudan University, Shanghai
\n
"
);
Abc_Print
(
-
2
,
"
\t
11: a new exact 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
-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"
);
src/base/abci/abcNpn.c
View file @
ee792bdd
...
...
@@ -185,23 +185,29 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
char
*
pAlgoName
=
NULL
;
if
(
NpnType
==
0
)
pAlgoName
=
"uniqifying "
;
pAlgoName
=
"uniqifying
"
;
else
if
(
NpnType
==
1
)
pAlgoName
=
"exact NPN "
;
pAlgoName
=
"exact NPN
"
;
else
if
(
NpnType
==
2
)
pAlgoName
=
"counting 1s "
;
pAlgoName
=
"counting 1s
"
;
else
if
(
NpnType
==
3
)
pAlgoName
=
"Jake's hybrid fast "
;
pAlgoName
=
"Jake's hybrid fast
"
;
else
if
(
NpnType
==
4
)
pAlgoName
=
"Jake's hybrid good "
;
pAlgoName
=
"Jake's hybrid good
"
;
else
if
(
NpnType
==
5
)
pAlgoName
=
"new hybrid fast "
;
pAlgoName
=
"new hybrid fast
"
;
else
if
(
NpnType
==
6
)
pAlgoName
=
"new phase flipping "
;
pAlgoName
=
"new phase flipping
"
;
else
if
(
NpnType
==
7
)
pAlgoName
=
"new hier. matching "
;
pAlgoName
=
"new hier. matching
"
;
else
if
(
NpnType
==
8
)
pAlgoName
=
"new adap. matching "
;
pAlgoName
=
"new adap. matching "
;
else
if
(
NpnType
==
9
)
pAlgoName
=
"FPL 2018 algorithm "
;
else
if
(
NpnType
==
10
)
pAlgoName
=
"TRETS algorithm "
;
else
if
(
NpnType
==
11
)
pAlgoName
=
"new exact algorithm "
;
assert
(
p
->
nVars
<=
16
);
if
(
pAlgoName
)
...
...
@@ -327,6 +333,29 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
}
Abc_TtHieManStop
(
pMan
);
}
else
if
(
NpnType
==
9
||
NpnType
==
10
||
NpnType
==
11
)
{
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
);
unsigned
Abc_TtCanonicizeCA
(
Abc_TtHieMan_t
*
p
,
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
,
int
iThres
);
Abc_TtHieMan_t
*
pMan
=
Abc_TtHieManStart
(
p
->
nVars
,
5
);
for
(
i
=
0
;
i
<
p
->
nFuncs
;
i
++
)
{
if
(
fVerbose
)
printf
(
"%7d : "
,
i
);
if
(
NpnType
==
9
)
uCanonPhase
=
Abc_TtCanonicizeWrap
(
Abc_TtCanonicizeAda
,
pMan
,
p
->
pFuncs
[
i
],
p
->
nVars
,
pCanonPerm
,
100
);
// FPL2018 algorithm
else
if
(
NpnType
==
10
)
uCanonPhase
=
Abc_TtCanonicizeWrap
(
Abc_TtCanonicizeAda
,
pMan
,
p
->
pFuncs
[
i
],
p
->
nVars
,
pCanonPerm
,
1100
);
// TRETS algorithm
else
if
(
NpnType
==
11
)
uCanonPhase
=
Abc_TtCanonicizeWrap
(
Abc_TtCanonicizeAda
,
pMan
,
p
->
pFuncs
[
i
],
p
->
nVars
,
pCanonPerm
,
0
);
// the new exact algorithm
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
);
clk
=
Abc_Clock
()
-
clk
;
printf
(
"Classes =%9d "
,
Abc_TruthNpnCountUnique
(
p
)
);
...
...
@@ -390,7 +419,7 @@ int Abc_NpnTest( char * pFileName, int NpnType, int nVarNum, int fDumpRes, int f
{
if
(
fVerbose
)
printf
(
"Using truth tables from file
\"
%s
\"
...
\n
"
,
pFileName
);
if
(
NpnType
>=
0
&&
NpnType
<=
8
)
if
(
NpnType
>=
0
&&
NpnType
<=
11
)
Abc_TruthNpnTest
(
pFileName
,
NpnType
,
nVarNum
,
fDumpRes
,
fBinary
,
fVerbose
);
else
printf
(
"Unknown canonical form value (%d).
\n
"
,
NpnType
);
...
...
src/opt/dau/dauCanon.c
View file @
ee792bdd
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