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
315733f2
Commit
315733f2
authored
May 24, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output unpacked localparam types as typedefs
parent
74a10a8e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
src/Language/SystemVerilog/AST/Decl.hs
+3
-1
No files found.
src/Language/SystemVerilog/AST/Decl.hs
View file @
315733f2
...
@@ -15,7 +15,7 @@ module Language.SystemVerilog.AST.Decl
...
@@ -15,7 +15,7 @@ module Language.SystemVerilog.AST.Decl
import
Text.Printf
(
printf
)
import
Text.Printf
(
printf
)
import
Language.SystemVerilog.AST.ShowHelp
(
showPad
,
unlines'
)
import
Language.SystemVerilog.AST.ShowHelp
(
showPad
,
unlines'
)
import
Language.SystemVerilog.AST.Type
(
Type
,
Identifier
,
pattern
UnknownType
)
import
Language.SystemVerilog.AST.Type
(
Type
(
UnpackedType
)
,
Identifier
,
pattern
UnknownType
)
import
Language.SystemVerilog.AST.Expr
(
Expr
,
Range
,
showRanges
,
showAssignment
)
import
Language.SystemVerilog.AST.Expr
(
Expr
,
Range
,
showRanges
,
showAssignment
)
data
Decl
data
Decl
...
@@ -28,6 +28,8 @@ data Decl
...
@@ -28,6 +28,8 @@ data Decl
instance
Show
Decl
where
instance
Show
Decl
where
showList
l
_
=
unlines'
$
map
show
l
showList
l
_
=
unlines'
$
map
show
l
show
(
Param
s
t
x
e
)
=
printf
"%s %s%s%s;"
(
show
s
)
(
showPad
t
)
x
(
showAssignment
e
)
show
(
Param
s
t
x
e
)
=
printf
"%s %s%s%s;"
(
show
s
)
(
showPad
t
)
x
(
showAssignment
e
)
show
(
ParamType
Localparam
x
(
UnpackedType
t
rs
))
=
printf
"typedef %s %s%s;"
(
show
t
)
x
(
showRanges
rs
)
show
(
ParamType
s
x
t
)
=
printf
"%s type %s%s;"
(
show
s
)
x
tStr
show
(
ParamType
s
x
t
)
=
printf
"%s type %s%s;"
(
show
s
)
x
tStr
where
tStr
=
if
t
==
UnknownType
then
""
else
" = "
++
show
t
where
tStr
=
if
t
==
UnknownType
then
""
else
" = "
++
show
t
show
(
Variable
d
t
x
a
e
)
=
printf
"%s%s%s%s%s;"
(
showPad
d
)
(
showPad
t
)
x
(
showRanges
a
)
(
showAssignment
e
)
show
(
Variable
d
t
x
a
e
)
=
printf
"%s%s%s%s%s;"
(
showPad
d
)
(
showPad
t
)
x
(
showRanges
a
)
(
showAssignment
e
)
...
...
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