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
f71accb3
Commit
f71accb3
authored
May 09, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix simple delayed multi-pack conversion within interface
parent
12c57ecc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
src/Convert/ImplicitNet.hs
+2
-1
src/Convert/MultiplePacked.hs
+7
-2
test/basic/interface_delay_1.sv
+15
-0
test/basic/interface_delay_1.v
+8
-0
No files found.
src/Convert/ImplicitNet.hs
View file @
f71accb3
...
...
@@ -61,7 +61,8 @@ traverseModuleItemM defaultNetType (orig @ (NOutputGate _ _ x lhss expr)) = do
_
<-
mapM
(
needsLHS
defaultNetType
)
lhss
needsExpr
defaultNetType
expr
return
orig
traverseModuleItemM
defaultNetType
(
orig
@
(
Instance
_
_
_
_
ports
))
=
do
traverseModuleItemM
defaultNetType
(
orig
@
(
Instance
_
_
x
_
ports
))
=
do
insertElem
x
()
_
<-
mapM
(
needsExpr
defaultNetType
.
snd
)
ports
return
orig
traverseModuleItemM
_
item
=
return
item
...
...
src/Convert/MultiplePacked.hs
View file @
f71accb3
...
...
@@ -39,8 +39,13 @@ import Language.SystemVerilog.AST
type
TypeInfo
=
(
Type
,
[
Range
])
convert
::
[
AST
]
->
[
AST
]
convert
=
map
$
traverseDescriptions
$
partScoper
traverseDeclM
traverseModuleItemM
traverseGenItemM
traverseStmtM
convert
=
map
$
traverseDescriptions
convertDescription
convertDescription
::
Description
->
Description
convertDescription
(
description
@
(
Part
_
_
Module
_
_
_
_
))
=
partScoper
traverseDeclM
traverseModuleItemM
traverseGenItemM
traverseStmtM
description
convertDescription
other
=
other
-- collects and converts declarations with multiple packed dimensions
traverseDeclM
::
Decl
->
Scoper
TypeInfo
Decl
...
...
test/basic/interface_delay_1.sv
0 → 100644
View file @
f71accb3
interface
Interface
;
logic
[
0
:
1
][
0
:
2
]
arr
;
endinterface
module
Module
(
intf
)
;
Interface
intf
;
endmodule
module
top
;
Interface
intf
()
;
Module
mod
[
1
][
2
]
(
intf
)
;
assign
intf
.
arr
[
1
]
=
6
;
assign
intf
.
arr
[
0
][
0
]
=
1
;
initial
$
display
(
"%b"
,
intf
.
arr
)
;
endmodule
test/basic/interface_delay_1.v
0 → 100644
View file @
f71accb3
module
top
;
if
(
1
)
begin
:
intf
wire
[
0
:
1
][
0
:
2
]
arr
;
end
assign
intf
.
arr
[
1
]
=
6
;
assign
intf
.
arr
[
0
][
0
]
=
1
;
initial
$
display
(
"%b"
,
intf
.
arr
)
;
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