Commit 63106069 authored by Thomas Schlichter's avatar Thomas Schlichter

fix alignment issues in case of odd number of PRBs

parent 3c17573f
...@@ -359,16 +359,29 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, ...@@ -359,16 +359,29 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
symbol_rotation[sidx + first_symbol + symb_offset].r, symbol_rotation[sidx + first_symbol + symb_offset].r,
symbol_rotation[sidx + first_symbol + symb_offset].i); symbol_rotation[sidx + first_symbol + symb_offset].i);
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size, if (fp->N_RB_DL & 1) {
symbol_rotation + sidx + first_symbol + symb_offset, rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size,
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size, symbol_rotation + sidx + first_symbol + symb_offset,
fp->N_RB_DL * 6, ((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size,
15); (fp->N_RB_DL + 1) * 6,
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset, 15);
symbol_rotation + sidx + first_symbol + symb_offset, rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset - 6,
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset, symbol_rotation + sidx + first_symbol + symb_offset,
fp->N_RB_DL * 6, ((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset - 6,
15); (fp->N_RB_DL + 1) * 6,
15);
} else {
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size,
symbol_rotation + sidx + first_symbol + symb_offset,
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size,
fp->N_RB_DL * 6,
15);
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset,
symbol_rotation + sidx + first_symbol + symb_offset,
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset,
fp->N_RB_DL * 6,
15);
}
} }
} }
This diff is collapsed.
...@@ -603,16 +603,29 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, ...@@ -603,16 +603,29 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
s + symb_offset, s + symb_offset,
rot.r, rot.i); rot.r, rot.i);
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s], if (frame_parms->N_RB_UL & 1) {
&rot, rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s], &rot,
frame_parms->N_RB_UL * 6, (c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
15); (frame_parms->N_RB_UL + 1) * 6,
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset], 15);
&rot, rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset - 6],
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset], &rot,
frame_parms->N_RB_UL * 6, (c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset - 6],
15); (frame_parms->N_RB_UL + 1) * 6,
15);
} else {
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
&rot,
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
frame_parms->N_RB_UL * 6,
15);
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset],
&rot,
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset],
frame_parms->N_RB_UL * 6,
15);
}
} }
} }
......
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