I have encountered an example property which works here:
property p_a;
@(posedge clk) $rose(a) -> $rose(b);
endproperty
There is no syntax error above.
Then I tried to modify to this
property p_a;
@(posedge clk) $rose(a) -> ##2 $rose(b);
endproperty
Which gives me syntax error, only to realize its not actually '|->'
property p_a;
@(posedge clk) $rose(a) |-> ##2 $rose(b);
endproperty
This works, so what is the symbol ->
actually here in property? I know usually its for triggering an event.
The
->
operator is a logical implication operator, works on the logical operands:The
|->
is a sequential implication used to express certain temporal properties.In other words, the first one is can be used for logical functions, the second is used in sequences of events. They are very much different.