In reply to dave_59:
Hi Dave , sorry for the confusion. It worked means killing the grand children happened with disable fork_name on one fork join_none block that is not the fork join_none block inside the for loop. so I tried to kill the fork block inside the for loop the same way and it gave compilation error. You are right. and applying the reset second time means I need to apply the reset on rtl when traffic flows . and the traffic flow starts after initial reset. here is the code.
fork begin
fork
Rate();
join_none
fork
Cycle();
join_none
if(!empty)
begin
for (int i_s=Min; i_s<=Max; i_s++) begin
fork
automatic int local_i_s = i_s;
begin
task0(local_i_s);
end
join_none
end
fork: fork_drivePkt
task1;
task2;
join_none :fork_drivePkt
// I tried by placing the code @reset_event disable fork here (reset_event is endThreads in the code) but it didn't work. I will give a trail again.
begin
@endThreads;
disable fork_drivePkt;
end
end
end
join
I want to kill all the tasks inside not empty block . all the code is in main task of vmm