diff --git a/Changes b/Changes index fb9f3ef20..fff4d3836 100644 --- a/Changes +++ b/Changes @@ -15,6 +15,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix over-shift structure optimization error, bug803. [Jeff Bush] +**** Fix optional parameter keyword in module #(), bug810. [Iztok Jeras] + * Verilator 3.862 2014-06-10 diff --git a/src/verilog.y b/src/verilog.y index f92215efc..5e4d86947 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -841,8 +841,7 @@ paramPortDeclOrArgList: // IEEE: list_of_param_assignments + { parameter_ paramPortDeclOrArg: // IEEE: param_assignment + parameter_port_declaration // // We combine the two as we can't tell which follows a comma - param_assignment { $$ = $1; } - | parameter_port_declarationFront param_assignment { $$ = $2; } + parameter_port_declarationFrontE param_assignment { $$ = $2; } ; portsStarE: // IEEE: .* + list_of_ports + list_of_port_declarations + empty @@ -1149,10 +1148,13 @@ parameter_declarationFront: // IEEE: parameter_declaration w/o assignment //UNSUP varGParamReset yTYPE { /*VARRESET-in-varGParam*/ VARDTYPE($2); } ; -parameter_port_declarationFront: // IEEE: parameter_port_declaration w/o assignment +parameter_port_declarationFrontE: // IEEE: parameter_port_declaration w/o assignment // // IEEE: parameter_declaration (minus assignment) - parameter_declarationFront { } - // + varGParamReset implicit_typeE { /*VARRESET-in-varGParam*/ VARDTYPE($2); } + | varGParamReset data_type { /*VARRESET-in-varGParam*/ VARDTYPE($2); } + | implicit_typeE { /*VARRESET-in-varGParam*/ VARDTYPE($1); } + | data_type { /*VARRESET-in-varGParam*/ VARDTYPE($1); } + //UNSUP varGParamReset yTYPE { /*VARRESET-in-varGParam*/ VARDTYPE($2); } //UNSUP data_type { VARDTYPE($1); } //UNSUP yTYPE { VARDTYPE($1); } ; diff --git a/test_regress/t/t_param.v b/test_regress/t/t_param.v index 9e7402cc5..8418cf417 100644 --- a/test_regress/t/t_param.v +++ b/test_regress/t/t_param.v @@ -46,8 +46,8 @@ module m1; initial if (PACKED_PARAM != 8'h36) $stop; endmodule -module m2; - parameter PAR2 = 10; +// bug 810 +module m2 #(/*parameter*/ integer PAR2 = 10); initial begin $display("%x",PAR2); if (PAR2 !== 2) $stop; diff --git a/veripool-logo.png b/veripool-logo.png deleted file mode 100644 index 6ca0a537b..000000000 Binary files a/veripool-logo.png and /dev/null differ