fix(gen-verilog): TB regs for untyped/nested let bindings and tuple elements - #1949
Merged
Conversation
…lements Refs #1948 The testbench declared regs for StmtAssign bindings (#1894) and top-level TYPED locals only. Untyped `let score = f(...)` bindings, nested locals and tuple-destructure elements stayed undeclared -- iverilog could not bind them, the biggest icarus compile-error class on the tri-net corpus (hit every spec whose executable tests use let). One declaration pass now walks the whole block: plain assign targets (#1894 behavior), tuple elements (64-bit regs), and any StmtLocal the typed top-level loop does not cover, width-inferred from the init expression. tri-net corpus: icarus compile errors 31 -> 21; the 10 unblocked specs now surface RUNTIME divergences (early-return fn lowering suspected), which are the next tail. Gate set unchanged (59/59 still green). FROZEN_HASH resealed; only unit red is the pre-existing bitnet_layer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
August 8, 2026 16:54
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1948
The testbench declared regs for StmtAssign bindings (#1894) and top-level TYPED locals only — untyped
let score = f(...), nested locals and tuple-destructure elements were unbound ("Unable to bind wire/reg"), the biggest icarus compile-error class on the tri-net corpus.One declaration pass now walks the whole block: assign targets, tuple elements (64-bit), and any StmtLocal the typed top-level loop doesn't cover (width from init expr).
tri-net corpus: icarus compile errors 31 → 21; the 10 unblocked specs surface runtime divergences (early-return fn lowering suspected) — next tail. Existing 59-spec gate unchanged and green. Only unit red is pre-existing bitnet_layer. FROZEN_HASH resealed; NOW.md entries added.
🤖 Generated with Claude Code