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
f3ecc3ff
Commit
f3ecc3ff
authored
Jul 02, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with edge-based mapping (bug fix).
parent
84a277b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
src/aig/gia/giaSatLE.c
+18
-6
No files found.
src/aig/gia/giaSatLE.c
View file @
f3ecc3ff
...
...
@@ -536,10 +536,25 @@ void Sle_ManMarkupVariables( Sle_Man_t * p )
SeeAlso []
***********************************************************************/
// returns 1 if Cut can represent LUT (Cut is equal or is contained in LUT)
static
inline
int
Sle_ManCheckContained
(
int
*
pCutLeaves
,
int
nCutLeaves
,
int
*
pLutFanins
,
int
nLutFanins
)
{
int
i
,
k
;
if
(
nCutLeaves
>
nLutFanins
)
return
0
;
for
(
i
=
0
;
i
<
nCutLeaves
;
i
++
)
{
for
(
k
=
0
;
k
<
nLutFanins
;
k
++
)
if
(
pCutLeaves
[
i
]
==
pLutFanins
[
k
]
)
break
;
if
(
k
==
nLutFanins
)
// not found
return
0
;
}
return
1
;
}
void
Sle_ManDeriveInit
(
Sle_Man_t
*
p
)
{
Vec_Int_t
*
vEdges
;
int
pFaninsCopy
[
16
];
int
i
,
iObj
,
iFanin
,
iEdge
;
if
(
!
Gia_ManHasMapping
(
p
->
pGia
)
)
return
;
...
...
@@ -553,13 +568,10 @@ void Sle_ManDeriveInit( Sle_Man_t * p )
Vec_IntPush
(
p
->
vPolars
,
iObj
);
// node var
nFanins
=
Gia_ObjLutSize
(
p
->
pGia
,
iObj
);
pFanins
=
Gia_ObjLutFanins
(
p
->
pGia
,
iObj
);
// duplicate and sort fanins
memcpy
(
pFaninsCopy
,
pFanins
,
sizeof
(
int
)
*
nFanins
);
Vec_IntSelectSort
(
pFaninsCopy
,
nFanins
);
// find cut
pList
=
Sle_ManList
(
p
,
iObj
);
Sle_ForEachCut
(
pList
,
pCut
,
i
)
if
(
nFanins
==
Sle_CutSize
(
pCut
)
&&
!
memcmp
(
pFaninsCopy
,
Sle_CutLeaves
(
pCut
),
sizeof
(
int
)
*
Sle_CutSize
(
pCut
)
)
)
if
(
Sle_ManCheckContained
(
Sle_CutLeaves
(
pCut
),
Sle_CutSize
(
pCut
),
pFanins
,
nFanins
)
)
{
iFound
=
i
;
break
;
...
...
@@ -568,7 +580,7 @@ void Sle_ManDeriveInit( Sle_Man_t * p )
{
printf
(
"Cannot find the following cut at node %d: {"
,
iObj
);
for
(
i
=
0
;
i
<
nFanins
;
i
++
)
printf
(
" %d"
,
pFanins
Copy
[
i
]
);
printf
(
" %d"
,
pFanins
[
i
]
);
printf
(
" }
\n
"
);
Sle_ManPrintCuts
(
p
->
pGia
,
p
->
vCuts
,
iObj
);
fflush
(
stdout
);
...
...
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