fix(smoke-test): decode self-test results from dedicated status fields

smoke_test.py:154-155 extracted self-test flags/detail from
status.cfar_threshold — but that field carries the CFAR detection
threshold (opcode 0x03 readback), not self-test results.

RadarProtocol.parse_status_packet already exposes the correct fields
via status.self_test_flags and status.self_test_detail (radar_protocol.py:257,
word 5: {7'd0, self_test_busy, 8'd0, self_test_detail[7:0], 3'd0,
self_test_flags[4:0]}). test_GUI_V65_Tk.py:198 pins these fields as
the contract.

Result: smoke_test on live hardware would have decoded garbage (CFAR
threshold bits) as per-subsystem PASS/FAIL flags. Fix replaces the
two assignments and refreshes the stale "simplification" comment
that predated the dedicated status fields.

Regression: 137 passed, 3 skipped (test_v7.py + cross_layer). 8
self_test invariant tests in test_GUI_V65_Tk.py still pass.
This commit is contained in:
Serhii
2026-04-21 09:09:37 +03:00
parent 846a0debe8
commit 470f68c370
+5 -5
View File
@@ -148,11 +148,11 @@ class SmokeTest:
if ptype == "status":
status = RadarProtocol.parse_status_packet(raw[start:end])
if status is not None:
# Self-test results encoded in status fields
# (This is a simplification — in production, the FPGA
# would have a dedicated self-test result packet type)
result_flags = status.cfar_threshold & 0x1F
result_detail = (status.cfar_threshold >> 8) & 0xFF
# Self-test results live in dedicated status fields
# (word 5: self_test_flags[4:0], self_test_detail[7:0]).
# See radar_protocol.py:257 and test_GUI_V65_Tk.py:198.
result_flags = status.self_test_flags
result_detail = status.self_test_detail
return (result_flags, result_detail)
time.sleep(0.1)