Rtl p5s integration test

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

Rtl p5s integration test is an AI agent skill from the GitHub repository babyworm/rtl-agent-team. P5 Tier 4 integration tests: cross-module data flow, reset propagation, boundary handshakes. Triggers 'integration test', 'end-to-end system verification'.

How to use this skill

Skill file

<Purpose>

Run Tier 4 integration-level tests on the complete RTL system. Verifies cross-module interactions: data flows end-to-end with correct values, reset propagates to all sub-modules, clocks are connected correctly, and handshake protocols are observed across module boundaries. Outputs: sim/top/integration_results.json (per-test PASS/FAIL) and reviews/phase-5-verify/integration-test-report.md.

</Purpose>

<Use_When>

</Use_When>

<Do_Not_Use_When>

</Do_Not_Use_When>

<Why_This_Exists>

Modules that pass individually may fail when connected due to interface mismatches, protocol violations, or timing assumptions that do not hold across boundaries. Integration testing catches: port width mismatches, reset not propagating to all sub-modules, backpressure not flowing through the pipeline, and data corruption at handoff points. These bugs are invisible to per-module testing.

</Why_This_Exists>

Prerequisites

If prerequisites are missing: WARNING — recommend completing Tier 2 and Tier 3 first. Orchestrator adapts scope with available artifacts.

<Assets>

| Path | Role |

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

| templates/integration-tb-template.sv | Top-level integration TB scaffold: multi-module DUT instantiation, clock/reset generation, connectivity checker, data flow monitors. |

| scripts/check_connectivity.py | Static connectivity checker: parses top + submodule SV (ANSI headers), verifies named port connections, literal/parameter-resolvable width compatibility, dangling pins, and undriven top outputs; emits deterministic JSON violation report. |

| references/integration-test-conventions.md | Tier ordering, test categories, JSON schema, report structure, anti-patterns. |

| examples/ | Worked example: dut_top.sv + 2 submodules with one intentional width mismatch and one dangling port, plus committed expected JSON — see examples/README.md. |

</Assets>

<Responsibility_Boundary>

</Responsibility_Boundary>

<Execution>

  1. Read references/integration-test-conventions.md for Tier 4 context, test categories, JSON schema, and report structure.
  2. Spawn p5s-integration-orchestrator (see Tool_Usage) to run the full integration test suite.
  3. The orchestrator runs static connectivity checks first (scripts/check_connectivity.py — named connections, literal/parameter-resolvable widths, dangling pins, undriven top outputs; positional/.* connections and non-literal widths are flagged as unanalyzed, not guessed), then dynamic tests: data flow, reset propagation, handshake protocol, and end-to-end reference comparison using the Phase 2 refC model output as oracle.
  4. The orchestrator writes sim/top/integration_results.json with one entry per test case (category, verdict, failure detail).
  5. The orchestrator writes reviews/phase-5-verify/integration-test-report.md with the test results table, failure details (module boundary, signal path, first failure cycle), and a recommendation.
  6. Report the overall verdict and both output paths to the user.

Apply steps 1-6 to every requested top-level module — do not stop after the first.

</Execution>

<Tool_Usage>

Integration test orchestration:

Task(subagent_type="rtl-agent-team:p5s-integration-orchestrator",
     prompt="Execute Tier 4 integration testing. User input: $ARGUMENTS")

Do not perform simulation work directly — the orchestrator manages connectivity checks, data flow tests, reset propagation tests, handshake verification, and end-to-end reference comparison.

</Tool_Usage>

<Examples>

<example index="1">

<scenario>Video codec top-level after all per-module Tier 2 and Tier 3 tests pass; verifying the full encode pipeline end-to-end.</scenario>

<reference>examples/</reference>

<expected_output>Static connectivity check passes; all 5 data flow tests PASS; reset propagation PASS; end-to-end output matches refC oracle — overall PASS. Report recommends proceeding to final compliance and rtl-p6-design-review.</expected_output>

</example>

<example index="2">

<scenario>AXI-Stream handshake fails at the boundary between the entropy coder and the bitstream packer due to a width mismatch.</scenario>

<reference>examples/</reference>

<expected_output>Static connectivity check reports o_bin_val[7:0] (cabac_encoder) connected to i_data[15:0] (bitstream_packer) — width mismatch. Dynamic simulation skipped. Report flags the boundary with signal paths; recommends Tier 2 re-run for both modules after RTL fix.</expected_output>

</example>

<example index="3">

<scenario>Reset de-assertion reaches the top module but one sub-module never exits its reset state.</scenario>

<reference>examples/</reference>

<expected_output>Reset propagation test FAIL: u_range_coder remains in reset state 5 cycles after sys_rst_n de-asserts. integration_results.json records the failure with the first divergence cycle. Report identifies the missing reset connection in the instantiation.</expected_output>

</example>

</Examples>

<Escalation_And_Stop_Conditions>

</Escalation_And_Stop_Conditions>

Output

<Final_Checklist>

</Final_Checklist>

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.