mcpbeat Sign in

Rtl Property Inference Agent Skill

Automatically infer formal correctness properties from Verilog/SystemVerilog RTL code and generate SystemVerilog Assertions (SVA). Identifies control-flow invariants (mutual exclusion, valid-ready handshakes, pipeline ordering, safety properties), liveness expectations, and temporal properties. Use when working with RTL designs that need formal property generation, when adding assertions to existing RTL, or when users ask to infer properties, generate assertions, or create formal specifications from hardware designs.

5k tokens
context cost
the whole folder, loaded on every use
3
files
instructions only
0
copies elsewhere
how many repositories repackaged it
141
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill rtl-property-inference

The instruction itself

14 sections, as written by the author

RTL Property Inference

Overview

This skill analyzes Verilog/SystemVerilog RTL code and automatically infers implicit correctness properties, generating formal SystemVerilog Assertions (SVA). The skill identifies common hardware patterns and generates appropriate safety, liveness, and fairness properties with clear explanations.

Workflow

Step 1: Parse and Understand RTL Structure

Analyze the input RTL code to extract key components:

  • Identify signals and their roles:
  • Clock and reset signals
  • Control signals (valid, ready, enable, grant, request)
  • Data signals
  • State variables (FSM states, counters, flags)
  • Recognize structural patterns:
  • State machines (one-hot, binary encoded)
  • Handshake protocols (valid-ready, req-ack)
  • Pipelines (with/without stalls)
  • FIFOs and buffers
  • Arbiters and mutual exclusion logic
  • Counters (saturating, wraparound)
  • Memory interfaces
  • Extract clock/reset conventions:
  • Clock signal name and edge (posedge/negedge)
  • Reset signal name, polarity (active high/low), and type (sync/async)
  • Reset values for state variables

Step 2: Identify Control-Flow Invariants

Systematically analyze the design for common invariant patterns:

  • Mutual Exclusion:
  • Grant signals from arbiters
  • Mutually exclusive enable signals
  • One-hot state encodings
  • Look for: Multiple signals that should never be active simultaneously
  • Valid-Ready Handshakes:
  • Data stability during valid-without-ready
  • Valid persistence until handshake completes
  • No data loss (eventual completion)
  • Look for: Pairs of valid/ready signals with associated data
  • Pipeline Ordering:
  • Valid bit propagation through stages
  • Data stability in pipeline stages
  • Stall behavior (freezing pipeline state)
  • Look for: Arrays of valid signals, stage indices, pipeline registers
  • Safety Properties (bad things never happen):
  • Buffer overflow/underflow prevention
  • Invalid state detection
  • Address conflict prevention
  • Counter bounds
  • Look for: Boundary conditions, error states, conflict scenarios

Step 3: Identify Liveness Properties

Look for patterns indicating "good things eventually happen":

  • Request-Response Patterns:
  • Request eventually gets grant
  • Valid eventually gets ready
  • Transaction eventually completes
  • Look for: Request signals paired with acknowledgment/grant signals
  • Progress Properties:
  • FSM eventually leaves certain states
  • Counters eventually reach targets
  • Pipelines eventually drain
  • Look for: Temporary states, countdown logic, completion conditions
  • Fairness Constraints:
  • All requesters eventually get service
  • Round-robin behavior
  • Starvation freedom
  • Look for: Arbitration logic, scheduling mechanisms

Note: Liveness properties require careful analysis. Only infer when there's clear evidence of intended eventual behavior. Use bounded liveness (with timeouts) when unbounded liveness may not hold.

Step 4: Map Patterns to Properties

Use the pattern library in common_patterns.md to generate appropriate assertions:

  • Match identified patterns to known property templates
  • Instantiate properties with actual signal names from the design
  • Adjust timing parameters based on design characteristics (e.g., pipeline depth, timeout values)
  • Add appropriate disable conditions (typically reset)

Refer to sva_syntax.md for SVA syntax details.

Step 5: Classify Properties

Separate properties into clear categories:

  • Strong Invariants (assert):
  • Properties that must always hold in correct design
  • Internal consistency checks
  • Safety properties derived from design structure
  • Example: Mutual exclusion, one-hot encoding, buffer bounds
  • Assumed Environment Constraints (assume):
  • Properties about external inputs
  • Interface protocol assumptions
  • Timing assumptions from environment
  • Example: Input valid-ready protocol compliance, reset behavior
  • Coverage Properties (cover):
  • Reachability checks for important scenarios
  • Corner case coverage
  • Example: All FSM states reachable, maximum buffer occupancy

Step 6: Generate Output

For each inferred property, provide:

  • SVA assertion code:
   property_name: assert property (
     @(posedge clk) disable iff (rst)
       antecedent |-> consequent
   ) else $error("Description of violation");
  • Natural-language explanation:
  • What the property checks
  • Why it should hold
  • What violation would indicate
  • Signal list:
  • All signals involved in the property
  • Their roles (control, data, state)
  • Classification:
  • Type: Safety / Liveness / Fairness
  • Directive: Assert / Assume / Cover
  • Confidence: High / Medium / Low (based on pattern clarity)
  • Additional context:
  • Related properties (if any)
  • Assumptions made during inference
  • Suggested verification approach

