Skip to content

gt2n: add Vt implant layers to the LEFs - #4607

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gt2n-vt-implant
Oct 3, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gt2n-vt-implant

Conversation

@maliberty

Copy link
Copy Markdown
Member

Summary

The upstream GT2N LEFs carry no threshold-voltage information. OpenROAD's resizer identifies a cell's Vt from IMPLANT-layer obstructions in the LEF (Resizer::cellVTType), so on gt2n it sees every W/Vt flavor as the same Vt:

  • vt_swap never fires — every repair_timing on gt2n reports 0 VT
  • keep_sizing_vt has no effect
  • Vt only changes as a side effect of sizeup treating Vt variants as drive strengths

This adds implant layers the same way asap7 does:

  • gt2_tech.lef: ELVT/ULVT/LVT/SVT/HVT TYPE IMPLANT layers after the front-end MASTERSLICE layers.
  • Every macro in the 10 gt2_6t_w*_*.lef files gets a full-cell OBS rectangle on its Vt layer (creating the OBS block for the filler and backside tap, which had none).
  • The rectangles mirror the GDS: every elvt/ulvt/svt/hvt cell has exactly one Vt-layer rectangle (94–97 in gt2.layermap) from the origin to the cell SIZE (checked on all 720 cells). LVT is the base device with no GDS layer; it gets an LEF-only layer so every flavor is explicit and reports as L rather than -. LEF obstructions are not streamed out, so the merged GDS is unchanged.
  • add_vt_implant.py makes the edit and is idempotent; the README notes it as a local modification to rerun after re-syncing the LEFs from upstream.

With this, report_equiv_cells -vt reports H/S/L/UL/EL, and repair_timing performs Vt swaps (e.g. 228 resized: 12 up, 216 VT).

gcd finish QoR, before → after

Flow WNS (ps) TNS (ps) Leakage (µW)
yosys (default) −68.8 → −60.0 −1208 → −568 43.6 → 33.8
SYNTH_USE_SYN=1 −216.0 → −45.1 −8042 → −794 29.2 → 32.1

The large syn improvement is because repair_design -pre_placement in the syn flow flips the mapped netlist to nearly all HVT (resizeToCapRatio breaks equal-area ties toward the weakest drive); with Vts now recognized, repair_timing can swap those back. Making resizeToCapRatio Vt-preserving is a separate OpenROAD change.

The upstream GT2N LEFs carry no threshold-voltage information, so the
resizer, which identifies a cell's Vt from IMPLANT-layer obstructions,
sees every W/Vt flavor as the same Vt. vt_swap never fires (every
repair_timing reports 0 VT), keep_sizing_vt has no effect, and Vt only
changes as a side effect of sizeup.

Declare ELVT/ULVT/LVT/SVT/HVT IMPLANT layers in gt2_tech.lef and give
every macro a full-cell OBS rectangle on its Vt layer, as asap7 does.
The rectangles mirror the GDS, where each elvt/ulvt/svt/hvt cell has a
single Vt-layer rectangle from the origin to the cell SIZE. LVT is the
base device with no GDS layer; it gets an LEF-only layer so every
flavor is explicit. LEF obstructions are not streamed out, so the
merged GDS is unchanged.

add_vt_implant.py makes the edit and is idempotent; rerun it after
re-syncing the LEFs from upstream.

gcd finish, before -> after:
  yosys flow: WNS -68.8 -> -60.0 ps, TNS -1208 -> -568 ps,
              leakage 43.6 -> 33.8 uW
  syn flow:   WNS -216.0 -> -45.1 ps, TNS -8042 -> -794 ps

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@maliberty maliberty self-assigned this Oct 3, 2026

@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 introduces a Python script, add_vt_implant.py, and updates the GT2N PDK LEF files to declare and add threshold-voltage (Vt) implant layers (ELVT, ULVT, LVT, SVT, HVT) as obstructions in the cell macros. This enables OpenROAD's resizer to identify a cell's Vt and perform Vt-aware optimizations. The review feedback recommends specifying encoding='utf-8' for all file read and write operations in the script to prevent platform-dependent encoding issues, and adding a warning check in the main function in case no macro LEF files are found.

Comment thread flow/platforms/gt2n/add_vt_implant.py Resolved
Comment on lines +55 to +56
def add_macro_obs(path, layer):
lines = path.read_text().splitlines(keepends=True)

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.

medium

Specify encoding="utf-8" when reading the macro LEF files to prevent platform-dependent encoding issues.

Suggested change
def add_macro_obs(path, layer):
lines = path.read_text().splitlines(keepends=True)
def add_macro_obs(path, layer):
lines = path.read_text(encoding="utf-8").splitlines(keepends=True)

Comment thread flow/platforms/gt2n/add_vt_implant.py Resolved
Comment thread flow/platforms/gt2n/add_vt_implant.py Resolved
@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 92b5c99 · 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 f81e15b into The-OpenROAD-Project:master Oct 3, 2026
12 checks passed
@maliberty
maliberty deleted the gt2n-vt-implant branch October 3, 2026 15:36
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.

2 participants