De-dup verify passes: drive analyze screen + dashboard from app::verify.

The analyze Issues pane and the dashboard Health rows each recomputed the
same verify passes inline (pin-role mismatches, Power/Gnd net-mix, NC orphan
rollup, model-driven checks) — the third and second copies of what the verify
command also did. Route both screens through app::verify(System*) instead, so
the passes live in exactly one place.

Enrich VerifyReport with a per-pin OrphanPin detail list (module/part/pin +
dropped flag) so the dashboard can still nest its dropped-singleton breakdown
under the NC health line without re-walking modules/parts/pins. Output is
unchanged in both screens (same label formats, same numbers).

Prune the now-dead includes (nets/bsdl_check/connect/parts/pins as applicable,
<unordered_set>) from both screens. Extend tests/test_verify.cpp to cover the
new orphans detail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 20:04:31 +02:00
parent e3350b8d95
commit 25939998ab
5 changed files with 82 additions and 134 deletions

View File

@@ -80,10 +80,17 @@ VerifyReport verify(System *sys)
Pin *pin = nkv.second;
if (pin->signal() || bridged_pins.count(pin))
continue;
if (pin->nc_origin == NcOrigin::ImportedUnconnected)
bool dropped;
if (pin->nc_origin == NcOrigin::ImportedUnconnected) {
++r.orphan_imported;
else if (pin->nc_origin == NcOrigin::DroppedSingleton)
dropped = false;
} else if (pin->nc_origin == NcOrigin::DroppedSingleton) {
++r.orphan_dropped;
dropped = true;
} else {
continue;
}
r.orphans.push_back({mkv.first, pkv.first, nkv.first, dropped});
}
// Passes 4-7 — model-driven checks (reuse the nets from pass 2).

View File

@@ -26,6 +26,13 @@ struct NetInconsistency {
std::vector<Member> members;
};
// One orphan pin: no signal and not bridged via a connection. `dropped` is true
// for a dropped singleton (essim detached it), false for an import-time NC.
struct OrphanPin {
std::string module, part, pin;
bool dropped = false;
};
// The full result of `verify`: structured data only — no strings beyond the
// names, no formatting. Frontends (the verify command, the analyze screen, the
// dashboard) render it however they like.
@@ -39,6 +46,7 @@ struct VerifyReport {
int orphan_imported = 0;
int orphan_dropped = 0;
std::vector<OrphanPin> orphans; ///< per-pin detail (both origins)
std::vector<Anomaly> pin_anomalies; ///< check_pin_specs
std::vector<Anomaly> jtag_anomalies; ///< check_jtag_chain