Gap 4 USB Read Path: wire host-to-FPGA command path with toggle CDC, add read path tests

- usb_data_interface.v: Add FT601 read FSM (RD_IDLE/OE_ASSERT/READING/
  DEASSERT/PROCESS) + cmd_data/valid/opcode/addr/value output ports
- radar_system_top.v: Connect cmd_* ports from usb_inst, add toggle CDC
  for cmd_valid (ft601_clk -> clk_100m), add command decode registers
  (mode/trigger/cfar_threshold/stream_control), wire host_mode and
  host_trigger to rx_inst
- radar_receiver_final.v: Add host_mode[1:0] and host_trigger input
  ports, replace hardcoded mode/trigger in radar_mode_controller instance
- tb_usb_data_interface.v: Connect cmd_* ports, add host data bus driver,
  add Test Groups 12 (single command), 13 (multiple commands), 14
  (read/write interleave). USB TB now has 55 checks.

Regression: 18/18 PASS
This commit is contained in:
Jason
2026-03-19 23:16:26 +02:00
parent c6103b37de
commit e5d1b3cfc3
4 changed files with 477 additions and 92 deletions
+8 -3
View File
@@ -22,7 +22,12 @@ module radar_receiver_final (
// Matched filter range profile output (for USB)
output wire signed [15:0] range_profile_i_out,
output wire signed [15:0] range_profile_q_out,
output wire range_profile_valid_out
output wire range_profile_valid_out,
// Host command inputs (Gap 4: USB Read Path)
// CDC-synchronized in radar_system_top.v before reaching here
input wire [1:0] host_mode, // Radar mode: 00=STM32, 01=auto-scan, 10=single-chirp
input wire host_trigger // Single-chirp trigger pulse (1 clk cycle)
);
// ========== INTERNAL SIGNALS ==========
@@ -81,11 +86,11 @@ wire [5:0] rmc_azimuth_count;
radar_mode_controller rmc (
.clk(clk),
.reset_n(reset_n),
.mode(2'b01), // Auto-scan mode
.mode(host_mode), // Controlled by host via USB (default: 2'b01 auto-scan)
.stm32_new_chirp(1'b0), // Unused in auto mode
.stm32_new_elevation(1'b0), // Unused in auto mode
.stm32_new_azimuth(1'b0), // Unused in auto mode
.trigger(1'b0), // Unused in auto mode
.trigger(host_trigger), // Single-chirp trigger from host via USB
.use_long_chirp(use_long_chirp),
.mc_new_chirp(mc_new_chirp),
.mc_new_elevation(mc_new_elevation),