Ship Fase B slices: hierarchy, derating bands, timing, PI, ESD/return.

ERROR stays only for RULE+MANDATORY. Hierarchy walks component→pin→net→block.
Derating is PASS/MARGIN/RISK from Vop/Vrated. Timing and PI skip without numbers.
ESD and HS return path are REVIEW, not RULE ERROR.
This commit is contained in:
2026-09-20 09:35:04 +02:00
parent facbaa2305
commit 342792df2d
16 changed files with 1259 additions and 27 deletions
+23
View File
@@ -137,6 +137,24 @@ def _seed() -> None:
requirement="Kelvin/sense pin should not share the load net.")
_add("PE-STCH-001", "TYPICAL", "INFO", domain="pcb",
requirement="GND stitch via in the bbox of a signal over a GND pour.")
_add("PE-HIER-001", "TYPICAL", "INFO", domain="pcb",
requirement="Every component pin should land on a named net.")
_add("PE-DRT-002", "RECOMMENDED", "RISK", domain="pcb",
requirement="Vop/Vrated utilization band (not an invented dielectric %).")
_add("PE-DRT-003", "TYPICAL", "INFO", domain="pcb",
requirement="Capacitors with Vop and Vrated at or below 80% utilization.")
_add("PE-TIM-001", "MANDATORY", "RULE", domain="pcb",
requirement="Reset RC delay vs datasheet t_reset when both numbers exist.")
_add("PE-TIM-002", "MANDATORY", "RULE", domain="pcb",
requirement="Strap divider voltage vs Vih/Vil when both numbers exist.")
_add("PE-PI-001", "RECOMMENDED", "RISK", domain="pcb",
requirement="IC supply net should have a local decoupling capacitor.")
_add("PE-PI-002", "RECOMMENDED", "REVIEW", domain="pcb",
requirement="Local vs bulk on a supply when capacitance values exist.")
_add("PE-ESD-001", "RECOMMENDED", "REVIEW", domain="pcb",
requirement="Connector/USB net ESD — REVIEW unless a mandatory FACT exists.")
_add("PE-RET-001", "TYPICAL", "REVIEW", domain="pcb",
requirement="High-speed net over a GND pour should have a nearby GND via.")
_seed()
@@ -215,6 +233,11 @@ def complete_finding(f: Finding) -> Finding:
if f.finding_class == "RULE":
f.finding_class = "RISK"
# ERROR only for a measured MANDATORY RULE. REVIEW/RISK/INFO stay ≤ WARNING.
if f.status == "ERROR":
if f.finding_class != "RULE" or prov != "MANDATORY":
f.status = "WARNING"
if f.finding_class == "RULE" and f.confidence is None:
f.confidence = 0.9 if f.evidence_status == "SUFFICIENT" else 0.3
elif f.finding_class == "REVIEW" and f.confidence is None: