Files
iverilog/ivtest/ivltests/parameter_no_default.v
T
Lars-Peter Clausen 91579c7c79 Add regression tests for parameters without default
SystemVerilog supports parameters without default values in parameter port
list. Add regression tests to check this feature.

Also add a regression test to check that modules without a default
parameter are not automatically picked as a toplevel module.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-02-13 18:21:56 +01:00

21 lines
352 B
Verilog

// SystemVerilog allows parameters without default values in the parameter port
// list. Check that this is supported. The test should fail in Verilog mode.
module a #(
parameter A
);
initial begin
if (A == 1) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule
module test;
a #(.A(1)) i_a();
endmodule