I have the following code.
According to my understanding the fork-join should wat for all the child processes to be completed.
Inside process B, I am waiting for an event which never happened. Shouldn’t this code end up in timeout ?
module top();
event e1;
bit clk;
task process_A();
$display("@%0t: Before triggering event e1", $time);
->e1;
$display("@%0t: After triggering event e1", $time);
endtask
task process_B();
#10;
$display("@%0t: waiting for the event e1", $time);
//@e1;
@(posedge clk);
$display("@%0t: event e1 is triggered", $time);
endtask
initial begin
fork
process_A();
process_B();
join
#10;
end
endmodule
Simulation result says
@0: Before triggering event e1
@0: After triggering event e1
@10: waiting for the event e1
Time: 10 ns
I thought the end time will be minimum 20ns as I have a 10ns delay at the end