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

22 lines
428 B
Verilog

module main;
// The declaration assignment within a task it not allowed
// in Verilog, but it is allowed in SystemVerilog.
task foo (input integer x, output integer y);
integer step = 3;
y = x + step;
endtask // foo
integer a, b;
initial begin
a = 3;
foo(a, b);
if (b !== 6) begin
$display("FAILED");
$finish;
end
$display("PASSED");
end
endmodule // main