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
e140ef7e
Commit
e140ef7e
authored
Jun 05, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix in SMT handling: 'distinct' with more than two inputs.
parent
943e625e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
+26
-1
src/base/wlc/wlcBlast.c
+25
-0
src/base/wlc/wlcReadSmt.c
+1
-1
No files found.
src/base/wlc/wlcBlast.c
View file @
e140ef7e
...
@@ -1211,6 +1211,31 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int iOutput, in
...
@@ -1211,6 +1211,31 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int iOutput, in
for
(
k
=
1
;
k
<
nRange
;
k
++
)
for
(
k
=
1
;
k
<
nRange
;
k
++
)
Vec_IntPush
(
vRes
,
0
);
Vec_IntPush
(
vRes
,
0
);
}
}
else
if
(
pObj
->
Type
==
WLC_OBJ_COMP_NOTEQU
&&
Wlc_ObjFaninNum
(
pObj
)
>
2
)
{
// find the max range
int
a
,
b
,
iRes
=
1
,
nRangeMax
=
Abc_MaxInt
(
nRange0
,
nRange1
);
for
(
k
=
2
;
k
<
Wlc_ObjFaninNum
(
pObj
);
k
++
)
nRangeMax
=
Abc_MaxInt
(
nRangeMax
,
Wlc_ObjRange
(
Wlc_NtkObj
(
p
,
Wlc_ObjFaninId
(
pObj
,
k
))
)
);
// create pairwise distinct
for
(
a
=
0
;
a
<
Wlc_ObjFaninNum
(
pObj
);
a
++
)
for
(
b
=
a
+
1
;
b
<
Wlc_ObjFaninNum
(
pObj
);
b
++
)
{
int
nRange0
=
Wlc_ObjRange
(
Wlc_NtkObj
(
p
,
Wlc_ObjFaninId
(
pObj
,
a
))
);
int
nRange1
=
Wlc_ObjRange
(
Wlc_NtkObj
(
p
,
Wlc_ObjFaninId
(
pObj
,
b
))
);
int
*
pFans0
=
Vec_IntEntryP
(
vBits
,
Wlc_ObjCopy
(
p
,
Wlc_ObjFaninId
(
pObj
,
a
))
);
int
*
pFans1
=
Vec_IntEntryP
(
vBits
,
Wlc_ObjCopy
(
p
,
Wlc_ObjFaninId
(
pObj
,
b
))
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
0
);
int
*
pArg1
=
Wlc_VecLoadFanins
(
vTemp1
,
pFans1
,
nRange1
,
nRangeMax
,
0
);
int
iLit
=
0
;
for
(
k
=
0
;
k
<
nRangeMax
;
k
++
)
iLit
=
Gia_ManHashOr
(
pNew
,
iLit
,
Gia_ManHashXor
(
pNew
,
pArg0
[
k
],
pArg1
[
k
])
);
iRes
=
Gia_ManHashAnd
(
pNew
,
iRes
,
iLit
);
}
Vec_IntFill
(
vRes
,
1
,
iRes
);
for
(
k
=
1
;
k
<
nRange
;
k
++
)
Vec_IntPush
(
vRes
,
0
);
}
else
if
(
pObj
->
Type
==
WLC_OBJ_COMP_EQU
||
pObj
->
Type
==
WLC_OBJ_COMP_NOTEQU
)
else
if
(
pObj
->
Type
==
WLC_OBJ_COMP_EQU
||
pObj
->
Type
==
WLC_OBJ_COMP_NOTEQU
)
{
{
int
iLit
=
0
,
nRangeMax
=
Abc_MaxInt
(
nRange0
,
nRange1
);
int
iLit
=
0
,
nRangeMax
=
Abc_MaxInt
(
nRange0
,
nRange1
);
...
...
src/base/wlc/wlcReadSmt.c
View file @
e140ef7e
...
@@ -331,7 +331,7 @@ static inline int Smt_PrsCreateNode( Wlc_Ntk_t * pNtk, int Type, int fSigned, in
...
@@ -331,7 +331,7 @@ static inline int Smt_PrsCreateNode( Wlc_Ntk_t * pNtk, int Type, int fSigned, in
Type
==
WLC_OBJ_LOGIC_OR
||
// 29: logic OR
Type
==
WLC_OBJ_LOGIC_OR
||
// 29: logic OR
Type
==
WLC_OBJ_LOGIC_XOR
||
// 30: logic XOR
Type
==
WLC_OBJ_LOGIC_XOR
||
// 30: logic XOR
Type
==
WLC_OBJ_COMP_EQU
||
// 31: compare equal
Type
==
WLC_OBJ_COMP_EQU
||
// 31: compare equal
Type
==
WLC_OBJ_COMP_NOTEQU
||
// 32: compare not equal
// Type == WLC_OBJ_COMP_NOTEQU || // 32: compare not equal -- bug fix
Type
==
WLC_OBJ_COMP_LESS
||
// 33: compare less
Type
==
WLC_OBJ_COMP_LESS
||
// 33: compare less
Type
==
WLC_OBJ_COMP_MORE
||
// 34: compare more
Type
==
WLC_OBJ_COMP_MORE
||
// 34: compare more
Type
==
WLC_OBJ_COMP_LESSEQU
||
// 35: compare less or equal
Type
==
WLC_OBJ_COMP_LESSEQU
||
// 35: compare less or equal
...
...
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