# SVA: is $rose($past(...)) legal?

**URL:** <https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922>\
**Category:** SystemVerilog\
**Tags:** SVA, SystemVerilog, rose, past\
**Created:** [August 7, 2020, 4:32am UTC](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922 "2020-08-07T04:32:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssureshgverifier](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@ssureshgverifier](https://verificationacademy.com/forums/u/ssureshgverifier)\
**Post date:** [August 7, 2020, 4:32am UTC](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922/1 "2020-08-07T04:32:30Z")

</div>

Is it legal to write something like below - I didn’t find anything against this in LRM  
works on major 3 simulators though.  
want to check, if there was a rising edge on a particular signal 3 clocks early

```verilog
property ack_chkr;
    @(posedge clk)
      $rose(ack) |-> $rose($past(req,3));
endproperty

```

irony is even $past($rose(…)) seems to work

> **[EDA Playground](https://www.edaplayground.com/x/3RPQ)**
>
> Edit, save, simulate, synthesize SystemVerilog, Verilog, VHDL and other HDLs from your web browser.

---

<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:** [August 7, 2020, 8:32pm UTC](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922/2 "2020-08-07T20:32:08Z")

</div>

_In reply to [ssureshg\_](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922):_

It’s legal based on the syntax.  
In general, it’s better to write forward looking, cause /effect, types of properties.  
Ben [systemverilog.us](http://systemverilog.us)

---

<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:** [August 7, 2020, 9:25pm UTC](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922/3 "2020-08-07T21:25:59Z")

</div>

_In reply to [ben@SystemVerilog.us](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922/2):_

There are cases where one may want to assert that if there is an effect it is because of a cause (or one of possible causes).  
For example, one would assert that you only get gnt if there was a req.  
You don’t want to see a spurious gnt.  
One could use the $past, but the number of cycles of the past has to be static, no range. For that case of a range, asolution is to use support logic that latches (store) the event of a req and resets it with the gnt.  
You can then assert something like

```verilog
 
  not(gnt && req_latch==0); // property body

```

Ben [systemverilog.us](http://systemverilog.us)

---

<div class="post-metadata">

**Author:** ![ssureshgverifier](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@ssureshgverifier](https://verificationacademy.com/forums/u/ssureshgverifier)\
**Post date:** [August 7, 2020, 10:39pm UTC](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922/4 "2020-08-07T22:39:54Z")

</div>

_In reply to [ben@SystemVerilog.us](https://verificationacademy.com/forums/t/sva-is-rose-past-legal/37922/3):_  
Ben, Thanks for your reply.
