Skip to content

asap7: align hardened macros to fin and gate grids - #4669

Closed
jeffhsu3 wants to merge 3 commits into
The-OpenROAD-Project:masterfrom
jeffhsu3:asap7-macro-fin-grid
Closed

jeffhsu3 wants to merge 3 commits into
The-OpenROAD-Project:masterfrom
jeffhsu3:asap7-macro-fin-grid

Conversation

@jeffhsu3

Copy link
Copy Markdown

Snapping hardened macro pins to routing tracks can leave the standard cells inside those macros off ASAP7's 27 nm fin and 54 nm gate grids. On aes-block, this produces FIN.S.1/GATE.S.1 violations at the top level.

Add snap_macros_to_fin_grid.tcl as an opt-in POST_MACRO_PLACE_TCL helper and enable it for aes-block. The helper moves each placed macro to the nearest origin that satisfies the fin/gate grids and the routing-track constraints of its pin layers, accounting for R0, MX, MY, and R180 orientations and preserving its placement status.

If the grid constraints are incompatible, the helper warns and falls back to fin/gate alignment. It also warns about unsupported orientations, macros moved outside the core, and overlaps after snapping.

Validation recorded in commit e8f97ee0 for aes-block (the full flow was not rerun when preparing this draft):

  • All 21 macros move by at most 0.192 µm, in whole routing-track increments.
  • gdscheck asap7 FIN.S.1/GATE.S.1 markers decrease from 11,940 to 0.
  • Detailed routing reports no DRC errors, and VDD/VSS remain connected.

Draft preparation also passed git diff --check for the functional change.

jeffhsu3 and others added 2 commits October 10, 2026 22:04
The macro placer snaps a macro's pins to the routing tracks only, so the
standard cells inside a hardened block land off the 27 nm fin and 54 nm
gate grids of the rows around it. snap_macros_to_fin_grid.tcl, run as
POST_MACRO_PLACE_TCL, moves each placed macro to the nearest origin that
puts its cells on those grids and keeps its pins on the tracks of every
layer they use, mirrored placements included.

On aes-block, which now uses it, the 21 macros move by at most 0.192 um,
each a whole number of tracks, and the DRM's FIN.S.1/GATE.S.1 markers go
from 11940 to 0 (gdscheck asap7). Detailed routing has no DRC errors and
VDD/VSS stay connected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: jeffhsu3 <jeffhsu3@gmail.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 introduces a new Tcl script, snap_macros_to_fin_grid.tcl, and integrates it into the ASAP7 AES block configuration to ensure that hardened macros are snapped to the fin and gate grids, as well as routing tracks. The review feedback suggests two key improvements: first, handling the fallback snapping logic for the X and Y axes independently so that one axis can still align to routing tracks even if the other fails; second, optimizing the asap7_snap_axis procedure by pre-calculating target offsets and halving the search range based on constraint periodicity.

Fall back to the gate or fin grid only on the axis with incompatible track constraints. Preserve a valid solution on the other axis and identify the failing axis in the warning.

Precompute constraint residues and limit the nearest-origin search to half the repeating grid period.

Validation: 5,008 Tcl axis cases match an independent exhaustive solver; nine mocked-database scenarios cover all supported orientations and fallback combinations, including four regressions that fail before this change. tclint 0.7.0, tclfmt, and git diff --check pass. The full physical-design flow was not rerun.
Signed-off-by: jeffhsu3 <jeffhsu3@gmail.com>
@jeffhsu3
jeffhsu3 marked this pull request as ready for review October 12, 2026 20:24
@openroad-ci

openroad-ci commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

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

Commit 4187d5d · Jenkins build #2 · Baseline: build · View build on dashboard

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

@rovinski

Copy link
Copy Markdown
Collaborator

This might be something that goes into OR rather than ORFS because I don't think OR should allow placing instances off the fin grid.

@jeffhsu3

Copy link
Copy Markdown
Author

Thanks @rovinski, agreed. I moved this into OpenROAD: The-OpenROAD-Project/OpenROAD#11760 makes the macro snapper keep macros on the core rows' site grid, which on ASAP7 means the fin and gate grids, while still aligning their pins with the tracks. On aes-block with no ORFS-side script, FIN.S.1/GATE.S.1 go from 11,940 to 0 and detailed routing stays clean. Closing this in favor of that PR.

@jeffhsu3 jeffhsu3 closed this Oct 14, 2026
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