Output Format

Structure the output as follows:

## Inferred Properties for [Module Name]

### Clock and Reset
- Clock: <signal_name> (<edge>)
- Reset: <signal_name> (<polarity>, <sync/async>)

### Strong Invariants (Assert)

#### Property 1: <Short Name>
**Type**: Safety | Liveness | Fairness
**Confidence**: High | Medium | Low

**Assertion**:

<property_name>: assert property (

@(posedge clk) disable iff (rst)

<property_expression>

) else $error("<error_message>");


**Explanation**:
<Natural language description of what this property checks and why>

**Signals Involved**:
- `<signal1>`: <role/description>
- `<signal2>`: <role/description>

**Rationale**:
<Why this property was inferred from the RTL structure>

---

[Repeat for each property]

### Assumed Environment Constraints (Assume)

[Same format as above, but using `assume` directive]

### Coverage Properties (Cover)

[Same format as above, but using `cover` directive]

### Summary

- Total properties inferred: <count>
  - Strong invariants: <count>
  - Environment assumptions: <count>
  - Coverage properties: <count>
- Patterns identified: <list of patterns>
- Verification recommendations: <suggestions>

Important Guidelines

  • Be conservative: Only infer properties with clear evidence in the RTL
  • Explain reasoning: Always justify why a property was inferred
  • Mark confidence: Indicate confidence level (High/Medium/Low) for each property
  • Avoid false positives: Better to miss a property than infer an incorrect one
  • Consider timing: Ensure delay values match design behavior
  • Check vacuity: Suggest cover properties for antecedents to avoid vacuous success
  • Document assumptions: Clearly state any assumptions made during inference
  • Provide context: Explain how properties relate to overall design correctness

Example Usage

User request: "Infer properties from this FIFO module"

Process:

  • Parse RTL and identify: full, empty, wr_en, rd_en, count signals
  • Recognize FIFO pattern with full/empty flags
  • Infer safety properties:
  • No write when full
  • No read when empty
  • Count within bounds [0:DEPTH]
  • Full and empty mutually exclusive (unless DEPTH=1)
  • Infer liveness property:
  • Write eventually makes FIFO non-empty
  • Generate SVA assertions with explanations
  • Classify as strong invariants (assert)
  • Add coverage for full and empty conditions

References

  • common_patterns.md - Library of common RTL patterns and their properties
  • sva_syntax.md - SystemVerilog Assertions syntax reference

Limitations

  • Cannot infer properties requiring deep semantic understanding beyond structural patterns
  • May miss complex cross-module properties
  • Liveness properties may need manual refinement for unbounded cases
  • Timing parameters (delays, timeouts) may need adjustment based on actual design constraints
  • Does not replace manual formal specification for critical properties

Other skills for the same job

different authors, same section of the catalogue
Scikit Learn
by christophacham
×3

Machine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, hyperparameter tuning, preprocessing, or building ML pipelines. Provides comprehensive reference documentation for algorithms, preprocessing techniques, pipelines, and best practices.

30k tokens scripts
Scikit Learn
by ComeOnOliver
×3

Machine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, hyperparameter tuning, preprocessing, or building ML pipelines. Provides comprehensive reference documentation for algorithms, preprocessing techniques, pipelines, and best practices.

32k tokens scripts
LLM Evaluation
by ComeOnOliver
×2

Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

6k tokens
LLM Evaluation
by ComeOnOliver
×2

Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

6k tokens
Agent Evaluation
by lingxling
×1

Testing and benchmarking LLM agents including behavioral testing, capability assessment, reliability metrics, and production monitoring—where even top agents achieve less than 50% on real-world benchmarks

9k tokens
Celltypist Cell Annotation
by BioTender-max
×1

Automated scRNA-seq cell type annotation via pre-trained logistic regression. 45+ models: immune, gut, lung, brain, fetal, cancer microenvironments. Input normalized AnnData; outputs per-cell labels, majority-vote cluster labels, confidence scores. Use for fast, reference-backed annotation without manual marker inspection.

5k tokens
Scikit Learn Machine Learning
by BioTender-max
×1

Classical ML in Python: classification, regression, clustering, dim reduction, evaluation, tuning, preprocessing pipelines. Linear models, tree ensembles, SVMs, K-Means, PCA, t-SNE. Use PyTorch/TF for deep learning; XGBoost/LightGBM for scale.

4k tokens
Statsmodels Statistical Modeling
by BioTender-max
×1

Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR), with rigorous inference, diagnostics, and hypothesis tests. Use scikit-learn for ML; statistical-analysis for test choice.

4k tokens

How to use it

Copy the folder

Take arabelatso/rtl-property-inference from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.