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
e1986d04
Commit
e1986d04
authored
Oct 05, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Towards better Boolean matching.
parent
a4a1053d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
src/map/if/ifDec07.c
+2
-2
src/misc/util/utilTruth.h
+13
-0
src/opt/dau/dauNonDsd.c
+2
-15
No files found.
src/map/if/ifDec07.c
View file @
e1986d04
...
...
@@ -988,13 +988,13 @@ word If_Dec5PerformEx()
{
word
z
;
// find one
z
=
0x17ac
&
0xFFFF
;
z
=
(
word
)(
0x17ac
&
0xFFFF
)
;
z
|=
(((
word
)
3
)
<<
(
16
+
4
*
0
));
z
|=
(((
word
)
4
)
<<
(
16
+
4
*
1
));
z
|=
(((
word
)
1
)
<<
(
16
+
4
*
2
));
z
|=
(((
word
)
2
)
<<
(
16
+
4
*
3
));
// second one
z
|=
((
0x179a
&
0xFFFF
)
<<
32
);
z
|=
((
(
word
)(
0x179a
&
0xFFFF
)
)
<<
32
);
z
|=
(((
word
)
0
)
<<
(
48
+
4
*
0
));
z
|=
(((
word
)
7
)
<<
(
48
+
4
*
1
));
z
|=
(((
word
)
1
)
<<
(
48
+
4
*
2
));
...
...
src/misc/util/utilTruth.h
View file @
e1986d04
...
...
@@ -61,6 +61,19 @@ static word s_PMasks[5][3] = {
{
ABC_CONST
(
0xFFFF00000000FFFF
),
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,
5
,
5
,
6
,
5
,
6
,
6
,
7
,
4
,
5
,
5
,
6
,
5
,
6
,
6
,
7
,
5
,
6
,
6
,
7
,
6
,
7
,
7
,
8
};
static
inline
int
Abc_TtBitCount16
(
int
i
)
{
return
Abc_TtBitCount8
[
i
&
0xFF
]
+
Abc_TtBitCount8
[
i
>>
8
];
}
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
...
...
src/opt/dau/dauNonDsd.c
View file @
e1986d04
...
...
@@ -27,19 +27,6 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
// the bit count for the first 256 integer numbers
static
int
BitCount8
[
256
]
=
{
0
,
1
,
1
,
2
,
1
,
2
,
2
,
3
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
4
,
5
,
5
,
6
,
5
,
6
,
6
,
7
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
4
,
5
,
5
,
6
,
5
,
6
,
6
,
7
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
4
,
5
,
5
,
6
,
5
,
6
,
6
,
7
,
3
,
4
,
4
,
5
,
4
,
5
,
5
,
6
,
4
,
5
,
5
,
6
,
5
,
6
,
6
,
7
,
4
,
5
,
5
,
6
,
5
,
6
,
6
,
7
,
5
,
6
,
6
,
7
,
6
,
7
,
7
,
8
};
static
inline
BitCount16
(
int
i
)
{
return
BitCount8
[
i
&
0xFF
]
+
BitCount8
[
i
>>
8
];
}
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
...
...
@@ -323,7 +310,7 @@ Vec_Int_t * Dau_DecFindSets( word * p, int nVars )
// iterate through bound sets of each size in increasing order
for
(
sizeB
=
2
;
sizeB
<
nVars
;
sizeB
++
)
// bound set size
for
(
maskB
=
0
;
maskB
<
Limit
;
maskB
++
)
// bound set
if
(
BitCount16
(
maskB
)
==
sizeB
)
if
(
Abc_Tt
BitCount16
(
maskB
)
==
sizeB
)
{
// permute variables to have bound set on top
Dau_DecMoveFreeToLSB
(
p
,
nVars
,
V2P
,
P2V
,
maskB
,
sizeB
);
...
...
@@ -342,7 +329,7 @@ Vec_Int_t * Dau_DecFindSets( word * p, int nVars )
for
(
sizeS
=
1
;
sizeS
<=
sizeB
-
2
;
sizeS
++
)
// shared set size
// sizeS = 1;
for
(
maskS
=
0
;
maskS
<
(
1
<<
sizeB
);
maskS
++
)
// shared set
if
(
BitCount16
(
maskS
)
==
sizeS
)
if
(
Abc_Tt
BitCount16
(
maskS
)
==
sizeS
)
{
setMixed
=
Dau_DecCreateSet
(
pVarsB
,
sizeB
,
maskS
);
// printf( "Considering %10d ", setMixed );
...
...
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