How to generate a bin that associated with none of he defined value bins and the take into account for the coverage caculation?

Hi all, according to the description in the IEEE system verilog, that the default specification defines a bin that associated with none of the defined value bins. And however, the coverage calculation for a coverage point shall not take into account the coverage captured by the default bin.

So in the following code ,the others are NOT take into account to calculate the coverage.


covergroup CovValue;
    dst : coverpoint data.dst[3:0]{
        bins zero = {0};
        bins two  = {2};
        bins others = default;
    }
endgroup

So I need to write all of them manually if I want the others to be valid.
But when the data is huge, for example 256,1024 or more what should I do? Anyway, use the script to generate the code is one way.
Is there any other suggestion for that?

In reply to aug_com:
If the bin values are contiguous, you just need a range expression.

covergroup CovValue;
    dst : coverpoint data.dst[7:0]{
        bins zero = {0};
        bins two  = {2};
        bins others = {1,[3:255]};
    }
endgroup

If they are not contiguous and no specific pattern of values, you’ll manually need to express all the independent ranges.

If you have an algorithm for expressing which bin values you want, you can use the with clause of a bin expression, or put the bin values into an array. See http://go.mentor.com/ready-for-systemverilog-2012

In reply to dave_59:

OK, thanks, my coverage divided into pieces and I think I need to express it manually. :-(