fix(gen-verilog): name a refused on_clock entry point in the .v file (#5963) - #5967
Merged
Merged
Conversation
…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>
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.
Summary
t27c gen-verilogwrote the in-file// ENTRY POINT REFUSEDcomment only inside the// NO DATA PORTSbranch. Anon_clockwhose parameter has no derivable width, in a module that still exposes avaras an output port, took the other branch: the.vfile 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, foron_combandon_clockalike. No second copy of the message text.Before / after
Before (head of #5955): stderr
t27c gen-verilog: ENTRY POINT REFUSED -- xs: []u8, and the file had no refusal comment:After: same stderr, same exit code (0), and the file says why
xshas no port:Corpus
gen-verilogover all 1183 specs underspecs/, 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_HASHupdated forcompiler.rs.Tests
Three new tests in
bootstrap/tests/verilog_struct_entry_ports.rs:on_clockslice parameter is named exactly once in the file and once on stderr, and theaccoutput port remains (fails on the baseline binary);on_clockandon_combrefusal comment blocks are identical, and the port-lesson_combcase still writes it once;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