# How Can I Hold Off an Assertion Until Sync is Established Using a Local Variable?

**URL:** <https://verificationacademy.com/forums/t/how-can-i-hold-off-an-assertion-until-sync-is-established-using-a-local-variable/29489>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, local-variables, assertion\
**Created:** [May 21, 2014, 4:53pm UTC](https://verificationacademy.com/forums/t/how-can-i-hold-off-an-assertion-until-sync-is-established-using-a-local-variable/29489 "2014-05-21T16:53:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![user49](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/user49/32/4533_2.png) [@user49](https://verificationacademy.com/forums/u/user49)\
**Post date:** [May 21, 2014, 11:45pm UTC](https://verificationacademy.com/forums/t/how-can-i-hold-off-an-assertion-until-sync-is-established-using-a-local-variable/29489/3 "2014-05-21T23:45:17Z")

</div>

You needed the property “or” operator.

```auto
property data_parity_prop (clk, rst, d, available, parity);
  bit flag = 0;
  @(posedge clk) disable iff (rst !== 1)
((d == SYNC_DATA), flag = 1) or flag |-> ^d ^ available ^ parity;
endproperty
// Could also use
property data_parity_prop (clk, rst, d, available, parity);
  bit flag = 0;
  @(posedge clk) disable iff (rst !== 1)
  ($rose(d == SYNC_DATA), flag = 1) or flag |-> ^d ^ available ^ parity;
endproperty
// Suggest you also use the default disable iff

```

> property\_expr ::=  
> sequence\_expr  
> | strong ( sequence\_expr )  
> | weak ( sequence\_expr )  
> | ( property\_expr )  
> | not property\_expr  
> | property\_expr or property\_expr // \<-----------  
> | property\_expr and property\_expr  
> | sequence\_expr |-\> property\_expr  
> | sequence\_expr |=\> property\_expr  
> …

* * *

Ben Cohen  
[http://www.systemverilog.us/](http://www.systemverilog.us/) [ben@systemverilog.us](mailto:ben@systemverilog.us)

- A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
- SystemVerilog Assertions Handbook, 2005 ISBN 0-9705394-7-9
- Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
- Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 0-9705394-2-8
- Component Design by Example ", 2001 ISBN 0-9705394-0-1
- VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
- VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115

* * *

---

_[View the full topic](https://verificationacademy.com/forums/t/how-can-i-hold-off-an-assertion-until-sync-is-established-using-a-local-variable/29489)._
