Rtl p5s sva policy

From babyworm/rtl-agent-team · View interactive version

Rtl p5s sva policy is an AI agent skill from the GitHub repository babyworm/rtl-agent-team. Internal reference: rtl p5s sva policy (agent-loaded; do not invoke).

How to use this skill

Skill file

SVA / Formal Verification Policy

SVA Coding Conventions

SVA property files MUST follow the project coding conventions (CLAUDE.md):

SVA Property Iterative Refinement (minimum 3 rounds)

SVA property extraction must iterate at least 3 times to strengthen assertion quality.

Each round builds upon the previous:

Each round produces a review note at .rat/scratch/phase-5/sva-iteration-r{N}.md.

Escalation & Stop Conditions

Final Checklist

Assume/Assert Principle and Engine Guide

Use assume statements to constrain inputs to legal protocol ranges before proving.

Principle: assume inputs, assert outputs. Inputs are constrained with assume; outputs are verified with assert.

Target properties: no deadlock, no overflow, interface protocol compliance, data integrity.

Assertion clock: @(posedge sys_clk) disable iff (!sys_rst_n) for synchronous properties.

See {plugin_root}/skills/rtl-p5s-sva-check/examples/handshake-assertions.sv for valid/ready handshake SVA patterns.

See {plugin_root}/skills/rtl-p5s-sva-check/examples/fifo-assertions.sv for FIFO overflow/underflow assertion patterns.

SymbiYosys engine guide:

| Engine | Mode | Best For |

|--------|------|----------|

| smtbmc boolector | BMC, prove | General purpose (default) |

| smtbmc yices | BMC, prove | Bitvector-heavy, often fastest |

| smtbmc z3 | BMC, prove | Arithmetic-heavy designs |

| abc pdr | prove only | Unbounded proof via PDR |

See {plugin_root}/skills/rtl-p5s-sva-check/references/sva-patterns.md for complete temporal operator reference and pattern library.

sv2v conversion note:

SymbiYosys relies on Yosys for reading design files. Yosys has limited SystemVerilog

support, so DUT RTL .sv files need explicit Verilog conversion before sby.

Run sv2v on DUT RTL only:

sv2v --write=formal/{module}_v2v.v rtl/{module}/*.sv
test -s formal/{module}_v2v.v
sby -f formal/{module}.sby bmc
sby -f formal/{module}.sby prove
sby -f formal/{module}.sby cover

Do NOT run sv2v on full concurrent SVA property files (formal/*_props.sv);

sv2v can remove assertions/covers. For OSS SBY, generate a dedicated

formal/*_formal_harness.sv from yosys-formal-harness-template.sv and use

procedural immediate assert(...), assume(...), and cover(...) in that harness.

Keep concurrent SVA assets as commercial-formal input.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.