Hi there, if I have a single bit variable bit s, which is fed into a sequence detector. I would like to collect the 4cycle transition coverage of this bit.
covergroup cg;
coverpoint s {
bins s1101 = {1=>1=>0=>1};
}
endgroup
how to nicely have the bins of every permutation of the 4cycle sequence? effectively 0000, 0001, …, to 1111.
Thanks,
Jeff
In reply to Jeff_Li_90:
You can do this by creating an array of 16 covergroups for each permutation.
covergroup cg(bit [3:0] p);
option.per_instance=1;
coverpoint s {
bins seq = (p[3]=>p[2]=>p[1]=>p[0]);
}
endgroup
cg cg_seq[16];
initial begin
foreach(cg_seq[i]) cg_seq[i] = new(i);
end
You will need to sample all 16 covergroup instances either with another foreach loop, or a common sampling event.