feat(fpga): make FT2232H default USB interface, rewrite FT601 write FSM, add clock-loss watchdog
- Set USB_MODE default to 1 (FT2232H) in radar_system_top.v; 200T build overrides to USB_MODE=0 via build_200t.tcl generic property - Rewrite FT601 write FSM: 4-state architecture with 3-word packed data, pending-flag gating, and frame sync counter - Add FT2232H read FSM rd_cmd_complete flag, stream field zeroing, and range_data_ready 1-cycle pipeline delay in both USB modules - Implement clock-loss watchdog: ft_heartbeat toggle + 16-bit timeout counter drives ft_clk_lost, feeding ft_effective_reset_n via 2-stage ASYNC_REG synchronizer chain - Fix sample_counter reset literal width (11'd0 -> 12'd0) - Add FT2232H I/O timing constraints to 50T XDC; fix dac_clk comments - Document vestigial ft601_txe_n/rxf_n ports (needed for 200T XDC) - Tie off AGC ports on TE0713 dev wrapper - Rewrite tb_usb_data_interface.v for new 4-state FSM (89 checks) - Add USB_MODE=1 regression runs; remove dead CHECK 5/6 loop - Update diag_log.h USB interface comment
This commit is contained in:
@@ -70,6 +70,7 @@ PROD_RTL=(
|
||||
xfft_16.v
|
||||
fft_engine.v
|
||||
usb_data_interface.v
|
||||
usb_data_interface_ft2232h.v
|
||||
edge_detector.v
|
||||
radar_mode_controller.v
|
||||
rx_gain_control.v
|
||||
@@ -219,26 +220,9 @@ run_lint_static() {
|
||||
fi
|
||||
done
|
||||
|
||||
# --- Single-line regex checks across all production RTL ---
|
||||
for f in "$@"; do
|
||||
[[ -f "$f" ]] || continue
|
||||
case "$f" in tb/*) continue ;; esac
|
||||
|
||||
local linenum=0
|
||||
while IFS= read -r line; do
|
||||
linenum=$((linenum + 1))
|
||||
|
||||
# CHECK 5: $readmemh / $readmemb in synthesizable code
|
||||
# (Only valid in simulation blocks — flag if outside `ifdef SIMULATION)
|
||||
# This is hard to check line-by-line without tracking ifdefs.
|
||||
# Skip for v1.
|
||||
|
||||
# CHECK 6: Unused `include files (informational only)
|
||||
# Skip for v1.
|
||||
|
||||
: # placeholder — prevents empty loop body
|
||||
done < "$f"
|
||||
done
|
||||
# CHECK 5 ($readmemh in synth code) and CHECK 6 (unused includes)
|
||||
# require multi-line ifdef tracking / cross-file analysis. Not feasible
|
||||
# with line-by-line regex. Omitted — use Vivado lint instead.
|
||||
|
||||
if [[ "$err_count" -gt 0 ]]; then
|
||||
echo -e "${RED}FAIL${NC} ($err_count errors, $warn_count warnings)"
|
||||
@@ -452,7 +436,7 @@ if [[ "$QUICK" -eq 0 ]]; then
|
||||
chirp_memory_loader_param.v latency_buffer.v \
|
||||
matched_filter_multi_segment.v matched_filter_processing_chain.v \
|
||||
range_bin_decimator.v doppler_processor.v xfft_16.v fft_engine.v \
|
||||
usb_data_interface.v edge_detector.v radar_mode_controller.v \
|
||||
usb_data_interface.v usb_data_interface_ft2232h.v edge_detector.v radar_mode_controller.v \
|
||||
rx_gain_control.v cfar_ca.v mti_canceller.v fpga_self_test.v
|
||||
|
||||
# E2E integration (46 strict checks: TX, RX, USB R/W, CDC, safety, reset)
|
||||
@@ -466,11 +450,40 @@ if [[ "$QUICK" -eq 0 ]]; then
|
||||
chirp_memory_loader_param.v latency_buffer.v \
|
||||
matched_filter_multi_segment.v matched_filter_processing_chain.v \
|
||||
range_bin_decimator.v doppler_processor.v xfft_16.v fft_engine.v \
|
||||
usb_data_interface.v edge_detector.v radar_mode_controller.v \
|
||||
usb_data_interface.v usb_data_interface_ft2232h.v edge_detector.v radar_mode_controller.v \
|
||||
rx_gain_control.v cfar_ca.v mti_canceller.v fpga_self_test.v
|
||||
|
||||
# USB_MODE=1 (FT2232H production) variants of system tests
|
||||
run_test "System Top USB_MODE=1 (FT2232H)" \
|
||||
tb/tb_system_ft2232h_reg.vvp \
|
||||
-DUSB_MODE_1 \
|
||||
tb/radar_system_tb.v radar_system_top.v \
|
||||
radar_transmitter.v dac_interface_single.v plfm_chirp_controller.v \
|
||||
radar_receiver_final.v tb/ad9484_interface_400m_stub.v \
|
||||
ddc_400m.v nco_400m_enhanced.v cic_decimator_4x_enhanced.v \
|
||||
cdc_modules.v fir_lowpass.v ddc_input_interface.v \
|
||||
chirp_memory_loader_param.v latency_buffer.v \
|
||||
matched_filter_multi_segment.v matched_filter_processing_chain.v \
|
||||
range_bin_decimator.v doppler_processor.v xfft_16.v fft_engine.v \
|
||||
usb_data_interface.v usb_data_interface_ft2232h.v edge_detector.v radar_mode_controller.v \
|
||||
rx_gain_control.v cfar_ca.v mti_canceller.v fpga_self_test.v
|
||||
|
||||
run_test "System E2E USB_MODE=1 (FT2232H)" \
|
||||
tb/tb_system_e2e_ft2232h_reg.vvp \
|
||||
-DUSB_MODE_1 \
|
||||
tb/tb_system_e2e.v radar_system_top.v \
|
||||
radar_transmitter.v dac_interface_single.v plfm_chirp_controller.v \
|
||||
radar_receiver_final.v tb/ad9484_interface_400m_stub.v \
|
||||
ddc_400m.v nco_400m_enhanced.v cic_decimator_4x_enhanced.v \
|
||||
cdc_modules.v fir_lowpass.v ddc_input_interface.v \
|
||||
chirp_memory_loader_param.v latency_buffer.v \
|
||||
matched_filter_multi_segment.v matched_filter_processing_chain.v \
|
||||
range_bin_decimator.v doppler_processor.v xfft_16.v fft_engine.v \
|
||||
usb_data_interface.v usb_data_interface_ft2232h.v edge_detector.v radar_mode_controller.v \
|
||||
rx_gain_control.v cfar_ca.v mti_canceller.v fpga_self_test.v
|
||||
else
|
||||
echo " (skipped receiver golden + system top + E2E — use without --quick)"
|
||||
SKIP=$((SKIP + 4))
|
||||
SKIP=$((SKIP + 6))
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user