How to define coverpoint bins which are mutually exclusive each other

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”.

  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,

In reply to tsb_matumoto:

Use the inside operator.

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};
}

In reply to dave_59:

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