# SVA: throughout vs until

**URL:** <https://verificationacademy.com/forums/t/sva-throughout-vs-until/32710>\
**Category:** SystemVerilog\
**Tags:** SVA, througout, SystemVerilog\
**Created:** [January 2, 2017, 9:57am UTC](https://verificationacademy.com/forums/t/sva-throughout-vs-until/32710 "2017-01-02T09:57:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [January 2, 2017, 5:43pm UTC](https://verificationacademy.com/forums/t/sva-throughout-vs-until/32710/2 "2017-01-02T17:43:47Z")

</div>

_In reply to [moogyd](https://verificationacademy.com/forums/t/sva-throughout-vs-until/32710):_

> …  
> There is also the property operator “until\_with”. I tried to re-write the above property as

```verilog
property AP_req_ack ;
$rose(req_i) |-> req_i until_with ack_o ##1 !req_i ;
endproperty : AP_req_ack

```

However, this doesn’t behave in the same way. The req\_i until ack\_o seems to work OK, but it doesn’t then check !req\_i.

The **until\_with** is a property operator:  
**property\_expr until\_with property\_expr**

An until property of one of the overlapping forms (i.e., **until\_with, s\_until\_with** ) evaluates to true if _property\_expr1_ evaluates to true at every clock tick beginning with the starting clock tick of the evaluation attempt and continuing until, _and including a clock tick at which property\_expr2 evaluates to true._ Thus, for

```verilog
 (req_i throughout ack_o[->1]) ##1 !req_i 

```

You are requiring that the property (_which is a sequence in this case, but a sequence can be a property_) **req\_i==1** until the property **(ack\_o[-\>1]) ##1 !req\_i)** completes. Thus, you are requiring that **req\_i==1** when it completes AND also in that SAME last cycle **req\_i==0**. Sorry,_but that ain’t going to happen_!!!  
The req\_i until ack\_o seems to work OK because in the last cycle there is no test for req\_i.  
An **until** property of the non-overlapping form (i.e., **until, s\_until** ) evaluates to true if _property\_expr1_ evaluates to true at every clock tick beginning with the starting clock tick of the evaluation attempt and continuing until _at least one tick before a clock tick where property\_expr2 (called the terminating property) evaluates to true_  
:)  
Ben Cohen  
[http://www.systemverilog.us/](http://www.systemverilog.us/) [ben@systemverilog.us](mailto:ben@systemverilog.us)

- [SVA Handbook 4th Edition, 2016 ISBN 978-1518681448](http://goo.gl/JOfuEB)
- A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
- 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 978-1539769712](https://goo.gl/d10QHh)
- 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/sva-throughout-vs-until/32710)._
