# 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:** 7

<div class="post-metadata">

**Author:** ![rag123](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rag123](https://verificationacademy.com/forums/u/rag123)\
**Post date:** [March 11, 2021, 6:19am UTC](https://verificationacademy.com/forums/t/apb-write-cycle-assertion/38801/7 "2021-03-11T06:19:47Z")

</div>

_In reply to [ben@SystemVerilog.us](https://verificationacademy.com/forums/t/apb-write-cycle-assertion/38801/6):_

Thanks a lot Ben :) I also tried with Wait states. can you let me know if this is correct?

```verilog

sequence s1;
    $rose (pwrite && psel) |-> ##1 (pwrite && psel) until with pready;
  endsequence
  
  sequence s2;
    $stable ((paddr) && $stable (pwdata)) until with pready;
  endsequence
  
  sequence s3;
    $rose (penable) ##1 penable until with pready
  endsequence
  

property p2;
    @(posedge pclk)    
    s1 |=> s2 |=> s3 ##1 pwrite && !psel && !penable
  endproperty

assert property (p2);
```

---

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