SVA Properties

While a sequence defines a pattern of events, a property defines the actual "rule" that must be valid. Properties encapsulate sequences, implications, and clocking/reset conditions.

Property Structure

A property typically specifies three things:

  1. Trigger Clock: @(posedge clk)
  2. Disable Condition: (Optional) When to ignore the check (e.g., Reset).
  3. Behavior: The sequence or logical expression to check.
Full Property Syntax
property p_safe_grant;
    @(posedge clk) 
    disable iff (!rst_n)   // Ignore checking when Reset is Active Low
    req |=> gnt;           // The Rule
endproperty

a_safe_grant: assert property (p_safe_grant);

Disable Iff (Reset Handling)

The disable iff clause is critical. During reset, signals are often indeterminate. If you don't disable assertions, you will get a flood of "X state" errors or protocol violations during the reset phase.

Best Practice: Always include disable iff (!rst_n) in your properties unless the check is strictly required during reset.

"not" & Recursive Properties

You can check that something should NEVER happen using the not keyword.

Forbidden Sequence
property p_no_conflict;
    @(posedge clk) disable iff (!rst_n)
    // "It should NEVER be the case that we write and read same addr simultaneously"
    not (write && read && (w_addr == r_addr));
endproperty

Common Interview Questions

Q: Can I nest properties?
No, you cannot declare a property inside another property. However, you can use *sequences* inside properties to build hierarchy.
Q: Difference between 'disable iff' and 'if' inside the property?
disable iff (Disable If and Only If) is an asynchronous kill-switch for the property. If the condition is true, the current evaluation is aborted. Standard if logic is part of the property expression itself. disable iff is preferred for resets.