How to write SVA when the antecedent is changing at the same time when the sampling clock is getting off?

consider a scenario say we want to check that whenever there is a change in sig_a, sig_b must be 0 and the prop is written like this:

property check_sigs;
@(posedge clk_1) disable iff (disable_check)
($change(sig_a) |-> sig_b==0);
endproperty

assume following conditions:
sim starts at t=0ns;
at t=3ns: sig_a changes 0->1 and clk_1 is also turned off right after the posedge (half of clk_1 was visible to check i.e. the posedge :: check image attached)
at t=7ns: the clocks are turned back on and by that time the sig_b which was correctly 0 at the the time of change now comes back to 1, since assertion will be triggered at this point i.e. t=7ns the check is bound to fail in such scenario.

How can we modify the check so that it handles such sampling clks turning of scenarios gracefully?

In reply to ViVer:
I don’t understand the issue.
($change(sig_a) |-> sig_b==0); says that when the sampled value of sig_a changes, then IN THE SAME CYCLE the sampled value of sign_b equals 0.
Your diagram "triggers @7ns, fails @8ns seems to indicate an assertion like:
($change(sig_a) |-> ##1 sig_b==0);
The fact that the clock turns off has nothing to do with this.
I don’t understand the issue, but maybe this is what you want:

property check_sigs;
@(posedge clk_1) disable iff (disable_check)
($change(sig_a) |-> @(negedge clk_1) sig_b==0);
// Checking the sig_b 0.5ns after the psoedge of clk_1. 
endproperty

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448

  1. SVA Package: Dynamic and range delays and repeats SVA: Package for dynamic and range delays and repeats | Verification Academy
  2. Free books:
  1. Papers:
    Understanding the SVA Engine,
    Verification Horizons - July 2020 | Verification Academy
    Reflections on Users’ Experiences with SVA, part 1
    Reflections on Users’ Experiences with SVA | Verification Horizons - March 2022 | Verification Academy
    Reflections on Users’ Experiences with SVA, part 2
    Reflections on Users’ Experiences with SVA, Part II | Verification Horizons - July 2022 | Verification Academy
    Understanding and Using Immediate Assertions
    Understanding and Using Immediate Assertions | Verification Horizons - December 2022 | Verification Academy
    SUPPORT LOGIC AND THE ALWAYS PROPERTY
    http://systemverilog.us/vf/support_logic_always.pdf
    SVA Alternative for Complex Assertions
    Verification Horizons - March 2018 Issue | Verification Academy
    SVA in a UVM Class-based Environment
    SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy
    SVA for statistical analysis of a weighted work-conserving prioritized round-robin arbiter.
    https://verificationacademy.com/forums/coverage/sva-statistical-analysis-weighted-work-conserving-prioritized-round-robin-arbiter.
    Udemy courses by Srinivasan Venkataramanan (http://cvcblr.com/home.html)
    https://www.udemy.com/course/sva-basic/
    https://www.udemy.com/course/sv-pre-uvm/

In reply to ViVer:

I don’t follow what you are asking. sig_a only changes at time 3ns and at no other time according to your diagram. Can you create an example stimulus that shows the when you expect the assertion passing and then failing.

In reply to ben@SystemVerilog.us:

oh yeah, my bad the assert will fail at 7ns itself.

In reply to dave_59:

So at 3ns the assertion will sample the sig_a value to be 0 (in prepone region-just before the clock edge) and when the clocks return at 7ns the assertion will sample the value to be 1. This will be considered as a 0->1 change and check will be triggered. Is there any way where we can say like the last signal change was before the sampling clk gap so don’t consider it.

I thought something like this:
• Keepping a var that remembers the time of the last falling edge of the clock.
• Keeping a var that remembers the time of the last transition of the sig_a.
• Keeping a var sig_a_last signal that remembers what the sig_a was before the previous clock edge.
• At the rising edge of the clock, if sig_a!=sig_a_last, throw an assertion if the sig_a transition occurred outside the range of the last falling edge of the clock and the current time.

but I am not able to put/employ it in code exactly.

In reply to ViVer:


property check_sigs;
@(posedge clk_1) disable iff (disable_check)
($change(sig_a) |-> $past(sig_b)==0);
endprope

In reply to ben@SystemVerilog.us:

In reply to ViVer:


property check_sigs;
@(posedge clk_1) disable iff (disable_check)
($change(sig_a) |-> $past(sig_b)==0);
endprope

This will work, thanks a lot for the help.
@ben are you planning to release any new edition for your book anytime soon, I am planning to purchase it.

In reply to ViVer:

[quote]In reply to ben@SystemVerilog.us:

I am NOT planning om a new edition of my 4th edition of my SVA nook.
What I have been doing is writing papers that supplement useful info and approaches in using SVA. Below is a link to the list of papers and books that I wrote, many now donated.