mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 08:25:32 +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.
35 lines
617 B
Verilog
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
|