# Assertion to check if all bits get set atleast once in simulation for a multibit vector

**URL:** <https://verificationacademy.com/forums/t/assertion-to-check-if-all-bits-get-set-atleast-once-in-simulation-for-a-multibit-vector/31836>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, assertion-systemverilog\
**Created:** [May 19, 2016, 4:04pm UTC](https://verificationacademy.com/forums/t/assertion-to-check-if-all-bits-get-set-atleast-once-in-simulation-for-a-multibit-vector/31836 "2016-05-19T16:04:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![user60](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/user60/32/1096_2.png) [@user60](https://verificationacademy.com/forums/u/user60)\
**Post date:** [May 20, 2016, 4:09am UTC](https://verificationacademy.com/forums/t/assertion-to-check-if-all-bits-get-set-atleast-once-in-simulation-for-a-multibit-vector/31836/3 "2016-05-20T04:09:22Z")

</div>

_In reply to [rohitk](https://verificationacademy.com/forums/t/assertion-to-check-if-all-bits-get-set-atleast-once-in-simulation-for-a-multibit-vector/31836/2):_

How about?

```verilog

  // Assuming default clock & disable

  property p_check_single_bit_to_be_set;
    s_eventually p_flags[0];
  endproperty : p_check_single_bit_to_be_set

  a_p_check_single_bit_to_be_set : assert property (p_check_single_bit_to_be_set) else
    `uvm_error ("SVA", "Bit was never set to 1")

```

Combine that with a generate loop for scalable bits

Regards  
Srini  
[http://www.verifworks.com](http://www.verifworks.com)

---

_[View the full topic](https://verificationacademy.com/forums/t/assertion-to-check-if-all-bits-get-set-atleast-once-in-simulation-for-a-multibit-vector/31836)._
