Commit Graph

6 Commits

Author SHA1 Message Date
Jason e78e36a635 Add UART diagnostic capture tool for board-day bring-up
- Python/pyserial script captures STM32 USART3 DIAG output (115200 8N1)
- Auto-detects serial port on macOS (ST-Link VCP, FTDI, CH340, CP210x)
- Color-coded terminal output by subsystem and severity
- Simultaneous logging to timestamped file in logs/
- Filtering by subsystem tag (--filter LO,PA) or severity (--errors-only)
- Parses all DIAG macro formats: DIAG, DIAG_WARN, DIAG_ERR, DIAG_SECTION
- Capture stats summary on exit (line counts by subsystem, error/warning totals)
- logs/ added to .gitignore
2026-03-19 16:32:54 +02:00
Jason bb7a7390c3 Clean gitignore after root artifact reorganization 2026-03-18 22:08:02 +02:00
Jason b879aefe6d Ignore local cleanup artifacts and generated report directories 2026-03-18 22:04:44 +02:00
Jason fd6094ee9e Fix P0/P1 RTL bugs found during pre-hardware audit
P0-1: nco_400m_enhanced.v — DSP48E1 OPMODE corrected from PCIN to P
      feedback (was routing stale cascade data into accumulator)
P0-2: radar_receiver_final.v — removed same-clock CDC that corrupted
      ADC data path between ad9484_interface and DDC
P1-5: fir_lowpass.v — fixed zero replication count in coefficient
      symmetric extension ({0{1'b0}} is empty, now uses explicit 0)

Also updates .gitignore to exclude debug/scratch artifacts.

All 30+ testbenches pass (unit, co-sim, integration).
2026-03-16 22:24:06 +02:00
Jason f5a3394f23 Add 3 missing FPGA modules with enhanced testbenches (168/168 pass)
Implement the 3 modules identified as missing during repo audit:
- matched_filter_processing_chain: behavioral FFT-based pulse compression
- range_bin_decimator: 1024→64 bin decimation with 3 modes + start_bin
- radar_mode_controller: 4-mode beam/chirp controller

Wire radar_mode_controller into radar_receiver_final.v to drive the
previously-undriven use_long_chirp and mc_new_* signals.

Implement start_bin functionality in range_bin_decimator (was dead code
in the original interface contract — now skips N input bins before
decimation for region-of-interest selection).

Add comprehensive testbenches with Tier 1 confidence improvements:
- Golden reference co-simulation (Python FFT → hex → bin comparison)
- Saturation boundary tests (0x7FFF / 0x8000 extremes)
- Reset mid-operation recovery tests
- Valid-gap / stall handling tests
- Mode switching and counter persistence tests
- Accumulator overflow stress tests

Test counts: matched_filter 40/40, range_bin_decimator 55/55,
radar_mode_controller 73/73 — all passing with iverilog -g2001.
2026-03-15 13:37:10 +02:00
Jason 558f49cd4a Add 8 Verilog testbenches with full coverage (144/144 pass)
Testbenches for: edge_detector (17), nco_400m (20), cic_decimator (14),
fir_lowpass (13), freq_matched_filter (14), ddc_400m full-chain (7),
chirp_controller (39), chirp_contract regression (20).

Includes CSV output data for waveform verification.
Add .gitignore to exclude VCD/VVP build artifacts.
2026-03-15 06:14:11 +02:00