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
820a48b2
Commit
820a48b2
authored
Jun 07, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to Wlc to accommodate signed signals in SMT-LIB.
parent
4efbd7b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/base/wlc/wlc.h
+2
-0
src/base/wlc/wlcBlast.c
+7
-7
No files found.
src/base/wlc/wlc.h
View file @
820a48b2
...
...
@@ -199,6 +199,8 @@ static inline int Wlc_ObjRangeIsReversed( Wlc_Obj_t * p )
static
inline
int
Wlc_ObjIsSigned
(
Wlc_Obj_t
*
p
)
{
return
p
->
Signed
;
}
static
inline
int
Wlc_ObjIsSignedFanin01
(
Wlc_Ntk_t
*
p
,
Wlc_Obj_t
*
pObj
){
return
p
->
fSmtLib
?
Wlc_ObjIsSigned
(
pObj
)
:
(
Wlc_ObjFanin0
(
p
,
pObj
)
->
Signed
&&
Wlc_ObjFanin1
(
p
,
pObj
)
->
Signed
);
}
static
inline
int
Wlc_ObjIsSignedFanin0
(
Wlc_Ntk_t
*
p
,
Wlc_Obj_t
*
pObj
)
{
return
p
->
fSmtLib
?
Wlc_ObjIsSigned
(
pObj
)
:
Wlc_ObjFanin0
(
p
,
pObj
)
->
Signed
;
}
static
inline
int
Wlc_ObjIsSignedFanin1
(
Wlc_Ntk_t
*
p
,
Wlc_Obj_t
*
pObj
)
{
return
p
->
fSmtLib
?
Wlc_ObjIsSigned
(
pObj
)
:
Wlc_ObjFanin1
(
p
,
pObj
)
->
Signed
;
}
static
inline
int
Wlc_ObjSign
(
Wlc_Obj_t
*
p
)
{
return
Abc_Var2Lit
(
Wlc_ObjRange
(
p
),
Wlc_ObjIsSigned
(
p
)
);
}
static
inline
int
*
Wlc_ObjConstValue
(
Wlc_Obj_t
*
p
)
{
assert
(
p
->
Type
==
WLC_OBJ_CONST
);
return
Wlc_ObjFanins
(
p
);
}
static
inline
int
Wlc_ObjTableId
(
Wlc_Obj_t
*
p
)
{
assert
(
p
->
Type
==
WLC_OBJ_TABLE
);
return
p
->
Fanins
[
1
];
}
...
...
src/base/wlc/wlcBlast.c
View file @
820a48b2
...
...
@@ -873,7 +873,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int fGiaSimple,
else
if
(
pObj
->
Type
==
WLC_OBJ_BUF
)
{
int
nRangeMax
=
Abc_MaxInt
(
nRange0
,
nRange
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
Fanin0
(
p
,
pObj
)
->
Signed
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
IsSignedFanin0
(
p
,
pObj
)
);
for
(
k
=
0
;
k
<
nRange
;
k
++
)
Vec_IntPush
(
vRes
,
pArg0
[
k
]
);
}
...
...
@@ -928,9 +928,9 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int fGiaSimple,
pObj
->
Type
==
WLC_OBJ_SHIFT_L
||
pObj
->
Type
==
WLC_OBJ_SHIFT_LA
)
{
int
nRangeMax
=
Abc_MaxInt
(
nRange
,
nRange0
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
Fanin0
(
p
,
pObj
)
->
Signed
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
IsSignedFanin0
(
p
,
pObj
)
);
if
(
pObj
->
Type
==
WLC_OBJ_SHIFT_R
||
pObj
->
Type
==
WLC_OBJ_SHIFT_RA
)
Wlc_BlastShiftRight
(
pNew
,
pArg0
,
nRangeMax
,
pFans1
,
nRange1
,
Wlc_Obj
Fanin0
(
p
,
pObj
)
->
Signed
&&
pObj
->
Type
==
WLC_OBJ_SHIFT_RA
,
vRes
);
Wlc_BlastShiftRight
(
pNew
,
pArg0
,
nRangeMax
,
pFans1
,
nRange1
,
Wlc_Obj
IsSignedFanin0
(
p
,
pObj
)
&&
pObj
->
Type
==
WLC_OBJ_SHIFT_RA
,
vRes
);
else
Wlc_BlastShiftLeft
(
pNew
,
pArg0
,
nRangeMax
,
pFans1
,
nRange1
,
0
,
vRes
);
Vec_IntShrink
(
vRes
,
nRange
);
...
...
@@ -948,7 +948,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int fGiaSimple,
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_NOT
)
{
int
nRangeMax
=
Abc_MaxInt
(
nRange
,
nRange0
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
Fanin0
(
p
,
pObj
)
->
Signed
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
IsSignedFanin0
(
p
,
pObj
)
);
for
(
k
=
0
;
k
<
nRange
;
k
++
)
Vec_IntPush
(
vRes
,
Abc_LitNot
(
pArg0
[
k
])
);
}
...
...
@@ -1151,15 +1151,15 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int fGiaSimple,
else
if
(
pObj
->
Type
==
WLC_OBJ_ARI_MINUS
)
{
int
nRangeMax
=
Abc_MaxInt
(
nRange0
,
nRange
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
Fanin0
(
p
,
pObj
)
->
Signed
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
IsSignedFanin0
(
p
,
pObj
)
);
Wlc_BlastMinus
(
pNew
,
pArg0
,
nRangeMax
,
vRes
);
Vec_IntShrink
(
vRes
,
nRange
);
}
else
if
(
pObj
->
Type
==
WLC_OBJ_ARI_POWER
)
{
int
nRangeMax
=
Abc_MaxInt
(
nRange0
,
nRange
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
Fanin0
(
p
,
pObj
)
->
Signed
);
int
*
pArg1
=
Wlc_VecLoadFanins
(
vTemp1
,
pFans1
,
nRange1
,
nRange1
,
Wlc_Obj
Fanin1
(
p
,
pObj
)
->
Signed
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_Obj
IsSignedFanin0
(
p
,
pObj
)
);
int
*
pArg1
=
Wlc_VecLoadFanins
(
vTemp1
,
pFans1
,
nRange1
,
nRange1
,
Wlc_Obj
IsSignedFanin1
(
p
,
pObj
)
);
Wlc_BlastPower
(
pNew
,
pArg0
,
nRangeMax
,
pArg1
,
nRange1
,
vTemp2
,
vRes
);
Vec_IntShrink
(
vRes
,
nRange
);
}
...
...
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