Fix localparam_implicit.v test

The localparam_implicit.v test was broken by a recent commit. Fix the
test, since the commit is correct and the test really is broken.
This commit is contained in:
Stephen Williams 2022-02-01 19:15:01 -08:00
parent 6db40d9f14
commit 687abbd030
3 changed files with 33 additions and 2 deletions

View File

@ -22,8 +22,8 @@ module b;
a #(
.A(10),
.B(20),
.C(30),
.D(40),
// Cannot override localparam .C(30),
// Cannot override localparam .D(40),
.E(50)
) i_a();

View File

@ -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), // This will cause an error
.D(40), // This will cause an error
.E(50)
) i_a();
endmodule

View File

@ -301,6 +301,7 @@ 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_implicit2 CE,-g2005-sv ivltests
localparam_query normal,-g2005-sv ivltests
localparam_type2 normal,-g2009 ivltests
logical_short_circuit normal,-g2012 ivltests