I am looking at some code as below (only psedo code posted.) and curious how .sample() works for triggering cover group.
//some code here. bins etc
// some code here. bins etc
For each covergroup I have multiple instances
A a_instA, b_instA;
In body task I am triggering with .sample.
coverage = some_task_call();
while (coverage !=1)
However I see that coverage is measured by combined coverage of a_instA, b_instA and a_instB. (a_instA.get_inst_coverage ==100 && b_instA.get_inst_coverage ==100 && a_instB.get_inst_coverage == 100). Test is also printing these coverage values with each iteration and I see them increasing for each cover groups instance. My understanding was that whatever instance calls .sample() only that instance coverage is measures after trigger. I am surprised to see other coverage increasing as well.