SystemVerilog fork join_none

fork join_none

As in the case of Fork-Join and Fork-Join_any fork block is blocking, but in case of Fork-Join_none fork block will be non-blocking.

Processes inside the fork-join_none block will be started at the same time, fork block will not wait for the completion of the Process inside the fork-join_none.

SystemVerilog Fork Join none
SystemVerilog Fork Join none

fork join none example

In the below example,

The fork will start Process-1 and Process-2 at the same time, and it will come out of the block. Process-1 and Process-2 will be executed until the completion.

module fork_join_none;
  initial begin
    $display("-----------------------------------------------------------------");
    fork
      //Process-1
      begin
        $display($time,"\tProcess-1 Started");
        #5;
        $display($time,"\tProcess-1 Finished");
      end
      //Process-2
      begin
        $display($time,"\tProcess-2 Startedt");
        #20;
        $display($time,"\tProcess-2 Finished");
      end
    join_none
 
    $display($time,"\tOutside Fork-Join_none");
    $display("-----------------------------------------------------------------");
  end
endmodule

Simulator Output

-----------------------------------------------------------------
0 Outside Fork-Join_none
-----------------------------------------------------------------
0 Process-1 Started
0 Process-2 Startedt
5 Process-1 Finished
20 Process-2 Finished

Click to execute on

❮ Previous Next ❯