This is my CG definition:
class my_cov;
bit [31:0] addr;
bit [31:0] data;
bit wr;
// ...
covergroup my_cg;
cp_addr : coverpoint addr {
option.auto_bin_max = 0;
bins a0 = {'h100};
bins a1 = {'h104};
}
cp_data : coverpoint data {
option.auto_bin_max = 1;
}
cp_access : coverpoint wr {
option.auto_bin_max = 0;
bins cb_wr = {1};
bins cb_rd = {0};
}
cr_a0_wr : cross cp_addr, cp_data, cp_access {
option.cross_auto_bin_max = 0;
bins OFF = binsof(cp_addr.a0) && binsof(cp_access.cb_wr) && binsof(cp_data) intersect {'h0};
bins ON1 = binsof(cp_addr.a0) && binsof(cp_access.cb_wr) && binsof(cp_data) intersect {'h1};
bins ON2 = binsof(cp_addr.a0) && binsof(cp_access.cb_wr) && binsof(cp_data) intersect {'h2};
}
endgroup
// ...
endclass
I expect the below cross-bins for ‘cr_a0_wr’:
‘OFF’ should get hit when → addr = 'h100 & wr = 1 & data = 'h0.
‘ON1’ should get hit when → addr = 'h100 & wr = 1 & data = 'h1.
‘ON2’ should get hit when → addr = 'h100 & wr = 1 & data = 'h2.
But after my simulation, I see all are getting hit even though I had only exercised the scenario for ‘ON1’.
I need help figuring out the mistake in this definition.
TIA.