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
12d977f0
Commit
12d977f0
authored
Sep 01, 2024
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
visit nested LHSs in enum, typedef, and typeof conversions
parent
8f2dc46e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
3 deletions
+22
-3
CHANGELOG.md
+2
-0
src/Convert/Enum.hs
+1
-1
src/Convert/TypeOf.hs
+1
-1
src/Convert/Typedef.hs
+1
-1
test/core/typename_lhs_nest.sv
+12
-0
test/core/typename_lhs_nest.v
+5
-0
No files found.
CHANGELOG.md
View file @
12d977f0
...
...
@@ -11,6 +11,8 @@
*
Fixed
`--write path/to/dir/`
with directives like
`` `default_nettype ``
*
Fixed
`logic`
incorrectly converted to
`wire`
even when provided to a task or
function output port
*
Fixed conversion of enum item names and typenames nested deeply within the
left-hand side of an assignment
*
Fixed
`input signed`
ports of interface-using modules producing invalid
declarations after inlining
*
Fixed
`` `resetall ``
not resetting the
`` `default_nettype ``
...
...
src/Convert/Enum.hs
View file @
12d977f0
...
...
@@ -47,7 +47,7 @@ traverseModuleItemM (Genvar x) =
insertElem
x
Nil
>>
return
(
Genvar
x
)
traverseModuleItemM
item
=
traverseNodesM
traverseExprM
return
traverseTypeM
traverseLHSM
return
item
where
traverseLHSM
=
traverseLHSExprsM
traverseExprM
where
traverseLHSM
=
traverse
NestedLHSsM
$
traverse
LHSExprsM
traverseExprM
traverseGenItemM
::
GenItem
->
SC
GenItem
traverseGenItemM
=
traverseGenItemExprsM
traverseExprM
...
...
src/Convert/TypeOf.hs
View file @
12d977f0
...
...
@@ -79,7 +79,7 @@ insertType ident typ = do
traverseModuleItemM
::
ModuleItem
->
ST
ModuleItem
traverseModuleItemM
=
traverseNodesM
traverseExprM
return
traverseTypeM
traverseLHSM
return
where
traverseLHSM
=
traverseLHSExprsM
traverseExprM
where
traverseLHSM
=
traverse
NestedLHSsM
$
traverse
LHSExprsM
traverseExprM
-- convert TypeOf in a GenItem
traverseGenItemM
::
GenItem
->
ST
GenItem
...
...
src/Convert/Typedef.hs
View file @
12d977f0
...
...
@@ -88,7 +88,7 @@ traverseModuleItemM item = traverseModuleItemM' item
traverseModuleItemM'
::
ModuleItem
->
SC
ModuleItem
traverseModuleItemM'
=
traverseNodesM
traverseExprM
return
traverseTypeM
traverseLHSM
return
where
traverseLHSM
=
traverseLHSExprsM
traverseExprM
where
traverseLHSM
=
traverse
NestedLHSsM
$
traverse
LHSExprsM
traverseExprM
traverseGenItemM
::
GenItem
->
SC
GenItem
traverseGenItemM
=
traverseGenItemExprsM
traverseExprM
...
...
test/core/typename_lhs_nest.sv
0 → 100644
View file @
12d977f0
module
top
;
logic
x
;
logic
[
2
:
0
]
y
;
for
(
genvar
i
=
0
;
i
<
3
;
i
++
)
begin
:
blk
wire
w
;
assign
y
[
i
]
=
w
;
end
localparam
type
T
=
enum
int
{
K
=
0
};
assign
blk
[
K
]
.
w
=
1
;
assign
blk
[$
bits
(
x
)]
.
w
=
1
;
assign
blk
[$
bits
(
T
)
-
30
]
.
w
=
1
;
endmodule
test/core/typename_lhs_nest.v
0 → 100644
View file @
12d977f0
module
top
;
wire
x
;
wire
[
2
:
0
]
y
;
assign
y
=
1
'
sb1
;
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