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
fd0bccfb
Commit
fd0bccfb
authored
Feb 28, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrote PackedArray to properly handle the various scenarios
parent
a6cd3626
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
src/Convert/PackedArray.hs
+0
-0
src/Convert/SplitPortDecl.hs
+1
-1
src/Convert/Traverse.hs
+17
-0
src/Language/SystemVerilog/AST.hs
+9
-9
No files found.
src/Convert/PackedArray.hs
View file @
fd0bccfb
This diff is collapsed.
Click to expand it.
src/Convert/SplitPortDecl.hs
View file @
fd0bccfb
...
...
@@ -24,5 +24,5 @@ splitPortDecl (orig @ (MIDecl (Variable _ (Implicit _) _ _ _))) = [orig]
splitPortDecl
(
MIDecl
(
Variable
d
t
x
a
me
))
=
[
MIDecl
$
Variable
d
(
Implicit
r
)
x
a
Nothing
,
MIDecl
$
Variable
Local
t
x
a
me
]
where
(
_
,
r
)
=
type
Dim
s
t
where
(
_
,
r
)
=
type
Range
s
t
splitPortDecl
other
=
[
other
]
src/Convert/Traverse.hs
View file @
fd0bccfb
...
...
@@ -24,6 +24,9 @@ module Convert.Traverse
,
traverseExprsM
,
traverseExprs
,
collectExprsM
,
traverseLHSsM
,
traverseLHSs
,
collectLHSsM
)
where
import
Data.Maybe
(
fromJust
)
...
...
@@ -259,3 +262,17 @@ traverseExprs :: Mapper Expr -> Mapper ModuleItem
traverseExprs
=
unmonad
traverseExprsM
collectExprsM
::
Monad
m
=>
CollectorM
m
Expr
->
CollectorM
m
ModuleItem
collectExprsM
=
collectify
traverseExprsM
traverseLHSsM
::
Monad
m
=>
MapperM
m
LHS
->
MapperM
m
ModuleItem
traverseLHSsM
mapper
item
=
traverseStmtsM
(
traverseStmtLHSsM
mapper
)
item
>>=
traverseModuleItemLHSsM
where
traverseModuleItemLHSsM
(
Assign
lhs
expr
)
=
do
lhs'
<-
mapper
lhs
return
$
Assign
lhs'
expr
traverseModuleItemLHSsM
other
=
return
other
traverseLHSs
::
Mapper
LHS
->
Mapper
ModuleItem
traverseLHSs
=
unmonad
traverseLHSsM
collectLHSsM
::
Monad
m
=>
CollectorM
m
LHS
->
CollectorM
m
ModuleItem
collectLHSsM
=
collectify
traverseLHSsM
src/Language/SystemVerilog/AST.hs
View file @
fd0bccfb
...
...
@@ -19,7 +19,7 @@ module Language.SystemVerilog.AST
,
Case
,
Range
,
GenCase
,
type
Dim
s
,
type
Range
s
)
where
import
Data.List
...
...
@@ -94,14 +94,14 @@ instance Show Type where
showVal
::
(
Identifier
,
Maybe
Expr
)
->
String
showVal
(
x
,
e
)
=
x
++
(
showAssignment
e
)
type
Dim
s
::
Type
->
([
Range
]
->
Type
,
[
Range
])
type
Dim
s
(
Reg
r
)
=
(
Reg
,
r
)
type
Dim
s
(
Wire
r
)
=
(
Wire
,
r
)
type
Dim
s
(
Logic
r
)
=
(
Logic
,
r
)
type
Dim
s
(
Alias
t
r
)
=
(
Alias
t
,
r
)
type
Dim
s
(
Implicit
r
)
=
(
Implicit
,
r
)
type
Dim
s
(
IntegerT
)
=
(
error
"ranges cannot be applied to IntegerT"
,
[]
)
type
Dim
s
(
Enum
t
v
r
)
=
(
Enum
t
v
,
r
)
type
Range
s
::
Type
->
([
Range
]
->
Type
,
[
Range
])
type
Range
s
(
Reg
r
)
=
(
Reg
,
r
)
type
Range
s
(
Wire
r
)
=
(
Wire
,
r
)
type
Range
s
(
Logic
r
)
=
(
Logic
,
r
)
type
Range
s
(
Alias
t
r
)
=
(
Alias
t
,
r
)
type
Range
s
(
Implicit
r
)
=
(
Implicit
,
r
)
type
Range
s
(
IntegerT
)
=
(
error
"ranges cannot be applied to IntegerT"
,
[]
)
type
Range
s
(
Enum
t
v
r
)
=
(
Enum
t
v
,
r
)
data
Decl
=
Parameter
Type
Identifier
Expr
...
...
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