Add regression test for implicit `localparam`
Check that all parameters in a parameter port list after a `localparam` get elaborated as localparams, until the next `parameter`. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
1549fd4332
commit
f25d7a74bc
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue