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
d0d897b4
Commit
d0d897b4
authored
Apr 09, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
package name resolution visits enum base types
parent
dce7f149
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletions
+20
-1
src/Convert/Package.hs
+2
-1
test/basic/package_enum_5.sv
+12
-0
test/basic/package_enum_5.v
+6
-0
No files found.
src/Convert/Package.hs
View file @
d0d897b4
...
...
@@ -304,8 +304,9 @@ processItems topName packageName moduleItems = do
traverseTypeM
(
Alias
x
rs
)
=
resolveIdent
x
>>=
\
x'
->
return
$
Alias
x'
rs
traverseTypeM
(
Enum
t
enumItems
rs
)
=
do
t'
<-
traverseTypeM
t
enumItems'
<-
mapM
prefixEnumItem
enumItems
return
$
Enum
t
enumItems'
rs
return
$
Enum
t
'
enumItems'
rs
where
prefixEnumItem
(
x
,
e
)
=
prefixIdent
x
>>=
\
x'
->
return
(
x'
,
e
)
traverseTypeM
other
=
traverseSinglyNestedTypesM
traverseTypeM
other
...
...
test/basic/package_enum_5.sv
0 → 100644
View file @
d0d897b4
package
P
;
localparam
int
W
=
4
;
typedef
logic
[
W
-
1
:
0
]
T
;
typedef
enum
T
{
A
=
4'b1010
,
B
=
4'b0101
}
E
;
endpackage
module
top
;
initial
$
display
(
"%d %d %d %b %b"
,
$
bits
(
P
::
A
)
,
$
bits
(
P
::
T
)
,
$
bits
(
P
::
E
)
,
P
::
A
,
P
::
B
)
;
endmodule
test/basic/package_enum_5.v
0 → 100644
View file @
d0d897b4
module
top
;
localparam
W
=
4
;
localparam
A
=
4'b1010
;
localparam
B
=
4'b0101
;
initial
$
display
(
"%d %d %d %b %b"
,
W
,
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