Skip to content

memories: run the in-tree FakeRAM2.0, drop FAKERAM_RUN_PY - #4611

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:memories-fakeram-in-tree
Oct 3, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:memories-fakeram-in-tree

Conversation

@oharboe

@oharboe oharboe commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR: gen_memories.py runs the in-tree tools/FakeRAM2.0/run.py directly, dropping FAKERAM_RUN_PY. Nothing set that variable, so AUTO_MEMORIES under plain make failed with "FAKERAM_RUN_PY not set".

FAKERAM_RUN_PY and its bazel RUNFILES_DIR search date from a632406, when FakeRAM2.0 was a separate repository. It moved into ORFS the same day (76a445c). This drops the variable, the search (which never matched FakeRAM2.0 anyway) and the test's bazel branch. bazel-orfs is pinned and adapts when it bumps.

Testing: flow/scripts/memories/*_test.py pass with no environment set. With nothing exported, make ... tinyRocket synth now runs FakeRAM and writes the macro views.

🤖 Generated with Claude Code

gen_memories.py found FakeRAM through FAKERAM_RUN_PY, or else by
searching bazel's RUNFILES_DIR for a run.py under a directory named
like "fakeram". Both date from a632406, when FakeRAM2.0 was a separate
repository that ORFS's MODULE.bazel fetched. The same day it moved into
ORFS (76a445c), so its location relative to this script is fixed.

Nothing in the make flow ever set FAKERAM_RUN_PY, so AUTO_MEMORIES
under make stopped with "FAKERAM_RUN_PY not set and FakeRAM run.py not
found" unless the user exported it. The RUNFILES_DIR search could not
match "FakeRAM2.0" (it is case-sensitive), and ORFS no longer builds
with bazel.

Run tools/FakeRAM2.0/run.py relative to this script, and drop the
variable, the search and the test's bazel branch. A missing run.py now
fails in the subprocess, which names the path.

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 simplifies the resolution of the FakeRAM executable path by replacing the dynamic find_fakeram_run function with a hardcoded relative path. Feedback suggests preserving support for the FAKERAM_RUN_PY environment variable as an optional override to maintain compatibility with hermetic build systems like Bazel, and adding an existence check for the executable path to prevent unhelpful Python tracebacks if the file is missing.

Comment thread flow/scripts/memories/gen_memories.py Resolved
Comment thread flow/scripts/memories/gen_memories.py Resolved
@oharboe
oharboe marked this pull request as ready for review October 3, 2026 07:06
@oharboe
oharboe requested a review from maliberty October 3, 2026 07:06
@openroad-ci

Copy link
Copy Markdown
Member

🔍 QoR check

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

Commit 2876dbd · Jenkins build #1 · Baseline: build · View build on dashboard

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

@maliberty
maliberty merged commit 94ae0e8 into The-OpenROAD-Project:master Oct 3, 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