Skip to content

Commit 7af2ca6

Browse files
oharboeclaude
andcommitted
docs: AutoMemories views come from FakeRAM2.0's asap7 backend
The "Generated views" and "Platform support" sections described emitters that are not in the tree: scripts/memories/liberty.py, lef.py, pdk_asap7.py with a PdkParams seam, and sram_area_model.py with an area model anchored to an ISSCC 2018 paper. The views come from tools/FakeRAM2.0/orfs_asap7/generate.py. Describe what it emits: a single-port FakeRAM2.0 RAM per memory under FakeRAM2.0's pin names, fixed asap7 default timing and power, area from poly and fin pitch, an identical _pre_layout.lib, and the LEF's M4 pins, M4 power straps and M1-M4 OBS. Platform constants are hardcoded in ASAP7_PROCESS_CONFIG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent d2b74aa commit 7af2ca6

1 file changed

Lines changed: 30 additions & 28 deletions

File tree

‎docs/user/AutoMemories.md‎

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -95,37 +95,39 @@ option and the design forces conversion.
9595

9696
## Generated views
9797

98-
The `.lib` mirrors the structural shape OpenROAD's abstract writer
99-
produces for hardened blocks: `bus()` groups **with per-bit `pin()`
100-
records** (a bus without per-bit siblings makes yosys silently drop bit
101-
connections at parent instances), per-port clock pins with
102-
`min/max_clock_tree_path` arcs, setup/hold constraints on inputs,
103-
clock-to-out arcs on outputs, and `internal_power()` records under a
104-
`power_lut_template` so SAIF-driven power reporting is non-zero.
105-
106-
The `.lef` is an abstract following the conventions of the platform's
107-
fakeram abstracts: `CLASS BLOCK`, per-bit signal pin pads stacked along
108-
the macro edge, interleaved horizontal power/ground straps the
109-
platform's PDN macro grid connects to, and a full-footprint multi-layer
110-
`OBS`.
111-
112-
Timing and area come from simple parametric models
113-
(`scripts/memories/liberty.py`, `scripts/memories/sram_area_model.py`):
114-
log2(rows) decode depth and √bits bit-line scaling for timing; an area
115-
model anchored to published 7 nm SP-SRAM figures (Suzuki et al., ISSCC
116-
2018). These are budgetary models — good enough to make floorplanning,
117-
placement, and timing behave representatively; not sign-off numbers.
98+
The views come from FakeRAM2.0's asap7 backend
99+
(`tools/FakeRAM2.0/orfs_asap7/generate.py`), which `gen_memories.py` runs
100+
as `run.py --orfs_asap7_backend`, finding it through `FAKERAM_RUN_PY`.
101+
Every converted memory becomes a FakeRAM2.0 single-port RAM of its depth
102+
and width. Its other ports and write-mask lanes are not modelled, and the
103+
views use FakeRAM2.0's pin names, not the memory's own.
104+
105+
The `.lib` has `bus()` groups `addr_in`, `wd_in` and `rd_out` and pins
106+
`clk`, `we_in` and `ce_in`. Inputs have setup/hold constraints, `rd_out`
107+
has a clock-to-out arc, and pins have `internal_power()` records under a
108+
`power_lut_template`. `<m>_pre_layout.lib` has the same content as
109+
`<m>.lib`.
110+
111+
Timing, power and leakage are FakeRAM2.0's built-in asap7 defaults,
112+
the same for every memory. Only area and bus widths depend on the
113+
memory. Each bit is 2 contacted poly pitches by 10 fin pitches, and the
114+
bit array gets 20% extra in each direction: that is the `.lib` area.
115+
The `.lef` size is at least that array, rounded up to a multiple of
116+
0.19 µm in width and 1.4 µm in height; a shallow memory is made taller
117+
to leave room for its pins.
118+
119+
The `.lef` is a `CLASS BLOCK` abstract with signal pins on M4 stacked up
120+
the left edge, alternating horizontal M4 `VDD`/`VSS` straps across the
121+
macro (which the platform's PDN macro grid connects to M5), and an `OBS`
122+
covering M1 to M4.
118123

119124
## Platform support
120125

121-
**asap7 only.** The emitters are split into general structure
122-
(`liberty.py`, `lef.py`, parameterized by a `PdkParams`) and platform
123-
constants (`pdk_asap7.py`: pins and power straps on M4 — where the
124-
platform's PDN macro grid connects — pin pad/pitch, strap geometry,
125-
OBS layers, nominal voltage). Generalizing to other PDKs means
126-
providing their `PdkParams` — the code seam exists, the calibration
127-
work does not. `AUTO_MEMORIES=1` on any other platform fails with a
128-
clear error.
126+
**asap7 only.** `gen_memories.py` rejects any other platform. The
127+
asap7 process parameters (layers, pin pitch, poly and fin pitch, snap grid)
128+
are constants in `ASAP7_PROCESS_CONFIG` in
129+
`tools/FakeRAM2.0/orfs_asap7/generate.py`, not read from the platform.
130+
Another PDK would need its own backend there.
129131

130132
## Trying it
131133

0 commit comments

Comments
 (0)