Skip to content

pex: accuracy of ends, pads and pins against the field solver - #12404

Draft
maliberty wants to merge 12 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:pex-validation
Draft

maliberty wants to merge 12 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:pex-validation

Conversation

@maliberty

Copy link
Copy Markdown
Member

Accuracy work on pex against the fsv field solver. On 200 sampled nets each of sky130hd gcd and aes, extraction now meets the accuracy target on both designs: 94% (gcd) and 90% (aes) of totals are within 5%, and 94% and 92% of the couplings to other signal nets above 5% of a net's total are within 20%.

  • Patterns as a design. make_patterns.py lays out the experiments' patterns on sky130hd as a DEF, each case repeated at 90 degrees, so pex_patterns extracts them with extract_pex, checks each net against its rotated copy, and compares a few nets with the field solver.
  • A via's pads counted once. Overlapping pads of a net on one layer that nearly fill their bounding box merge into one box. A square box is estimated along each axis and takes the mean. Where a pad overlaps another box of its net, the wider of the two counts the overlap.
  • A neighbor ending at a line end. The end tables' neighbors run past the end. A neighbor that ends where the wire does now takes that end, however far it runs past. Before, its share was scaled by how far it runs past, so a neighbor ending with the wire counted as none. Experiment group e20 measures the end against the wire's length and the neighbors' end states.
  • Instance pins as context. Pins stay in the field but don't count toward their net, since the cells' timing models already hold that capacitance.
    • In extraction, a pin never counts an overlap and never joins a line end, and coupling to another net's pin goes to ground.
    • In compare_pex_fsv, a net's own pins become a separate conductor in the field solve, trimmed clear of its routing. Their coupling comes off the net's total, and other nets' pins are grounded.
  • Ends of neighbors. A wire running past the end of a neighbor on another net now couples to that end, as the end table already did from the neighbor's side. The coupling comes off the wire's ground. A short pad beside a wire couples at both its ends, and both nets see the same coupling. This fixes the largest coupling misses, which were 30–60% low.
200 nets gcd aes
model alone: totals within 5% 86% 88%
model alone: signal couplings above 5%, within 20% 92% 90%
extraction: totals within 5% 94% 90%
extraction: total error, median +0.8% +0.5%
extraction: total error, 90th percentile 4.4% 5.3%
extraction: signal couplings above 5%, within 20% 94% 92%

The README lists what remains:

  • Coupling to the supplies is 11–16% high, because a narrow strap is looked up as a full plane.
  • The substrate takes 3–5 times what the field solver gives it.
  • Crossing arrays and isolated via stacks still need work.

make_patterns.py lays out the experiments' patterns on sky130hd as a
DEF, generated at build time: a wire whose cover and neighbor change
along it (e1), crossing arrays at two coverages (e2), short wires and
facing line ends (e3), several neighbors and a wide neighbor (e4),
different spacings on the two sides (e6), vias at a wire's end and
middle (e8), and a jog onto the non-preferred direction. Each case
appears again rotated by 90 degrees, where every wire runs in its
layer's non-preferred direction.

pex_patterns checks that each net extracts the same as its rotated copy
and compares a few nets with the field solver. The via stack in e8 is
the one case that differs: its square met3 pad runs along x in both
orientations, so when rotated it crosses the other pad and its line
ends count.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Three changes to how a net's own overlapping shapes are counted, found
with the rotated copies of the patterns:

- Overlapping pads of a net on one layer (boxes less than twice as long
  as wide) whose union nearly fills their bounding box are merged into
  it, so a via stack's two pads are one shape with two ends.
- A square box has no long axis; it is estimated along each axis and
  takes the mean, so a design and its rotation extract the same.
- Where a pad overlaps another box of its net, the wider of the two
  counts the overlap, rather than the longer. A wire under a wider via
  pad no longer counts the span the pad covers as well.

Against the field solver with the sky130hd model, a via in a wire's
middle goes from +3.8% to +2.2%, one at its end from +4.3% to +3.0%,
and the e8 via stack from +8.5% (+19.3% rotated) to +8.7% (+9.7%).
On 200 nets each the median error moves from +2.3% to -2.0% (aes) and
+2.4% to -1.8% (gcd): the double-counted overlaps were hiding line
ends that are 12-15% low on wires of 10 µm and more.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
The end tables' neighbors run past the end, and the evaluator scaled a
neighbor's share of the end by how far it runs past, so a neighbor
ending where the wire does counted as none. The field solver puts that
end below both: 15-18% under neighbors running past on met1-met4, and
further under no neighbor. A neighbor at the end now takes the end with
it, however far it runs past.

Experiments group e20 measures the end against the wire's length and
its neighbors' end states: with a cover or a neighbor near, the end
measured on a 2 um wire is settled; alone with no cover it still grows
15-25% from 2 to 10 um.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
A cell's library timing model already counts the capacitance of its pin
metal, so extraction counting the pin shapes again doubled it. The pins
stay in the extraction as neighbors and covers: a net's routing ends on
its pins without counting them, a pin never takes the overlap of a wire
of its net nor joins a line end, and coupling to another net's pins goes
to ground.

The field-solver check matches: readNetWindow gains pins_as_context,
which grounds the neighbors' instance pins with the obstructions and puts
each target's own pins in a net of their own, trimmed clear of its
routing (vias landing on them included) by the layer's spacing. The
target's total leaves out its coupling to that net, which is at its
potential. compare_pex_fsv and the e9 experiments use it.

On 200 sampled nets with the sky130hd model, compare_pex_fsv puts 88%
(gcd) and 90% (aes) of totals within 5%, medians +0.4% and -0.2%; e9,
the model alone, 86% and 88%, where the pins counted in the net gave
72% and medians of -1.6% and -2.5%.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
The end tables give a line end's coupling to a neighbor running past it,
and the evaluator gave it to the wire that ends only. Seen from the
neighbor running past, the end beside it added nothing, so a short pad
beside a wire, which is two ends, coupled at the overlap only: the
largest coupling misses were 30-60% low. Extraction averaged the two
views and kept half.

A wire now couples to each end of a neighbor of another net that it
runs past, with the neighbor's width, the gap, the wire's covers there
and the neighbor's other side open, unless the neighbor's net continues
it. The coupling comes off the wire's ground, which drew that field in
the tables' open-sided pieces past the end.

On 200 sampled nets each of sky130hd gcd and aes, the signal couplings
above 5% of a net's total within 20% go from 84%/85% to 92%/90% for the
model alone and from 83%/81% to 94%/92% in extraction; the totals
within 5% stay at 86%/88% for the model alone and are 94%/90% in
extraction.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@maliberty maliberty self-assigned this Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@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 support for treating instance pins as context during parasitic extraction and field solver validation, preventing double-counting of their capacitance. It also adds a pad-merging feature for via stacks, improves square box estimation by averaging along both axes, and implements reciprocity-based coupling for lateral neighbor ends. Additionally, a new test pattern generator and regression tests are introduced. The reviewer identified a bug in the square box estimation logic where r.xCenter() is incorrectly used for both horizontal and vertical axis estimations, and suggested using r.yCenter() when estimating along the vertical axis.

Comment thread openroad/pex/src/Evaluator.cpp Resolved
- A neighbor's end takes no more of the wire's ground than the wire has,
  and none where a longer box of the net counts the wire; its end span
  stays within the wire.
- The model-table check skips instance pins, which are not measured.
- estimate() leaves pins out of the pad merge, as extraction does.
- NetWindow skips the trim for a target with no instance pins.
- American spelling in the new NetWindow comments.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Drop nested conditional operators and add trailing commas.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
The golden follows report_net's new capacitance range format.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant