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
d5b9c1da
Commit
d5b9c1da
authored
Nov 04, 2023
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
visit function args in empty args conversion
parent
18f33352
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
1 deletions
+13
-1
CHANGELOG.md
+1
-0
src/Convert/EmptyArgs.hs
+2
-1
test/core/empty_args.sv
+5
-0
test/core/empty_args.v
+5
-0
No files found.
CHANGELOG.md
View file @
d5b9c1da
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
*
Fixed failure to resolve typenames suffixed with dimensions in contexts
*
Fixed failure to resolve typenames suffixed with dimensions in contexts
permitting both types and expressions, e.g.,
`$bits(T[W-1:0])`
permitting both types and expressions, e.g.,
`$bits(T[W-1:0])`
*
Fixed errant constant folding of shadowed non-trivial localparams
*
Fixed errant constant folding of shadowed non-trivial localparams
*
Fixed conversion of function calls with no arguments passed to other functions
*
Fixed certain non-ANSI style port declarations being incorrectly reported as
*
Fixed certain non-ANSI style port declarations being incorrectly reported as
incompatible
incompatible
...
...
src/Convert/EmptyArgs.hs
View file @
d5b9c1da
...
@@ -64,7 +64,8 @@ traverseStmt = traverseStmtExprsM traverseExpr
...
@@ -64,7 +64,8 @@ traverseStmt = traverseStmtExprsM traverseExpr
traverseExpr
::
Expr
->
SC
Expr
traverseExpr
::
Expr
->
SC
Expr
traverseExpr
(
Call
func
(
Args
args
[]
))
=
do
traverseExpr
(
Call
func
(
Args
args
[]
))
=
do
details
<-
lookupElemM
$
Dot
func
dummyIdent
details
<-
lookupElemM
$
Dot
func
dummyIdent
let
args'
=
if
details
/=
Nothing
args'
<-
mapM
traverseExpr
$
if
details
/=
Nothing
then
RawNum
0
:
args
then
RawNum
0
:
args
else
args
else
args
return
$
Call
func
(
Args
args'
[]
)
return
$
Call
func
(
Args
args'
[]
)
...
...
test/core/empty_args.sv
View file @
d5b9c1da
...
@@ -3,4 +3,9 @@ module top;
...
@@ -3,4 +3,9 @@ module top;
return
32'h00000013
;
return
32'h00000013
;
endfunction
endfunction
initial
$
display
(
nop
())
;
initial
$
display
(
nop
())
;
function
automatic
integer
flip
;
input
integer
inp
;
return
~
inp
;
endfunction
initial
$
display
(
flip
(
nop
()))
;
endmodule
endmodule
test/core/empty_args.v
View file @
d5b9c1da
...
@@ -4,4 +4,9 @@ module top;
...
@@ -4,4 +4,9 @@ module top;
nop
=
32'h00000013
;
nop
=
32'h00000013
;
endfunction
endfunction
initial
$
display
(
nop
(
0
))
;
initial
$
display
(
nop
(
0
))
;
function
automatic
integer
flip
;
input
integer
inp
;
flip
=
~
inp
;
endfunction
initial
$
display
(
flip
(
nop
(
0
)))
;
endmodule
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