Skip to content

tinyRocket: the tag_array override carries the pins and geometry it needs - #4557

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:tinyrocket-tag-array-override
Sep 26, 2026
Merged

maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:tinyrocket-tag-array-override

Conversation

@oharboe

@oharboe oharboe commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Why

This is to stop AI squirrel chasing: a checked-in design file that fails its own format's contract sends an agent (or a human) hunting in the flow for a bug that is in the data.

What

asap7/tinyRocket force-converts tag_array through ADDITIONAL_MEMORIES, because the RTL gives that wrapper no behavioral body: it instantiates a tag_array_ext the sources never define. Detection finds memories by their inferred $mem_v2 cells and tag_array has none, so the override is taken whole (schema.merge: "it must then carry pins and geometry itself to be emittable"). It carried only name, idiomatic and reason, so gen_memories stops in validate_emittable:

schema.SchemaError: memory tag_array: no pins

Fix

The override carries what the module boundary in freechips.rocketchip.system.TinyConfig.v says: one read-write port, rows 4 (addr_w 2), bits 25, and the six RW0 pins, no mask.

Test

flow/scripts/memories/schema_test.py gains TinyRocketTagArrayTest:

  • the override taken whole is emittable;
  • its pins equal the tag_array module's ports read from the RTL, so the data cannot drift from the design.

Both fail before this change; the memories tests pass after. Note that CI does not run flow/scripts/memories/*_test.py today.

🤖 Generated with Claude Code

…eeds

asap7/tinyRocket force-converts tag_array through ADDITIONAL_MEMORIES,
because the RTL gives that wrapper no behavioral body: it instantiates
a tag_array_ext the sources never define. Detection finds memories by
their inferred $mem_v2 cells and tag_array has none, so the override is
taken whole (schema.merge: "it must then carry pins and geometry itself
to be emittable"). It carried only name, idiomatic and reason, and
gen_memories stopped in validate_emittable:

    schema.SchemaError: memory tag_array: no pins

The override now carries what the module boundary in
freechips.rocketchip.system.TinyConfig.v says: one read-write port,
rows 4 (addr_w 2), bits 25, and the six RW0 pins, no mask.

schema_test.py gains TinyRocketTagArrayTest: the override taken whole
is emittable, and its pins equal the tag_array module's ports read from
the RTL, so the data cannot drift from the design. Both fail before
this change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the tag_array memory definition in tag_array.memories with detailed properties and pins, and introduces a unit test in schema_test.py to verify that the override is emittable and matches the RTL. The review feedback suggests making the Verilog module header parser in the test helper more robust by stripping leading whitespace before checking for the module declaration and closing parenthesis.

Comment thread flow/scripts/memories/schema_test.py
@openroad-ci

openroad-ci commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 6827978 · Jenkins build #3 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.

@maliberty
maliberty merged commit 658a379 into The-OpenROAD-Project:master Sep 26, 2026
12 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.

3 participants