# Counting number of events on clock a, while clock o is forbidden

**URL:** <https://verificationacademy.com/forums/t/counting-number-of-events-on-clock-a-while-clock-o-is-forbidden/30521>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, first\_match, assertion\
**Created:** [April 4, 2015, 8:22am UTC](https://verificationacademy.com/forums/t/counting-number-of-events-on-clock-a-while-clock-o-is-forbidden/30521 "2015-04-04T08:22:30Z")\
**Posts on this page:** 1\
**Showing post:** 20

<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:** [April 11, 2015, 3:57am UTC](https://verificationacademy.com/forums/t/counting-number-of-events-on-clock-a-while-clock-o-is-forbidden/30521/20 "2015-04-11T03:57:23Z")

</div>

_In reply to [Jadoon](https://verificationacademy.com/forums/t/counting-number-of-events-on-clock-a-while-clock-o-is-forbidden/30521/19):_

```verilog

(($rose(rst) ##1 a[->4]) intersect !o[*]) ##1 a[->1]
Is the antecedent; if it fails, assertion is vacuous.
Two options: 
1) write another assertion with just the antecedent, I.e.,
(($rose(rst) ##1 a[->4]) intersect !o[*]) ##1 a[->1]
If that sequence fails, that assertion will fail.

2) replace the implication operator with ##0. Thus,
(($rose(rst) ##1 a[->4]) intersect !o[*]) ##1 a[->1] ##0 o==1'b1 ##1 a ~^ o[*1000]);

```

Ben [SystemVerilog.us](http://SystemVerilog.us)

---

_[View the full topic](https://verificationacademy.com/forums/t/counting-number-of-events-on-clock-a-while-clock-o-is-forbidden/30521)._
