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
4ddbff9b
Commit
4ddbff9b
authored
Apr 13, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep enum localparam types for later resolution
parent
eeeade3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletions
+19
-1
src/Convert/Typedef.hs
+4
-1
test/basic/enum_typedef_keep.sv
+9
-0
test/basic/enum_typedef_keep.v
+6
-0
No files found.
src/Convert/Typedef.hs
View file @
4ddbff9b
...
...
@@ -76,7 +76,10 @@ traverseDeclM decl = do
insertElem
x
UnknownType
>>
return
decl'
ParamType
Localparam
x
t
->
do
traverseTypeM
t
>>=
scopeType
>>=
insertElem
x
return
$
CommentDecl
$
"removed localparam type "
++
x
return
$
case
t
of
Enum
{}
->
ParamType
Localparam
tmpX
t
_
->
CommentDecl
$
"removed localparam type "
++
x
where
tmpX
=
"_sv2v_keep_enum_for_params"
ParamType
{}
->
return
decl'
CommentDecl
{}
->
return
decl'
...
...
test/basic/enum_typedef_keep.sv
0 → 100644
View file @
4ddbff9b
module
top
;
localparam
int
W
=
4
;
typedef
logic
[
W
-
1
:
0
]
T
;
typedef
enum
T
{
A
=
4'b1010
,
B
=
4'b0101
}
E
;
initial
$
display
(
"%d %d %b %b"
,
$
bits
(
A
)
,
$
bits
(
B
)
,
A
,
B
)
;
endmodule
test/basic/enum_typedef_keep.v
0 → 100644
View file @
4ddbff9b
module
top
;
localparam
W
=
4
;
localparam
A
=
4'b1010
;
localparam
B
=
4'b0101
;
initial
$
display
(
"%d %d %b %b"
,
W
,
W
,
A
,
B
)
;
endmodule
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