# Conditional Statement in Assertion Property

**URL:** <https://verificationacademy.com/forums/t/conditional-statement-in-assertion-property/33671>\
**Category:** SystemVerilog\
**Tags:** conditional-statement, SystemVerilog, assertion\
**Created:** [November 2, 2017, 8:44am UTC](https://verificationacademy.com/forums/t/conditional-statement-in-assertion-property/33671 "2017-11-02T08:44:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Tudor\_Timi](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/tudor_timi/32/1897_2.png) [@Tudor\_Timi](https://verificationacademy.com/forums/u/Tudor_Timi)\
**Post date:** [November 2, 2017, 2:28pm UTC](https://verificationacademy.com/forums/t/conditional-statement-in-assertion-property/33671/4 "2017-11-02T14:28:59Z")

</div>

_In reply to [Reuben](https://verificationacademy.com/forums/t/conditional-statement-in-assertion-property/33671/3):_

The property gets attempted on each clock cycle. If _a_ is low, the the **else** block is taken and the property _sig1 & sig2 & sig3 → ##1 sig\_B_ is evaluated. Since _sig3_ is low, the whole antecedent is false. For implication, a false antecedent is a vacuous pass. Since the property under the **else** evaluated to pass, the whole **if/else** property evaluates to pass. I couldn’t find the vacuity semantics for **if/else** explicitly written out int he LRM, but I presume that they are similar to those for implication. This means that, since the evaluation of the property under the **else** was vacuous, then the entire evaluation of the **if/else** is also vacuous.

Also, I noticed that you were also asking how to have the tool not mark the assertion as passed. You can only do this with a **disable iff**. I’m not sure what the best practices w.r.t. using this are, but you for sure want to use _$sampled(…)_ inside it due to the way the semantics are defined. I guess in your case it would look something like:

```verilog

property my_property;
  disable iff ($sampled(!a && !(sig1 & sig2 & sig3)))
  // ...
endproperty

```

The issue with vacuity you will have regardless of whether you split your assertion into two smaller assertions or not. Tools usually either don’t collect vacuous passes by default or if they do they categorize them separately.

---

_[View the full topic](https://verificationacademy.com/forums/t/conditional-statement-in-assertion-property/33671)._
