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
5a3e0a1f
Commit
5a3e0a1f
authored
May 22, 2022
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to MiniAIG.
parent
4f7bf910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
src/aig/miniaig/miniaig.h
+22
-3
No files found.
src/aig/miniaig/miniaig.h
View file @
5a3e0a1f
...
...
@@ -280,18 +280,37 @@ static int Mini_AigAndMulti( Mini_Aig_t * p, int * pLits, int nLits )
}
return
pLits
[
0
];
}
static
int
Mini_AigMuxMulti
(
Mini_Aig_t
*
p
,
int
*
pCtrl
,
int
*
pData
,
int
nData
)
static
int
Mini_AigMuxMulti
(
Mini_Aig_t
*
p
,
int
*
pCtrl
,
int
nCtrl
,
int
*
pData
,
int
nData
)
{
int
i
,
c
;
assert
(
nData
>
0
);
if
(
nCtrl
==
0
)
return
pData
[
0
];
assert
(
nData
<=
(
1
<<
nCtrl
)
);
for
(
c
=
0
;
c
<
nCtrl
;
c
++
)
{
for
(
i
=
0
;
i
<
nData
/
2
;
i
++
)
pData
[
i
]
=
Mini_AigMux
(
p
,
pCtrl
[
c
],
pData
[
2
*
i
+
1
],
pData
[
2
*
i
]
);
if
(
nData
&
1
)
pData
[
i
++
]
=
Mini_AigMux
(
p
,
pCtrl
[
c
],
0
,
pData
[
nData
-
1
]
);
nData
=
i
;
}
assert
(
nData
==
1
);
return
pData
[
0
];
}
static
int
Mini_AigMuxMulti_rec
(
Mini_Aig_t
*
p
,
int
*
pCtrl
,
int
*
pData
,
int
nData
)
{
int
Res0
,
Res1
;
assert
(
nData
>
0
);
if
(
nData
==
1
)
return
pData
[
0
];
assert
(
nData
%
2
==
0
);
Res0
=
Mini_AigMuxMulti
(
p
,
pCtrl
+
1
,
pData
,
nData
/
2
);
Res1
=
Mini_AigMuxMulti
(
p
,
pCtrl
+
1
,
pData
+
nData
/
2
,
nData
/
2
);
Res0
=
Mini_AigMuxMulti
_rec
(
p
,
pCtrl
+
1
,
pData
,
nData
/
2
);
Res1
=
Mini_AigMuxMulti
_rec
(
p
,
pCtrl
+
1
,
pData
+
nData
/
2
,
nData
/
2
);
return
Mini_AigMux
(
p
,
pCtrl
[
0
],
Res1
,
Res0
);
}
static
unsigned
s_MiniTruths5
[
5
]
=
{
0xAAAAAAAA
,
0xCCCCCCCC
,
...
...
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