Gate SI layout_rules to the quoted bus, not EN RC onto USB.
PE-SI-009 no longer treats ESP32 CHIP_PU/EN RC as a USB series R. USB without a library Z number stays PE-SI-010 measurement-only. Pintable skill 1.13.0 requires net_class on SI kinds (usb2/usb3/MDI/RGMII/DDR3).
This commit is contained in:
@@ -48,6 +48,20 @@ def has_si_layout_rule(raw: object) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def has_ungated_si_rule(raw: object) -> bool:
|
||||
"""True when an SI kind has no net_class — it must not paint USB/DDR/PHY."""
|
||||
if not isinstance(raw, list):
|
||||
return False
|
||||
for row in raw:
|
||||
if not isinstance(row, dict):
|
||||
continue
|
||||
if str(row.get("kind") or "").strip() not in SI_KINDS:
|
||||
continue
|
||||
if not str(row.get("net_class") or "").strip():
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def needs_layout_rules_refresh(
|
||||
data: dict,
|
||||
*,
|
||||
@@ -61,6 +75,9 @@ def needs_layout_rules_refresh(
|
||||
From skill 1.11.0, SI kinds are first-class. An older JSON that only
|
||||
has decoupling/thermal rules is stale and must be re-extracted so
|
||||
ImpedenceFinder checks are not starved.
|
||||
|
||||
From skill 1.13.0, SI kinds without ``net_class`` are ungated (EN RC
|
||||
was painted onto USB). Re-extract those.
|
||||
"""
|
||||
ver = str(data.get("model_version") or "0.0.0")
|
||||
if not min_scan_version or min_scan_version == "0.0.0":
|
||||
@@ -76,7 +93,19 @@ def needs_layout_rules_refresh(
|
||||
except Exception:
|
||||
need_si = False
|
||||
if need_si:
|
||||
return not has_si_layout_rule(data.get("layout_rules"))
|
||||
try:
|
||||
need_bus = Version(min_scan_version) >= Version("1.13.0")
|
||||
except Exception:
|
||||
need_bus = False
|
||||
if need_bus and has_ungated_si_rule(data.get("layout_rules")):
|
||||
return True
|
||||
if has_si_layout_rule(data.get("layout_rules")):
|
||||
return False
|
||||
try:
|
||||
extracted_before_si = Version(ver) < Version("1.11.0")
|
||||
except Exception:
|
||||
extracted_before_si = True
|
||||
return extracted_before_si
|
||||
return not has_any_layout_rule(data.get("layout_rules"))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user