fix: FPGA timing margins (WNS +0.002→+0.080ns) + 11 bug fixes from code review

FPGA timing (400MHz domain WNS: +0.339ns, was +0.002ns):
- DONT_TOUCH on BUFG to prevent AggressiveExplore cascade replication
- NCO→mixer pipeline registers break critical 1.5ns route
- Clock uncertainty reduced 200ps→100ps (adequate guardband)
- Updated golden/cosim references for +1 cycle pipeline latency

STM32 bug fixes:
- Guard uint32_t underflow in processStartFlag (length<4)
- Replace unbounded strcat in getSystemStatusForGUI with snprintf
- Early-return error masking in checkSystemHealth
- Add HAL_Delay in emergency blink loop

GUI bug fixes:
- Remove 0x03 from _HARDWARE_ONLY_OPCODES (was in both sets)
- Wire real error count in V7 diagnostics panel
- Fix _stop_demo showing 'Live' label during replay mode

FPGA comment fixes + CI: add test_v7.py to pytest command

Vivado build 50t passed: 0 failing endpoints, WHS=+0.056ns
This commit is contained in:
Jason
2026-04-14 00:08:26 +05:45
parent b4d1869582
commit 063fa081fe
12 changed files with 4323 additions and 4262 deletions
+1 -1
View File
@@ -452,7 +452,7 @@ class FT2232HConnection:
_HARDWARE_ONLY_OPCODES = {
0x01, # RADAR_MODE
0x02, # TRIGGER_PULSE
0x03, # DETECT_THRESHOLD
# 0x03 (DETECT_THRESHOLD) is NOT hardware-only — it's in _REPLAY_ADJUSTABLE_OPCODES
0x04, # STREAM_CONTROL
0x10, # LONG_CHIRP
0x11, # LONG_LISTEN
+10 -3
View File
@@ -150,6 +150,7 @@ class RadarDashboard(QMainWindow):
self._last_status: StatusResponse | None = None
self._frame_count = 0
self._gps_packet_count = 0
self._last_stats: dict = {}
self._current_targets: list[RadarTarget] = []
# FPGA control parameter widgets
@@ -1312,7 +1313,13 @@ class RadarDashboard(QMainWindow):
self._simulator.stop()
self._simulator = None
self._demo_mode = False
self._sb_mode.setText("Idle" if not self._running else "Live")
if not self._running:
mode = "Idle"
elif isinstance(self._connection, ReplayConnection):
mode = "Replay"
else:
mode = "Live"
self._sb_mode.setText(mode)
self._sb_status.setText("Demo stopped")
self._demo_btn_main.setText("Start Demo")
self._demo_btn_map.setText("Start Demo")
@@ -1359,7 +1366,7 @@ class RadarDashboard(QMainWindow):
@pyqtSlot(dict)
def _on_radar_stats(self, stats: dict):
pass # Stats are displayed in _refresh_gui
self._last_stats = stats
@pyqtSlot(str)
def _on_worker_error(self, msg: str):
@@ -1670,7 +1677,7 @@ class RadarDashboard(QMainWindow):
str(self._frame_count),
str(det),
str(gps_count),
"0", # errors
str(self._last_stats.get("errors", 0)),
f"{uptime:.0f}s",
f"{frame_rate:.1f}/s",
]