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
b7738a32
Commit
b7738a32
authored
Apr 26, 2023
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't use positional error message on extra named bindings
parent
e4c47363
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
CHANGELOG.md
+1
-0
src/Convert/ResolveBindings.hs
+4
-3
test/error/binding_not_found_overflow.sv
+8
-0
No files found.
CHANGELOG.md
View file @
b7738a32
...
...
@@ -23,6 +23,7 @@
*
Added constant folding for comparisons involving string literals
*
Port connection attributes (e.g.,
[
pulp_soc.sv
]
) are now ignored with a
warning rather than failing to parse
*
Improved error message when specifying an extraneous named port connection
[
pulp_soc.sv
]:
https://github.com/pulp-platform/pulp_soc/blob/0573a85c/rtl/pulp_soc/pulp_soc.sv#L733
...
...
src/Convert/ResolveBindings.hs
View file @
b7738a32
...
...
@@ -102,12 +102,13 @@ type Binding t = (Identifier, t)
-- give a set of bindings explicit names
resolveBindings
::
String
->
[
Identifier
]
->
[
Binding
t
]
->
[
Binding
t
]
resolveBindings
_
_
[]
=
[]
resolveBindings
location
available
bindings
=
resolveBindings
location
available
bindings
@
((
""
,
_
)
:
_
)
=
if
length
available
<
length
bindings
then
error
$
"too many bindings specified for "
++
location
else
if
null
$
fst
$
head
bindings
then
else
zip
available
$
map
snd
bindings
else
if
not
$
null
unknowns
then
resolveBindings
location
available
bindings
=
if
not
$
null
unknowns
then
error
$
"unknown binding"
++
unknownsPlural
++
" "
++
unknownsStr
++
" specified for "
++
location
else
...
...
test/error/binding_not_found_overflow.sv
0 → 100644
View file @
b7738a32
// pattern: unknown binding "z" specified for port connections in instance "e" of "example"
module
example
(
input
x
,
y
)
;
endmodule
module
top
;
example
e
(
.
x
(
1'b1
)
,
.
y
(
1'b0
)
,
.
z
(
1'b0
))
;
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