From 84ccfb7379570e4aa443a937393391cb3cef09ff Mon Sep 17 00:00:00 2001 From: david rice Date: Wed, 22 Apr 2026 14:29:27 +0100 Subject: [PATCH] Updates --- __pycache__/csv_preprocessor.cpython-312.pyc | Bin 47410 -> 47151 bytes csv_preprocessor.py | 49 ++++--------------- 2 files changed, 9 insertions(+), 40 deletions(-) diff --git a/__pycache__/csv_preprocessor.cpython-312.pyc b/__pycache__/csv_preprocessor.cpython-312.pyc index d82c25821dd9eca6c1a7e3b643c172f350287948..f8c4c47a82eae222b8131186ded1f94b67dac36d 100644 GIT binary patch delta 1965 zcmZuwdu)?c6uSrNF3`Wn_wF${++IxQIchB#f zd(XMO9Ogcjxr7_>@j3*bft&ZYHhpn0AsMG1^q#GkG#qL}Bxwo}+XYSuKkxa;x6TL?k+{3-*9=WU0#0}9Nh|VL~Vm|Q_ z-xh8QBK|WN)|@k#FZCwKpoV9-=Fw$txjw)tcm0WJ7E^xz&;GK6AD(p&H1wfpn4DSbR+#)K-yt=zn$e zQdQtLKwOPfOBx4!2n}8$m~h+b#5xX1I;s8wUVSj3Hz>S}#HKMlLSiHAHA!`$x9N)C zOurt{7)bL#Gl<<05(05EeZuGKTXv*EXsgs1+ONn5T4L#9mT;ss6^SiUOEcP72dUfP zNwrDsp+ir-(~MYoJ;{D#ie&uPSbO4G?*#& zC_ZUd3eanZEd``Q>N$ztQ^hi3)Q1Qs_Vo9>Gq7q$@CX{^`_KsXce8G_pkn=6QG-M5 zQ{!e1Z)K_G6%KcuePUJN1MJ_FNgmI!3Hvu1{1L15oV4I&cDM3|7QeV>vD97!%gkniz-ou@`%mwD>oc_fjQ?@3WxzvIgg|?>4=TaTaUX9N=+18wtj# z@OHK*1mrgMWS|cVBK+frMB3fzW|P~e1U$)9!yy4*WIM;+(cypSo{*iTy!n9FJXQin zc=}(nhZRp>=Y`t}@fpQQHtI;SGVi;!Jg#KH15O^d(YNR|;kE&xeF3_-JCp7_yub%0 z1nN9$rM*WiI6!}IYfPUG5S8*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Exy5 z4G;Pljy*`{UYT63ftZ!Z^WceB0d9ea2zHZ+dz{%Q25&LPbAA7#V&EK}n`14trZp_! zw}UQc${f$#{S@*uz0|fSk-F&`csC${i!|L8$v2^;_Dnb(wL!F<+7i{4wxy1_?YRcX z78*|Mhbf#-4Cy*3CcRWkcyJ#p`qOOz&$0a1z80+G@S?>$K#4&m6!gUCR@r&Y)R_{?Y2T%t%Z27f&4jEK2`Opurp$b4Lxq)JT6>cIo@7-|%FbQo z;7aUET7xMh7B*bBdDgrg*K8dr5mxIZzNF2U(gD=;$k~vz)oa~IXVbzM$(vG0kh`I3 zqCIH}q(oS(^A@_UnYy$*q!S%l0e$mQ)3QZ2uA3YwWHJ}5TdPw@E-Zq+?14ADNn0a` z*lVvl{J^)@t~-KS8R-A)M<#m;6`Az^aMfrc*c+}|O$YWTJ#q)MJU~AiklUBof2r-7 zFZ3Q>bMfxvgxofm)KpHC2>0Nhj zP3w`l_0BEW(DvOpZh|fSNVF*CqN}o5DW?CqJb-u8{wwd}CHl*ib9j}WW+#k)g`I{! zihoZ7Z@-eKN0n7cRLVYndrWYIC9FT=)eyId&9~B4+hd^qcW+iSS|T3l6Hjl%FI@HO R#>~2_btPj4-KPeQ{|lQCIr0Di diff --git a/csv_preprocessor.py b/csv_preprocessor.py index e1b204f..a3bc3db 100644 --- a/csv_preprocessor.py +++ b/csv_preprocessor.py @@ -65,9 +65,6 @@ CLK_LP_LOW_MIN_NS = 300.0 HS_BURST_AMPLITUDE_MIN_MV = 40.0 # mV — below this, no real HS burst is present # Lowered from 50 mV: 48 mV capture (0001) was a false alarm; true flicker (0008) at 34 mV. -HS_BURST_AMPLITUDE_HIGH_MV = 70.0 # mV — above this with short LP-low → anomalous LP states -# Normal HS (dynamic video) = ~15–40 mV P95-P5/2 on LP probe (RC-filtered). -# LP-01/LP-10 states in the burst window (cap 0042 type) produce 130+ mV → flag these. # Mode A minimum amplitude: LP-11-return edge artifacts produce near-zero amplitude in the # burst window (burst is pure LP-low DC between two LP-11 regions). Require ≥ this to @@ -997,7 +994,7 @@ def analyze_lp_file(path: Path) -> "LPMetrics": f"(TCLK_PREPARE+TCLK_ZERO minimum) — SN65DSI83 may fail to lock CLK lane" ) - # Flicker suspect: four confirmed failure modes on this hardware: + # Flicker suspect: three confirmed failure modes on this hardware: # # A) Normal LP-low (~342–380 ns) → bridge misses SoT → returns to LP-11 # Signature: lp11_to_hs fires at real LP-low end (~347 ns), hs_amplitude ≈ 15–30 mV. @@ -1007,21 +1004,13 @@ def analyze_lp_file(path: Path) -> "LPMetrics": # A2) LP-11 present, HS attempt made but amplitude too weak for rolling-std to fire # Signature: lp11_to_hs is None (rolling-std < HS_OSC_STD_V throughout 500 ns # lookahead), hs_amplitude < 50 mV, LP-11 returns ~500 ns later. - # Root cause: marginal VDD_DSI (LP-11 sags to ~1.0 V vs 1.2 V nominal), reducing - # HS drive strength below the detection threshold. - # Confirmed: capture 0010 (lp11_to_hs=None, amp≈32 mV, LP-11 returned at +513 ns). # - # B) Short LP-low (50–200 ns, vs nominal ~342–380 ns) → marginal SoT timing - # → HS burst starts but is weak, hs_amplitude ≈ 40–60 mV (vs normal 100–122 mV). - # Signature: lp_low anomalously short, lp11_to_hs fires at noise spike (~3 ns). - # The lp11_to_hs guard cannot be used here, so LP-low duration gates the check. - # Confirmed example: capture 0120 (lp_low=108 ns, lp11_to_hs=1.7 ns, amp=49 mV). + # B) Short LP-low (< 200 ns, vs nominal ~342–380 ns) → anomalous SoT timing. + # Flag on LP-low duration alone: any lp_low < 200 ns is outside the normal range + # and warrants investigation regardless of amplitude or rolling-std state. + # Confirmed: capture 0124 (lp_low=108 ns). # - # C) No LP-11 detected at all → MIPI link silent or stuck - # Signature: no LP-11 region found, lp_transition_valid=False, no LP or HS seen. - # This is the most severe failure: the bridge or DSI IP has stopped outputting. - # Confirmed: follow-up of capture 13 (no LP-11, no HS) while display was flickering. - # Guard: only flag DAT lane (not CLK which is normally in continuous HS mode). + # C) No LP-11 detected at all → MIPI link silent or stuck. # # Only flag DAT lane (CLK is continuous HS — LP states not expected). _lp_low_short = ( @@ -1047,26 +1036,9 @@ def analyze_lp_file(path: Path) -> "LPMetrics": # 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. - # Gated by hs_rolling_std_found: if HS actually launched (rolling-std fires - # after LP-low ends), LP-low being short is a timing anomaly but not a flicker. - or (_lp_low_short and not hs_rolling_std_found) - # Mode D: LP-low normal, noise-spike lp11_to_hs (< 50 ns), low HS amplitude. - # Requires video/dynamic content. Gate: if rolling-std fires after LP-low ends, - # HS launched normally and the early lp11_to_hs was just the LP-low edge trigger. - or (lp11_to_hs_ns is not None - and lp11_to_hs_ns < LP_LOW_DUR_MIN_NS - and not _lp_low_short - and not hs_rolling_std_found) + or _lp_low_short ) ) - # Mode E: short LP-low with anomalously HIGH amplitude — LP-01/LP-10 states in the - # burst window (link failed to launch HS cleanly). Normal LP probe HS = 15–40 mV; - # LP-01/LP-10 DC levels produce 70+ mV. Confirmed: cap 0042 (lp_low=61 ns, amp=133 mV). - hs_burst_anomalous = ( - _lp_low_short - and hs_amplitude_mv is not None - and hs_amplitude_mv > HS_BURST_AMPLITUDE_HIGH_MV - ) # Mode C: no LP-11 at all → link silent (but exclude CLK which is always HS) link_silent = ( channel == "dat" @@ -1080,13 +1052,9 @@ def analyze_lp_file(path: Path) -> "LPMetrics": or ( lp_transition_valid and ( - # 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 - or hs_burst_anomalous + or _lp_low_short ) ) ) @@ -1108,6 +1076,7 @@ def analyze_lp_file(path: Path) -> "LPMetrics": hs_amplitude_mv = hs_amplitude_mv, lp_transition_valid = lp_transition_valid, clk_lp_startup_ok = clk_lp_startup_ok, + hs_rolling_std_found = hs_rolling_std_found, flicker_suspect = flicker_suspect, warnings = warnings, )