Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
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
sv2v
Commits
f13275bf
Commit
f13275bf
authored
Apr 02, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Struct and Interface conversion for expressions within LHSs
parent
c53b3931
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
src/Convert/Interface.hs
+4
-0
src/Convert/Struct.hs
+7
-3
No files found.
src/Convert/Interface.hs
View file @
f13275bf
...
...
@@ -147,6 +147,10 @@ convertDescription interfaces modules (Part extern Module lifetime name ports it
if
Map
.
member
x
modports
||
Map
.
member
x
instances
then
LHSIdent
(
x
++
"_"
++
y
)
else
orig
convertLHS
(
LHSBit
l
e
)
=
LHSBit
l
(
traverseNestedExprs
convertExpr
e
)
convertLHS
(
LHSRange
l
(
e1
,
e2
))
=
LHSRange
l
(
traverseNestedExprs
convertExpr
e1
,
traverseNestedExprs
convertExpr
e2
)
convertLHS
other
=
other
convertPort
::
Identifier
->
[
Identifier
]
convertPort
ident
=
...
...
src/Convert/Struct.hs
View file @
f13275bf
...
...
@@ -142,12 +142,13 @@ convertAsgn structs types (lhs, expr) =
Just
t
->
(
t
,
LHSIdent
x
)
convertLHS
(
LHSBit
l
e
)
=
if
null
rs
then
(
Implicit
Unspecified
[]
,
LHSBit
l'
e
)
else
(
tf
$
tail
rs
,
LHSBit
l'
e
)
then
(
Implicit
Unspecified
[]
,
LHSBit
l'
e
'
)
else
(
tf
$
tail
rs
,
LHSBit
l'
e
'
)
where
(
t
,
l'
)
=
convertLHS
l
(
tf
,
rs
)
=
typeRanges
t
convertLHS
(
LHSRange
l
(
rOuter
@
(
hiO
,
loO
)))
=
e'
=
snd
$
convertSubExpr
e
convertLHS
(
LHSRange
l
rOuterOrig
)
=
case
l'
of
LHSRange
lInner
(
_
,
loI
)
->
(
t
,
LHSRange
lInner
(
simplify
hi
,
simplify
lo
))
...
...
@@ -160,6 +161,9 @@ convertAsgn structs types (lhs, expr) =
where
(
t
,
l'
)
=
convertLHS
l
(
tf
,
rs
)
=
typeRanges
t
hiO
=
snd
$
convertSubExpr
$
fst
rOuterOrig
loO
=
snd
$
convertSubExpr
$
snd
rOuterOrig
rOuter
=
(
hiO
,
loO
)
rs'
=
rOuter
:
tail
rs
convertLHS
(
LHSDot
l
x
)
=
case
t
of
...
...
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