# APB write cycle assertion

**URL:** <https://verificationacademy.com/forums/t/apb-write-cycle-assertion/38801>\
**Category:** SystemVerilog\
**Tags:** SVA, SystemVerilog\
**Created:** [March 9, 2021, 6:31am UTC](https://verificationacademy.com/forums/t/apb-write-cycle-assertion/38801 "2021-03-09T06:31:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [March 11, 2021, 2:18am UTC](https://verificationacademy.com/forums/t/apb-write-cycle-assertion/38801/6 "2021-03-11T02:18:11Z")

</div>

_In reply to [rag123](https://verificationacademy.com/forums/t/apb-write-cycle-assertion/38801/5):_

- I made a mistake in **$stable(paddr && pwdata**) because they are vectors, and you do to want to AND the vectors and then check for stability. Should be  
**$stable(paddr) && $stable(pwdata)**.
- If you look at the timing, addr@T2 == addr@T3, i.e., thus stable  
The $stable is tested at T3, the cycle after the rose in the antecedent.  
I see 2 clocks in the stabibilty, one at the $rose (at t2) and other in the next cycle at T3.

```verilog

ap: assert property( 
           @(posedge pclk) now_waite_write ##0  
              $rose (pwrite && psel) |-> ##1 // 1 $rose is at T2 
              $stable(paddr) && $stable(pwdata) ##0 / 2 at T3
              // addr@T2 == addr@T3, i.e., thus stable 
              $rose (penable && pready) ##1 // 3 at $rose at T3
              pwrite && !psel && !penable); // 4 at T4

```

---

_[View the full topic](https://verificationacademy.com/forums/t/apb-write-cycle-assertion/38801)._
