RFC: macro timing models in stages that do no timing

Aperta
#12,531 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

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

dbSta enhancement Memory rsz Runtime sta

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_model output.
  • 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_model output 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 .odb and .sdc are 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_pin listing 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 .sdc independent of the model.

Questions

  1. 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_pin as 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_model emit 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.
  2. 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?
  3. Should a missing or reduced macro liberty be a hard error in stages whose result depends on it? Today the result changes silently.
  4. 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di The-OpenROAD-Project/OpenROAD

Tutte le issue di The-OpenROAD-Project/OpenROAD

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.