mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-06-08 22:47:16 +00:00
51a94f0baf
Two issues caught re-reviewing7862f4d: 1. doppler_processor.v: at sub_frame = NUM_SUBFRAMES-1 (=2 in production), the read-ahead pointer was advanced one cycle past the last useful chirp, producing an out-of-range mem_read_addr (chirps 48/49 in a 48-chirp frame) on the BRAM read port. The result was never consumed — counter > CPS-1 blocks the multiply — so the OOB read had no functional effect, but it still drives mem_mem[OOB_idx] every frame and would trigger Vivado synth range warnings. Gate the read_doppler_index advance on fft_sample_counter <= CHIRPS_PER_SUBFRAME - 3 so the last NBA at counter = CPS-3 schedules the data needed at counter = CPS-1 and no more. For sub_frame < NUM_SUBFRAMES-1 this just replaces previously-wasted forward reads with redundant reads of the same address; outputs are bit-exact. 2. radar_system_top.v: cfar_detect_class, cfar_detect_threshold_soft, and cfar_detect_count_cand were declared and connected to cfar_inst but went nowhere downstream. They will be wired to USB / telemetry in PR-G; until then they show up as dangling wires that Vivado optimises away with noisy warnings. Drop the wire decls and leave the cfar_ca output ports unconnected. The soft-tier comparison is still synthesized because the 1-bit detect_flag (which IS wired) depends on noise_product_soft via the `else if (cur > thr_soft)` branch, so the candidate logic is preserved in the netlist — only the class / soft-thr / cand-count rails are gone. Tests (parity with the PR-F numbers in7862f4d): - tb_chirp_controller: 43/43 PASS - tb_chirp_contract: 10/10 PASS - tb_cfar_ca: 24/0 PASS - tb_mti_canceller: 43/43 PASS - tb_doppler_realdata: 2056/2056 PASS - tb_doppler_frame_start_gate: 21/21 PASS - tb_system_e2e: 33/49 PASS (PR-F baseline parity)