Files
iverilog/ivtest/ivltests/simple_longint.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

35 lines
617 B
Verilog

module main;
longint foo, bar = 10;
longint wire_res;
longint var_res;
assign wire_res = foo*bar;
initial begin
foo = 9;
var_res = foo * bar;
$display("%0d * %0d = %0d %0d", foo, bar, foo * bar, var_res);
if ((foo * bar) !== 90) begin
$display("FAILED");
$finish;
end
if (var_res !== 90) begin
$display("FAILED");
$finish;
end
#0; // allow CA to propagate
$display("%0d * %0d = %0d", foo, bar, wire_res);
if (wire_res !== 90) begin
$display("FAILED");
$finish;
end
$display("PASSED");
end
endmodule // main