# Assertion Question

**URL:** <https://verificationacademy.com/forums/t/assertion-question/42001>\
**Category:** SystemVerilog\
**Tags:** SVA, systemverilogassertionSVA, SystemVerilog, assertion\
**Created:** [July 25, 2023, 5:49am UTC](https://verificationacademy.com/forums/t/assertion-question/42001 "2023-07-25T05:49:45Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![VE1](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/v/54ee81/32.png) [@VE1](https://verificationacademy.com/forums/u/VE1)\
**Post date:** [July 26, 2023, 10:21pm UTC](https://verificationacademy.com/forums/t/assertion-question/42001/10 "2023-07-26T22:21:34Z")

</div>

_In reply to [ben@SystemVerilog.us](https://verificationacademy.com/forums/t/assertion-question/42001/9):_

> _In reply to [MICRO\_91](https://verificationacademy.com/forums/t/assertion-question/42001/9):_  
> Comments about the replies:  
> I see an ambiguity in the requirement _sig2 can only be high for one clock cycle while sig1 is high._ Does that mean that there ONE sig2 between $rose(sig1) and ($fell(sig1))?  
> rose(sig1) |-\> sig2[-\>1] ##1 !sig2[\*1:] intersect sig1[\*1:$];  
> when the sequence **sig2 ##1 !sig2** occurs, the consequent is satisfied.  
> However, it fails to check if sig2 occurs again for one or more cycles when sig1 remains high for more cycles.  
> How about something like:  
> [Edit code - EDA Playground](https://www.edaplayground.com/x/LxiX) // code  
> [EPWave Waveform Viewer](https://www.edaplayground.com/w/x/Mbk) // wave

```verilog
  
module my_module;
bit clk, sig1, sig2; 
int pass, fail; 
initial forever #1 clk = !clk;
ap_sig1_2: assert property( @(posedge clk)
$rose(sig1) |-> (sig1 && sig2)[=1] intersect 
##1 !(sig1)[->1]) pass=pass+1; else fail=fail+1;
initial begin
$dumpfile("dump.vcd"); $dumpvars; 
#2 @(posedge clk) sig1 <= 1; 
repeat(2) @(posedge clk); 
sig2 <=1; @(posedge clk) sig2 <= 0;
repeat(2) @(posedge clk); 
sig1 <= 0; 
#4 $finish;
end
endmodule

```

Ben Cohen  
[Ben@systemverilog.us](mailto:Ben@systemverilog.us)  
Link to the list of papers and books that I wrote, many are now donated.

> **[Cohen\_Links\_to\_papers\_books.pdf](https://systemverilog.us/vf/Cohen_Links_to_papers_books.pdf)**
>
> 141.16 KB

or [Cohen\_Links\_to\_papers\_books - Google Docs](https://rb.gy/ibks5p)  
Getting started with verification with SystemVerilog  
[https://rb.gy/f3zhh](https://rb.gy/f3zhh)

Hi Ben.  
I think I might miss something with “intersect”. In the below property you gave, Let us say if (sig1 && sig2)[=1] happens at T5 and sig2 drops at T6, !(sig1)[-\>1] happens at T10. At which point they intersect ?

Thanks

```verilog
   ap_sig1_2: assert property( @(posedge clk)
          $rose(sig1) |-> (sig1 && sig2)[=1] intersect 
          ##1 !(sig1)[->1]) pass=pass+1; else fail=fail+1;

```

---

_[View the full topic](https://verificationacademy.com/forums/t/assertion-question/42001)._
