Here is requirements : we have two process and spawned together in one fork-join. what we need is if processB is completed, then we disable the fork and jump out the fork-join. How to write it ?
fork
begin
processA();
end
begin
processB();
disable fork;
end
join
If there are other child-thread spawned in processA(), for example we connect a sequencer with a driver inside processA and the item started at a certain point, how to kill it when processB() completed ? I mean if pA.kill() will kill all child process inside processA() ?
Now you’ve brought UVM into the picture. It’s generally a bad idea to kill or disable a sequence thread. It could leave the driver in a messup up state. I would do a search for “proper way to kill a sequence”
It works if there’s only one instance of the main_blk. However, the problem with disabling named blocks is that it disables all invocations of those blocks.
Is there any option or way to create the name/tag of the block to include ID which would be incremented upon each invocation of this block?
e.g. we have a UVC agent, which we have 10 instances of it in our TB.
Each UVC will have a unique index.
Ideally the name of fork block would include in its name - the unique index of the UVC.