Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ archive_override(
# pull request carries a gtest. Retires at a bump onto an OpenROAD
# that has it.
"//patches:0004-openroad-dpl-window-supply.patch",
# 0010: generate_regfile in the ram module, a multi-port register
# file as placed standard cells, which AUTO_MEMORIES_REGFILES
# (ORFS patch 0089) runs. The net diff of upstream
# The-OpenROAD-Project/OpenROAD#11669; retires at a bump onto an
# OpenROAD that has it.
"//patches:0010-openroad-ram-generate-regfile.patch",
],
strip_prefix = "OpenROAD-22b7c537718e77cd3e7b6c0e883d966bf7e92563",
urls = ["https://github.com/The-OpenROAD-Project/OpenROAD/archive/22b7c537718e77cd3e7b6c0e883d966bf7e92563.tar.gz"],
Expand Down Expand Up @@ -853,7 +859,7 @@ http_archive(
"//test/coremark_joule/xiangshan:patches/0007-xiangshan-rob-cell-packed-ports.patch",
# Carried, not upstreamed: the ROB entry payload as a register-file
# module, RobEntryFile, which the planned parent's
# STRUCTURED_MEMORIES names (see the patch header).
# AUTO_MEMORIES_REGFILES names (see the patch header).
"//test/coremark_joule/xiangshan:patches/0008-xiangshan-rob-entry-file.patch",
],
sha256 = "e4b48e602db1ee00835ea8e99aef9585b16fd34f9049fdfc37c5208625c6a002",
Expand Down
8 changes: 4 additions & 4 deletions config_mk_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@
# canonicalization, so they have to be staged like any other source
# rather than passed as a string.
"ADDITIONAL_MEMORIES",
# STRUCTURED_MEMORIES: register-file spec files gen_memories.py hands
# to tools/structured_gen during canonicalization; staged like the
# .memories files above.
"STRUCTURED_MEMORIES",
# SYNTH_VERILOG_SURGERY: the script that edits copies of the sources
# before synthesis; run during canonicalization, so staged.
"SYNTH_VERILOG_SURGERY",
# AUTO_MEMORIES_REGFILES: register-file spec files gen_memories.py
# hands to OpenROAD's generate_regfile during canonicalization;
# staged like the .memories files above.
"AUTO_MEMORIES_REGFILES",
}

# Variables that are purely for path resolution, not passed to orfs_flow()
Expand Down
5 changes: 5 additions & 0 deletions ideas/structured-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

*Plan, 2026-09-21, for the record in PR #1055.*

*2026-10-06: STRUCTURED_MEMORIES and STRUCTURED_PLACEMENT (ORFS patches
0071, 0078, 0082, 0084) are replaced by AUTO_MEMORIES_REGFILES (ORFS patch
0089 on OpenROAD patch 0010): a register file is a macro through
synthesis and macro placement and dissolves into its cells after it.*

![The parent with its generated macros, and the tile structure of one generated array](structured-macros.png)

