One Hot encoding

This is very similar to the other issue just posted here. You need to model each slave as a separate covergroup instance.

covergroup onehot_cg(input bit  position, ref bit  vector);
  encoding: coverpoint ((1'b1<<position) & vector) != 0 {
    bins hit = { 1 };
  }
  option.per_instance = 1;
endgroup
 
onehot_cg cgi[NSLAVES];
 
foreach (cgi[i]) cgi[i] = new(i,ADD);