Skip to content

fix(gen-verilog): name a refused on_clock entry point in the .v file (#5963) - #5967

Merged
gHashTag merged 2 commits into
masterfrom
claude/verilog-on-clock-refusal-comment
Oct 4, 2026
Merged

gHashTag merged 2 commits into
masterfrom
claude/verilog-on-clock-refusal-comment

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

t27c gen-verilog wrote the in-file // ENTRY POINT REFUSED comment only inside the // NO DATA PORTS branch. An on_clock whose parameter has no derivable width, in a module that still exposes a var as an output port, took the other branch: the .v file said nothing about the refusal (stderr has reported it since #5955). The comment now comes from one helper, VerilogCodegen::write_entry_refusal_comment, called whenever an entry point is refused, for on_comb and on_clock alike. No second copy of the message text.

Before / after

module slice_clock;
var acc : u8 = 0
fn on_clock(xs: []u8) { acc = acc + 1; }

Before (head of #5955): stderr t27c gen-verilog: ENTRY POINT REFUSED -- xs: []u8, and the file had no refusal comment:

    output wire        ready,
    output reg [7:0] acc
);

    // -------------------------------------------------------

After: same stderr, same exit code (0), and the file says why xs has no port:

    output reg [7:0] acc
);
// ENTRY POINT REFUSED -- a parameter or return has no derivable width:
//     xs: []u8
// `[N]T` is accepted (N*width(T) is arithmetic). A slice has no length in
// the type; `f64` has a size but not an encoding. Neither is guessed here.

Corpus

gen-verilog over all 1183 specs under specs/, baseline binary (#5955 head) vs this branch: 0 files differ in stdout, stderr or exit code (1163 exit 0, 19 exit 1 on both sides). No corpus spec has a refused entry point, so the change is visible only to new specs. No seals touched; FROZEN_HASH updated for compiler.rs.

Tests

Three new tests in bootstrap/tests/verilog_struct_entry_ports.rs:

  • a refused on_clock slice parameter is named exactly once in the file and once on stderr, and the acc output port remains (fails on the baseline binary);
  • the on_clock and on_comb refusal comment blocks are identical, and the port-less on_comb case still writes it once;
  • negative control: an accepted on_clock (x: u8) writes no refusal.

cargo test -p t27c --release --test 'verilog_*': 43 passed, 0 failed.

Closes #5963
Part of #5905

🤖 Generated with Claude Code

gHashTag and others added 2 commits October 4, 2026 15:21
…5963)

The ENTRY POINT REFUSED comment lived inside the NO DATA PORTS branch, so an
on_clock whose parameter had no derivable width but whose module still had a
var output port wrote nothing into the file (stderr reported it since #5904).
Move the comment into write_entry_refusal_comment and call it whenever an
entry point is refused, for on_comb and on_clock alike.

Corpus gen-verilog is byte-identical (no corpus spec is refused). FROZEN_HASH
updated for compiler.rs.

Closes #5963
Part of #5905

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#5955 merged; bring the branch onto master. compiler.rs is unchanged by
master, so FROZEN_HASH still matches.

Closes #5963

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

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-04 08:35:03 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 43
PRs with All Checks Green 7
READY 1
FAILING 43
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 43 + 0 + 0 = 44, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=f4a1fbade08e != 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).

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@gHashTag
gHashTag merged commit eeaebdd into master Oct 4, 2026
38 of 40 checks 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.

gen-verilog: a refused on_clock entry point leaves no comment in the .v file

1 participant