Skip to content

Commit b175768

Browse files
authored
Merge pull request #316 from diffblue/typed-parameter-ports
typed parameter ports
2 parents 9d8dc69 + 1082047 commit b175768

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
KNOWNBUG
2+
parameter_ports2.v
3+
--bound 0
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
The type of the parameter needs to be processed.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module sub #(parameter an_eight_bit_parameter_port = 1)();
2+
3+
always assert p1: $bits(an_eight_bit_parameter_port) == 8;
4+
5+
endmodule
6+
7+
module main;
8+
9+
sub #(123) submodule();
10+
11+
endmodule // main

src/verilog/parser.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,8 +1490,8 @@ list_of_variable_identifiers:
14901490
// This rule is more permissive that the grammar in the standard
14911491
// to cover list_of_param_assignments.
14921492
parameter_port_declaration:
1493-
TOK_PARAMETER param_assignment
1494-
{ $$ = $2; }
1493+
TOK_PARAMETER data_type_or_implicit param_assignment
1494+
{ $$ = $3; }
14951495
| data_type param_assignment
14961496
{ $$ = $2; }
14971497
| param_assignment

0 commit comments

Comments
 (0)