@@ -822,23 +822,26 @@ ansi_port_declaration:
822822 ;
823823
824824module_port_input_declaration :
825- TOK_INPUT net_port_type port_identifier
825+ TOK_INPUT net_port_type port_identifier unpacked_dimension_brace
826826 { init($$ , ID_decl);
827827 stack_expr ($$).set(ID_class, ID_input);
828- addswap ($$, ID_type, $2 );
828+ add_as_subtype (stack_type($4 ), stack_type($2 ));
829+ addswap ($$, ID_type, $4 );
829830 mto ($$, $3 ); }
830831 ;
831832
832833module_port_output_declaration :
833- TOK_OUTPUT net_port_type port_identifier
834+ TOK_OUTPUT net_port_type port_identifier unpacked_dimension_brace
834835 { init($$ , ID_decl);
835836 stack_expr ($$).set(ID_class, ID_output);
836- addswap ($$, ID_type, $2 );
837+ add_as_subtype (stack_type($4 ), stack_type($2 ));
838+ addswap ($$, ID_type, $4 );
837839 mto ($$, $3 ); }
838- | TOK_OUTPUT data_type port_identifier
840+ | TOK_OUTPUT data_type port_identifier unpacked_dimension_brace
839841 { init($$ , ID_decl);
840842 stack_expr ($$).set(ID_class, ID_output_register);
841- addswap ($$, ID_type, $2 );
843+ add_as_subtype (stack_type($4 ), stack_type($2 ));
844+ addswap ($$, ID_type, $4 );
842845 mto ($$, $3 ); }
843846 ;
844847
@@ -1089,10 +1092,11 @@ specparam_declaration:
10891092// A.2.1.2 Port declarations
10901093
10911094module_port_inout_declaration :
1092- TOK_INOUT net_port_type port_identifier
1095+ TOK_INOUT net_port_type port_identifier unpacked_dimension_brace
10931096 { init($$ , ID_decl);
10941097 stack_expr ($$).set(ID_class, ID_inout);
1095- addswap ($$, ID_type, $2 );
1098+ add_as_subtype (stack_type($4 ), stack_type($2 ));
1099+ addswap ($$, ID_type, $4 );
10961100 mto ($$, $3 ); }
10971101 ;
10981102
0 commit comments