# SVA and clock domain crossing

**URL:** <https://verificationacademy.com/forums/t/sva-and-clock-domain-crossing/30872>\
**Category:** SystemVerilog\
**Tags:** SVA-Assertion, SVA, SystemVerilog, Clock-domain-crossing, CDC\
**Created:** [July 14, 2015, 3:22pm UTC](https://verificationacademy.com/forums/t/sva-and-clock-domain-crossing/30872 "2015-07-14T15:22:35Z")\
**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:** [July 15, 2015, 2:15am UTC](https://verificationacademy.com/forums/t/sva-and-clock-domain-crossing/30872/2 "2015-07-15T02:15:16Z")

</div>

```verilog
@(posedge ckA) $rose(a) |->
     @(posedge ckB) ##1 !b;

```

[Ben] this is equivalent to:

```verilog
@(posedge ckA) $rose(a) |->
     @(posedge ckA) @(posedge ckB) ##1 !b;

```

> This causes the assertion to sample rose on ckA, then wait one ckA, then wait two ckB before asserting the statement.

[Ben] NO. This causes the assertion to sample rose on ckA, then at next ckB b==0.

> What i want is: sample rose on ckA, then wait two ckB before asserting the statement. How can I do this?

```verilog
@(posedge ckA) $rose(a) |->
     @(posedge ckB) ##2 !b;

```

## This causes the assertion to sample rose on ckA, then at second posedge of ckB b==0.

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

- SystemVerilog Assertions Handbook, 3rd Edition, 2013
- A Pragmatic Approach to VMM Adoption
- Using PSL/SUGAR … 2nd Edition
- Real Chip Design and Verification
- Cmpt Design by Example
- VHDL books

---

_[View the full topic](https://verificationacademy.com/forums/t/sva-and-clock-domain-crossing/30872)._
