Fix CFAR blocking assignment (= to <=) in clocked block, add Build 15 analysis report
CFAR magnitude computation in radar_system_top.v used blocking assignment (=) inside posedge-clocked always block, creating sim/synth mismatch risk. Changed to non-blocking (<=). Threshold check now reads previous cycle's magnitude, which is correct sequential behavior. Regression: 15/15 quick + system TB pass. Build 15 analysis written to 10_docs/reports/ (not tracked — gitignored).
This commit is contained in:
@@ -436,8 +436,8 @@ always @(posedge clk_100m_buf or negedge sys_reset_n) begin
|
||||
// Simple threshold detection on doppler magnitude
|
||||
if (rx_doppler_valid) begin
|
||||
// Calculate approximate magnitude (|I| + |Q|)
|
||||
cfar_mag = (rx_doppler_real[15] ? -rx_doppler_real : rx_doppler_real) +
|
||||
(rx_doppler_imag[15] ? -rx_doppler_imag : rx_doppler_imag);
|
||||
cfar_mag <= (rx_doppler_real[15] ? -rx_doppler_real : rx_doppler_real) +
|
||||
(rx_doppler_imag[15] ? -rx_doppler_imag : rx_doppler_imag);
|
||||
|
||||
// Threshold detection
|
||||
if (cfar_mag > 17'd10000) begin
|
||||
|
||||
Reference in New Issue
Block a user