Hi, I am new to verification academy and systemverilog/uvm so forgive me if this is trivial. I am currently trying to get the a cross coverpoint to catch the condition that (a==b) && (c==d), regardless of what value they are. I have tried the following crosses and none of them seem to be working.
covergroup abcd_tracking with function sample (bit [7:0] a, bit [7:0] b, bit [7:0] c, bit [7:0] d);
coverpoint a {
bins a_bin[1] = {[0:$]};
}
coverpoint b {
bins b_bin[1] = {[0:$]};
}
coverpoint c {
bins c_bin[1] = {[0:$]};
}
coverpoint d {
bins d_bin[1] = {[0:$]};
abcd_cross : cross a,b,c,d
{
bins abcd_bin = abcd_cross with( (a==b) && (c==d) );
}
abcd_cross_2 : cross a,b,c,d
{
bins abcd_2_bin = ( binsof(a) intersect(b) && binsof(c) intersect(d) );
}
abcd_cross_3 : cross a,b,c,d
{
bins abcd_3_bin = ( binsof(a) intersect{[0:$]} with (a==b) && binsof(c) intersect{[0:$]} with (c==d) );
}
This should actually be an illegal condition that never gets hit, but the 3 cross coverpoints seem to be constantly getting hit even though after checking with my log files, the sampled variables don’t meet the condition I am trying to define in my cross coverpoint. What is the proper syntax for catching this particular condition: " (a==b) && (c==d) " ?