Hi,
I am trying to run the following code and my output is not what I expected:
module top;
task display(input int t_in, string name);
#t_in $display("@%0t: %s", $time, name);
endtask
initial begin
$display("@%0t: Main process started", $time);
fork
display(5, "Thread1");
display(10, "Thread2");
display(15, "Thread3");
join_none
$display("@%0t: Fork-join_none completed", $time);
wait fork;
end
endmodule
I am getting the following output (ACTUAL OUTPUT):
@0: Main process started
# @0: Fork-join_none completed
# @5: Thread3
# @10: Thread3
# @15: Thread3
But I am expecting the following output: (EXPECTED OUTPUT)
@0: Main process started
# @0: Fork-join_none completed
# @15: Thread3
# @15: Thread3
# @15: Thread3
So, my query is why t_in argument has not overridden when I called non-automatic task display() three times?