Writing alternative for throughout

I am looking to achieve following :

// signal ‘a’ is high until signal ‘b’ has been asserted.
// signal ‘a’ should not become 0 before signal ‘b’ = 1;

For the same I think obvious choice is throughout, please correct if wrong:


assert property (@(posedge clk) $rose(A) |-> A throughout B[->1]);

However I was thinking to write it using repetition operator as:


assert property (@(posedge clk) $rose(A) |-> (A && !B)[*1:$];

Is above correct, if not please suggest accordingly.

In reply to bhupeshpaliwal:

The repetition operator does not work here because A could go low before B goes high. Your assertion only checks that there is at least one cycle where A is high and B is low. In general I would avoid using open ended ranges with assertions because they have a tendency to not fail when you think they should fail.

There is also the until property operator that is much easer to comprehend. And the strong s_until operator catches failures if B never rises before the end of your test.

assert property (@(posedge clk) $rose(A) |-> A s_until B);