Skip to content

Add native CDC/reset verification and stronger diagnostic evidence - #13

Merged
aHappend merged 3 commits into
mainfrom
feat/digital-cdc-reset
Oct 5, 2026
Merged

aHappend merged 3 commits into
mainfrom
feat/digital-cdc-reset

Conversation

@aHappend

@aHappend aHappend commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Add an opt-in cdc workflow profile on the existing verification simulation stage, preserving the legacy full workflow.
  • Bind native Yosys structural checks and Icarus clock/reset traces to an original external specification for declared single-bit level/reset adapters.
  • Check complete sequential-state inventory, stage counts, direct connections, clock/reset polarity and intermediate fanout; retain native models, generated stimuli and raw traces for independent replay.
  • Distinguish valid negative diagnosis from mandatory passing design/composed FPGA verification.
  • Strengthen multi-input stimuli so swapped inputs cannot hide behind identical levels; retain precise cell/bit/source/expected/observed findings and continue inspecting remaining direct stages.
  • Enforce time and output limits during execution, terminate only the owned process group on POSIX, and retain actual stopped-command exits and reasons.

Validation

  • Final focused native, legacy verification/FPGA, role-contract, catalog and fresh Store suite: 364 passed, 10 unrelated native Store cases deselected, no skips.
  • Initial real autonomous Argus trial correctly accepted a negative diagnosis: finite digital traces passed, but the declared receiving reset structure failed.
  • Fresh autonomous follow-up on exact head 935bf2013a96be58c9f39ab92bef8f332f291ae2 completed in 258 observed seconds with independent Reviewer acceptance and no input/requirement/manual evidence repairs.
  • In that controlled fault case, all four configurations exposed swapped source data: 4,806 mismatching scalar observations among 40,804 comparisons. The previous provider's separate manual native baseline had zero trace mismatches on the same original inputs, although structural checks still rejected the design.
  • Independent host audit checked every trace value against native bit-level and required models, precise structural witnesses, unchanged original bytes, installed provider bytes, role context and read-only native replay. All eight provider calls exited zero; reflection settled and the isolated worker shut down normally.
  • The prior accepted experiment and stable Argus instance were not modified.

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.

aHappend and others added 2 commits October 5, 2026 04:24
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>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity

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.

Comment on lines +105 to +108
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()
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +129 to +133
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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +124 to +125
if (root / CDC_PLAN).exists():
validate_cdc(root, require_pass=True)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@aHappend
aHappend merged commit cee191c into main Oct 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants