Updates
This commit is contained in:
@@ -47,6 +47,9 @@ LP11_SPEC_MIN_V = 1.0 # V — LP-11 minimum voltage spec
|
||||
LP11_SPEC_MAX_V = 1.45 # V — LP-11 maximum voltage spec
|
||||
LP_LOW_DUR_MIN_NS = 50.0 # ns — minimum LP-low duration per D-PHY spec (LP-01 + LP-00 combined)
|
||||
HS_OSC_STD_V = 0.045 # V — rolling-std threshold above which a region is classified as HS
|
||||
# If rolling-std fires within this margin after LP-low ends, it's detecting HS onset (not LP-11
|
||||
# return). Mode A only fires when lp11_to_hs exceeds lp_low_duration by more than this margin.
|
||||
LP_LOW_HS_ONSET_MARGIN_NS = 20.0 # ns
|
||||
|
||||
# Flicker detection thresholds
|
||||
# LP-low plateau below this → SoT sequence too brief for receiver to detect → flicker risk
|
||||
@@ -1011,21 +1014,24 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
|
||||
and hs_amplitude_mv < HS_BURST_AMPLITUDE_MIN_MV
|
||||
and (
|
||||
# Mode A: LP-low normal, rolling-std fired but HS amplitude is sub-threshold.
|
||||
# Require amp ≥ HS_MODE_A_MIN_MV to exclude LP-11-return artifacts: when LP-11
|
||||
# returns after LP-low without any HS attempt the burst window is pure DC ~0 V
|
||||
# (two LP-11 regions straddling a clean LP-low), giving amp ≈ 0–3 mV. A genuine
|
||||
# weak HS attempt leaves measurable oscillations well above this floor.
|
||||
# Two guards prevent false positives:
|
||||
# 1. amp ≥ HS_MODE_A_MIN_MV: excludes LP-11-return artifacts where the burst
|
||||
# window is pure DC ~0 V (amp ≈ 0–3 mV).
|
||||
# 2. lp11_to_hs > lp_low + LP_LOW_HS_ONSET_MARGIN_NS: excludes HS-onset firing
|
||||
# where rolling-std triggers right when LP-low ends (lp11_to_hs ≈ lp_low + 5 ns).
|
||||
# True LP-11 return or delayed HS would be significantly beyond LP-low end.
|
||||
(lp11_to_hs_ns is not None and lp11_to_hs_ns >= LP_LOW_DUR_MIN_NS
|
||||
and hs_amplitude_mv >= HS_MODE_A_MIN_MV)
|
||||
and hs_amplitude_mv >= HS_MODE_A_MIN_MV
|
||||
and (lp_low_duration_ns is None
|
||||
or lp11_to_hs_ns > lp_low_duration_ns + LP_LOW_HS_ONSET_MARGIN_NS))
|
||||
# Mode A2: rolling-std never fired — HS absent or amplitude below HS_OSC_STD_V;
|
||||
# weak oscillations are misclassified as LP-low, masking the true HS failure
|
||||
or lp11_to_hs_ns is None
|
||||
# Mode B: LP-low anomalously short + low amplitude = marginal HS launch
|
||||
or _lp_low_short
|
||||
# Mode D: LP-low normal (≥ 200 ns) but rolling-std fired on LP-11 falling edge
|
||||
# transition noise (lp11_to_hs < LP_LOW_DUR_MIN_NS). HS amplitude sub-threshold
|
||||
# confirms the HS burst never formed — bridge entered LP-low but returned to LP-11
|
||||
# without completing SoT. Confirmed: capture 0035 (lp_low=379 ns, amp=19 mV).
|
||||
# Mode D: LP-low normal, noise-spike lp11_to_hs (< 50 ns), low HS amplitude.
|
||||
# Requires dynamic display content (video) during the test — with static/DC content
|
||||
# the probe noise floor is 15–35 mV regardless of HS health, making this unreliable.
|
||||
or (lp11_to_hs_ns is not None
|
||||
and lp11_to_hs_ns < LP_LOW_DUR_MIN_NS
|
||||
and not _lp_low_short)
|
||||
@@ -1044,7 +1050,11 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
|
||||
or (
|
||||
lp_transition_valid
|
||||
and (
|
||||
(lp_low_duration_ns is None or lp_low_duration_ns < FLICKER_LP_LOW_MAX_NS)
|
||||
# LP-00 absent entirely (LP-01/LP-00 skipped — SoT never completed).
|
||||
# Short-but-non-zero LP-low is handled by Mode B inside hs_burst_absent;
|
||||
# flagging it standalone (even with healthy HS amplitude) caused false
|
||||
# positives when noise triggers gave lp_low < 50 ns with normal HS.
|
||||
lp_low_duration_ns is None
|
||||
or hs_burst_absent
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user