@@ -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
@@ -1092,10 +1095,11 @@ specparam_declaration:
10921095// A.2.1.2 Port declarations
10931096
10941097module_port_inout_declaration :
1095- TOK_INOUT net_port_type port_identifier
1098+ TOK_INOUT net_port_type port_identifier unpacked_dimension_brace
10961099 { init($$ , ID_decl);
10971100 stack_expr ($$).set(ID_class, ID_inout);
1098- addswap ($$, ID_type, $2 );
1101+ add_as_subtype (stack_type($4 ), stack_type($2 ));
1102+ addswap ($$, ID_type, $4 );
10991103 mto ($$, $3 ); }
11001104 ;
11011105
0 commit comments