module Wait_fork_1_2;
initial begin
DELAY(10);
fork
begin
fork
DELAY(5);
DELAY(3);
join_any
wait fork;
$display(" Time:%0d ",$time," Done with wait fork ");
end
join
end
task automatic DELAY ( input int D );
fork
begin
#D;
$display(" Done with Delay %0d ",D);
end
join_none
endtask
endmodule
Shouldn’t wait fork wait for its Immediate Child Threads DELAY(3) & DELAY(5) [ DELAY(10) Is Another Process ] to Complete ?
Here is my Expected Output ::
Done with Delay 3
Done with Delay 5
Time:5 Done with wait fork
Done with Delay 10
Here is The Output I am Getting ::
Time:0 Done with wait fork
Done with Delay 3
Done with Delay 5
Done with Delay 10