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
e6e62e88
Commit
e6e62e88
authored
4 years ago
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typedef conversion visits nested types in statements
parent
90de4aa1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
src/Convert/Typedef.hs
+6
-3
test/basic/struct_nested_cast.sv
+16
-0
test/basic/struct_nested_cast.v
+7
-0
No files found.
src/Convert/Typedef.hs
View file @
e6e62e88
...
@@ -78,9 +78,12 @@ traverseDeclM decl = do
...
@@ -78,9 +78,12 @@ traverseDeclM decl = do
CommentDecl
{}
->
return
decl'
CommentDecl
{}
->
return
decl'
traverseStmtM
::
Stmt
->
Scoper
Type
Stmt
traverseStmtM
::
Stmt
->
Scoper
Type
Stmt
traverseStmtM
=
traverseStmtM
=
traverseStmtExprsM
$
traverseNestedExprsM
traverseStmtExprM
traverseStmtExprsM
$
traverseNestedExprsM
$
where
traverseExprTypesM
traverseTypeM
>=>
traverseExprM
traverseStmtExprM
::
Expr
->
Scoper
Type
Expr
traverseStmtExprM
=
traverseExprTypesM
(
traverseNestedTypesM
traverseTypeM
)
>=>
traverseExprM
traverseTypeM
::
Type
->
Scoper
Type
Type
traverseTypeM
::
Type
->
Scoper
Type
Type
traverseTypeM
(
Alias
st
rs1
)
=
do
traverseTypeM
(
Alias
st
rs1
)
=
do
...
...
This diff is collapsed.
Click to expand it.
test/basic/struct_nested_cast.sv
0 → 100644
View file @
e6e62e88
package
PKG
;
typedef
struct
packed
{
logic
f
;
}
foo_t
;
endpackage
module
top
;
typedef
struct
packed
{
PKG
::
foo_t
f
;
}
local_t
;
local_t
w
;
initial
begin
w
<=
local_t
'
(
1
'
sb1
)
;
$
display
(
"%b"
,
w
)
;
end
endmodule
This diff is collapsed.
Click to expand it.
test/basic/struct_nested_cast.v
0 → 100644
View file @
e6e62e88
module
top
;
reg
w
;
initial
begin
w
<=
1'b1
;
$
display
(
"%b"
,
w
)
;
end
endmodule
This diff is collapsed.
Click to expand it.
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