Skip to content

AUTO_MEMORIES: the generated macros reach the GDS merge - #4660

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:auto-memories-gds-merge
Oct 11, 2026
Merged

maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:auto-memories-gds-merge

Conversation

@oharboe

@oharboe oharboe commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

The GDS merge reads the final DEF through a KLayout technology built from the tech, standard-cell and ADDITIONAL_LEFS LEFs. The LEFs AUTO_MEMORIES generates were not among them, so the merge stopped at the first generated macro:

Macro not found in LEF file: mbtb_entry_sram

A generated macro also has no GDS, and a platform's GDS_ALLOW_EMPTY pattern (asap7: fakeram.*) only matches the platform's own memories, so with the LEF found every generated macro would have been reported as an empty cell.

With AUTO_MEMORIES=1, klayout.lyt now takes the generated LEFs, the ones load.tcl reads, and is rebuilt when they change; def2stream.py allows the modules listed in memories/blackboxes.txt to be empty, taking the first column of each line. Found with asap7/tage_update (#4595), which now writes 6_final.gds.

🤖 Generated with Claude Code

The GDS merge reads the final DEF through a KLayout technology built
from the tech, standard-cell and ADDITIONAL_LEFS LEFs. The LEFs
AUTO_MEMORIES generates were not among them, so the merge stopped at
the first generated macro:

  Macro not found in LEF file: mbtb_entry_sram

And a generated macro has no GDS, while a platform's GDS_ALLOW_EMPTY
pattern (asap7: fakeram.*) only matches the platform's own memories,
so with the LEF found, every generated macro would have been reported
as an empty cell.

With AUTO_MEMORIES=1, klayout.lyt now takes the generated LEFs, the
ones load.tcl reads, and is rebuilt when they change; def2stream.py
allows the modules listed in memories/blackboxes.txt to be empty,
taking the first column of each line. Found with asap7/tage_update
(The-OpenROAD-Project#4595), which now writes 6_final.gds.

Co-Authored-By: Claude Opus 5.5 <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 integrates automatically generated memories into the KLayout layout merging process by allowing specified cells to be empty without triggering errors. It updates the Makefile to include the generated LEFs as dependencies and introduces a helper function 'auto_memories_cells' to parse these cell names from 'blackboxes.txt'. The review feedback recommends handling missing environment variables or files gracefully in 'auto_memories_cells' to prevent potential crashes, along with updating the corresponding unit tests.

Comment thread flow/util/def2stream.py
Comment thread flow/test/test_def2stream.py
Review asked for a missing RESULTS_DIR or blackboxes.txt to mean no
generated macros. It does not: do-auto-memories always writes the list,
empty when nothing was converted, so a missing one is a broken flow,
and passing over it would turn into "has no matching GDS/OAS cell"
errors for the generated macros further on. It stays a stop, now with
a message naming what is missing instead of a KeyError or
FileNotFoundError; under klayout -r the merge exits 1 with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe requested a review from maliberty October 9, 2026 08:34
@openroad-ci

openroad-ci commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

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

Commit 67b47fd · Jenkins build #2 · Baseline: build · View build on dashboard

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

@maliberty
maliberty merged commit f7dff2f into The-OpenROAD-Project:master Oct 11, 2026
13 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