# \#Condition-for-sampling-covergroup

**URL:** https://verificationacademy.com/forums/tag/condition-for-sampling-covergroup/6438.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [How to write array of coverpoints with a condition when each coverpoint should be sampled?](https://verificationacademy.com/forums/t/how-to-write-array-of-coverpoints-with-a-condition-when-each-coverpoint-should-be-sampled/34333)

<div class="topic-metadata">

**Author:** [@balanandan14](https://verificationacademy.com/forums/u/balanandan14)\
**Replies:** 1\
**Last updated:** [April 15, 2018, 3:38pm UTC](https://verificationacademy.com/forums/t/how-to-write-array-of-coverpoints-with-a-condition-when-each-coverpoint-should-be-sampled/34333 "2018-04-15T15:38:35Z")

</div>

I have 2 variables. bit \[31:0\] enable and bit \[31:0\] value. The 2 variables function in the following way. If enable\[i\] = 1, then value\[i\] can take values 0 or 1. I want to write coverpoints for all the 32 bits of var…
