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
3e85885d
Commit
3e85885d
authored
May 04, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix conversion of multi-packed arrays in packages
parent
2ac236dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
src/Convert/MultiplePacked.hs
+4
-2
test/basic/array_in_package.sv
+15
-0
test/basic/array_in_package.v
+12
-0
No files found.
src/Convert/MultiplePacked.hs
View file @
3e85885d
...
...
@@ -40,8 +40,10 @@ convert :: [AST] -> [AST]
convert
=
map
$
traverseDescriptions
convertDescription
convertDescription
::
Description
->
Description
convertDescription
=
scopedConversion
traverseDeclM
traverseModuleItemM
traverseStmtM
Map
.
empty
convertDescription
part
@
Part
{}
=
scopedConversion
traverseDeclM
traverseModuleItemM
traverseStmtM
Map
.
empty
part
convertDescription
other
=
other
-- collects and converts declarations with multiple packed dimensions
traverseDeclM
::
Decl
->
State
Info
Decl
...
...
test/basic/array_in_package.sv
0 → 100644
View file @
3e85885d
package
pkg
;
localparam
ARR
[
3
:
0
][
2
:
0
]
=
12'h3EA
;
endpackage
module
top
;
import
pkg
::*;
initial
begin
for
(
integer
i
=
0
;
i
<
4
;
++
i
)
for
(
integer
j
=
0
;
j
<
3
;
++
j
)
$
display
(
"ARR[%0d][%0d] = %0d"
,
i
,
j
,
ARR
[
i
][
j
])
;
for
(
integer
i
=
0
;
i
<
4
;
++
i
)
for
(
integer
j
=
0
;
j
<
3
;
++
j
)
$
display
(
"ARR[%0d][%0d] = %0d"
,
i
,
j
,
pkg
::
ARR
[
i
][
j
])
;
end
endmodule
test/basic/array_in_package.v
0 → 100644
View file @
3e85885d
module
top
;
localparam
[
11
:
0
]
ARR
=
12'h3EA
;
initial
begin
:
foo
integer
i
,
j
;
for
(
i
=
0
;
i
<
4
;
++
i
)
for
(
j
=
0
;
j
<
3
;
++
j
)
$
display
(
"ARR[%0d][%0d] = %0d"
,
i
,
j
,
ARR
[
i
*
3
+
j
])
;
for
(
i
=
0
;
i
<
4
;
++
i
)
for
(
j
=
0
;
j
<
3
;
++
j
)
$
display
(
"ARR[%0d][%0d] = %0d"
,
i
,
j
,
ARR
[
i
*
3
+
j
])
;
end
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