diff --git a/ivtest/ivltests/localparam_implicit.v b/ivtest/ivltests/localparam_implicit.v new file mode 100644 index 000000000..98e73edc3 --- /dev/null +++ b/ivtest/ivltests/localparam_implicit.v @@ -0,0 +1,30 @@ +// Check that all parameters in a parameter port list after a `localparam` get +// elaborated as localparams, until the next `parameter`. + +module a #( + parameter A = 1, B = 2, + localparam C = 3, D = 4, + parameter E = 5 +); + +initial begin + if (A == 10 && B == 20 && C == 3 && D == 4 && E == 50) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end +end + +endmodule + +module b; + + a #( + .A(10), + .B(20), + .C(30), + .D(40), + .E(50) + ) i_a(); + +endmodule diff --git a/ivtest/regress-sv.list b/ivtest/regress-sv.list index a0bfc15e6..1841e5bfa 100644 --- a/ivtest/regress-sv.list +++ b/ivtest/regress-sv.list @@ -300,6 +300,7 @@ l_equiv normal,-g2005-sv ivltests l_equiv_ca normal,-g2005-sv ivltests l_equiv_const normal,-g2005-sv ivltests line_directive normal,-g2009,-I./ivltests ivltests gold=line_directive.gold +localparam_implicit normal,-g2005-sv ivltests localparam_query normal,-g2005-sv ivltests localparam_type2 normal,-g2009 ivltests logical_short_circuit normal,-g2012 ivltests