# SVA to check if there is any glitch in the signal between two toggles of the same signal

**URL:** <https://verificationacademy.com/forums/t/sva-to-check-if-there-is-any-glitch-in-the-signal-between-two-toggles-of-the-same-signal/37442>\
**Category:** SystemVerilog\
**Tags:** SVA, SystemVerilog, assertion-systemverilog\
**Created:** [April 15, 2020, 8:39am UTC](https://verificationacademy.com/forums/t/sva-to-check-if-there-is-any-glitch-in-the-signal-between-two-toggles-of-the-same-signal/37442 "2020-04-15T08:39:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nandeesha](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/n/5f8ce5/32.png) [@Nandeesha](https://verificationacademy.com/forums/u/Nandeesha)\
**Post date:** [April 15, 2020, 8:39am UTC](https://verificationacademy.com/forums/t/sva-to-check-if-there-is-any-glitch-in-the-signal-between-two-toggles-of-the-same-signal/37442/1 "2020-04-15T08:39:53Z")

</div>

property acs\_3k9\_frq\_check\_5b;  
@(posedge o\_c\_500k) disable iff(!o\_acs\_en)  
$rose(o\_c\_3k9)|-\> if(i\_c\_3k9\_freq == 2’b00) delay\_seq(32) |-\> $rose(o\_c\_3k9)  
else if (i\_c\_3k9\_freq == 2’b01)delay\_seq(64) |-\> $rose(o\_c\_3k9)  
else if (i\_c\_3k9\_freq == 2’b10)delay\_seq(128) |-\> $rose(o\_c\_3k9)  
else if (i\_c\_3k9\_freq == 2’b11)delay\_seq(256) |-\> $rose(o\_c\_3k9);  
endproperty  
Above is my assertion to check from one rising edge of o\_c\_3k9 signal to another rising edge of the same signal to be either 32, 64, 128, 256 o\_c\_500k clk signal. I’m using the delay\_seq provided by the BEN. This assertion is to check the number of o\_c\_500k clock cycles constitute one o\_c\_3k9 cycle. This assertion perfectly works.

But my query is, I need to check if there is any unwanted multiple toggles of o\_c\_3k9(excluding the usual high to low toggle during the half cycle and low to high at the full cycle.). This is to check if there is any glitch in between two toggles.The assertion should fail if there is any unnecessary toggles. I tried some assertions but didn’t work. Please help me to resolve this.

Regards,  
Nandeesh

---

<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 15, 2020, 6:48pm UTC](https://verificationacademy.com/forums/t/sva-to-check-if-there-is-any-glitch-in-the-signal-between-two-toggles-of-the-same-signal/37442/2 "2020-04-15T18:48:21Z")

</div>

_In reply to [Nandeesha](https://verificationacademy.com/forums/t/sva-to-check-if-there-is-any-glitch-in-the-signal-between-two-toggles-of-the-same-signal/37442):_

I would use an always @ (o\_c\_3k9) and using a  
local variable in the always block, calculate if the pulse widths are within limits for the expected range, as defined by i\_c\_3k9\_freq  
Ben [systemverilog.us](http://systemverilog.us)
