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
dd3a7e68
Commit
dd3a7e68
authored
Sep 11, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EmptyArgs conversion skips global functions until nested
parent
4d0d652c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletions
+40
-1
src/Convert/EmptyArgs.hs
+2
-1
test/basic/package_order.sv
+21
-0
test/basic/package_order.v
+17
-0
No files found.
src/Convert/EmptyArgs.hs
View file @
dd3a7e68
...
...
@@ -20,13 +20,14 @@ convert :: [AST] -> [AST]
convert
=
map
$
traverseDescriptions
convertDescription
convertDescription
::
Description
->
Description
convertDescription
description
=
convertDescription
(
description
@
(
Part
_
_
_
_
_
_
))
=
traverseModuleItems
(
traverseExprs
$
traverseNestedExprs
$
convertExpr
functions
)
description'
where
(
description'
,
functions
)
=
runWriter
$
traverseModuleItemsM
traverseFunctionsM
description
convertDescription
other
=
other
traverseFunctionsM
::
ModuleItem
->
Writer
Idents
ModuleItem
traverseFunctionsM
(
MIPackageItem
(
Function
ml
t
f
decls
stmts
))
=
do
...
...
test/basic/package_order.sv
0 → 100644
View file @
dd3a7e68
package
evil_pkg
;
localparam
Z
=
1
;
localparam
A
=
Z
;
localparam
B
=
Z
;
function
logic
evil_fun
;
return
A
;
endfunction
endpackage
module
evil_mdl
(
output
logic
[
evil_pkg
::
B
-
1
:
0
]
foo
)
;
initial
foo
=
evil_pkg
::
evil_fun
()
;
endmodule
module
top
;
logic
[
evil_pkg
::
B
-
1
:
0
]
foo
;
evil_mdl
x
(
foo
)
;
initial
$
display
(
foo
)
;
endmodule
test/basic/package_order.v
0 → 100644
View file @
dd3a7e68
module
evil_mdl
(
output
reg
[
evil_pkg_B
-
1
:
0
]
foo
)
;
localparam
evil_pkg_Z
=
1
;
localparam
evil_pkg_A
=
evil_pkg_Z
;
localparam
evil_pkg_B
=
evil_pkg_Z
;
initial
foo
=
evil_pkg_A
;
endmodule
module
top
;
localparam
evil_pkg_Z
=
1
;
localparam
evil_pkg_A
=
evil_pkg_Z
;
localparam
evil_pkg_B
=
evil_pkg_Z
;
wire
[
evil_pkg_B
-
1
:
0
]
foo
;
evil_mdl
x
(
foo
)
;
initial
$
display
(
foo
)
;
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