Why properties need helper logic
SVA is excellent at local timing: "after a request, a grant within four cycles". It is much weaker at counting and remembering. Try writing these with sequences alone:
- "There are never more than 8 requests waiting for a response."
- "A response only ever arrives for a tag that was issued and not yet answered."
- "The value read from address A is the last value written to address A."
Each needs memory of the past that can be arbitrarily long. You could stretch sequences with local variables and unbounded repetition, but the result is hard to read and very expensive for formal engines, because every pending attempt of a property becomes extra hidden state.
The alternative is auxiliary code (also called modelling code or glue logic): a few lines of ordinary, synthesizable SystemVerilog in the formal testbench that keep exactly the history the property needs. The assertion then becomes short.
Rules for good auxiliary code
| Rule | Why |
|---|---|
| Keep it in the formal testbench (bind or wrapper), never in the RTL | The design stays clean; the same RTL is signed off and shipped. |
Make it synthesizable: always_ff, always_comb, no delays | Formal tools only understand synthesizable semantics. |
| Model the spec, not the implementation | If you copy the RTL into the model, both share the same bugs. |
| Keep it tiny and obviously correct | A bug in the model hides bugs or causes false failures. |
| Cover the model's interesting states | Proves the model is exercised (e.g. "counter reached its maximum"). |
| Prefer outputs and interface signals over internal RTL names | Internal names change; interface behaviour is the contract. |