# How to define coverpoint bins which are mutually exclusive each other

**URL:** <https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004>\
**Category:** Coverage\
**Tags:** covergroup, coverpoint, Coverage\
**Created:** [January 10, 2020, 9:22am UTC](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004 "2020-01-10T09:22:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsb\_matumoto](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/t/ce7236/32.png) [@tsb\_matumoto](https://verificationacademy.com/forums/u/tsb_matumoto)\
**Post date:** [January 10, 2020, 9:22am UTC](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004/1 "2020-01-10T09:22:08Z")

</div>

I want to write a bins which are mutually exclusive.  
Here is the example:

1. DUT has two kinds of slave devices: ahb slave and apb slave.
2. I want to sample AMBA bus address to collect a coverage to check whether accesses to APB slave and AHB slave take place.
3. AHB address is rest of APB address.
4. I want to define a set of address for ahb\_slave which is “[0:$]” - “bins apb\_slave”.

It could be a bit cumbersome to list out all the address for ahb\_slave. So I am wondering whether there is a good way of expressing “rest of apb”.

```verilog
  cg_AccessArea: coverpoint addr {
     bins apb_slave = {['h4002_3800:'h4002_3BFF],
                 ['h4002_4000:'h4002_4FFF],
                 ['h4002_6800:'h4002_68FF],
                 ['h4001_C000:'h4001_FFFF]};
     bins ahb_slave = /* rest of apb */
  }

```

Thanks,

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [January 11, 2020, 12:15pm UTC](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004/2 "2020-01-11T12:15:51Z")

</div>

_In reply to [tsb\_matumoto](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004):_

Use the **inside** operator.

```verilog
cg_AccessArea: coverpoint addr inside {['h4002_3800:'h4002_3BFF],
                                       ['h4002_4000:'h4002_4FFF],
                                       ['h4002_6800:'h4002_68FF],
                                       ['h4001_C000:'h4001_FFFF]} {
     bins apb_slave = {1};
     bins ahb_slave = {0};
}

```

---

<div class="post-metadata">

**Author:** ![tsb\_matumoto](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/t/ce7236/32.png) [@tsb\_matumoto](https://verificationacademy.com/forums/u/tsb_matumoto)\
**Post date:** [January 14, 2020, 3:35am UTC](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004/3 "2020-01-14T03:35:49Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004/2):_

Thanks!  
It was exactly what I wanted to find. It worked in my env.

---

<div class="post-metadata">

**Author:** ![Rhiny](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/d07c76/32.png) [@Rhiny](https://verificationacademy.com/forums/u/Rhiny)\
**Post date:** [April 20, 2026, 12:35am UTC](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004/4 "2026-04-20T00:35:24Z")

</div>

hi Dave

can we use default for ahb slave

cg\_AccessArea: coverpoint addr {  
bins apb\_slave = {['h4002\_3800:'h4002\_3BFF],  
['h4002\_4000:'h4002\_4FFF],  
['h4002\_6800:'h4002\_68FF],  
['h4001\_C000:'h4001\_FFFF]};  
bins ahb\_slave = _default_ ;

}

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [April 20, 2026, 7:22am UTC](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004/5 "2026-04-20T07:22:19Z")

</div>

No, because `default` bins are excluded from the coverage calculation. They are mostly used for debugging any stray values that may have been missed.

---

<div class="post-metadata">

**Author:** ![Rhiny](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/d07c76/32.png) [@Rhiny](https://verificationacademy.com/forums/u/Rhiny)\
**Post date:** [April 20, 2026, 1:25pm UTC](https://verificationacademy.com/forums/t/how-to-define-coverpoint-bins-which-are-mutually-exclusive-each-other/37004/6 "2026-04-20T13:25:16Z")

</div>

ok dave thanks
