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
dde734be
Commit
dde734be
authored
Jul 21, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle params with unpacked typenames
parent
b2fe865e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
src/Convert/Typedef.hs
+5
-0
test/core/unpacked_localparam.sv
+3
-0
test/core/unpacked_localparam.v
+2
-0
No files found.
src/Convert/Typedef.hs
View file @
dde734be
...
...
@@ -76,6 +76,11 @@ traverseDeclM decl = do
case
decl'
of
Variable
{}
->
return
decl'
Net
{}
->
return
decl'
Param
s
(
UnpackedType
t
rs1
)
x
e
->
do
insertElem
x
UnknownType
let
(
tf
,
rs2
)
=
typeRanges
t
let
t'
=
tf
$
rs1
++
rs2
return
$
Param
s
t'
x
e
Param
_
_
x
_
->
insertElem
x
UnknownType
>>
return
decl'
ParamType
Localparam
x
t
->
do
...
...
test/core/unpacked_localparam.sv
View file @
dde734be
...
...
@@ -9,4 +9,7 @@ module top;
end
end
end
typedef
byte
T
[
3
]
;
localparam
T
X
=
'
{
5
,
3
,
2
};
initial
$
display
(
"%0d %0d %0d"
,
X
[
0
]
,
X
[
1
]
,
X
[
2
])
;
endmodule
test/core/unpacked_localparam.v
View file @
dde734be
...
...
@@ -9,4 +9,6 @@ module top;
end
end
end
localparam
[
23
:
0
]
X
=
{
8'd5
,
8'd3
,
8'd2
};
initial
$
display
(
"%0d %0d %0d"
,
X
[
16
+:
8
]
,
X
[
8
+:
8
]
,
X
[
0
+:
8
])
;
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