difference between : sig_a - > ##2 sig_b and sig_a = > ##2 sig_b in systemverilog assertions
→ immediately evaluated
=> next clock cycle evaluated
=> is equal to ->##1
u can say sig_a=>##2 sig_b as sig_a ->##3 sig_b
1 Like
To write a constraint that sig_a goes high, sig_b must follow within 3 clk cycles.
sig_a |-> [1:3] sig_b; // is this correct
Be careful with your syntax
A -> Bis a logical implication operator equivalent to!A || BA |-> Bis an overlapping implication property operator. When A and B are both boolean expressions, it behaves the same as the logical operator, except that !A is considered a vacuous success.A |=> Bis non-overlapping implication property operator. It is equivalent toA|-> ##1 B. We recommend using the latter for consistency and clarity.A -> ##[1:3] Bmeans B must follow between 1 and 3 cycles.
1 Like
Hi Dave,
I believe this is incorrect. The ##1 1 should be part of antecedent in the equivalent expression
As per LRM Section 16.12.7 Implication
sequence_expr |=> property_expr
is equivalent to the following:
sequence_expr ##1 `true |-> property_expr
It’s true that there can be a subtle difference in some cases. However, in most instances, there’s no difference.