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
478f0d19
Commit
478f0d19
authored
Jun 01, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix premature typename cast conversion (resolves #88)
parent
90421456
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
src/Convert/SizeCast.hs
+6
-0
test/basic/typename_cast.sv
+6
-0
test/basic/typename_cast.v
+5
-0
No files found.
src/Convert/SizeCast.hs
View file @
478f0d19
...
...
@@ -70,6 +70,12 @@ traverseExprM =
_
->
convertCastM
(
Number
s
)
(
Number
n
)
convertExprM
(
orig
@
(
Cast
(
Right
DimsFn
{})
_
))
=
return
orig
convertExprM
(
Cast
(
Right
(
Ident
x
))
e
)
=
do
typeMap
<-
get
-- can't convert this cast yet because x could be a typename
if
Map
.
notMember
x
typeMap
then
return
$
Cast
(
Right
$
Ident
x
)
e
else
convertCastM
(
Ident
x
)
e
convertExprM
(
Cast
(
Right
s
)
e
)
=
convertCastM
s
e
convertExprM
(
Cast
(
Left
(
IntegerVector
_
Signed
rs
))
e
)
=
...
...
test/basic/typename_cast.sv
0 → 100644
View file @
478f0d19
module
Example
;
parameter
type
T
=
logic
[
3
:
0
]
;
T
v
=
T
'
(
'1
)
;
initial
#
1
$
display
(
"%b"
,
v
)
;
endmodule
module
top
;
Example
example
()
;
endmodule
test/basic/typename_cast.v
0 → 100644
View file @
478f0d19
module
Example
;
wire
[
3
:
0
]
v
=
4'b1111
;
initial
#
1
$
display
(
"%b"
,
v
)
;
endmodule
module
top
;
Example
example
()
;
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