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
e00582de
Commit
e00582de
authored
Jul 18, 2022
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for conflicts with unused declarations
parent
a9f00cce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
src/Convert/Package.hs
+15
-2
test/core/package_unique.sv
+2
-0
test/core/package_unique.v
+1
-0
No files found.
src/Convert/Package.hs
View file @
e00582de
...
@@ -123,8 +123,21 @@ convertPackages files =
...
@@ -123,8 +123,21 @@ convertPackages files =
-- injected package items
-- injected package items
collectIdentConflicts
::
Idents
->
AST
->
Writer
Idents
()
collectIdentConflicts
::
Idents
->
AST
->
Writer
Idents
()
collectIdentConflicts
prefixes
=
collectIdentConflicts
prefixes
=
mapM_
$
collectModuleItemsM
$
collectify
traverseIdentsM
$
mapM_
$
collectModuleItemsM
collectModuleItem
collectIdent
prefixes
where
collectModuleItem
=
evalScoperT
.
scoper
>=>
collectify
traverseIdentsM
ident
scoper
=
scopeModuleItem
collectDecl
return
return
return
collectDecl
decl
=
do
case
decl
of
Variable
_
_
x
_
_
->
lift
$
ident
x
Net
_
_
_
_
x
_
_
->
lift
$
ident
x
Param
_
_
x
_
->
lift
$
ident
x
ParamType
_
x
_
->
lift
$
ident
x
CommentDecl
{}
->
return
()
return
decl
ident
=
collectIdent
prefixes
-- write down identifiers that have a package name as a prefix
-- write down identifiers that have a package name as a prefix
collectIdent
::
Idents
->
Identifier
->
Writer
Idents
()
collectIdent
::
Idents
->
Identifier
->
Writer
Idents
()
...
...
test/core/package_unique.sv
View file @
e00582de
package
P
;
package
P
;
typedef
logic
T
;
typedef
logic
T
;
typedef
logic
[
1
:
0
]
U
;
endpackage
endpackage
module
top
;
module
top
;
P
::
T
P_T
;
P
::
T
P_T
;
assign
P_T
=
0
;
assign
P_T
=
0
;
initial
$
display
(
"%b"
,
P_T
)
;
initial
$
display
(
"%b"
,
P_T
)
;
P
::
U
P_U
=
0
;
endmodule
endmodule
test/core/package_unique.v
View file @
e00582de
...
@@ -2,4 +2,5 @@ module top;
...
@@ -2,4 +2,5 @@ module top;
wire
P_T
;
wire
P_T
;
assign
P_T
=
0
;
assign
P_T
=
0
;
initial
$
display
(
"%b"
,
P_T
)
;
initial
$
display
(
"%b"
,
P_T
)
;
reg
[
1
:
0
]
P_U
=
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