mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 01:33:07 +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
428 B
Verilog
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
|