Commit 19301afc authored by alexjiao's avatar alexjiao

Fix bug for SRS generation when freqDomainShift (n_shift) is not 0

According to TS 38.211 section 6.4.1.4.3, the frequency domain shift value n_shift
is from higher-layer parameter freqDomainShift.
The quantity n_RRC is given by higher-layer parameter freqDomainPosition.
Also corrected k_0_overbar_p calculation formula to align with standard.
parent 8186e840
...@@ -293,7 +293,7 @@ bool generate_srs_nr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -293,7 +293,7 @@ bool generate_srs_nr(NR_DL_FRAME_PARMS *frame_parms,
} }
uint8_t k_l_offset = 0; // If the SRS is configured by the IE SRS-PosResource-r16, the quantity k_l_offset is uint8_t k_l_offset = 0; // If the SRS is configured by the IE SRS-PosResource-r16, the quantity k_l_offset is
// given by TS 38.211 - Table 6.4.1.4.3-2, otherwise k_l_offset = 0. // given by TS 38.211 - Table 6.4.1.4.3-2, otherwise k_l_offset = 0.
uint8_t k_0_overbar_p = (nr_srs_info->n_shift * NR_NB_SC_PER_RB + (K_TC_p + k_l_offset)) % K_TC; uint8_t k_0_overbar_p = nr_srs_info->n_shift * NR_NB_SC_PER_RB + (K_TC_p + k_l_offset) % K_TC;
uint8_t k_0_p = k_0_overbar_p + K_TC * M_sc_b_SRS * sum_n_b; uint8_t k_0_p = k_0_overbar_p + K_TC * M_sc_b_SRS * sum_n_b;
nr_srs_info->k_0_p[p_index][l_line] = k_0_p; nr_srs_info->k_0_p[p_index][l_line] = k_0_p;
......
...@@ -278,8 +278,8 @@ static void configure_srs_info(fapi_nr_ul_config_srs_pdu *srs_config_pdu, nr_srs ...@@ -278,8 +278,8 @@ static void configure_srs_info(fapi_nr_ul_config_srs_pdu *srs_config_pdu, nr_srs
nr_srs_info->n_SRS_cs = srs_config_pdu->cyclic_shift; nr_srs_info->n_SRS_cs = srs_config_pdu->cyclic_shift;
nr_srs_info->n_ID_SRS = srs_config_pdu->sequence_id; nr_srs_info->n_ID_SRS = srs_config_pdu->sequence_id;
// It adjusts the SRS allocation to align with the common resource block grid in multiples of four // It adjusts the SRS allocation to align with the common resource block grid in multiples of four
nr_srs_info->n_shift = srs_config_pdu->frequency_position; nr_srs_info->n_shift = srs_config_pdu->frequency_shift;
nr_srs_info->n_RRC = srs_config_pdu->frequency_shift; nr_srs_info->n_RRC = srs_config_pdu->frequency_position;
nr_srs_info->groupOrSequenceHopping = srs_config_pdu->group_or_sequence_hopping; nr_srs_info->groupOrSequenceHopping = srs_config_pdu->group_or_sequence_hopping;
nr_srs_info->l_offset = srs_config_pdu->time_start_position; nr_srs_info->l_offset = srs_config_pdu->time_start_position;
nr_srs_info->T_SRS = srs_config_pdu->t_srs; nr_srs_info->T_SRS = srs_config_pdu->t_srs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment