From 627db2eba6df45cae83129aa246d0e4e7be20270 Mon Sep 17 00:00:00 2001 From: Michele Bigi Date: Wed, 23 Sep 2026 06:30:28 +0200 Subject: [PATCH] USB/RMII cert lines and not_reviewed count fix (2.85.0). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit USB D+/D− is one English certified/not-certified line vs the packed 90 Ω cite. RMII ETH_RXD/TXD/TXEN is identified as PHY–MAC, not RJ45 100 Ω. J2 missing-field L1/L2/L3 noise is silent. PCB AI failures go to review_errors; not_reviewed count matches one designator per row. --- .../src/backend/periscopex/af_trace_check.py | 98 ++++- .../src/backend/periscopex/pcb_checks.py | 57 ++- .../src/backend/periscopex/protocol_l1.py | 11 +- .../src/backend/periscopex/protocol_l2.py | 343 ++++++++++++++++-- .../src/backend/periscopex/protocol_l3.py | 27 +- .../src/backend/periscopex/protocol_report.py | 26 +- periscope/src/backend/periscopex/si_check.py | 47 ++- .../src/backend/services/pcb_pipeline.py | 32 +- .../src/backend/services/pcb_validation.py | 25 +- periscope/src/frontend/content/changelog.md | 13 + .../app/(app)/project/[id]/report/page.tsx | 5 +- .../components/report/protocol-section.tsx | 8 + .../frontend/src/lib/protocol-report.test.ts | 2 +- tests/pcb/test_af_trace_check.py | 6 +- tests/pcb/test_bom_esd_ep_cc_eth.py | 12 +- tests/pcb/test_j2_usb_cert_line.py | 134 +++++++ tests/pcb/test_not_reviewed_count.py | 131 +++++++ tests/pcb/test_pcb_review.py | 3 +- tests/pcb/test_protocol_l1_m3.py | 3 +- tests/pcb/test_protocol_l2_m4.py | 22 +- tests/pcb/test_protocol_l3_m9.py | 43 +-- tests/pcb/test_protocol_report_m5.py | 19 +- tests/pcb/test_rmii_cert_line.py | 110 ++++++ 23 files changed, 1030 insertions(+), 147 deletions(-) create mode 100644 tests/pcb/test_j2_usb_cert_line.py create mode 100644 tests/pcb/test_not_reviewed_count.py create mode 100644 tests/pcb/test_rmii_cert_line.py diff --git a/periscope/src/backend/periscopex/af_trace_check.py b/periscope/src/backend/periscopex/af_trace_check.py index 22efa72..af7c3db 100644 --- a/periscope/src/backend/periscopex/af_trace_check.py +++ b/periscope/src/backend/periscopex/af_trace_check.py @@ -27,7 +27,7 @@ from backend.periscopex.impedance_traces import analyze_specified_nets from backend.periscopex.models import DesignGraph, Finding, LayoutGraph, LayoutVia from backend.periscopex.pcb_net_match import kicad_nets_match, refs_on_matched_net from backend.periscopex.protocol_catalog import load_catalog -from backend.periscopex.si_check import bus_class, partner_net +from backend.periscopex.si_check import bus_class, partner_net, phy_mac_kind, single_ended_eth_mac log = logging.getLogger(__name__) SOURCE = "af_trace_check" @@ -55,6 +55,8 @@ def _mdi_mate(name: str) -> str | None: def _is_eth_mdi_net(net: str) -> bool: + if single_ended_eth_mac(net): + return False return bus_class(net) == "eth_mdi" @@ -162,8 +164,8 @@ def _ethernet_mdi_finding( label = _label(unit) if cite is None: text = ( - f"ERROR: Ethernet pair {label} speed is not identified on the " - "PHY/jack, so no 10/100 or 1000 clause was applied." + f"Ethernet not certified — because the speed on {label} is not " + "identified on the PHY/jack, so no cited clause was applied." ) req = "Pair Z is certified only against the cited clause for the identified speed." rec = "Identify the PHY/jack speed. No ohm value is assumed." @@ -185,12 +187,12 @@ def _ethernet_mdi_finding( missing.append("geometry") miss = "/".join(missing) text = ( - f"ERROR: pair Z for {label} cannot be calculated from the PCB " - f"({miss} missing). Cited limit {limit:g} Ω, {cite_label}." + "Ethernet not certified — because Z cannot be calculated from the " + f"PCB stackup/geometry ({miss} missing). Cited {limit:g} Ω ({cite_label})." ) rec = ( f"Pair Z was not calculated ({miss} missing). " - f"Cited limit {limit:g} Ω, {cite_label}." + f"Cited {limit:g} Ω ({cite_label})." ) return _finding( rule_id="PE-AF-002", unit=unit, finding=text, @@ -202,10 +204,10 @@ def _ethernet_mdi_finding( inside = abs(measured - limit) <= 1e-6 * max(1.0, abs(limit)) if inside: text = ( - f"PASS: {label} pair Z {measured:g} Ω is inside the cited limit " - f"{limit:g} Ω, {cite_label}." + f"Ethernet certified — calculated Z {measured:g} Ω vs cited " + f"{limit:g} Ω ({cite_label})." ) - rec = f"Pair Z matches {limit:g} Ω ({cite_label})." + rec = f"Calculated pair Z matches cited {limit:g} Ω ({cite_label})." return _finding( rule_id="PE-AF-002", unit=unit, finding=text, facts=f"nets={label}; speed={speed}; Z={measured:g} Ω; limit={limit:g} Ω.", @@ -214,11 +216,11 @@ def _ethernet_mdi_finding( calculation=f"pair Z {measured:g} Ω compared to {limit:g} Ω.", ) text = ( - f"FAIL: {label} pair Z {measured:g} Ω is outside the cited limit " - f"{limit:g} Ω, {cite_label}." + f"Ethernet not certified — because Z {measured:g} Ω is outside cited " + f"{limit:g} Ω ({cite_label})." ) rec = ( - f"Pair Z {measured:g} Ω is outside {limit:g} Ω ({cite_label})." + f"Calculated pair Z {measured:g} Ω is outside cited {limit:g} Ω ({cite_label})." ) return _finding( rule_id="PE-AF-002", unit=unit, finding=text, @@ -244,8 +246,16 @@ def check_af_traces( if f.rule_id == "PE-SI-002" and f.net } zrows = _z_rows(impedance_nets) + rmii_nets: list[str] = [] for unit in _coalesce_eth_pairs(list(iter_af_units(layout, graph))): + if any(single_ended_eth_mac(n) or phy_mac_kind(n) == "rmii" for n in unit.nets): + if not any(_is_eth_mdi_net(n) for n in unit.nets): + rmii_nets.extend(unit.nets) + continue if unit.bus == "eth_mdi": + if any(single_ended_eth_mac(n) for n in unit.nets): + rmii_nets.extend(unit.nets) + continue out.append(_ethernet_mdi_finding(graph, layout, unit)) continue trig = evaluate_trigger(graph, constraints_map, layout, unit) @@ -255,10 +265,65 @@ def check_af_traces( if not trig.af: continue out.extend(_analyze_triggered(graph, constraints_map, layout, trig, zrows, seen_si_z)) + if rmii_nets: + out.append(_rmii_cert_finding(graph, rmii_nets)) complete_findings(out) return out +def _rmii_cert_finding(graph: DesignGraph, nets: list[str]) -> Finding: + """One line: PHY–MAC is RMII/MII, not RJ45 100 Ω. No invented ohm.""" + uniq = sorted({n for n in nets if n}) + label = " / ".join(uniq[:6]) + (" / …" if len(uniq) > 6 else "") + kinds = {phy_mac_kind(n) or "rmii" for n in uniq} + if kinds == {"mii"}: + iface = "MII" + elif "rgmii" in kinds and "rmii" not in kinds: + iface = "RGMII" + else: + iface = "RMII" + phy_refs = sorted({ + ref + for net in uniq + for ref in refs_on_matched_net(graph, net) + if (graph.components.get(ref) or None) is not None + and "LAN8720" in ( + (graph.components[ref].mpn or "") + (graph.components[ref].value or "") + ).upper() + }) + host = phy_refs[0] if phy_refs else "layout" + text = ( + f"{iface} certified — {label} identified as single-ended {iface} PHY–MAC " + "(not an RJ45/MDI 100 Ω differential pair). No invented ohm." + ) + rec = ( + f"Keep {iface} as single-ended PHY–MAC. Do not apply the MDI 100 Ω pair cite." + ) + return Finding( + designator=host, + mpn="", + aspect="si", + finding=text, + facts=f"nets={label}; interface={iface}; phy={','.join(phy_refs) or '—'}.", + requirement=( + f"{iface} data/enable nets are single-ended MAC–PHY. " + "They are not certified against the RJ45/MDI 100 Ω clause." + ), + inference="Interface class from net names and PHY on the nets. No Z invented.", + why=text, + status="INFO", + recommendation=rec, + action=rec, + source=SOURCE, + rule_id="PE-AF-003", + finding_class="INFO", + provenance="TYPICAL", + evidence_status="SUFFICIENT", + net=uniq[0] if uniq else None, + pins=[], + ) + + def _z_rows(impedance_nets: list[dict] | dict | None) -> list[dict]: raw = impedance_nets if isinstance(impedance_nets, dict): @@ -272,12 +337,15 @@ def _label(unit: AfUnit) -> str: def _skip(unit: AfUnit, missing: tuple[str, ...], extra: str = "") -> Finding: miss = ", ".join(missing) - text = f"Pista ad alta frequenza non controllata per mancanza di {miss}." + text = ( + f"HF not certified — because {miss} is missing on {_label(unit)}. " + "No invented ohm." + ) if extra: text = f"{text} {extra}".strip() rec = ( - f"Fornire {miss} dal datasheet o dallo stackup KiCad. " - "Non si assume 50 Ω o 90 Ω." + f"Provide {miss} from the datasheet or KiCad stackup. " + "50 Ω or 90 Ω is not assumed." ) return Finding( designator="layout", diff --git a/periscope/src/backend/periscopex/pcb_checks.py b/periscope/src/backend/periscopex/pcb_checks.py index 054d5a5..70cf9e5 100644 --- a/periscope/src/backend/periscopex/pcb_checks.py +++ b/periscope/src/backend/periscopex/pcb_checks.py @@ -149,6 +149,52 @@ def check_pcb_derating(graph: DesignGraph) -> list[Finding]: return out +def _expand_not_reviewed(rows: list) -> list[dict]: + """One designator per entry. Comma-joined refs become separate rows.""" + out: list[dict] = [] + for row in rows: + if not isinstance(row, dict): + continue + raw = str(row.get("designator") or "").strip() + reason = str(row.get("reason") or "").strip() or "not reviewed" + if not raw: + continue + parts = [p.strip() for p in raw.replace(";", ",").split(",") if p.strip()] + if not parts: + parts = [raw] + for ref in parts: + out.append({"designator": ref, "reason": reason}) + return out + + +def _merge_not_reviewed( + schema_nr: list, + pcb_nr: list, + covered: set[str], + review_errors: dict[str, str] | None = None, +) -> list[dict]: + """Dedupe by designator. Drop ICs that were reviewed. Count == list length. + + Legacy ``pcb_review error`` rows move into ``review_errors`` when possible + and are not kept as not-reviewed. + """ + errors = review_errors if review_errors is not None else {} + merged: dict[str, str] = {} + for row in _expand_not_reviewed(list(schema_nr or []) + list(pcb_nr or [])): + ref = row["designator"] + if ref in covered: + continue + reason = row["reason"] + if reason == "pcb_review error": + errors.setdefault(ref, "pcb_review error") + continue + prev = merged.get(ref) + if prev and prev != "pcb_review error" and reason == "pcb_review error": + continue + merged[ref] = reason + return [{"designator": k, "reason": merged[k]} for k in sorted(merged)] + + def merge_schema_pcb_reports( schema: dict | None, pcb: dict | None, ) -> dict | None: @@ -189,10 +235,17 @@ def merge_schema_pcb_reports( if st in summary: summary[st] = summary.get(st, 0) + 1 out["summary"] = summary + covered = set((schema or {}).get("coverage") or {}) | set((pcb or {}).get("coverage") or {}) + schema_err = dict((schema or {}).get("review_errors") or {}) + pcb_err = dict((pcb or {}).get("review_errors") or {}) + merged_err = {**schema_err, **pcb_err} schema_nr = list((schema or {}).get("not_reviewed") or []) pcb_nr = list((pcb or {}).get("not_reviewed") or []) - if schema_nr or pcb_nr: - out["not_reviewed"] = schema_nr + pcb_nr + out["not_reviewed"] = _merge_not_reviewed(schema_nr, pcb_nr, covered, merged_err) + if merged_err: + out["review_errors"] = merged_err + elif "review_errors" in out and not out["review_errors"]: + out.pop("review_errors", None) return out diff --git a/periscope/src/backend/periscopex/protocol_l1.py b/periscope/src/backend/periscopex/protocol_l1.py index 1df30f4..73a5a7a 100644 --- a/periscope/src/backend/periscopex/protocol_l1.py +++ b/periscope/src/backend/periscopex/protocol_l1.py @@ -4,7 +4,9 @@ Skew is compared only when the constraint is NUMERIC (length unit) or an explicit DESIGN LIMIT. Otherwise UNKNOWN / CONTROLLER_DEPENDENT / PHY_DEPENDENT / VENDOR_DEPENDENT. Length is not delay. Not electrical. RECOMMENDED never FAIL. Internal interfaces are NOT_APPLICABLE. -Missing DQ/DQS grouping or missing PCB geometry is a visible skip, not PASS. +Missing DQ/DQS grouping is a visible skip, not PASS. A geometric check +with no NUMERIC or DESIGN millimetre limit does not warn: the standard +did not set a mm limit, and one is not invented. """ from __future__ import annotations @@ -497,11 +499,14 @@ def l1_findings(inst: PhysicalBusInstance, results: list[L1CheckResult]) -> list finding = f"L1 geometric {r.check}: {r.notes}" elif skip_family: grouping = "grouping" in (r.notes or "").lower() or "dq/dqs" in (r.notes or "").lower() + if not grouping and r.limit_mm is None: + # No NUMERIC/DESIGN millimetre limit in the pack. Silence. + continue rule_id = "PE-PRT-L1-002" if grouping else "PE-PRT-L1-001" status = "WARNING" finding = r.notes or ( - f"Interfaccia {inst.physical_interface_id} non certificata a L1 " - f"per {r.check} ({r.result}). Not electrical." + f"{inst.physical_interface_id} L1 {r.check} is {r.result}. " + "Geometric only, not electrical." ) else: rule_id = "PE-PRT-L0-002" diff --git a/periscope/src/backend/periscopex/protocol_l2.py b/periscope/src/backend/periscopex/protocol_l2.py index 30f9af1..a6ff93c 100644 --- a/periscope/src/backend/periscopex/protocol_l2.py +++ b/periscope/src/backend/periscopex/protocol_l2.py @@ -1,21 +1,23 @@ """M4: L2 ELECTRICAL protocol certifier. Z, termination, levels, rise/fall. -Z only from datasheet / stackup / fabricator / cited pack — never invented -90 Ω USB. USB-IF/IEEE numbers only if the pack has a cite. Silicon cross is -max PCB × PHY subset when datasheet windows exist. Length is not delay. -Not L3 / OpenEMS. L0/L1 are not electrical certification. -RECOMMENDED never FAIL. MISSING_SOURCE / UNKNOWN when cite is absent. -Visible skip (PE-AF-002 style) when Z cannot be obtained. +Z only from datasheet / stackup / fabricator / cited pack. USB 2.0 HS +D+/D− pair Z is compared to the packed ``pcb_trace_nominal_zdiff`` +(RECOMMENDED). That number is not invented here and is not a MANDATORY +FAIL. Silicon cross is max PCB × PHY subset when datasheet windows exist. +A missing field (termination cite, rise/fall, return path, voltage) does +not emit a warning. Length is not delay. Not L3 / OpenEMS. """ from __future__ import annotations +import math from typing import Any, Literal from pydantic import BaseModel, Field from backend.periscopex.constraints_lookup import match_constraints from backend.periscopex.finding_engine import complete_finding +from backend.periscopex.impedance import GeometryError, TraceGeometry, coupled_diff_z from backend.periscopex.models import ( ComponentConstraints, ComponentType, @@ -23,7 +25,6 @@ from backend.periscopex.models import ( Finding, LayoutGraph, ) -from backend.periscopex.pcb_net_match import kicad_nets_match from backend.periscopex.protocol_catalog import ( PhysicalInterface, ProtocolCatalog, @@ -31,8 +32,10 @@ from backend.periscopex.protocol_catalog import ( load_catalog, map_protocol_outcome, ) +from backend.periscopex.pcb_net_match import kicad_nets_match from backend.periscopex.protocol_l0 import _constraint_for, _mandatory from backend.periscopex.protocol_recognize import PhysicalBusInstance +from backend.periscopex.si_check import single_ended_eth_mac PACK_MACROPHASE = "M4" SOURCE = "protocol_l2" @@ -81,6 +84,8 @@ class L2CheckResult(BaseModel): notes: str = "" finding_class: str = "" status: str = "" + # "" legacy, "silent" no finding, "warn" one WARNING, "error" one ERROR. + emit: str = "" def _pack( @@ -95,6 +100,7 @@ def _pack( limit_ohm_max: float | None = None, value_kind: str = "", notes: str = "", + emit: str = "", ) -> L2CheckResult: if result == "FAIL" and mandatory != "MANDATORY": result = "WARNING" @@ -120,6 +126,7 @@ def _pack( notes=notes, finding_class=cls, status=status, + emit=emit, ) @@ -286,6 +293,24 @@ def _pack_ohm_window(cons: ProtocolConstraint | None) -> tuple[float, float] | N return None +_NOISE_CHECKS = frozenset({ + "differential_impedance", + "impedance", + "impedance_if_required", + "termination", + "cc_termination", + "voltage", + "levels", + "rise_time", + "fall_time", + "timing", + "return_path", + "magnetics", + "phy_requirements", + "ac_coupling", +}) + + def _skip_z(check: str, mand: MandatoryClass, inst: PhysicalBusInstance, kind: str) -> L2CheckResult: return _pack( check, "UNKNOWN" if kind not in { @@ -294,10 +319,10 @@ def _skip_z(check: str, mand: MandatoryClass, inst: PhysicalBusInstance, kind: s } else kind, mand, value_kind=kind, + emit="silent", notes=( - f"Interfaccia {inst.physical_interface_id} non certificata a L2 " - f"per mancanza di Z (datasheet/stackup/fab/cited pack). " - f"Not USB/IEC folklore. L0/L1 are not electrical certification." + f"{inst.physical_interface_id} has no cited Z window " + "(datasheet, stackup, fabricator, or pack). Not a warning." ), ) @@ -349,8 +374,8 @@ def _run_l2_check( "differential_impedance", "impedance", "impedance_if_required", }: return _z_check( - check, mand, cons, kind, inst, graph, nets, - constraints_map, impedance_nets, + check, mand, cons, kind, inst, iface, graph, nets, + constraints_map, impedance_nets, layout, ) if check in {"termination", "cc_termination"}: @@ -362,10 +387,10 @@ def _run_l2_check( if check in {"rise_time", "fall_time", "timing"}: return _pack( check, "UNKNOWN" if kind in {"NUMERIC", "UNKNOWN", ""} else kind, mand, - nets=nets, value_kind=kind, + nets=nets, value_kind=kind, emit="silent", notes=( - "Length is not delay. Rise/fall/timing UNKNOWN without a cited " - "time source (no tpd invented from mm). Not L3." + "Length is not delay. Rise/fall/timing stays UNKNOWN without a cited " + "time source (no tpd invented from mm). Not L3. Not a warning." ), ) @@ -374,27 +399,234 @@ def _run_l2_check( if verdict == "NUMERIC": verdict = "UNKNOWN" return _pack( - check, verdict, mand, nets=nets, value_kind=kind, + check, verdict, mand, nets=nets, value_kind=kind, emit="silent", notes=( - f"{check} not certified without a cited electrical source. " - f"Not invented. L0/L1 are not electrical certification." + f"{check} has no cited electrical source. " + "Not invented. Not a warning." ), ) return _pack(check, "UNKNOWN", mand, value_kind=kind, notes="Not an L2 electrical check.") +def _pcb_zdiff_cite(iface: PhysicalInterface) -> ProtocolConstraint | None: + """Packed board Zdiff recommendation. Never a number typed in this module.""" + for c in iface.constraints: + if c.parameter != "pcb_trace_nominal_zdiff": + continue + if c.value_kind != "NUMERIC" or c.value is None: + continue + unit = (c.unit or "").strip().lower() + if unit not in _OHM_UNITS: + continue + return c + return None + + +def _usb_dp_dm(inst: PhysicalBusInstance) -> tuple[str, str] | None: + for g in inst.groups: + if g.kind != "DIFFERENTIAL_PAIR" or len(g.nets) < 2: + continue + dp = g.roles.get("D+") or g.nets[0] + dm = g.roles.get("D-") or g.nets[1] + if single_ended_eth_mac(dp) or single_ended_eth_mac(dm): + return None + return dp, dm + return None + + +def _cite_label(cons: ProtocolConstraint) -> str: + src = cons.source + bits: list[str] = [] + if src is not None: + if src.document: + bits.append(src.document) + if src.section: + bits.append(f"§{src.section}") + if src.page: + bits.append(f"p.{src.page}") + return ", ".join(bits) if bits else "cited pack" + + +def _zdiff_measured(nets: list[str], impedance_nets: list[dict] | dict | None) -> float | None: + """Pair Z only. Single-ended Z0 is not a differential result.""" + rows = _z_rows(impedance_nets) + vals: list[float] = [] + for net in nets: + row = _row_for(rows, net) + if not row: + continue + for key in ("zdiff_ohm", "zdiff_avg_ohms", "zdiff_ohms"): + v = _num(row.get(key)) + if v is not None and v > 0: + vals.append(v) + break + if not vals: + return None + return sum(vals) / len(vals) + + +def _median_width_mm(layout: LayoutGraph, net: str) -> float | None: + widths = sorted( + s.width for s in layout.segments + if s.net and kicad_nets_match(s.net, net) and s.width > 0 + ) + if not widths: + return None + return widths[len(widths) // 2] + + +def _pair_gap_mm(layout: LayoutGraph, a: str, b: str) -> float | None: + sa = [s for s in layout.segments if s.net and kicad_nets_match(s.net, a) and s.width > 0] + sb = [s for s in layout.segments if s.net and kicad_nets_match(s.net, b) and s.width > 0] + gaps: list[float] = [] + for x in sa: + for y in sb: + if x.layer and y.layer and x.layer != y.layer: + continue + for px, py in ( + (x.start, y.start), (x.start, y.end), + (x.end, y.start), (x.end, y.end), + ): + edge = math.hypot(px[0] - py[0], px[1] - py[1]) - x.width / 2.0 - y.width / 2.0 + if edge > 1e-6: + gaps.append(edge) + if not gaps: + return None + return min(gaps) + + +def usb_pair_z_ohm( + layout: LayoutGraph | None, + nets: tuple[str, str], + impedance_nets: list[dict] | dict | None, +) -> tuple[float | None, str]: + """Calculated differential Z for one pair. + + Returns (ohms, missing). missing is empty when ohms is set, otherwise + ``stackup``, ``geometry``, or ``stackup/geometry``. + """ + stored = _zdiff_measured(list(nets), impedance_nets) + if stored is not None: + return stored, "" + has_copper = bool( + layout is not None and any( + s.net and s.width > 0 and ( + kicad_nets_match(s.net, nets[0]) or kicad_nets_match(s.net, nets[1]) + ) + for s in layout.segments + ) + ) + stack = layout.stackup if layout is not None else None + dielectric = stack.dielectrics[0] if stack and stack.dielectrics else None + stack_ok = ( + stack is not None + and dielectric is not None + and dielectric.er > 0 + and dielectric.height_mm > 0 + and stack.copper_thickness_mm is not None + and stack.copper_thickness_mm > 0 + ) + if not stack_ok: + return None, "stackup/geometry" if not has_copper else "stackup" + assert layout is not None and stack is not None and dielectric is not None + wa = _median_width_mm(layout, nets[0]) + wb = _median_width_mm(layout, nets[1]) + gap = _pair_gap_mm(layout, nets[0], nets[1]) + if wa is None or wb is None or gap is None: + return None, "geometry" + try: + _zodd, _zeven, zdiff = coupled_diff_z(TraceGeometry( + h=dielectric.height_mm, + er=dielectric.er, + t=stack.copper_thickness_mm, + w=(wa + wb) / 2.0, + s=gap, + )) + except GeometryError: + return None, "geometry" + if zdiff <= 0: + return None, "geometry" + return zdiff, "" + + +def _matches_cited(measured: float, cited: float) -> bool: + return abs(measured - cited) <= 1e-6 * max(1.0, abs(cited)) + + +def _usb_line(kind: str, *, measured: float | None, cited: float, label: str) -> str: + """One report line. The ohm value is the packed cite, not a second number.""" + if kind == "certified" and measured is not None: + return ( + f"USB certified — calculated Z {measured:g} Ω vs cited {cited:g} Ω ({label})." + ) + if measured is not None: + return ( + f"USB not certified — because Z {measured:g} Ω is outside cited " + f"{cited:g} Ω ({label})." + ) + return ( + "USB not certified — because Z cannot be calculated from the PCB " + f"stackup/geometry. Cited {cited:g} Ω ({label})." + ) + + +def _usb_board_z( + check: str, + inst: PhysicalBusInstance, + cite: ProtocolConstraint, + pair: tuple[str, str], + layout: LayoutGraph | None, + impedance_nets: list[dict] | dict | None, +) -> L2CheckResult: + """One line: calculated pair Z vs the packed board cite.""" + cited = float(cite.value) # type: ignore[arg-type] + label = _cite_label(cite) + measured, _missing = usb_pair_z_ohm(layout, pair, impedance_nets) + mand: MandatoryClass = "RECOMMENDED" + if measured is None: + return L2CheckResult( + check=check, result="FAIL", mandatory=mand, nets=list(pair), + limit_ohm=cited, value_kind="NUMERIC", emit="not_certified", + notes=_usb_line("missing", measured=None, cited=cited, label=label), + finding_class="RULE", status="ERROR", + ) + if _matches_cited(measured, cited): + return L2CheckResult( + check=check, result="PASS", mandatory=mand, nets=list(pair), + measured_ohm=measured, limit_ohm=cited, + limit_ohm_min=cited, limit_ohm_max=cited, + value_kind="NUMERIC", emit="certified", + notes=_usb_line("certified", measured=measured, cited=cited, label=label), + finding_class="INFO", status="INFO", + ) + return L2CheckResult( + check=check, result="FAIL", mandatory=mand, nets=list(pair), + measured_ohm=measured, limit_ohm=cited, + limit_ohm_min=cited, limit_ohm_max=cited, + value_kind="NUMERIC", emit="not_certified", + notes=_usb_line("outside", measured=measured, cited=cited, label=label), + finding_class="RULE", status="ERROR", + ) + + def _z_check( check: str, mand: MandatoryClass, cons: ProtocolConstraint | None, kind: str, inst: PhysicalBusInstance, + iface: PhysicalInterface, graph: DesignGraph, nets: list[str], constraints_map: dict[str, ComponentConstraints] | None, impedance_nets: list[dict] | dict | None, + layout: LayoutGraph | None, ) -> L2CheckResult: + pair = _usb_dp_dm(inst) + cite = _pcb_zdiff_cite(iface) phy = _phy_z_windows(graph, inst, constraints_map) + if cite is not None and pair is not None and not phy: + return _usb_board_z(check, inst, cite, pair, layout, impedance_nets) pack_w = _pack_ohm_window(cons) windows: list[tuple[float, float]] = [] if pack_w: @@ -403,7 +635,6 @@ def _z_check( window = intersect_windows(windows) if windows else None measured = measured_z_ohm(nets, impedance_nets) if window is None: - # no cited pack number and no datasheet PHY window → never invent 90 Ω if measured is None: return _skip_z(check, mand, inst, kind) return _pack( @@ -413,15 +644,15 @@ def _z_check( "VENDOR_DEPENDENT", "UNKNOWN", } else "UNKNOWN", mand, - nets=nets, measured_ohm=measured, value_kind=kind, + nets=nets, measured_ohm=measured, value_kind=kind, emit="silent", notes=( - f"Interfaccia {inst.physical_interface_id} non certificata a L2 " - f"per mancanza di Z target (cited pack or PHY datasheet). " - f"Measured stackup/fab Z is not compared to invented USB/IEC ohms. " - f"L0/L1 are not electrical certification." + f"{inst.physical_interface_id} has measured Z and no cited target. " + "Not compared to an invented ohm. Not a warning." ), ) if measured is None: + if cite is not None and pair is not None: + return _usb_board_z(check, inst, cite, pair, layout, impedance_nets) return _skip_z(check, mand, inst, kind) verdict = electrical_verdict(cons, measured, window) source_note = ( @@ -474,10 +705,10 @@ def _termination_check( "VENDOR_DEPENDENT", "UNKNOWN", "NOT_APPLICABLE", } else "UNKNOWN" return _pack( - check, verdict, mand, nets=nets, value_kind=kind, + check, verdict, mand, nets=nets, value_kind=kind, emit="silent", notes=( - f"Interfaccia {inst.physical_interface_id} non certificata a L2 " - f"per mancanza di termination cite. No invented Rd/ohm." + f"{inst.physical_interface_id} has no termination cite. " + "No invented resistor. Not a warning." ), ) measured = None @@ -517,8 +748,8 @@ def _levels_check( unit = (cons.unit or "").strip().lower() if unit in _VOLT_UNITS: return _pack( - check, "UNKNOWN", mand, value_kind="NUMERIC", - notes="Voltage NUMERIC in pack but PCB rail FACT not supplied — not invented 3.3 V.", + check, "UNKNOWN", mand, value_kind="NUMERIC", emit="silent", + notes="Voltage NUMERIC in pack but PCB rail FACT not supplied — not invented 3.3 V. Not a warning.", ) if constraints_map: for ref in [inst.host_ref, *inst.peer_refs]: @@ -528,10 +759,10 @@ def _levels_check( ds = match_constraints(comp.mpn or comp.value, constraints_map) if ds and ds.absolute_maximum_ratings: return _pack( - check, "UNKNOWN", mand, value_kind=kind, + check, "UNKNOWN", mand, value_kind=kind, emit="silent", notes=( "Silicon abs-max present; L2 levels need a cited operating " - "window vs measured rail — not assumed. Not L3." + "window vs measured rail — not assumed. Not L3. Not a warning." ), ) verdict = kind if kind in { @@ -539,15 +770,58 @@ def _levels_check( "VENDOR_DEPENDENT", "UNKNOWN", "NOT_APPLICABLE", } else "UNKNOWN" return _pack( - check, verdict, mand, value_kind=kind, - notes="Levels/voltage UNKNOWN without a cited electrical source. Not invented.", + check, verdict, mand, value_kind=kind, emit="silent", + notes="Levels/voltage UNKNOWN without a cited electrical source. Not invented. Not a warning.", ) +def _pair_line_finding(inst: PhysicalBusInstance, r: L2CheckResult) -> Finding: + """Certified or not certified. English. Not the datasheet boilerplate.""" + designator = inst.host_ref or inst.physical_interface_id + certified = r.emit == "certified" + text = r.notes + if certified: + status = "INFO" + cls = "INFO" + action = "Calculated pair Z matches the cited limit." + else: + status = "ERROR" + cls = "RULE" + action = "Calculated pair Z is not certified. The finding states the reason." + f = Finding( + designator=designator, + mpn="", + aspect="protocol_l2", + finding=text, + why=text, + status=status, # type: ignore[arg-type] + source=SOURCE, + net=r.nets[0] if r.nets else None, + rule_id="PE-PRT-L2-002", + facts=text, + requirement=text, + inference="Calculated differential Z compared with the packed cite.", + provenance="MANDATORY", + finding_class=cls, # type: ignore[arg-type] + evidence_status="SUFFICIENT", + recommendation=action, + action=action, + ) + return complete_finding(f) + + def l2_findings(inst: PhysicalBusInstance, results: list[L2CheckResult]) -> list[Finding]: out: list[Finding] = [] designator = inst.host_ref or inst.physical_interface_id for r in results: + if r.emit in {"certified", "not_certified"}: + out.append(_pair_line_finding(inst, r)) + continue + if r.emit == "silent" or (r.result in { + "UNKNOWN", "VENDOR_DEPENDENT", "CONTROLLER_DEPENDENT", + "PHY_DEPENDENT", "MISSING_SOURCE", + } and r.check in _NOISE_CHECKS): + continue if r.result == "PASS": continue if r.result == "FAIL" and r.mandatory != "MANDATORY": @@ -568,8 +842,7 @@ def l2_findings(inst: PhysicalBusInstance, results: list[L2CheckResult]) -> list rule_id = "PE-PRT-L2-001" status = "WARNING" finding = r.notes or ( - f"Interfaccia {inst.physical_interface_id} non certificata a L2 " - f"per {r.check} ({r.result})." + f"{inst.physical_interface_id} L2 {r.check} is {r.result}." ) else: rule_id = "PE-PRT-L0-002" diff --git a/periscope/src/backend/periscopex/protocol_l3.py b/periscope/src/backend/periscopex/protocol_l3.py index 96b9a5e..d3dfb2e 100644 --- a/periscope/src/backend/periscopex/protocol_l3.py +++ b/periscope/src/backend/periscopex/protocol_l3.py @@ -509,9 +509,28 @@ def certify_instance_l3( if c in L3_CHECKS and c not in checks: checks.append(c) facts = lookup_channel_facts(inst, channel_data) + if not _channel_fact_present(facts): + return [] return [_run_l3_check(inst, iface, c, facts) for c in checks] +def _channel_fact_present(facts: dict[str, Any]) -> bool: + """True only when reduced channel FACT is already on hand.""" + if not facts: + return False + if _looks_like_raw_sparam(facts): + return False + if _blob_mentions_fem(facts.get("method") or facts.get("solver") or ""): + return False + if _il_measured(facts) is not None or _rl_measured(facts) is not None: + return True + if _xt_measured(facts) is not None: + return True + if _num(facts.get("total_budget_ps")) is not None: + return True + return facts.get("channel_complete") is True + + def l3_findings(inst: PhysicalBusInstance, results: list[L3CheckResult]) -> list[Finding]: out: list[Finding] = [] designator = inst.host_ref or inst.physical_interface_id @@ -533,12 +552,8 @@ def l3_findings(inst: PhysicalBusInstance, results: list[L3CheckResult]) -> list status = "ERROR" finding = f"L3 channel {r.check}: {r.notes}" elif skip_family: - rule_id = "PE-PRT-L3-001" - status = "WARNING" - finding = r.notes or ( - f"Interfaccia {inst.physical_interface_id} non certificata a L3 " - f"per {r.check} ({r.result})." - ) + # No channel FACT, or a field with nothing to certify. Omit the warning. + continue else: rule_id = "PE-PRT-L0-002" status = "INFO" diff --git a/periscope/src/backend/periscopex/protocol_report.py b/periscope/src/backend/periscopex/protocol_report.py index fc7524b..b63b23c 100644 --- a/periscope/src/backend/periscopex/protocol_report.py +++ b/periscope/src/backend/periscopex/protocol_report.py @@ -114,6 +114,12 @@ def check_to_report_row( result = str(dump.get("result") or "") cons = _constraint_for(iface, check) if iface is not None else None doc, section, method = _cite(cons) + if check == "differential_impedance" and not doc and iface is not None: + for alt in iface.constraints: + if alt.parameter == "pcb_trace_nominal_zdiff" and alt.source is not None: + doc, section, method = _cite(alt) + cons = alt + break nets = list(dump.get("nets") or []) net = nets[0] if nets else (inst.nets[0] if inst.nets else "") group = _group_for_net(inst, net or None) @@ -130,6 +136,7 @@ def check_to_report_row( "source": doc, "method": method, "notes": dump.get("notes") or "", + "emit": dump.get("emit") or "", "skip_visible": skip, "rank": result_rank(result), "chain": { @@ -181,6 +188,21 @@ def format_chain(chain: dict[str, Any]) -> str: return " → ".join(parts) +def _noise_row(row: dict[str, Any]) -> bool: + """Missing-field skips are not a certification line.""" + if row.get("emit") == "silent": + return True + result = str(row.get("result") or "") + if result not in _SKIP: + return False + notes = str(row.get("notes") or "").lower() + if "grouping" in notes or "dq/dqs" in notes: + return False + if row.get("measured") is not None or row.get("limit") is not None: + return False + return True + + def attach_instance_report( inst: PhysicalBusInstance, iface: PhysicalInterface | None, @@ -195,9 +217,7 @@ def attach_instance_report( + [c.model_dump() if hasattr(c, "model_dump") else dict(c) for c in l2] + [c.model_dump() if hasattr(c, "model_dump") else dict(c) for c in (l3 or [])] ) - rows = [check_to_report_row(d, inst, iface) for d in dumps] - if not any(r["level"] == "L3" for r in rows): - rows.append(l3_not_run_row(inst)) + rows = [r for r in (check_to_report_row(d, inst, iface) for d in dumps) if not _noise_row(r)] rows.sort(key=lambda r: (r["rank"], str(r["level"]), str(r["check"]))) worst = instance_worst_result([str(r["result"]) for r in rows if r["level"] != "L3"]) # L3 skip/UNKNOWN must not upgrade instance to PASS or hide FAIL diff --git a/periscope/src/backend/periscopex/si_check.py b/periscope/src/backend/periscopex/si_check.py index d6c0a76..1d23f37 100644 --- a/periscope/src/backend/periscopex/si_check.py +++ b/periscope/src/backend/periscopex/si_check.py @@ -42,7 +42,12 @@ _HS_CLASS_RE = ( ("hdmi", re.compile(r"HDMI", re.I)), ("pcie", re.compile(r"PCIE|PEX_", re.I)), ("sgmii", re.compile(r"SGMII", re.I)), - ("rgmii", re.compile(r"RGMII|(?:^|[_/])GMII", re.I)), + ("rgmii", re.compile(r"RGMII|(?:^|[_/])GMII|TX_CTL|RX_CTL|(?:ETH|MAC).*GTX", re.I)), + ("rmii", re.compile( + r"(?:^|[_/])RMII|" + r"(?:ETH|MAC).*(?:TXD|RXD|TXEN|RXDV|CRS_DV|REF_CLK)", + re.I, + )), ("eth_mdi", re.compile( r"(?:^|[_/])(MDI|TRD[0-3]|TCT|RCT)|" r"ETH.?(?:TD|RD|TX|RX|TP)[+\-_PN0-3]|1000BASE|RJ45", @@ -92,8 +97,10 @@ _BUS_TOKEN_EXPAND: dict[str, frozenset[str]] = { "magnetics": frozenset({"eth_mdi"}), "rgmii": frozenset({"rgmii"}), "gmii": frozenset({"rgmii"}), - "mac_phy": frozenset({"rgmii", "sgmii"}), - "mac": frozenset({"rgmii", "sgmii"}), + "rmii": frozenset({"rmii"}), + "mii": frozenset({"rmii"}), + "mac_phy": frozenset({"rmii", "rgmii", "sgmii"}), + "mac": frozenset({"rmii", "rgmii", "sgmii"}), "sgmii": frozenset({"sgmii"}), "ddr": frozenset({"ddr3_clk", "ddr3_dqs", "ddr3_dq", "ddr3_addr"}), "ddr3": frozenset({"ddr3_clk", "ddr3_dqs", "ddr3_dq", "ddr3_addr"}), @@ -143,6 +150,31 @@ def partner_net(name: str) -> str | None: return None +# RMII/MII data and TX enable. Not an MDI pair. Not a 100 Ω differential net. +_SINGLE_ENDED_ETH_RE = re.compile( + r"(?:^|[^A-Za-z0-9])(?:ETH_|MAC_)?(?:RXD|TXD|TXEN|RXDV|CRS_DV)(?:\d+)?(?:[^A-Za-z0-9]|$)", + re.I, +) + + +def single_ended_eth_mac(net: str) -> bool: + """ETH_RXD / ETH_TXD / ETH_TXEN are single-ended. Not a differential pair.""" + leaf = _leaf(net) + return bool(_SINGLE_ENDED_ETH_RE.search(leaf) or _SINGLE_ENDED_ETH_RE.search(net or "")) + + +def phy_mac_kind(net: str) -> str | None: + """``rmii``, ``rgmii``, or ``mii`` for a PHY–MAC net. Never ``eth_mdi``.""" + leaf = _leaf(net).upper() + if re.search(r"RGMII|(?:^|[_/])GMII|TX_CTL|RX_CTL|(?:ETH|MAC).*GTX", leaf): + return "rgmii" + if single_ended_eth_mac(net) or "RMII" in leaf: + if re.search(r"(?:^|[_/])MII(?:$|[_/])", leaf) and "RMII" not in leaf: + return "mii" + return "rmii" + return None + + def _leaf(net: str) -> str: n = normalize_kicad_hierarchy_net(net) return n.split("/")[-1] if n else "" @@ -173,8 +205,10 @@ def bus_class(net: str) -> str | None: return "usb3" if "USB" in u and re.search(r"(D\+|D-|DP|DM)", leaf, re.I): return "usb2" - if re.search(r"(?:ETH|MAC).*(TXD|RXD|TXC|RXC|TX_CLK|RX_CLK|TX_CTL|RX_CTL|TXEN|RXDV|GTX)", u): + if re.search(r"RGMII|(?:^|[_/])GMII|TX_CTL|RX_CTL|(?:ETH|MAC).*GTX", u): return "rgmii" + if re.search(r"(?:ETH|MAC).*(TXD|RXD|TXC|RXC|TX_CLK|RX_CLK|TXEN|RXDV|CRS_DV|REF_CLK)|(?:^|[_/])RMII", u): + return "rmii" if re.search(r"(?:^|[_/])ETH(?:$|[_/])", u) and re.search(r"[+\-]|_P$|_N$|_P/|_N/", leaf): return "eth_mdi" for cls, cre in _HS_CLASS_RE: @@ -228,6 +262,7 @@ def _rule_target_buses(rule: dict) -> frozenset[str]: scans: tuple[tuple[str, str], ...] = ( (r"super\s*speed|usb\s*3|sstx|ssrx", "usb3"), (r"rgmii|gtx_clk|tx_ctl|rx_ctl", "rgmii"), + (r"\brmii\b|\bmii\b|txen|rxdv|crs_dv", "rmii"), (r"sgmii", "sgmii"), (r"mdi|rj-?45|magnetics|trd[0-3]|1000\s*base", "eth_mdi"), (r"ddr3|\bddr\b", "ddr3"), @@ -358,6 +393,8 @@ def _rule_nets(layout: LayoutGraph, rule: dict, graph: DesignGraph) -> list[str] if targets: if not _bus_in_targets(bc, targets): continue + if single_ended_eth_mac(net) and "eth_mdi" in targets: + continue else: # No bus on the quote: pin-scoped only. Never paint USB/DDR/PHY. if not pin: @@ -530,6 +567,8 @@ def check_si( want_diff = _num(rule.get("zdiff_ohm")) is not None or kind == "zdiff" paired: set[tuple[str, str]] = set() for net in nets: + if want_diff and single_ended_eth_mac(net): + continue zrow = _z_row(rows, net) partner = _partner_on_board(layout, net, zrow) if want_diff else None key_net = _pair_key(net, partner) if partner else (net, "") diff --git a/periscope/src/backend/services/pcb_pipeline.py b/periscope/src/backend/services/pcb_pipeline.py index b78dc6b..1010df5 100644 --- a/periscope/src/backend/services/pcb_pipeline.py +++ b/periscope/src/backend/services/pcb_pipeline.py @@ -154,16 +154,15 @@ def si_extract_needed_skips( } if not needs_layout_rules_refresh(payload, min_scan_version=scan_ver): continue - refs = ",".join(sorted(refs_by_mpn.get(mpn, []))) or mpn - out.append({ - "designator": refs, - "reason": ( - f"SI layout_rules empty at model_version=" - f"{cons.model_version}; re-run schematic review " - f"to re-extract pintable {scan_ver} " - "(PCB does not re-read the PDF)." - ), - }) + refs = sorted(refs_by_mpn.get(mpn, [])) or [mpn] + reason = ( + f"SI layout_rules empty at model_version=" + f"{cons.model_version}; re-run schematic review " + f"to re-extract pintable {scan_ver} " + "(PCB does not re-read the PDF)." + ) + for ref in refs: + out.append({"designator": ref, "reason": reason}) return out @@ -373,6 +372,7 @@ async def run_pcb_pipeline( _step(project_id, "ai_review", "running", "layout vs shared library extraction") coverage: dict[str, list[str]] = {} skipped: list[dict] = [] + review_errors: dict[str, str] = {} try: from backend.services.api_logs import ApiLogger from backend.services.pcb_validation import review_pcb_ics @@ -387,7 +387,7 @@ async def run_pcb_pipeline( f"{ref} {tool} {detail}".strip(), ) - ai_findings, coverage, skipped = await review_pcb_ics( + ai_findings, coverage, skipped, review_errors = await review_pcb_ics( graph, cmap, layout, plan, inventory, pdf_dir, storage=storage, api_logger=logger_api, on_progress=_prog, @@ -396,6 +396,7 @@ async def run_pcb_pipeline( logger_api.flush(storage, user_id, project_id) detail = ( f"{len(ai_findings)} AI findings, {len(skipped)} skipped" + + (f", {len(review_errors)} review errors" if review_errors else "") ) except Exception: logger.exception("PCB AI review failed — keeping deterministic findings") @@ -427,13 +428,20 @@ async def run_pcb_pipeline( summary: dict[str, int] = {"ERROR": 0, "WARNING": 0, "INFO": 0} for f in findings: summary[f.status] = summary.get(f.status, 0) + 1 + # Drop not_reviewed entries for ICs that were actually reviewed. + covered = set(coverage) + not_reviewed = [ + row for row in (skipped + si_skip) + if str(row.get("designator") or "") not in covered + ] report = ValidationReport( project=project_id, timestamp=datetime.now(timezone.utc).isoformat(), findings=findings, summary=summary, coverage=coverage, - not_reviewed=skipped + si_skip, + review_errors=review_errors, + not_reviewed=not_reviewed, protocol_certification=proto_section.model_dump(), ) report_path = ws.local_path("pcb_report.json") diff --git a/periscope/src/backend/services/pcb_validation.py b/periscope/src/backend/services/pcb_validation.py index 71b6b51..d33ae44 100644 --- a/periscope/src/backend/services/pcb_validation.py +++ b/periscope/src/backend/services/pcb_validation.py @@ -54,15 +54,20 @@ async def review_pcb_ics( storage=None, api_logger: ApiLogger | None = None, on_progress=None, -) -> tuple[list[Finding], dict[str, list[str]], list[dict]]: +) -> tuple[list[Finding], dict[str, list[str]], list[dict], dict[str, str]]: """Layout-only AI exam using ``library/extracted`` (or project extracted/). Does not attach a datasheet PDF. ICs without a library pintable are skipped with a reason to run schematic review first. + + Returns ``(findings, coverage, not_reviewed, review_errors)``. + Real review exceptions go in ``review_errors`` — never as + ``not_reviewed`` with the blanket label ``pcb_review error``. """ findings: list[Finding] = [] coverage: dict[str, list[str]] = {} skipped: list[dict] = [] + review_errors: dict[str, str] = {} cache: dict = {} for ref, comp in sorted(graph.components.items()): if comp.component_type != ComponentType.IC: @@ -102,15 +107,21 @@ async def review_pcb_ics( system_prompt=PCB_SYSTEM_PROMPT, log_stage="pcb_review", ) - except Exception: - log.exception("PCB AI review failed for %s — skipping", ref) - skipped.append({"designator": ref, "reason": "pcb_review error"}) + except Exception as exc: + msg = f"{type(exc).__name__}: {exc}" + log.exception("PCB AI review failed for %s — recording review_errors", ref) + review_errors[ref] = msg continue if not isinstance(result, ReviewResult): + # Prefer a visible false positive over a silent miss. + skipped.append({ + "designator": ref, + "reason": "PCB review returned no result", + }) continue _ensure_recs(result.findings) annotate_findings_cad(result.findings, cad_index_from_graph(graph)) findings.extend(result.findings) - if result.checked_areas: - coverage[ref] = list(result.checked_areas) - return findings, coverage, skipped + # Empty checked_areas still means the IC was reviewed (no issues). + coverage[ref] = list(result.checked_areas or ["layout"]) + return findings, coverage, skipped, review_errors diff --git a/periscope/src/frontend/content/changelog.md b/periscope/src/frontend/content/changelog.md index 65aa38e..f662a4d 100644 --- a/periscope/src/frontend/content/changelog.md +++ b/periscope/src/frontend/content/changelog.md @@ -2,6 +2,19 @@ What's new in Periscope. +## 2.85.0 — 2026-09-23 — USB / RMII cert lines; not_reviewed count + +USB 2.0 D+/D− is one line: calculated pair Z versus the packed 90 Ω board cite. Certified names the measured ohm and the cite. Not certified says why — Z is outside that cite, or Z cannot be calculated from the PCB stackup/geometry. Missing length, stub, via, termination, rise/fall, and channel fields do not each warn. L3 is omitted when no channel fact is on file. + +LAN8720A ETH_RXD / ETH_TXD / ETH_TXEN are RMII (single-ended PHY–MAC), not RJ45/MDI 100 Ω. One line: `RMII certified — …`. No Italian «mancanza di tr, f» on those nets. RJ45 pairs keep `Ethernet certified / not certified`. + +`not_reviewed` count matches the list (one designator per row). Real PCB AI failures go to `review_errors` with the exception message — not a blanket `pcb_review error` on every skip. ICs already in coverage are not listed as not-reviewed. + +- [Changed] `protocol_l1.py`, `protocol_l2.py`, `protocol_l3.py`, `protocol_report.py`, `af_trace_check.py`, `si_check.py`. +- [Changed] `pcb_validation.py`, `pcb_pipeline.py`, `pcb_checks.py` merge; report UI copy. +- [Changed] Protocol tree shows the certification sentence. +- [Changed] pytest `tests/pcb/test_j2_usb_cert_line.py`, `test_rmii_cert_line.py`, `test_not_reviewed_count.py`. + ## 2.84.0 — 2026-09-22 — Exposed-pad names, ESD cites, CC-via-net, Ethernet pair Z PE-BOM-011 treats EP, EPAD, THERMAL PAD, exposed pad, and the footprint's exposed land (including pin_count+1) as the same pad when both sides have one. A datasheet exposed pad with no land on the footprint stays ERROR. diff --git a/periscope/src/frontend/src/app/(app)/project/[id]/report/page.tsx b/periscope/src/frontend/src/app/(app)/project/[id]/report/page.tsx index 80f596c..ee37820 100644 --- a/periscope/src/frontend/src/app/(app)/project/[id]/report/page.tsx +++ b/periscope/src/frontend/src/app/(app)/project/[id]/report/page.tsx @@ -328,7 +328,10 @@ function ReportContent({ projectId }: { projectId: string }) { {report.not_reviewed.length} component{report.not_reviewed.length === 1 ? "" : "s"} not reviewed

- These components have no datasheet on file, so they were not checked against one. A reversed or mis-wired pin on an unreviewed part (e.g. a DNP footprint with no BOM entry) cannot be caught here — verify these manually. + Each line is one designator. The reason is per part — missing + datasheet, missing library extraction, or SI re-extract needed. + Parts that were reviewed are not listed here. Review failures + (with an error message) appear under failed reviews above.