From b1e2c99b93a937827a963939a2d2b2a939df2346 Mon Sep 17 00:00:00 2001 From: Francesco Mani Date: Thu, 17 Dec 2020 13:09:32 +0100 Subject: [PATCH] moving initialization of gold for pdsch to nr_init_ue --- openair1/PHY/INIT/nr_init_ue.c | 6 ++++++ openair1/PHY/NR_REFSIG/nr_gold_ue.c | 13 ++++--------- .../PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 8 ++++++++ openair1/PHY/defs_nr_UE.h | 3 +++ openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 6 ------ .../CONF/gnb.band78.tm1.106PRB.usrpn300.conf | 2 +- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index d7b7a7d855..a18da98eb5 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -616,6 +616,12 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, } } + // initializing the scrambling IDs for PDSCH DMRS + for (int i=0; i<2; i++) + ue->scramblingID[i]=fp->Nid_cell; + + nr_gold_pdsch(ue,ue->scramblingID); + // DLSCH for (eNB_id=0; eNB_idn_connected_eNB; eNB_id++) { for (th_id=0; th_idframe_parms.Nid_cell; - - //printf("gold pdsch nid %d lbar %d\n",nid,lbar); + nid = n_idDMRS[nscid]; for (ns=0; nsframe_parms.slots_per_frame; ns++) { for (l=0; lframe_parms.symbols_per_slot; l++) { @@ -112,9 +107,9 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue, LOG_D(PHY,"UE DMRS slot %d, symb %d, x2 %x, nscid %d\n",ns,l,x2,nscid); for (n=0; nnr_gold_pdsch[0][ns][l][nscid][n] = lte_gold_generic(&x1, &x2, reset); - reset = 0; - } + ue->nr_gold_pdsch[0][ns][l][nscid][n] = lte_gold_generic(&x1, &x2, reset); + reset = 0; + } } } } diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index b8cababbbc..6fb3d75ad1 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -689,6 +689,14 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12; uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type; int8_t delta = get_delta(p, config_type); + + // checking if re-initialization of scrambling IDs is needed + if ((ue->dmrs_DownlinkConfig.scramblingID0 != ue->scramblingID[0]) || (ue->dmrs_DownlinkConfig.scramblingID1 != ue->scramblingID[1])){ + ue->scramblingID[0]=ue->dmrs_DownlinkConfig.scramblingID0; + ue->scramblingID[1]=ue->dmrs_DownlinkConfig.scramblingID1; + nr_gold_pdsch(ue,ue->scramblingID); + } + nr_pdsch_dmrs_rx(ue,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol][0], &pilot[0],1000,0,nb_rb_pdsch+rb_offset); if (config_type == pdsch_dmrs_type1){ diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 1e64646815..d1caa06bd4 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -907,6 +907,9 @@ typedef struct { /// PDSCH DMRS uint32_t ****nr_gold_pdsch[NUMBER_OF_CONNECTED_eNB_MAX]; + // Scrambling IDs used + uint16_t scramblingID[2]; + /// PDCCH DMRS uint32_t ***nr_gold_pdcch[NUMBER_OF_CONNECTED_eNB_MAX]; diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index ae85135ba0..4d11e321d4 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1843,15 +1843,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, NR_DL_UE_HARQ_t *dlsch0_harq = dlsch->harq_processes[harq_pid]; uint16_t nb_symb_sch = dlsch0_harq->nb_symbols; uint16_t start_symb_sch = dlsch0_harq->start_symbol; - int symb_dmrs = -1; LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx); //to update from pdsch config - - for (int i=0;i<4;i++) if (((1<dlDmrsSymbPos) > 0) {symb_dmrs=i;break;} - AssertFatal(symb_dmrs>=0,"no dmrs in 0..3\n"); - LOG_D(PHY,"Initializing dmrs for symb %d DMRS mask %x\n",symb_dmrs,dlsch0_harq->dlDmrsSymbPos); - nr_gold_pdsch(ue,0); for (uint16_t m=start_symb_sch;m<(nb_symb_sch+start_symb_sch) ; m++){ nr_slot_fep(ue, diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index a6a11ee420..995fbfb45e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -159,7 +159,7 @@ gNBs = # ssb_PositionsInBurs_BitmapPR # 1=short, 2=medium, 3=long ssb_PositionsInBurst_PR = 2; - ssb_PositionsInBurst_Bitmap = 0x51; + ssb_PositionsInBurst_Bitmap = 0x1; # ssb_periodicityServingCell # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1