mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-06-08 14:44:56 +00:00
004c933ef0
The FT601 USB 3.0 driver was 5 PRs behind the FT2232H driver: still
emitting pre-PR-G 12-byte per-cell streaming packets with 1-bit
cfar_detection, no subframe_enable snapshot (M-8), no MEDIUM PRI
status readback (M-5 / PR-AC.1), no CFAR telemetry (PR-G). Host
parser only speaks v2 bulk, so a 200T+FT601 build couldn't talk to
the GUI. This commit closes that gap by cloning the FT2232H module
body verbatim and swapping the output stage from 8b/cycle to
32b+4b-BE/cycle.
usb_data_interface.v — full rewrite (~1300 LOC):
- 3 internal BRAMs (doppler_mag / range / detect), 3-cycle RMW
pipeline, Manhattan magnitude, all CDC chains, 8-state WR FSM
copied from FT2232H reference verbatim
- status_words[0..7] 34-byte packet (M-5 parity with PR-AC.1
21bf7a0): medium_chirp_cycles + medium_listen_cycles in word 7
- subframe_enable_snapshot in frame byte 2 bits[5:3] (PR-U / M-8)
- 2-bit cfar_detect_class (PR-F)
- PR-G CFAR telemetry (detect_count_cand + detect_threshold_soft
in status word 6)
- AUDIT-C12 wr_done_toggle handshake + frame_drop_count
- PR-Z A6 Bug C fix (detect_clearing on wr_done_pulse)
- PR-AA fix (BRAM addr advance at phase 0 / MSB, not phase 1)
- PR-Z A6 Bug B preload (detect_rd_addr=1 at WR_DETECT entry)
- Output stage: byte_now combinational generator + 4-lane pack-emit
accumulator. Full words BE=1111, partials BE=0001/0011/0111 at
section ends. Byte-order convention: byte 0 -> ft601_data[7:0],
byte N+1 -> next lane up (preserves MSB-first FT2232H wire order)
- ODDR clock forwarding preserved (ft601_clk_out)
- Vestigial ft601_txe_n / ft601_rxf_n outputs kept tied 1'b1
(200T board has physical pins routed; removing breaks the build)
radar_system_top.v — 9 new connections to the FT601 instance
(no new top-level signals — all driven from already-existing internal
wires the FT2232H instance was already using):
- cfar_detection (1-bit) -> cfar_detect_class (2-bit)
- range_bin_in, doppler_bin_in (rx_detect_valid mux)
- frame_complete, subframe_enable
- status_medium_chirp, status_medium_listen, status_cfar_alpha_soft
- status_detect_threshold_soft, status_detect_count_cand