From 11111bcd6802ab464fc4f9dacdc8939fc923fab1 Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Fri, 23 Apr 2021 16:22:28 +0200 Subject: [PATCH] Adding freq domain deroration to DL also fixed build wanings --- executables/nr-uesoftmodem.c | 1 + openair1/PHY/MODULATION/nr_modulation.c | 1 - openair1/PHY/MODULATION/nr_modulation.h | 2 ++ openair1/PHY/MODULATION/slot_fep_nr.c | 13 +++++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index ef50e34008..3b27716ed6 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -470,6 +470,7 @@ int main( int argc, char **argv ) { nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]); init_symbol_rotation(&UE[CC_id]->frame_parms); + init_timeshift_rotation(&UE[CC_id]->frame_parms); init_nr_ue_vars(UE[CC_id], 0, abstraction_flag); #ifdef FR2_TEST diff --git a/openair1/PHY/MODULATION/nr_modulation.c b/openair1/PHY/MODULATION/nr_modulation.c index efa18db2a3..954cabc21d 100644 --- a/openair1/PHY/MODULATION/nr_modulation.c +++ b/openair1/PHY/MODULATION/nr_modulation.c @@ -749,7 +749,6 @@ void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp) { const double fd = 15e3*(float)(1<numerology_index); const double Tc=(1/480e3/4096); - const double Nu=2048*64*(1/(float)(1<numerology_index)); const double Ncp0=16*64 + (144*64*(1/(float)(1<numerology_index))); const double Ncp1=(144*64*(1/(float)(1<numerology_index))); double t0; diff --git a/openair1/PHY/MODULATION/nr_modulation.h b/openair1/PHY/MODULATION/nr_modulation.h index 547d20952f..75541a1361 100644 --- a/openair1/PHY/MODULATION/nr_modulation.h +++ b/openair1/PHY/MODULATION/nr_modulation.h @@ -117,6 +117,8 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, void init_symbol_rotation(NR_DL_FRAME_PARMS *fp); +void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp); + void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, int32_t *rxdataF, int slot, diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index 5a6a5ed625..10c25ea7bc 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -157,6 +157,19 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, (int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], frame_parms->ofdm_symbol_size, 15); + + int16_t *shift_rot; + if (symb_offset+symbol == (7 * (1 << frame_parms->numerology_index))) + shift_rot = frame_parms->timeshift_symbol_rotation[0]; + else + shift_rot = frame_parms->timeshift_symbol_rotation[1]; + + multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], + shift_rot, + (int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], + 1, + frame_parms->ofdm_symbol_size, + 15); } #ifdef DEBUG_FEP