## Why
Expand Down
51 changes: 25 additions & 26 deletions orfs_source.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -78,44 +78,25 @@ ORFS_PATCHES = [
# cells of their own type.
# Not upstreamed -- retire at a bump onto an ORFS with such a hook.
Label("//patches:0068-orfs-synth-techmap-hook.patch"),
# STRUCTURED_MEMORIES: a design lists register-file spec files, one
# per module, and gen_memories.py runs tools/structured_gen for each
# -- a placed standard-cell macro checked against the module's
# ports, its views beside the AUTO_MEMORIES ones, the module in
# blackboxes.txt. Explicit by design; XiangShan's register files are
# Reg(Vec) and no detector sees them. Not upstreamed -- retire at a
# bump onto an ORFS that can declare a generated macro per module.
Label("//patches:0071-orfs-structured-memories.patch"),
Label("//patches:0073-orfs-fakeram-declared-pins-write-mask.patch"),
Label("//patches:0074-orfs-skip-extract-fa.patch"),
# With GPL_TIMING_DRIVEN and GPL_ROUTABILITY_DRIVEN both off, the place
# stage runs one global placement with -place_ios instead of a
# pins-blind solve, place_pins and a second solve. Not upstreamed --
# retire at a bump onto an ORFS that places pins with global placement.
Label("//patches:0077-orfs-gpl-place-ios.patch"),
# 0078: STRUCTURED_MEMORIES in mode netlist: the generated array's cells
# placed FIRM into the parent at floorplan (STRUCTURED_PLACEMENT) instead
# of a macro. Carried, not upstreamed. See ideas/structured-macros.md.
Label("//patches:0078-orfs-structured-netlists.patch"),
# 0081: the memory detector names a slang-uniquified module
# (`array_512x17$Frontend...`) for its definition and collapses the
# copies: read_slang blackboxes by definition name, so the uniquified
# names never matched and the arrays were flattened into their tables
# (Frontend's TAGE partition, 64 x 8704 bits). Carried, not upstreamed.
Label("//patches:0081-orfs-memories-slang-uniquified-names.patch"),
# 0082: structured_netlists.tcl skips a placed netlist's cells that
# eliminate_dead_logic removed in the synth ODB step (a dead bit of the
# array takes its whole column) and reports them; FLW-0005 stays for a
# netlist with no cell in the design. Builds on 0078; retires with it.
Label("//patches:0082-orfs-structured-netlists-dead-cells.patch"),
# 0083: the macro step skips rtl_macro_placer when MACRO_PLACEMENT_TCL
# fixed every macro; run anyway it refuses the FIRM cells of a placed
# structured netlist (MPL-0050). Carried, not upstreamed.
# fixed every macro (a planned parent: its blocks and register files
# placed by the plan). Written for the FIRM cells of the retired
# structured netlists, which it refused (MPL-0050). Carried, not
# upstreamed.
Label("//patches:0083-orfs-macro-place-all-fixed.patch"),
# 0084: a placed netlist's cells are dont_touch as well as FIRM;
# repair_design upsized 378 of them in place and the wider masters
# overlapped their fixed neighbours. Builds on 0078; retires with it.
Label("//patches:0084-orfs-structured-netlists-dont-touch.patch"),
# 0085: SKIP_PIN_ACCESS runs the global route without building access
# points. pin_access fails on a macro pin it cannot reach (DRT-0073),
# which on a hierarchical design is one pin of one block between a
Expand Down Expand Up @@ -147,16 +128,34 @@ ORFS_PATCHES = [
# its name, so keep_hierarchy -min_cost (SYNTH_MINIMUM_KEEP_SIZE)
# accepts it; any AUTO_MEMORIES design with a keep threshold stopped
# on "Missing cost information on instanced blackbox". Upstream as
# The-OpenROAD-Project/OpenROAD-flow-scripts#4650; also gives 0071's
# register files their area. Retires at a bump onto an ORFS that
# carries #4650.
# The-OpenROAD-Project/OpenROAD-flow-scripts#4650; 0089's register
# files write their area after it. Retires at a bump onto an ORFS
# that carries #4650.
Label("//patches:0090-orfs-auto-memories-keep-cost.patch"),
# 0094: SYNTH_VERILOG_SURGERY, a script that edits copies of
# VERILOG_FILES before synthesis reads them, so vendored RTL stays as
# upstream has it. Upstream as
# The-OpenROAD-Project/OpenROAD-flow-scripts#4649; retires at a
# //:bump onto an ORFS that carries it.
Label("//patches:0094-orfs-synth-verilog-surgery.patch"),
# 0089: AUTO_MEMORIES_REGFILES: register files listed by spec are
# built by OpenROAD's generate_regfile (OpenROAD patch 0010) as
# macros of placed standard cells; in `mode netlist` each dissolves
# into its cells at the end of macro placement, its core FIRM where
# the macro was placed, its address decode left to placement.
# Replaces STRUCTURED_MEMORIES (0071, 0078, 0082, 0084). Upstream as
# The-OpenROAD-Project/OpenROAD-flow-scripts#4651, without its
# example designs; retires at a bump onto an ORFS that carries it.
Label("//patches:0089-orfs-auto-memories-regfiles.patch"),
# 0091: AUTO_MEMORIES_MACRO_PLACE lists the register files placed as
# macros; any other AUTO_MEMORIES_REGFILES register file is inlined,
# its generated netlist read in synthesis in the module's place. On
# 0089; the second commit of ORFS #4651.
Label("//patches:0091-orfs-auto-memories-macro-place.patch"),
# 0099: an inlined register file in place of a parameterized module:
# its instances' parameters dropped before the netlist is read. On
# 0091; the third commit of ORFS #4651.
Label("//patches:0099-orfs-regfile-inline-parameterized.patch"),
]

# Generate the BUILD file for any design directory that has a config.mk
Expand Down
Loading