SV Verification Directory

Fork Join None

As the name suggests, the process in the fork will start and does not wait till it completes any of the threads. The figure below depicts the fork join none constructs.

Syntax: Fork Join None

fork
   // process 1
   // process 2
   // process 3
join_none

Example Code: Fork Join None

module fork_join_any;

  initial begin
    fork
      #2  $display("t = %0t, fork 1 => process 1", $time);
      #10 $display("t = %0t, fork 1 => process 2", $time);
      #5  $display("t = %0t, fork 1 => process 3", $time);
    join_none
    $display("--------------- Exited Fork 1 ---------------");
    end


  initial begin
    fork
      #3 $display("t = %0t, fork 2 => process 1", $time);
      #6 $display("t = %0t, fork 2 => process 2", $time);
      #1 $display("t = %0t, fork 2 => process 3", $time);
    join_none
    $display("--------------- Exited Fork 2 ---------------");
    end

endmodule