# How to apply at least option only to a particular bin in a coverpoint

**URL:** <https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638>\
**Category:** Coverage\
**Tags:** Coverage-bins, Coverage, SystemVerilog-FunctionalCoverage\
**Created:** [September 30, 2021, 5:32pm UTC](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638 "2021-09-30T17:32:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sj1992](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/ecae2f/32.png) [@sj1992](https://verificationacademy.com/forums/u/sj1992)\
**Post date:** [September 30, 2021, 5:32pm UTC](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638/1 "2021-09-30T17:32:42Z")

</div>

Hi,

In the below code I want the atleast=10 option applied only to other\_val bin. Is that possible?

```verilog

bit [9:0] var_1;
c2: coverpoint var_1 { 
option.at_least = 10;
bins min = {0};
bins max = {1023};
bins other_val[10] = {[1:1022]};
}

```

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:** [September 30, 2021, 5:38pm UTC](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638/2 "2021-09-30T17:38:29Z")

</div>

_In reply to [sj1992](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638):_

break your coverpoint into two coverpoints

```verilog
c2_1: coverpoint var_1 { 
  bins min = {0};
  bins max = {1023};
}
c2_2: coverpoint var_1 { 
  option.at_least = 10;
  bins other_val[10] = {[1:1022]};
}

```

---

<div class="post-metadata">

**Author:** ![sj1992](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/ecae2f/32.png) [@sj1992](https://verificationacademy.com/forums/u/sj1992)\
**Post date:** [September 30, 2021, 7:11pm UTC](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638/3 "2021-09-30T19:11:05Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638/2):_

Hi Dave,

Thanks for the reply. In your comment for c2\_2 coverpoint there will be 10 automatic bins created with range of values. Will the coverage be 100% when all the 10 bins are hit at least 10 times?

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:** [September 30, 2021, 8:17pm UTC](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638/4 "2021-09-30T20:17:26Z")

</div>

_In reply to [sj1992](https://verificationacademy.com/forums/t/how-to-apply-at-least-option-only-to-a-particular-bin-in-a-coverpoint/39638/3):_

option.at\_least applies to individual bins. You have specified 10 bins, each needing to get hit 10 times. That means you need a minimum of 100 samples before it would be possible to get 100% coverage.
