Difference between goto and non-consecutive repetition assertion

hello,
i am not able to understand the exact difference between the goto and non-consecutive assertion. Both are almost performing the same way. How exactly are they differentiating??

In reply to gulshan11:

The difference is when the operator ends and there are more operations in the sequence.

a[->2] ##b //goto - a is true immediately followed by b is true
a[=2] ##1 b // non-consecutive - 'a' could be false any number of clock cycle before b is true

Note that ‘a’ cannot go true again before ‘b’ goes true, otherwise the repetition count would no longer match.

In reply to dave_59:
Dave’s answer is correct, but there IS A LOT more to the story.
I am providing 3 pages from my SVA Handbook that explains not only the difference between the [->n] and [=n], but also guidelines and warnings in the use of these operators.
http://systemverilog.us/vf/goto_conseq.pdf

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr


In reply to dave_59:

Hi dave_59,
can you please elaborate this with the help of an example.

In reply to kumar-vin:

Ben’s link provides many examples.