Skip to content

A dead simulator reads as a design that emitted nothing - #2194

Merged
gHashTag merged 1 commit into
masterfrom
loop/t27-vvp-diag
Aug 18, 2026
Merged

A dead simulator reads as a design that emitted nothing#2194
gHashTag merged 1 commit into
masterfrom
loop/t27-vvp-diag

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Last site of the class opened in #2187 / #2189, and it sits on the load-bearing proof: Verilog == model.

tools/verify_emit_bitexact.py:127 ran the simulator as

out = subprocess.run(["vvp", vvp], capture_output=True, text=True).stdout

with no exit-code check. A vvp that crashes produces a short Y-list, and the next check reports

FAIL (2, 2, 1): step count RTL=0 PY=80

which reads as the RTL emitted no outputs — a design fault. Nothing was compared.

And the testbench already says so. It contains initial begin #60000000 $display("TIMEOUT"); $finish; end — the word TIMEOUT is printed into the very stdout the script parses, and the script never looked for it. A design that ran out of simulated time is not a design that disagrees with the model, and the two want completely different fixes.

Fix: check vvp's exit code (reporting the signal number when negative), then look for the TIMEOUT marker, then fall through to the step-count check — which now says explicitly that vvp exited 0 and printed no TIMEOUT, so a count mismatch there is a real disagreement.

Verified by shortening the testbench timeout so the branch actually fires:

before:  FAIL (2, 2, 1): step count RTL=0 PY=80
after:   FAIL (2, 2, 1): the testbench hit its own TIMEOUT after 0 of 80 steps
         -- the design did not finish, which is not the same as disagreeing with the model

Clean tree still exits 0 (ALL SYNTHESIZE).

The class is now closed. An AST re-scan leaves two run(...).stdout sites, both git ls-files inside try/except with check=True and an rglob fallback — a git failure raises and is handled, not swallowed.

Refs #2189, #2187

Closes #2193

🤖 Generated with Claude Code

Last site of the class opened in #2187/#2189, and it sits on the load-bearing
proof: Verilog == model.

verify_emit_bitexact.py:127 took vvp's stdout with no exit-code check. A crashed
simulator yields a short Y-list and the next check reports

    FAIL (2, 2, 1): step count RTL=0 PY=80

which reads as 'the RTL emitted no outputs' -- a design fault. Nothing had been
compared.

The testbench already said so. It contains

    initial begin #60000000 $display("TIMEOUT"); $finish; end

printing TIMEOUT into the very stdout this script parses, and the script never
looked for it. A design that ran out of simulated time is not a design that
disagrees with the model, and the two want different fixes.

Order is now: vvp's exit code (with the signal number when negative), then the
TIMEOUT marker, then the step count -- which states explicitly that vvp exited 0
and printed no TIMEOUT, so a mismatch there is a real disagreement.

Verified by shortening the testbench timeout so the branch actually fires, rather
than by reading it. Clean tree still exits 0.

The class is closed: an AST re-scan leaves two run(...).stdout sites, both
git ls-files inside try/except with check=True and an rglob fallback, so a git
failure raises and is handled rather than swallowed.

A hardcoded #60000000 went into the message on the first pass and was removed on
the second -- a literal copied into prose is the drift this cycle has been
correcting.

Closes #2193
Refs #2189

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-18 13:15:50 UTC

Summary

Status Count
Total Open PRs 29
PRs with Failing Checks 12
PRs with All Checks Green 17
READY 9
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=cd2822f290eb != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 948fbe5 into master Aug 18, 2026
19 checks passed
@gHashTag
gHashTag deleted the loop/t27-vvp-diag branch August 18, 2026 13:23
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.

A dead simulator reads as a design that emitted nothing

1 participant