Coverage

Hi ,

1.How Can we control the condition bin creation by using with?
2. what is the difference between using iff and with in coverpoint?
3. What is exactly term item in coverage especially in coverpoint ?
ignore_bins with (item >a). does item means the coverpoint value please correct me /
4. what is the role of iff condition in ignore bins .is it needed ?
5. does ignore bins will stop the creation of bins ?
6. How Ignore bins by using with will work ?

Please guide me with examples that would be helpful.

Regards,
Mechanic

In reply to Mechanic:

All bins get created when calling the constructor of a covergroup. Once constructed, you cannot modify the set of bins. Realize that bins are just counters that get incremented on each sample when there is a value match.

The iff clause on a covergroup/coverpoint/bin is an enable on the counters—it has no effect on bin creation. Functional coverage calculation can be as simple as the percentage of bins with non-zero counts divided by the total number of bins.

There’s no difference in how you specify ignore_bins; the iff and with clauses work the same. But ignore_bins are excluded from the coverage calculation. The ignore_bin counter can be used for debugging.

One example of the with clause is here:

In reply to dave_59:

I have consolidated some of your other questions in to this example here

Suppose you have a 5-bit value and you need cover the values 1-7,9,11,13,15-31. You can specify isolated values in one bin specification

bins a[] = { [1:7], 9,11,13,[15:$]};

Or you specify a more general bin, and pick out the values you want to ignore

bins a[] = {[1:$]};
ignore_bins b[] ={[8:14]} with (item % 2 == 0)};

You normally don’t see iff on individual bins but if they are there, you probably need them on both bins specifications if you need analyze bins counters.

In reply to dave_59:

thanks Dave

could you guide me how the below example will works.
Let us consider below is the complex coverpoint so i will be using ignore bin with clause for defining the bins.

eg:) coverpoint a {

       ignore_bins ig1 = coverpoint iff(write config) with ( item = 7,8,9)
       ignore_bins ig2 = coverpoint iff(read onfig enable) with ( item = 2,3,4)

         }

eg;) ignore_bins ig1 = coverpoint with(item > && (expression1 && exp 2)) is this valid ?

inside with (<>) do i need to use only cover point value ? or can i use hierarchy for contral bit
ignore_bins = coverpoint with (item>x && hier_1.hier_2.en == 1) → does this also work?

is it possible to create like this.
which example is valid
Please correct me if i am wrong