With that, you basically keep on decremeting “v” until v==0, and then check for the fell.
You know that since delay is a positive number, v==0 will eventually occur.
***** A word of caution ******
(a[*0] ##1 b) is same as (b)
Thus, in (v>0, v=v-1'b1)[*0:] ##1 v==0, you have the equivalency for the 1st term of
((v>0, v=v-1’b1)[*0] ##1 v==0) // SAME AS (v==0), with v not decremented since
the sequence-matched-item is not exercised.
Ben Cohen http://www.systemverilog.us/ben@systemverilog.us
I tried it. Now it seems to be checking. But i am facing failures for anything other than the initial start of the assertion after a disable. After more debugging, it does not seem to be able to calculate the delay which keeps changing with slice_no. Hence these errors. I am not sure how to approach this problem.
it does not seem to be able to calculate the delay, which keeps changing with slice_no. Hence these errors.
[Ben] You need to clarify your requirements. Based on your assertion below, your requirements seem to be as follow (ignoring the disable for now):
upon a fell of hvsw_preset_en, capture the value of “delay”, which is based on the current slice number. Ignoring the equation for the value of delay for now)
Following the number of cycles defined by the captured (i.e., saved) “delay”, signal initial_tun_v_en is expected to fall.
If that is not your requirements, you need to clarify what to expect at which cycle; and that is your responsibility. Remember GIBO!!! Don’t blame SVA :)
Thanks for the reply. Yes I agree i should have been clearer with spec. I tried to execute the SVA as per your reply. But the SVA does not seem to trigger ( no pass or fails). Is there a good way to debug this?
In reply to ben@SystemVerilog.us: I tried to execute the SVA as per your reply. But the SVA does not seem to trigger ( no pass or fails). Is there a good way to debug this?
Tools provide debug features. If not disabled, the assertion should trigger at every successful attempt. You could add some $display.