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

32 lines
602 B
Verilog

module automatic_task();
task automatic fill_array;
input [7:0] value;
reg [7:0] array[3:0];
integer i;
fork
begin
#10 array[0] = value;
#10 array[1] = array[0];
#10 array[2] = array[1];
#10 array[3] = array[2];
end
begin
@(array[0]) $display(array[0], array[1], array[2], array[3]);
@(array[1]) $display(array[0], array[1], array[2], array[3]);
@(array[2]) $display(array[0], array[1], array[2], array[3]);
@(array[3]) $display(array[0], array[1], array[2], array[3]);
end
join
endtask
initial #1 fill_array(1);
initial #2 fill_array(2);
endmodule