Repository navigation
feat: join runset pex devices with curated parasitics by geometric net correspondence - #6882
loom-fleet-dispatch[bot] wants to merge 6 commits into
Conversation
…t correspondence klt pex --engine klayout-runset --deck <curated> runs a second, curated-deck extraction with parasitics, joins the two extractions on strictly interior metal-geometry probe points (layer-identity matched against the original stream), and merges the curated lumped R/C network into the runset leg. Unmatched nets and split/merge disagreements are disclosed in extraction.net_correspondence, never silently dropped or merged. klt signoff now refuses a parasitic-free pex leg for item 7 (unmet, no_parasitics); a merged leg that attached cards grades as a curated one. The measured decision and the refuted alternatives (boundary-point probing, device-layer roles, name-based joins) are recorded in docs/design/runset-pex-net-correspondence.md. Closes #6606
|
PR #6882's |
|
❌ Changes Requested Reviewed at The design doc is genuinely good — R1/R2/R3 are measured refutations with the numbers, not arguments, and AC 1 is met on its own terms. The join itself (strictly-interior sampling, ≥99 %-area layer identity, 1. BLOCKING — duplicate curated labels silently drop a matched net's parasitics (
|
|
PR #6882's |
|
Addressing the review findings on this PR. |
|
Addressed the five findings in the Judge review of
Local verification at this head passed 214 targeted tests. Eight real-PDK tests skipped because this checkout lacks IHP SG13CMOS5L. Ruff lint and format, type, complexity, file-size and import-boundary checks passed. Remote CI was still running at handoff. |
|
PR #6882's |
|
❌ Changes Requested Reviewed at The five findings from the previous review are all genuinely fixed, and I verified each by running the code rather than reading the response (per-finding list at the bottom). The join and the merged-leg writer are now sound: cluster identity is carried end to end, and the rewrite is scoped to the selected circuit. What blocks approval is a different class, which the previous review did not reach: three user-facing surfaces of this very route still state the pre-#6606 behaviour, and one of them contradicts a claim this PR's own documentation makes. All three are measured below. 1. BLOCKING —
|
|
PR #6882's |
…, refresh --engine help Fixes the three findings of the re-review of 2c55323: 1. `klt pex --format text` hard-coded `parasitics: none` for any runset leg. The line now renders the envelope's own `parasitics_carried` (`carried (N cards, M nets matched)`, plus the substrate return) and keeps `none` for a plain runset leg or a merged leg that attached nothing. Extracted into `_print_runset_engine`. 2. `--pdk`/`--pdk-root` were silently dropped on the merged route: `run_extract_leg` did not forward them and `merged_runset_extract`'s hand-built refusal dict had no keys for them. Both are now forwarded and refused by name, as docs/cli/pex.md already promised. 3. `--engine` help (and its tracked snapshot) still said the leg has no parasitics and that `--deck` is refused. Reworded, with the same correction to the `--deck` and `--label-layer` help, which changed meaning under this engine, and to two developer docstrings that repeated the pre-#6606 statement. Tests written first and observed red: merged-route refusal of `--pdk`/`--pdk-root` (with `--deck-option`/`--critical-net` as controls) and the three text-line cases. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
🩺 Doctor handoff — per-finding status at Source: the Judge re-review of
Same class, beyond the cited lines (all in this PR's changed files):
Tests, written first and seen red: merged-route refusal of Local verification at this head: CI was still running at hand-off. The Python test jobs take 25–30 minutes and had not settled when I handed back; I have not read a final result. This list is evidence only; Judge decides independently whether each finding is resolved. |
|
PR #6882's |
The options list still carried the pre-#6606 rule ("--deck ... under --engine klayout-runset, where it is refused by name") and the unconditional "no parasitics" pointer, both of which this PR makes false and which contradict the file's own "Runset engine" section. Measured at this head: `klt pex --engine klayout-runset --deck sg13cmos5l --deck-file <f>` is accepted and runs the merged route; only --pdk/--pdk-root are refused by name. Fixed during evaluation (docs only, no behavior change). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Judge: review in progress. The three findings of the |
Summary
klt pex --engine klayout-runset --deck <curated>(issue #6606) closes the T1-item-7 gap for runset-only device families: it runs the runset leg for devices, a second curated-deck extraction with parasitics, joins the two extractions by a measured geometric net correspondence, and merges the curated lumped R/C network into the runset leg's netlist. A net that cannot be matched 1:1 is listed in machine-readable form (extraction.net_correspondence), never silently dropped or silently merged; a connectivity disagreement between the two engines (split/merge) is detected and reported, not compared.klt signoffnow refuses a parasitic-free pex leg for item 7 (unmet, reasonno_parasitics); a merged leg that attached cards disclosesparasitics_carried: trueand grades exactly as a curated one (AC 4, decided in the design doc).Changes
src/klayout_tools/pex_net_correspondence.py(new): the join — strictly-interior point sampling of the runset database's per-net metal geometry (polygons_of_netoff the preserved.lvsdb), metal-role layer identity (≥99 % by area inside a curated metal GDS layer), curated point→net resolution through the existing--probemachinery, and the matched/unmatched/split/merge classification.src/klayout_tools/pex_merged_leg.py(new): the merged-leg writer (node renames preferring named runset nets, one lumped series R + ground C + coupling + substrate tie per matched net, in-place rewrite preserving pin order) and the route driver.src/klayout_tools/pex_runset.py:run_extract_leg— the extracted leg's engine dispatch (curated / runset / merged), moved here frompex.py's call site (the module's docstring already claimed ownership of the option mapping; the move also keepspex.pyunder its file-size ratchet).extraction_fieldsgainsnet_correspondenceand flipsparasitics_carriedfor merged legs.src/klayout_tools/extract_runset.py:lvsdb_out(internal) preserves the runset database for the join.src/klayout_tools/signoff.py+signoff_pex_disclosure.py: theno_parasiticsitem-7 gate (parasitic_free_refusal), reading the envelope's own disclosure verbatim.docs/design/runset-pex-net-correspondence.md(new): the AC 1 measured decision — M1–M3 what each side provides, R1–R3 the refuted alternatives (boundary points, device-layer roles, anonymous internal layers), the landed rule, measured outcomes per layout, and the AC 4 ruling.docs/cli/pex.md,docs/cli/extract.md,docs/cli/signoff.md,docs/design-evidence-tiers.md: the merged route, its refusals, its envelope fields, and theno_parasiticsreason.Acceptance Criteria Verification
docs/design/runset-pex-net-correspondence.mdrecords the decision with the measurements (every number from local runs onihp-sg13cmos5l, KLayout 0.30.12: thepnpMPAtestcase and the repo's sg13cmos5l inverter fixture), including the refuted alternatives. ✅test_labelled_and_unlabelled_nets_both_match_and_get_parasitics); unmatched nets appear inextraction.net_correspondence.unmatched_runset_nets/unmatched_curated_nets; a merge disagreement poisons both fragments (test_a_merge_disagreement_is_reported_never_guessed,test_correspondence_classifies_every_outcome). ✅disagreements: [{kind: split|merge, ...}]in the envelope; asserted for both directions with deliberately-disagreeing extractions. ✅unmet/no_parasitics(test_item_7_refuses_a_parasitic_free_runset_leg), merged legs grade as curated ones (test_item_7_accepts_a_merged_runset_leg); documented insignoff.md("no_parasiticsvs. all of them"), the design doc, anddesign-evidence-tiers.mditem 7. ✅Test Plan
tests/test_pex_net_correspondence.py(new, 9 tests): the issue's Test Plan end to end on a faked-runset layer over the repo's own sg13cmos5l inverter fixture — labelled and unlabelled (anonymous) nets both matched with parasitics attached; a deliberately-split net (metal joins removed) flagged as merges, never guessed; a deliberately-wrong join (diffusion bridged to gate) flagged as splits; pure-unit coverage ofcorrespondence/preferred_renames/merge_parasitics; one skip-gated real-PDK test pinning the measuredpnpMPAoutcome (curated leg empty → total mismatch honestly reported).tests/test_pex_runset*.py:--deckunder the runset engine now runs the merged route (previously refused); signoff item-7 refusal/acceptance; CLI envelope.tests/test_pex.py: threerun_extract-wrapping tests re-targeted to the new dispatch site (pex_runset.run_extract_leg, klt pex runset route: no net correspondence, so runset-recognised devices get no parasitics (follow-up of #6559) #6606).check_file_size_baseline(OK),check_import_boundaries(7711 imports OK),check_type_baseline(OK), doc-pointer/help-snapshot tests, and the fulltest_pex*/test_signoff*/test_extract_runset*suites. CI runs the full suite (build gate: fast preflight only here).klt pex --engine klayout-runset --deck sg13cmos5l --extract-onlyon IHP'spnpMPAtestcase and on the inverter fixture — both envelopes behave exactly as the design doc's measured-outcomes table records (parasitics_carriedtrue with 3 matches/7 cards on the inverter; the honest total-mismatch degeneration onpnpMPA).TDD: the join was measured first (prototype scripts against the real PDK runset + curated engine — the numbers are in the design doc), then the failing-by-design disagreement tests (merge/split knobs in the fake runset) were written against the prototype's behavior, then the implementation landed to green.
Closes #6606
loom dashboard