rand bit [255:0] foo;
I wish to write a coverpoint (location_cp) to indicate which of the bits in foo have become 1.
e.g.
If foo [0] = 1, then location_cp should indicate that bit 0 of foo has become 1.
If foo [1] = 1, then location_cp should indicate that bit 1 of foo has become 1.
.
.
.
.
If foo and foo[y] are 1, then location_cp should indicate that bits x and y of foo have become 1, and so on.
How do I do this?
Thank You!