I’m trying to have a coverpoint that will cover the resultant of a function that will return integer values.
Like:
function int diff_seq_addr(address_t a, address_t b);
case (a-b) inside
0 : return 0;
[-31:31] : return 2;
default : return 1;
endcase
endfunction : diff_seq_addr
seq_addr_cp : coverpoint {diff_seq_addr(a, b),diff_seq_addr(a,c),diff_seq_addr(a,d),diff_seq_addr(a,e)} iff valid {
wildcard bins AA = {0???};
wildcard bins ABA = {10??};
wildcard bins ABCA = {110?};
bins ABCDA = {1110};
wildcard bins AAA = {000?};
bins AAAA = {0000};
bins other = default;
}
But compilation is throwing error in the wildcard bins line. I get what the problem is: The problem here is that I’m concantenating integer values, but not using them the right way in the bins expression. Can you please help me resolve this?
Thanks