I want to write a coverpoint for an integer x with 3 bins: zero, all positive values, and all negative values. Intuitively, I think the answer is as follows:
int x;
x_cp : coverpoint x {
bins positive = {[1:$]};
bins zero = {0};
bins negative = {[$:-1]};
}
I cannot find any documentation in the SV language spec or online to confirm this intuitive solution is in fact correct. Is that negative bin covering negative -(2^31) to -1, or is it covering 1 to (2^31)-1. More than an answer, I am looking for a section in the SV language spec that I can read to understand .