NR UE: enable CSI report for SISO case
Correct precoded_sinr_dB wrongly set to 0 for SISO case. Also correct ri_restriction is 0 when calculating CQI bit length for SISO.
This commit is contained in:
@@ -592,7 +592,33 @@ int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue,
|
|||||||
// The first column is applicable if the UE is reporting a Rank = 1, whereas the second column is applicable if the
|
// The first column is applicable if the UE is reporting a Rank = 1, whereas the second column is applicable if the
|
||||||
// UE is reporting a Rank = 2.
|
// UE is reporting a Rank = 2.
|
||||||
|
|
||||||
if(N_ports == 1 || interference_plus_noise_power == 0) {
|
if (interference_plus_noise_power == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (N_ports == 1) {
|
||||||
|
// SISO case: SINR = E[|h|^2] / noise_power. No PMI to estimate.
|
||||||
|
int64_t signal_power = 0;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
for (int rb = csirs_config_pdu->start_rb; rb < (csirs_config_pdu->start_rb + csirs_config_pdu->nr_of_rbs); rb++) {
|
||||||
|
if (csirs_config_pdu->freq_density <= 1 && csirs_config_pdu->freq_density != (rb % 2)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
uint16_t k = (frame_parms->first_carrier_offset + rb * NR_NB_SC_PER_RB) % frame_parms->ofdm_symbol_size;
|
||||||
|
uint16_t k_offset = k + mem_offset;
|
||||||
|
|
||||||
|
const c16_t h = csi_rs_estimated_channel_freq[0][0][k_offset];
|
||||||
|
signal_power += (int64_t)h.r * h.r + (int64_t)h.i * h.i;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count > 0) {
|
||||||
|
const int64_t avg_signal_power = signal_power / count;
|
||||||
|
const uint32_t sinr = avg_signal_power / interference_plus_noise_power;
|
||||||
|
*precoded_sinr_dB = dB_fixed(sinr);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4480,7 +4480,7 @@ static uint8_t compute_ri_bitlen(const NR_CSI_ReportConfig_t *csi_reportconfig,
|
|||||||
|
|
||||||
if (codebookConfig == NULL) {
|
if (codebookConfig == NULL) {
|
||||||
csi_report->csi_meas_bitlen.ri_bitlen = 0;
|
csi_report->csi_meas_bitlen.ri_bitlen = 0;
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel *type1single = NULL;
|
struct NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel *type1single = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user