# Multiple clocks in an assertion

**URL:** <https://verificationacademy.com/forums/t/multiple-clocks-in-an-assertion/38276>\
**Category:** SystemVerilog\
**Tags:** Assertion-Multiple-clocks, SystemVerilog\
**Created:** [October 28, 2020, 9:40am UTC](https://verificationacademy.com/forums/t/multiple-clocks-in-an-assertion/38276 "2020-10-28T09:40:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [October 30, 2020, 4:16pm UTC](https://verificationacademy.com/forums/t/multiple-clocks-in-an-assertion/38276/4 "2020-10-30T16:16:07Z")

</div>

_In reply to [rrkk66418](https://verificationacademy.com/forums/t/multiple-clocks-in-an-assertion/38276/3):_

```verilog
sequence_expr |=> property_expr // is equivalent to:
sequence_expr ##1 `true |-> property_expr
// Thus
ap1: assert property(@(posedge clk1) $rose(a) |=> @(posedge clk2) b); // equivalent to 
ap1: assert property(@(posedge clk1) $rose(a) ##1 1'b1 |-> @(posedge clk2) b); // same as 
ap1: assert property(@(posedge clk1) $rose(a) ##1 @(posedge clk1) 1'b1 // clock flow through 
  |-> @(posedge clk2) b);
/* 1800'2017 Differently clocked or multiclocked sequence operands cannot be combined with any sequence operators other than ##1 and ##0. For example, if clk1 and clk2 are not identical, then the following are illegal: */
@(posedge clk1) s1 ##2 @(posedge clk2) s2
@(posedge clk1) s1 intersect @(posedge clk2) s2
//[Ben] The following should be legal though 
@(posedge clk1) s1 ##1 '1b1 ##1 @(posedge clk2) s2
// equivalent to 
sequence s1b; 
  @(posedge clk1) s1 ##1 1'b1; 
endsequence 
@(posedge clk1) s1b ##1 @(posedge clk2) s2 

```

## As to why? Amybe to keep it simple as there are other ways to clearly express the intent.

Ben Cohen  
[http://www.systemverilog.us/](http://www.systemverilog.us/) [ben@systemverilog.us](mailto:ben@systemverilog.us)  
For training, consulting, services: contact [http://cvcblr.com/home](http://cvcblr.com/home)

\*\* SVA Handbook 4th Edition, 2016 ISBN 978-1518681448  
…

1. SVA Package: Dynamic and range delays and repeats [https://rb.gy/a89jlh](https://rb.gy/a89jlh)
2. Free books: Component Design by Example [https://rb.gy/9tcbhl](https://rb.gy/9tcbhl)  
Real Chip Design and Verification Using Verilog and VHDL($3) [https://rb.gy/cwy7nb](https://rb.gy/cwy7nb)
3. Papers:

- SVA Alternative for Complex Assertions  
[Browse all content in Verification Academy: Articles, Cookbooks, Resources, Sessions, and Tracks](https://verificationacademy.com/news/verification-horizons-march-2018-issue)
- SVA in a UVM Class-based Environment  
[SVA in a UVM Class-based Environment](https://verificationacademy.com/verification-horizons/february-2013-volume-9-issue-1/SVA-in-a-UVM-Class-based-Environment)
- Understanding the SVA Engine,  
[Browse all content in Verification Academy: Articles, Cookbooks, Resources, Sessions, and Tracks](https://verificationacademy.com/verification-horizons/july-2020-volume-16-issue-2)

---

_[View the full topic](https://verificationacademy.com/forums/t/multiple-clocks-in-an-assertion/38276)._
