Commit b8f77a9c authored by Ahmed Hussein's avatar Ahmed Hussein
Browse files

Fixed PTRS frequency domain allocation

   - The bug occurs when the PUSCH allocation contains the central RB of the whole UL BW
parent e9dd51a7
......@@ -221,9 +221,6 @@ uint8_t is_ptrs_subcarrier(uint16_t k, uint8_t K_ptrs, uint16_t n_rnti, uint16_t
else
k_RB_ref = n_rnti % (N_RB % K_ptrs);
if (k < (k_RE_ref + k_RB_ref*NR_NB_SC_PER_RB + start_sc))
return 0;
if ((k - k_RE_ref - k_RB_ref*NR_NB_SC_PER_RB - start_sc) % (K_ptrs*NR_NB_SC_PER_RB) == 0)
return 1;
......
......@@ -230,7 +230,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
nfapi_nr_pusch_pdu_t *pusch_pdu,
NR_DL_FRAME_PARMS *frame_parms)
{
unsigned short start_re, re, nb_re_pusch;
unsigned short start_re, re, nb_re_pusch, k;
unsigned char aarx;
uint8_t K_ptrs;
uint32_t rxF_ext_index = 0;
......@@ -285,8 +285,14 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
is_dmrs_re = 0;
if ( ((pusch_pdu->pdu_bit_map)>>2)& 0x01 ) {
if(((start_re + re) % frame_parms->ofdm_symbol_size) < start_re)
k = start_re + re;
else
k = (start_re + re) % frame_parms->ofdm_symbol_size;
is_ptrs_symbol_flag = is_ptrs_symbol(symbol,
(start_re + re)%frame_parms->ofdm_symbol_size,
k,
n_rnti,
pusch_pdu->rb_size,
aarx,
......
......@@ -106,7 +106,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
int32_t **txdataF;
uint16_t start_sc, start_rb;
int8_t Wf[2], Wt[2], l_prime[2], delta;
uint16_t rnti, n_dmrs, code_rate, number_dmrs_symbols, nb_rb, k;
uint16_t rnti, n_dmrs, code_rate, number_dmrs_symbols, nb_rb, k, k_temp;
uint8_t dmrs_type, nb_dmrs_re_per_rb, number_of_symbols, mcs, Nl;
int ap, start_symbol, Nid_cell, i;
int sample_offsetF, N_RE_prime, N_PRB_oh;
......@@ -396,8 +396,14 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
}
if (UE->ptrs_configured == 1){
if(k < start_sc)
k_temp = k + frame_parms->ofdm_symbol_size;
else
k_temp = k;
is_ptrs = is_ptrs_symbol(l,
k,
k_temp,
rnti,
nb_rb,
ap,
......
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