How to disable the fork join for this scenerio

Status
Not open for further replies.

karalamoorthy_p

Newbie level 5
Joined
Jun 6, 2013
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,358
Hi

fork
task A;
task B;
task C;
join
$display("Fork-join is completed")


Usually in the above cases the display is printed after all the tasks are completed. But in my case, two tasks are completed but one of the task is running infinite.How can I come out the fork join statement.

Please help me to solve this issues.

Thanks
 

Hi,

Check is there any bug in that task which is running infinite. Which may not be a syntax error.

Task may be not written correctly so its not going to be completed during simulation time.

if it really working well try any other piece of code injecting any sort of errors for that task completion.

Or

try
initial begin
fork
task A;
task B;
task C;
join

$display("Fork-join is completed");
#5 disable fork;
end

Then also Your not able to figure out your error or problem, try self checking test bench
 

You can come out of the fork/join block in many different ways
  1. By making the infinite task a finite task
  2. By having one of the existing tasks disable the infinite task
  3. By creating another task inside the fork/join block that disables the infinite task after some timout
  4. By creating another task in another process that disables the infinite task or the entire fork/join block
  5. By using any number of other SystemVerilog fork constructs ...

You would have to explain a little more about what behavior you are trying model to suggest the "right" solution.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…