SystemVerilog Fork-Join_any example - EDA Playground
Warning! This exercise has been opened in another tab; autosave has been disabled. Close this tab or refresh to reactivate.

 Languages & Libraries

 Tools & Simulators

 Examples

203


32
 
1
//----------------------------------------------------------------------------------
2
//                      www.verificationguide.com
3
//----------------------------------------------------------------------------------
4
module fork_join;
5
  
6
  initial begin
7
    $display("-----------------------------------------------------------------");
8
    
9
    fork
10
      //-------------------
11
      //Process-1
12
      //-------------------
13
      begin
14
        $display($time,"\tProcess-1 Started");
15
        #5;
16
        $display($time,"\tProcess-1 Finished");
17
      end
18
      //-------------------
19
      //Process-2
20
      //-------------------
21
      begin
22
        $display($time,"\tProcess-2 Startedt");
23
        #20;
24
        $display($time,"\tProcess-2 Finished");
25
      end
26
    join_any
27
    
28
    $display($time,"\tOutside Fork-Join");
29
    $display("-----------------------------------------------------------------");
30
  
31
  end  
32
endmodule
xxxxxxxxxx
1
 
1
// Code your design here
2
3612 views and 2 likes     
 
SystemVerilog Fork-Join_any example www.verificationguide.com

SystemVerilog Fork-Join_any example www.verificationguide.com

170:0