mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-06-10 23:41:18 +00:00
test(fpga): PR-AD AD.2 — USB driver TB rewrite + cross-comparison parity TB
tb/tb_usb_data_interface.v was on the obsolete pre-PR-G streaming
protocol (1-bit cfar_detection, 4-state FSM) — green CI gave false
confidence because TB and DUT were equally out of date. This rewrite
exercises the new v2 bulk FSM and adds a cross-comparison TB that
asserts byte-for-byte equality between the FT601 and FT2232H drivers
fed identical stimulus.
tb/tb_usb_data_interface.v — full rewrite (~370 LOC):
- Mirrors tb_usb_protocol_v2.v test groups for the FT601 path
- BE-aware byte capture using a single capture_idx integer with
blocking arithmetic + one non-blocking egress_count update
(four separate non-blocking assigns dropped 3 of 4 lanes — race
caught during development)
- 31/0 PASS, egress_count = 56330 bytes (matches FT2232H exactly)
tb/tb_usb_drivers_parity.v — new (~376 LOC):
- Instantiates both drivers in one TB, fed identical clk/reset/
streaming inputs, drained concurrently
- Captures each driver's byte stream into a 65536-byte ring buffer
- assert_parity task finds first byte mismatch index
- 3 scenarios: header-only (10 B), status packet (34 B), full
frame (56330 B)
- 9/0 PASS — drivers are now byte-equal across all scenarios.
Any future v2 protocol change on FT2232H must land on FT601 in
the same PR or this guard fires.
run_regression.sh — adds "USB Drivers Parity (PR-AD AD.2
cross-comparison)" entry in Phase 1 (changed-modules block).
Regression: 44/0/0 (43 baseline + 1 parity test).
This commit is contained in:
@@ -558,6 +558,10 @@ run_test "FT2232H Frame Drop Counter (AUDIT-C12)" \
|
||||
tb/tb_ft2232h_frame_drop.vvp \
|
||||
tb/tb_ft2232h_frame_drop.v usb_data_interface_ft2232h.v
|
||||
|
||||
run_test "USB Drivers Parity (PR-AD AD.2 cross-comparison)" \
|
||||
tb/tb_usb_drivers_parity.vvp \
|
||||
tb/tb_usb_drivers_parity.v usb_data_interface.v usb_data_interface_ft2232h.v
|
||||
|
||||
run_test "Doppler Frame-Start Gate (AUDIT-S3)" \
|
||||
tb/tb_doppler_frame_start_gate.vvp \
|
||||
tb/tb_doppler_frame_start_gate.v doppler_processor.v xfft_16.v fft_engine.v
|
||||
|
||||
Reference in New Issue
Block a user