Coverpoint for an expression

Hello…I am new to coverage. Can anyone help me to ensure the coverpoint written below is correct for the condition mentioned?

condition: v_reg_btb_entry_0_EN == 1 and v_reg_btb_tag_0[xlen-2:1]==upper xlen-2 bits of ma_train_bpu_td and v_reg_btb_tag_0[0]==1.(Xlen=64 and size of
ma_train_bpu_td is 142bits.
hit_entry_cp_0: coverpoint (v_reg_btb_entry_0_EN == 1 && (v_reg_btb_tag_0[62:1]== ma_train_bpu_td[141:80]) && v_reg_btb_tag_0[0]==1){
bins hit_entry_0 = {1};
}

In reply to Jyothi_G:

A Boolean expression used in a coverpoint is no different than a boolean expression used in a $display. Try it out.

I want that as a coverpoint only…Is there any other way to write it as a coverpoint

In reply to dave_59:
a:coverpoint v_reg_btb_entry_0_EN{
bins a = {1};
}
b:coverpoint v_reg_btb_tag_0[0] {
bins b = {1};
}

d: coverpoint (v_reg_btb_tag_0[60:1]== ma_train_bpu_td[141:80]){
bins d = {1};
}
c:cross a,b,d;

Is this correct for above condition.

In reply to Jyothi_G:

If they all have to be true simultaneously, you need to and them together using the && operator.

In reply to dave_59:
solution1:
a:coverpoint v_reg_btb_entry_0_EN{
bins a = {1};
}
b:coverpoint v_reg_btb_tag_0[0] {
bins b = {1};
}
c:cross a,b iff (v_reg_btb_tag_0[60:1]== ma_train_bpu_td[141:80]);
solution2:
hit_entry_cp_0: coverpoint (v_reg_btb_entry_0_EN == 1 && (v_reg_btb_tag_0[62:1]== ma_train_bpu_td[141:80]) && v_reg_btb_tag_0[0]==1){
bins hit_entry_0 = {1};
}
Dave can you tell me which one is correct solution1 or solution2?

In reply to Jyothi_G:

A cross is a cross-product of all coverpoint bins. If all your coverpoints in a cross have only a single “true” bin, then it is effectively the same as ANDing the coverpoints together.

The only difference is in computing partial coverage results. Solution 1 can have 0%, 33% or 100% coverage, whereas Solution 2 can only have 0% or 100% coverage. You previous solution with 3 coverpoints and a cross could have 0,25, 50, and 100% coverage. Without know the design, I can’t tell you if having partial coverage results is useful.