Skip to content

Commit f774bcc

Browse files
committed
SystemVerilog: type parameter ports
1 parent 195103b commit f774bcc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

regression/verilog/modules/parameter_ports4.desc renamed to regression/verilog/modules/type_parameter_port1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
KNOWNBUG
2-
parameter_ports4.sv
2+
type_parameter_port1.sv
33

44
^EXIT=0$
55
^SIGNAL=0$

src/verilog/parser.y

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,6 +1985,8 @@ list_of_variable_identifiers:
19851985
parameter_port_declaration:
19861986
TOK_PARAMETER data_type_or_implicit param_assignment
19871987
{ $$ = $3; }
1988+
| TOK_PARAMETER TOK_TYPE type_assignment
1989+
{ $$ = $3; }
19881990
| TOK_LOCALPARAM data_type_or_implicit param_assignment
19891991
{ $$ = $3; }
19901992
| data_type param_assignment
@@ -3161,7 +3163,10 @@ named_parameter_assignment_brace:
31613163
;
31623164

31633165
ordered_parameter_assignment:
3164-
expression;
3166+
expression
3167+
| data_type
3168+
{ init($$, ID_type); stack_expr($$).type() = stack_type($1); }
3169+
;
31653170

31663171
named_parameter_assignment:
31673172
'.' parameter_identifier '(' expression_opt ')'

0 commit comments

Comments
 (0)