mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 06:03:11 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
22 lines
441 B
Verilog
22 lines
441 B
Verilog
// This program is about testing that the value ranges parse and work for
|
|
// integer parameters.
|
|
module test(input wire in);
|
|
|
|
parameter real foo = 0.0 from [-10.0 : 10.0] exclude [1:2);
|
|
parameter real bar = 0 from (-inf:0];
|
|
|
|
initial begin
|
|
$display("foo = %f", foo);
|
|
$display("PASSED");
|
|
$finish;
|
|
end
|
|
|
|
endmodule // test
|
|
|
|
module main;
|
|
|
|
reg rrr = 0;
|
|
test #(.foo(2), .bar(-5.0)) dut (rrr);
|
|
|
|
endmodule // main
|