RFC: macro timing models in stages that do no timing
I maintainer di solito rispondono entro 1 giorno
@jhkim-pii ci sta già lavorando.
Dal 1/12/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
In a hierarchical flow, the parent's floorplan, place and CTS read every macro's full liberty timing model, even when the stage times no path. With many macro pins, reading those models takes most of the stage's time and memory. In The-OpenROAD-Project/bazel-orfs#1686 the flow instead gives these stages a reduced "stub" liberty. The results are byte-identical and the stages run one to two orders of magnitude faster. That PR is a stopgap in the build layer. I'd like to find out where a proper solution belongs: OpenSTA, OpenROAD, ORFS, or a combination.
Where this hurts: routing-by-abutment tops in design space exploration
- No work for timing at the top. In this style of top, the macros abut: non-rectangular blocks whose pins meet their neighbours' pins at the shared edge. The top has no standard-cell logic to resize, and repair at the top has nothing to work on. All timing closure happens inside the blocks.
- Many pins. This style is used in large hierarchical designs (abutted-pin hierarchical design, with no routing channels between blocks), and by Rent's rule [Landman and Russo, "On a Pin Versus Block Relationship For Partitions of Logic Graphs", IEEE Trans. Computers C-20(12), 1971] larger blocks have more pins. In design space exploration the pin count grows further, because block boundaries are not yet registered and cuts are moved around between runs. Every input–output pair of a block then becomes a combinational arc in its
write_timing_modeloutput. - Models grow with inputs × outputs. A block with a few thousand pins gets a liberty file in the gigabytes. The parent's stages read every such file.
- The result. The time and memory of floorplan, place and CTS are dominated by liberty reading and timing-graph construction. The actual work takes seconds to minutes. In design space exploration this is paid on every point.
What the stopgap does (The-OpenROAD-Project/bazel-orfs#1686)
For floorplan, place and CTS, when a stage's variables say it does no timing (no timing-driven placement, no repair_timing, no useful skew, no metrics reports), the stage reads a stub of each macro's liberty. The stub keeps:
- the header, types, templates, cells, buses and pin attributes (direction, capacitance, max_transition, area, …);
- every non-combinational timing group: setup/hold/recovery/removal checks, clock-to-output arcs, min/max clock tree path;
- the first combinational arc of each timing_type per output pin. A
write_timing_modeloutput pin has one driver, so this one arc carries the pin's drive.
It drops all other combinational arcs, and all power and current groups.
Results:
- Toy test (
test/lib_stubs: two abstracts with combinational and register arcs, plus a parent): synthesis, floorplan, place and CTS.odband.sdcare byte-identical with stubs and with full models. - Large hierarchical design:
- Stubs are two orders of magnitude smaller than the models.
- Stage time drops from tens of minutes to minutes. Peak memory drops by close to an order of magnitude.
- Floorplan and CTS are byte-identical.
- Place is identical in instances, masters, locations and connectivity. Only the names of some repair_design buffers differ (see below).
What the parent's stages actually need from a macro's liberty
| need | why | what goes wrong without it |
|---|---|---|
| the cell and its pins | network, buffer_ports treats the macro as a non-buffer |
results change silently |
| output drive, input capacitance | repair_design slew/cap repair | nets the macro drives are treated as ideally driven |
| register arcs | all_registers, so the SDC's group_path/set_max_delay over registers resolve |
written SDC and repairs change |
| clock tree path groups | CTS balances against the macro's insertion delay | different clock tree |
| arc topology (which inputs relate to which outputs) | graph levels, hence repair_design's driver order and buffer names | different buffer names, same placement |
With no macro liberty at all, global placement and resize change the result and print no warning.
Where the stub approach stops
- repair_design order. Keeping one arc per output changes the levels of nets below the macro, which changes the order repair_design visits drivers in, and with it the buffer names. Keeping the whole fan-in (
related_pinlisting every input) makes the result byte-identical through global route. But OpenSTA then expands that list back into one arc set per input pair, so read time and memory return to roughly the same order as the full model. - Global route. With resistance-aware routing (the asap7 default), nets are ranked by slack. Stubs remove the paths through macros, so the route changes. With it off, global route on stubs is byte-identical. So global route is left on full models.
- SDC writing. Writing
[all_registers]back symbolically rather than expanded keeps the written.sdcindependent of the model.
Questions
- Where should this live?
- OpenSTA: read liberty lazily: cells, pins and pin attributes up front, timing tables only when a path through them is first timed. Or represent a multi-input
related_pinas one arc set that shares its tables, rather than one set per input pair. - OpenROAD: let a command or stage declare it needs no path timing, and only drive, capacitance, registers and clock insertion. Or have
write_timing_modelemit a compact model (one arc per output pin with a shared table) next to the full one. - ORFS: a documented variable that gives non-timing stages a reduced liberty for macros, with the gating conditions defined in one place, instead of in each build system.
- OpenSTA: read liberty lazily: cells, pins and pin attributes up front, timing tables only when a path through them is first timed. Or represent a multi-input
- Is "identical placement, different repair_design buffer names" acceptable for a non-timing stage? Or should a solution be byte-identical to the full models?
- Should a missing or reduced macro liberty be a hard error in stages whose result depends on it? Today the result changes silently.
- Is binary liberty enough on its own? Binary liberty reduces parse time, but the timing graph keeps the same size. Is it seen as complementary to the above, or as a replacement for it?
My goal is to retire the bazel-orfs stopgap in favour of whichever upstream mechanism the maintainers prefer.
- Lingua principale
- Verilog
- Stelle
- 3.3k
- Fork
- 1.1k
- Merge medio
- 3g 11h
- PR unite (30g)
- 247
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
-
drt: min-area patch owner search compares the origin-relative patch box with absolute shapes, so patches are droppedForse già presa @bnmfw l’ha presa 11 giorni fa. Apertabug drt
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
The-OpenROAD-Project/OpenROAD#12191 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the ruleForse già presa @LucasYuki l’ha presa 25 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 25 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