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

<div class="post-metadata">

**Author:** ![henrsol](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/h/9e8a1a/32.png) [@henrsol](https://verificationacademy.com/forums/u/henrsol)\
**Post date:** [July 16, 2015, 5:45pm UTC](https://verificationacademy.com/forums/t/sva-and-clock-domain-crossing/30872/7 "2015-07-16T17:45:00Z")

</div>

_In reply to [ben@SystemVerilog.us](https://verificationacademy.com/forums/t/sva-and-clock-domain-crossing/30872/6):_

> [Ben] Not sure as to why you needed to do this.

Seeing as the two clocks are asynchronous I needed to check that _b_ would be low two _ckB_ cycles after a rose on the _ckA_ edge. Therefore, I needed to move the sampling of _a_ in _$rose(a)_ to a scheduling region after ‘Observed’, so that I could evaluate the change when it happens and not on the next _ckA_ edge(possibly very slow relative to _ckB_). Failing to do this in some clever way, I merely moved the checking edge until after the change had resolved itself, while making sure that I also wanted to move the checking of the _ckB_ events.

* * *

Thank you for your kind advice.

The property is used twice, as\_ifFullNotEmpty and as\_ifEmptyNotFull.

I have been feeling the lack of a proper way of reporting(my last project involved UVM), and I hadn’t thought to use only the reporting part of UVM. Does adding the whole UVM package, to an otherwise simple testbench, add any unwanted overhead? Is there a particular subset that one could import?

If you don’t mind, I’ll slip in another question: What are your thoughts on the necessity of the cover property statement. Questa seems to be able to count the number of activations of an assertion when this option(-assertion\_debug?) is set, but this doesn’t seem as “loud” as a cover property. Right now I am doing it like this:

```verilog

property pr_ifAnotBstable(a, b, ckA, ckB);
     disable iff(arstWrite | arstRead) 
     @(posedge ckA) $rose(a) |->
     @(posedge ckB) ##1 !b;
  endproperty
 
as_ifEmptyNotFull: assert property 
  (pr_ifAnotBstable(fifoEmpty, fifoFull, ckReadDel, ckWriteDel))
    else $error("Assertion failed");

cv_ifEmptyNotFull: cover property 
  (pr_ifAnotBstable(fifoEmpty, fifoFull, ckReadDel, ckWriteDel));

```

/Henrik

---

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