- // Send 7 most significant bits of tag signal (signed), plus 1 bit reader signal
- if (corr_i_accum[13:11] == 3'b000 || corr_i_accum[13:11] == 3'b111)
- corr_i_out <= {corr_i_accum[11:5], after_hysteresis_prev_prev};
- else // truncate to maximum value
- if (corr_i_accum[13] == 1'b0)
- corr_i_out <= {7'b0111111, after_hysteresis_prev_prev};
- else
- corr_i_out <= {7'b1000000, after_hysteresis_prev_prev};
- if (corr_q_accum[13:11] == 3'b000 || corr_q_accum[13:11] == 3'b111)
- corr_q_out <= {corr_q_accum[11:5], after_hysteresis_prev};
- else // truncate to maximum value
- if (corr_q_accum[13] == 1'b0)
- corr_q_out <= {7'b0111111, after_hysteresis_prev};
- else
- corr_q_out <= {7'b1000000, after_hysteresis_prev};
- after_hysteresis_prev_prev <= after_hysteresis;
+ if (hi_read_rx_xcorr_amplitude)
+ begin
+ // send amplitude plus 2 bits reader signal
+ corr_i_out <= corr_amplitude[13:6];
+ corr_q_out <= {corr_amplitude[5:0], after_hysteresis_prev_prev, after_hysteresis_prev};
+ end
+ else
+ begin
+ // Send 7 most significant bits of in phase tag signal (signed), plus 1 bit reader signal
+ if (corr_i_accum[13:11] == 3'b000 || corr_i_accum[13:11] == 3'b111)
+ corr_i_out <= {corr_i_accum[11:5], after_hysteresis_prev_prev};
+ else // truncate to maximum value
+ if (corr_i_accum[13] == 1'b0)
+ corr_i_out <= {7'b0111111, after_hysteresis_prev_prev};
+ else
+ corr_i_out <= {7'b1000000, after_hysteresis_prev_prev};
+ // Send 7 most significant bits of quadrature phase tag signal (signed), plus 1 bit reader signal
+ if (corr_q_accum[13:11] == 3'b000 || corr_q_accum[13:11] == 3'b111)
+ corr_q_out <= {corr_q_accum[11:5], after_hysteresis_prev};
+ else // truncate to maximum value
+ if (corr_q_accum[13] == 1'b0)
+ corr_q_out <= {7'b0111111, after_hysteresis_prev};
+ else
+ corr_q_out <= {7'b1000000, after_hysteresis_prev};
+ end