Hi,
I’m looking for a way to disable a thread for a particular index. How would I be able to do that. Using a label infront of fork and disable on it will disable all threads spawned for all indexes. Please advise if there a solution to do this.
Here is a sample code I’m trying to achieve.
task A();
for (int i=0; i<n; i++)
fork
automatic int idx =i;
drive_req(i);
join_none
endtask
task drive_req(int idx)
forever begin
@(posedge clk);
if(a) begin
...x....
disable <idx>
.......
end // end iff=
else if (b) begin
----y--
<idx> : fork
---
---
join_none
end // end else
end
endtask
Thanks