Repository navigation
tools: record t27core.t27 in the Verilog width ledger, exact arithmetic (Closes #8024) - #8025
Merged
Merged
Conversation
…ic (Closes #8024) #8020 moved the self-hosted core's tables into arrays of structs, which gen-verilog packs into one register each: toks is 262144 * 192 = 50331648 bits and nodes 262144 * 512 = 134217728 bits. Not an underflow; the same class as the two lines already recorded, with the arithmetic beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 9, 2026 06:15
4 of 6 tasks
Contributor
gHashTag
added a commit
that referenced
this pull request
Oct 9, 2026
…e leaves the width ledger (Closes #8151) (#8154) * gen-verilog: hold a module-level array of structs as a memory (Closes #8151) A module-level `var` whose type is an array of structs was one packed register. Since #8020 that made t27core's `nodes` 262144 * 512 = 134,217,728 bits (`toks` 50,331,648), the line #8025 added to tools/verilog_width_baseline.txt. It is now an unpacked memory, `reg [W-1:0] name[0:N-1]`, with W the struct's packed width: the form W531 already gives an array of primitives, which is what these tables were before #8020. - The decision is specs/compiler/verilog_aos_memory.t27 (6 tests), lowered by `t27c gen-rust` to bootstrap/gen/rust/compiler/ and mounted by #[path]. A var initialized by a function call stays packed (W589, as W545 for primitives); so does an empty list. - compiler.rs prints it: declaration, element and field access (`name[i]`, `name[i][off +: w]`) and literal initialization. 39 hand-written lines added, 1 changed. FROZEN_HASH updated. - t27core.t27 leaves the width ledger; the gate reports 2 known, 0 new. stdlib.t27 and ternary_memory.t27 stay: each is one struct of millions of bits, which a memory does not split (see #2566). - Outputs changed for 9 of 2038 .t27 files, all the same conversion. Resealed gen_hash_verilog for the 4 sealed ones (mac, lotus, xc7a100t_minimal, similarity_search: 9 seal files); sealed the new spec. html, xml and terminal are left as master's ledgered debt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * t27b ledger: list specs/compiler/verilog_aos_memory.t27 as pass (Closes #8151) The t27b native ratchet reported the new spec UNLISTED: the reference and t27b both pass it. Listed where a new spec is listed, in sorted order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #8024. Follows #8020 (P2 slice 5 of #5980). It turns
Verilog widths (absurd-width ledger)green on master again.#8020 moved the self-hosted core's tables from parallel
i64arrays into arrays of structs.t27c gen-veriloglowers the old arrays as memories ([0:262143]), but it packs an array of structs into one register:toks: [262144]TokTok { kind, pos, len: i64 }, 192 bits[50331647:0]nodes: [262144]NodeNode { 8 x i64 }, 512 bits[134217727:0]These are not underflows: the widths match the emitter bit for bit. This is the same class as the two lines the ledger already holds,
stdlib.t27andternary_memory.t27. Each of those has its arithmetic beside it, and the question of whether such a type should lower at all stays with #2566. The core is a compiler built for C, Zig and AArch64, not a hardware design.Lines by file
tools/verilog_width_baseline.txtcheck_budgetexit 0 andcheck_allexit 0. Both ran on the t27c lab with master'sown_language.candforeign-exceptions.txt.Lab evidence
On the t27c lab, with t27c built from master and this branch,
python3 tools/check_verilog_widths.py --requiregives:🤖 Generated with Claude Code