mpl: check_macro_placement, a fail-early macro placement check at floorplan (no outputs, no annealing): roadmap
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
The issue describes adding a new command check_macro_placement to the mpl (macro placer) module. Start by examining the existing feasibility checks in ClusteringEngine::init() and setFloorplanShape() in the OpenROAD source. The roadmap lists specific PRs to implement; the first step is understanding the current macro placement flow in floorplan.tcl and macro_place.tcl scripts. 'Done' means the new command runs the checks without clustering or annealing and leaves the ODB unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Why
This is to stop AI squirrel chasing. When a floorplan or macro-placement problem surfaces hours later, as an error from placement, CTS or routing, an AI agent (or a human) chases it in the tool that reported it. Each squirrel below came from taking XiangShan through the flow; every one was decidable at floorplan, in seconds, from geometry that was already known.
Situation today
ORFS's floorplan stage is four steps:
| Step | Script | Does | Checks |
|---|---|---|---|
| 2_1 | floorplan.tcl |
load, initialize_floorplan, tracks, repair_tie_fanout, remove_buffers or repair_timing -setup, IO constraints, write ODB |
init method exclusivity, check_setup |
| 2_2 | macro_place.tcl |
MACRO_PLACEMENT_TCL and/or rtl_macro_placer |
only what rtl_macro_placer checks for itself |
| 2_3 | tapcell.tcl |
tap and endcap cells | |
| 2_4 | pdn.tcl |
power grid | PDN errors, found here |
- The expensive netlist work in 2_1 runs before any macro is placed, so a macro-placement problem costs the whole of 2_1 first.
- Nothing checks the macro placement itself.
check_placementallows macro-on-macro overlap by design (Opendp::overlap: "BLOCK/BLOCK overlaps allowed"). It can only run after global placement today;check_placement -fixed_only(OpenROAD #11431, in review) is the first piece that lets it run at floorplan. pdngen -check_onlychecks the PDN configuration, not the geometry; strap-fit errors such as PDN-0185 appear only when the grid is built, in 2_4.rtl_macro_placer's own checks (MPL-0016, MPL-0050, MPL-0065) run only when it runs, and until #11491 MPL-0050 fired even when every macro was fixed.
The problem: late, misattributed failures
| Squirrel (where it surfaced, what it cost) | Cause, decidable at floorplan | Early check |
|---|---|---|
| MPL-0050 in 2_2, after 2_1's netlist work | fixed standard cells, every macro fixed | fixed upstream (#11491) |
MPL-0034: place_macro rejects rtl_macro_placer's own -write_macro_placement output (#11278) |
snap residue past the core edge | macro inside core, after snapping |
| PDN-0185 in 2_4 | core too small for the strap pitch and offset | build the grid right after macro placement |
DRT-0073 "No access point" in global route's pin_access, hours in, one pin per block |
a macro pin with no access point | pin access on macro masters at floorplan |
| GRT-0228 edge overflow in route-0 inside an 11 um channel carrying 1 198 macro-to-macro pins | channel narrower than the pins facing it need | channel capacity: pins facing a gap vs tracks in it |
| 82 minutes of diamond search in detailed placement; hours of post-CTS legalisation | channels between macros too narrow for the cells placed there | free sites vs demand per window (Hall's condition) |
| macros that overlap each other or each other's halos | placement script or plan error | macro and halo overlap |
Proposal
Add a macro placement check to floorplan.tcl that has no outputs and runs no annealing, right after initialize_floorplan and the tracks, before the stage's expensive netlist work. Macro placement itself stays where it is, in 2_2, unchanged, so QoR does not move.
The check, an OpenROAD command (check_macro_placement, in mpl):
- runs the feasibility checks
rtl_macro_placerruns before it clusters (movable cells fit in the macro placement area, MPL-0065; macro plus halo area within the floorplan, MPL-0016; fence inside the core, MPL-0068; fixed standard cells in the macro placement area when there are macros to place, MPL-0050), and nothing after them: no clustering, no annealing, no report directory; - with
-macro_placement_tcl file, sources that placement inside an odb ECO journal (dbDatabase::beginEco/undoEco, asrszalready does), soplace_macro's own validation runs on every macro, adds the checksplace_macrodoes not make (halo overlap, legal orientation for the site), and rolls back; - fails hard with a message ID, the first offenders by name and coordinate, and what to change;
FLOORPLAN_CHECKS=warnin ORFS downgrades to warnings for exploration; - leaves the ODB exactly as it found it, so 2_1's output does not change.
One source of truth: no check is written twice
A check that can disagree with the placer is a new squirrel. So check_macro_placement adds no second copy of any rule; every rule lives in one function that the placer, place_macro and the check all call:
- The feasibility checks move out of
ClusteringEngine::init()andsetFloorplanShape()(MPL-0016, 0050, 0065, 0068) into one function.rtl_macro_placercalls it where it does today;check_macro_placementcalls it and stops. - The placement rules stay in
MacroPlacer::placeMacro()(MPL-0034 inside the core, MPL-0041 no macro overlap, the Snapper). The check reaches them by sourcing the placement script, not by re-implementing them. TodayplaceMacro()tests core containment before snapping and commits the snapped position, which is howrtl_macro_placer -write_macro_placementcan write a placementplace_macrothen rejects (#11278). Testing the snapped position, in that one function, makes the check, the placer, the writer and the reader agree. - New rules (halo overlap, orientation) go into that same function, so
place_macroenforces them as well, not only the check. - In ORFS,
FLOORPLAN_CHECKSis declared once invariables.yaml, andfloorplan.tclandmacro_place.tclcall one command; neither re-implements a check in Tcl. - Tests assert the message IDs, so a check and its message cannot drift apart.
2_2 then places macros as today, and runs the same command without the ECO step after rtl_macro_placer, as a post-check, before tap cells and the power grid.
More checks join the same fail-early point as they land:
| Check | Catches | Where it belongs | When it can run |
|---|---|---|---|
| macro feasibility (MPL-0016/0050/0065/0068 without annealing) | infeasible macro sets, fixed cells in the way | mpl: check_macro_placement |
2_1, before the expensive work |
a MACRO_PLACEMENT_TCL plan: place_macro's own checks (inside core after snapping, macro overlap) plus halo overlap and orientation |
MPL-0034, MPL-0041, overlaps | mpl: check_macro_placement -macro_placement_tcl, ECO journal |
2_1 |
| fixed-instance placement legality | overlaps, off-row, off-site fixed cells | check_placement -fixed_only (#11431) |
2_1 for fixed cells; after 2_2 for placed macros |
| area budget after macros | standard cells that cannot fit at PLACE_DENSITY |
mpl, part of the feasibility checks |
2_1 |
| IO pin budget | more pins than slots on the allowed edges and layers | ppl: check before placing |
2_1 |
| power grid fits | PDN-0185 and friends | build the grid in an ECO journal and roll back, or leave it in 2_4 | 2_1 with a plan, else 2_4 |
| macro pin access | DRT-0073 | drt: pin_access limited to macro masters |
2_1 |
| channel capacity between macros | GRT-0228 | research first | after macros are placed |
| window capacity | legaliser-hours in narrow channels | dpl: the up-front Hall check |
after macros are placed |
Roadmap: one pull request per concern
OpenROAD:
check_placement -fixed_only: #11431, in review; a dependency, not ours.mpl: extract the pre-clustering feasibility checks fromClusteringEngineinto one function and addcheck_macro_placement, which calls it: no clustering, no annealing, no outputs.rtl_macro_placer's behaviour and messages are unchanged. Pass/fail tests: each check fires with its message ID; a feasible design passes; the ODB is unchanged afterwards.mpl:placeMacro()tests core containment on the snapped position (fixes #11278).mpl:check_macro_placement -macro_placement_tcl: source a placement script in an ECO journal soplace_macro's own checks run, then roll back. Tests: MPL-0034 and MPL-0041 fire through the check; the ODB is unchanged afterwards.mpl: halo overlap and orientation rules inplaceMacro(), enforced byplace_macroand therefore by the check.ppl: pin budget check before placing pins, the same ruleplace_pinsapplies.drt:pin_accesslimited to macro masters.dpl: the window-capacity (Hall) check as a command, the same function the legaliser would call.- Channel capacity between macros: research, then a proposal.
ORFS:
floorplan.tclrunscheck_macro_placement(with-macro_placement_tclwhenMACRO_PLACEMENT_TCLis set) right after the floorplan and tracks exist;FLOORPLAN_CHECKS=warndowngrades. 2_2 runs it again afterrtl_macro_placer.- Each later OpenROAD check joins the same point as it lands.
Open questions for maintainers
- The ECO journal was built for the resizer's moves; is it the right tool for rolling back a sourced placement script (
place_macro, blockages, halos), or should the check parse the script's placements instead? - Should the halo checks use
MACRO_PLACE_HALOas the flow sets it, or the halos stored on the instances? - Should a failing check be an error by default in ORFS, with
FLOORPLAN_CHECKS=warnto opt out, or the other way around for a release?
Future PRs for this roadmap refer to this issue.
🤖 Generated with Claude Code
- Lingua principale
- Verilog
- Stelle
- 3.4k
- Fork
- 1.1k
- Merge medio
- 3g 11h
- PR unite (30g)
- 245
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di The-OpenROAD-Project/OpenROAD
-
odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the ruleForse già presa @LucasYuki l’ha presa 26 giorni fa. Apertabug drt odb
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
The-OpenROAD-Project/OpenROAD#12176 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
drt: LEF58_SPACING ENDOFLINE MINLENGTH l TWOSIDES is checked one-sided (io passes the TWOEDGES flag as TWOSIDES)Forse già presa @osamahammad21 l’ha presa 26 giorni fa. Apertabug drt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
The-OpenROAD-Project/OpenROAD#12173 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
cleanup-opportunity: BUILD files never refer to mockturtle in third-partty/Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabazel enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
The-OpenROAD-Project/OpenROAD#12160 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
odb: Bazel build fails on linux/aarch64 — char fc compared to EOF in def/lef lexersForse già presa @shivarammysore l’ha presa 32 giorni fa. Apertabazel bug odb
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
The-OpenROAD-Project/OpenROAD#12095 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
syn: acd_resynth -apply segfaults on a database resynthesized in an earlier processForse di nuovo libera @povik l’ha presa 31 giorni fa e non c’è nessuna pull request aperta. Apertabug syn
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
The-OpenROAD-Project/OpenROAD#12046 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di The-OpenROAD-Project/OpenROAD
Issue simili
-
v3
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
pluginkollektiv/antispam-bee#952 ·
I maintainer di solito rispondono entro 1 giorno
-
area: middleware enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
config: reject Proxy-Authorization and Proxy-Authenticate in server headersForse già presa @haseemajaz l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
rohitgollarahalli/mcpx#38 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area: API good first issue size/xs
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
DahanItamar/DockNest#354 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100