Files
iverilog/ivtest/ivltests/real_wire_array.v
T
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
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.
2022-01-15 10:18:50 -08:00

31 lines
645 B
Verilog

module top;
reg passed = 1'b1;
real rval = 1.0;
wire real rvar [1:0];
assign rvar[0] = -1.0;
assign rvar[1] = 2.0*rval;
initial begin
#1;
if (rvar[0] != -1.0) begin
$display("Failed: real wire array[0], expected -1.0, got %g", rvar[0]);
passed = 1'b0;
end
if (rvar[1] != 2.0) begin
$display("Failed: real wire array[1], expected 2.0, got %g", rvar[1]);
passed = 1'b0;
end
rval = 2.0;
#1;
if (rvar[1] != 4.0) begin
$display("Failed: real wire array[1], expected 4.0, got %g", rvar[1]);
passed = 1'b0;
end
if (passed) $display("PASSED");
end
endmodule