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
3834b9f1
Commit
3834b9f1
authored
Aug 01, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support type lookup of genvars
parent
698e3b0b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletions
+23
-1
src/Convert/TypeOf.hs
+5
-1
test/basic/typeof.sv
+8
-0
test/basic/typeof.v
+10
-0
No files found.
src/Convert/TypeOf.hs
View file @
3834b9f1
...
...
@@ -38,7 +38,11 @@ traverseDeclM decl = do
CommentDecl
{}
->
return
decl'
traverseModuleItemM
::
ModuleItem
->
Scoper
Type
ModuleItem
traverseModuleItemM
=
traverseTypesM
$
traverseNestedTypesM
traverseTypeM
traverseModuleItemM
(
Genvar
x
)
=
do
insertElem
x
$
IntegerAtom
TInteger
Unspecified
return
$
Genvar
x
traverseModuleItemM
item
=
traverseTypesM
(
traverseNestedTypesM
traverseTypeM
)
item
traverseGenItemM
::
GenItem
->
Scoper
Type
GenItem
traverseGenItemM
=
traverseGenItemExprsM
traverseExprM
...
...
test/basic/typeof.sv
View file @
3834b9f1
...
...
@@ -62,4 +62,12 @@ module top;
$
display
(
"%b %d %d %d"
,
y
,
y
,
$
left
(
y
)
,
$
right
(
y
))
;
$
display
(
"%b %d %d %d"
,
z
,
z
,
$
left
(
z
)
,
$
right
(
z
))
;
end
for
(
genvar
i
=
0
;
i
<
2
;
++
i
)
initial
begin
type
(
i
)
a
;
a
=
~
i
;
$
display
(
"%b %d %d %d"
,
i
,
i
,
$
left
(
i
)
,
$
right
(
i
))
;
$
display
(
"%b %d %d %d"
,
a
,
a
,
$
left
(
a
)
,
$
right
(
a
))
;
end
endmodule
test/basic/typeof.v
View file @
3834b9f1
...
...
@@ -75,4 +75,14 @@ module top;
$
display
(
"%b %d %d %d"
,
y
,
y
,
31
,
0
)
;
$
display
(
"%b %d %d %d"
,
z
,
z
,
31
,
0
)
;
end
generate
genvar
i
;
for
(
i
=
0
;
i
<
2
;
i
=
i
+
1
)
initial
begin
:
block5
localparam
a
=
~
i
;
$
display
(
"%b %d %d %d"
,
i
,
i
,
31
,
0
)
;
$
display
(
"%b %d %d %d"
,
a
,
a
,
31
,
0
)
;
end
endgenerate
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