Subbi Reddy Manne Posted September 6, 2022 Report Share Posted September 6, 2022 How to disable join fork after executed particular thread or process Requirement: Need to disable fork join after executing join_2 thread or process Please help me in this module fork_join; initial begin $display("**********BEFORE FORK..JOIN**********"); fork begin:join_1 #1 $display($time,"\tThread A"); #2 $display($time,"\tThread B"); end begin: join_2 #2 $display($time,"\tThread C"); #3 $display($time,"\tThread D"); end begin:join_3 #5 $display($time,"\tThread E"); #6 $display($time,"\tThread F"); end join #7 $display($time,"\tThread G"); $display("**********AFTER FORK..JOIN**********"); $finish; end endmodule Quote Link to comment Share on other sites More sharing options...
David Black Posted September 6, 2022 Report Share Posted September 6, 2022 Read up on fork-join, fork-join_any, and fork-join_none. You can disable any labeled block or task. You can also kill processes if you know the process id. Your "After fork" won't execute until ALL three processes within the join complete. You likely want fork-join_any or fork-join_none. Also, you only have three threads/processes (the three labeled blocks). Your $displays inside those threads will execute sequentially. Quote Link to comment Share on other sites More sharing options...
Subbi Reddy Manne Posted September 7, 2022 Author Report Share Posted September 7, 2022 Thank you, I got it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.