Skip to content

Commit 27d34a6

Browse files
authored
Merge pull request #405 from diffblue/parameter_ports3
Verilog: localparam parameter ports
2 parents 3c3289f + ab6b8a1 commit 27d34a6

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
parameter_ports3.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 p = 1, localparam derived = p+1)();
2+
3+
always assert p1: derived == 124;
4+
5+
endmodule
6+
7+
module main;
8+
9+
sub #(123) submodule();
10+
11+
endmodule // main

src/verilog/parser.y

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,8 @@ list_of_variable_identifiers:
15371537
parameter_port_declaration:
15381538
TOK_PARAMETER data_type_or_implicit param_assignment
15391539
{ $$ = $3; }
1540+
| TOK_LOCALPARAM data_type_or_implicit param_assignment
1541+
{ $$ = $3; }
15401542
| data_type param_assignment
15411543
{ $$ = $2; }
15421544
| param_assignment

0 commit comments

Comments
 (0)