Repository navigation
Add native CDC/reset verification and stronger diagnostic evidence - #13
Conversation
Preserve legacy workflows and add an opt-in original-input-bound CDC profile with Yosys structure, Icarus phase/reset traces, independent replay and diagnosis/design acceptance. Compose passing checks into existing FPGA verification without extending its single-clock implementation backend. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise independent multi-input levels, retain cell/bit-specific expected and observed connections while tracing all direct stages, and enforce native time/output budgets during execution with actual stopped-process exits. Preserve original goals, bounds, legacy workflows and accepted prior evidence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Legacy workflows can inadvertently require CDC, and malformed evidence can crash validation instead of producing deterministic issues.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Adds opt-in native CDC/reset adapter verification to digital verification, with FPGA composition support and replayable evidence.
Changes:
- Adds Yosys structural analysis and Icarus trace verification.
- Integrates CDC evidence into workflow profiles and FPGA validation.
- Adds documentation, catalog updates, references, and extensive tests.
| File | Description |
|---|---|
tests/test_voice_wordlist.py |
Registers new CDC modules. |
tests/test_catalog.py |
Tests packaged CDC references. |
tests/skills/test_cdc_reset.py |
Covers core CDC validation. |
tests/skills/test_cdc_followup.py |
Covers diagnostics and limits. |
README.md |
Documents CDC capability. |
CONTRIBUTING.md |
Adds CDC contribution requirements. |
catalog.json |
Updates catalog metadata. |
argus_verticals/fpga_design/vertical.json |
Bumps FPGA version. |
argus_verticals/fpga_design/README.md |
Documents CDC composition. |
argus_verticals/digital_circuit/verification/vertical.json |
Updates verification metadata. |
argus_verticals/digital_circuit/verification/stages.py |
Adds the CDC workflow profile. |
argus_verticals/digital_circuit/verification/skills/reviewer/verification-acceptance.md |
Adds reviewer guidance. |
argus_verticals/digital_circuit/verification/skills/manager/verification-scope.md |
Adds profile-selection guidance. |
argus_verticals/digital_circuit/verification/skills/engineer/cdc-formal-review.md |
Defines engineering scope. |
argus_verticals/digital_circuit/verification/skills/engineer_scripts/cdc_reference.sv |
Adds reference RTL. |
argus_verticals/digital_circuit/verification/run_cdc_reference.py |
Creates and runs the reference. |
argus_verticals/digital_circuit/verification/README.md |
Documents CDC execution. |
argus_verticals/digital_circuit/verification/evidence.py |
Composes CDC evidence checks. |
argus_verticals/digital_circuit/verification/evidence-contract.md |
Defines the evidence contract. |
argus_verticals/digital_circuit/verification/cdc.py |
Implements execution and replay. |
argus_verticals/digital_circuit/verification/cdc_simulation.py |
Generates and checks traces. |
argus_verticals/digital_circuit/verification/cdc_model.py |
Validates declarations and structure. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| simulations = { | ||
| name: cdc_simulation.measure(spec, configuration, project_file(root, f"{DIRECTORY}/{name}.simulate.log").read_text(encoding="utf-8")) | ||
| for name, configuration in spec["configurations"].items() | ||
| } |
There was a problem hiding this comment.
Fixed in d781476: trace read/encoding errors are normalized to EvidenceError at the measurement boundary. Two new regressions reproduced UnicodeDecodeError and OSError before the fix and now pass.
| def structure(spec: dict, netlist: dict) -> dict: | ||
| try: | ||
| return _structure(spec, netlist) | ||
| except (KeyError, TypeError, IndexError, ValueError) as exc: | ||
| raise EvidenceError(f"invalid native Yosys cell/connection record: {exc}") from exc |
There was a problem hiding this comment.
Fixed in d781476: AttributeError is normalized by the existing native schema boundary. Four regressions for malformed ports, netnames, connections and attributes initially failed and now return deterministic completion issues.
| if (root / CDC_PLAN).exists(): | ||
| validate_cdc(root, require_pass=True) |
There was a problem hiding this comment.
Fixed in d781476: removed the redundant file-presence-triggered final check. validate_simulation and validate_formal already enforce passing CDC when the validated plan explicitly sets cdc=true. Native legacy FIFO regressions with an unused CDC_PLAN and missing/false cdc now pass, while true composition remains covered.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Changes
cdcworkflow profile on the existing verification simulation stage, preserving the legacy full workflow.Validation
935bf2013a96be58c9f39ab92bef8f332f291ae2completed in 258 observed seconds with independent Reviewer acceptance and no input/requirement/manual evidence repairs.Scope
Digital verification 0.2.1; FPGA documentation 0.1.1. This is a bounded explicit adapter study, not complete CDC/RDC analysis, metastability/MTBF modeling, physical timing/placement qualification, coherent-bus/pulse/FIFO verification, multiclock FPGA implementation, or board programming. No framework change, release or stable deployment.
PR review follow-up (verification 0.2.2)
All three review findings were reproduced by eight initially failing regressions
and corrected: final legacy review now relies on the explicitly composed plan
checks rather than file presence; malformed native JSON shapes and trace read/
encoding failures become evidence errors. The updated focused CDC/Store suite
passed 258 tests (10 unrelated native archive cases deselected), and 82 legacy
verification/FPGA/digital tests passed. Fresh native execution and read-only
replay preserved both previous autonomous diagnoses; the original accepted
projects and their records were byte-checked unchanged. These follow-up replays
are native checks, not additional autonomous experiments.