could you please let me know
how to convert fork join to fork join_any
could you please let me know
how to convert fork join to fork join_any
In reply to srbeeram:
Consider following fork … join_any code ::
initial begin
fork
begin:T1
$display("In T1");
#5 ;
$display("Done with T1");
end
begin:T2
$display("In T2");
#7 ;
$display("Done with T1");
end
join_any
$display("In Parent thread ");
end
To achieve this via fork join ::
initial begin
int counter ;
fork
begin:T1
$display("In T1");
#5 ;
$display("Done with T1");
counter++;
end
begin:T2
$display("In T2");
#7 ;
$display("Done with T1");
counter++;
end
begin
wait ( count >= 1 ) ;
$display("In Parent thread ");
end
join
end