From f1e041ad98ecfef28f4571557ca47ce114a1e432 Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Tue, 21 Aug 2018 15:18:05 +0200 Subject: [PATCH 1/5] bug fix for 25RBs with new modulation scheme and add config for 5 & 10 MHz with phy-test --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 7 ++++--- openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 6f1913ff91..0bd28b6827 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -2423,7 +2423,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, * with above code that needs to be analyzed and fixed. In the * meantime, let's use the generic function. */ - allocate_REs = allocate_REs_in_RB; + //allocate_REs = allocate_REs_in_RB; break; } @@ -2432,7 +2432,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, * previous version. Some more work/validation is needed before * we switch to the new version. */ - allocate_REs = allocate_REs_in_RB; + //allocate_REs = allocate_REs_in_RB; switch (mod_order1) { case 2: @@ -2485,7 +2485,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, skip_half = check_skiphalf(rb,subframe_offset,frame_parms,l,nsymb); skip_dc = check_skip_dc(rb,frame_parms); - + if(skip_half>0) + allocate_REs = allocate_REs_in_RB; if (dlsch0) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 49cc68b06a..71449e3cd4 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -202,7 +202,8 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int32_t normalized_rx_power; int32_t target_rx_power= 178; int CC_id = 0; - int nb_rb = 96; + int nb_rb; + int N_RB_UL; eNB_MAC_INST *mac = RC.mac[module_idP]; COMMON_channels_t *cc = &mac->common_channels[0]; UE_list_t *UE_list=&mac->UE_list; @@ -222,6 +223,18 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s //nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[0];; nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body; + N_RB_UL = to_prb(cc->mib->message.dl_Bandwidth); + switch(N_RB_UL){ + case 100: + nb_rb = 96; + break; + case 50: + nb_rb = 48; + break; + case 25: + nb_rb = 24; + break; + } mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe; hi_dci0_req->sfn_sf = (frameP << 4) + subframeP; From 7fed2bec9d59d2f3d0ba62a07c084941216e2200 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 21 Aug 2018 08:03:14 -0700 Subject: [PATCH 2/5] disabling new modulation for 25PRB --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 0bd28b6827..d18f0c2cd3 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -2432,7 +2432,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, * previous version. Some more work/validation is needed before * we switch to the new version. */ - //allocate_REs = allocate_REs_in_RB; + if (frame_parms->N_RB_DL==25) + allocate_REs = allocate_REs_in_RB; switch (mod_order1) { case 2: @@ -2485,9 +2486,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, skip_half = check_skiphalf(rb,subframe_offset,frame_parms,l,nsymb); skip_dc = check_skip_dc(rb,frame_parms); - if(skip_half>0) - allocate_REs = allocate_REs_in_RB; - if (dlsch0) { if (dlsch0_harq->Nlayers>1) { From 30cc9c1c66a749484a6c0842dc6f2d5669127319 Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Wed, 22 Aug 2018 15:36:43 +0200 Subject: [PATCH 3/5] adding half fill mechanism into accelorated modulation --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 203 +++++++++++++----- openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 6 +- 2 files changed, 156 insertions(+), 53 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 0bd28b6827..19fefc845e 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -165,10 +165,19 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, uint32_t tti_offset; uint8_t re; uint8_t *x0p; + uint8_t first_re,last_re; + + last_re=12; + first_re=0; + if (skip_half==1) + last_re=6; + else if (skip_half==2) + first_re=6; + re=first_re; if (skip_dc == 0) { - for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; - re<12; + for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re; + re0) + /*if(skip_half>0) allocate_REs = allocate_REs_in_RB; - + */ if (dlsch0) { if (dlsch0_harq->Nlayers>1) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 71449e3cd4..19570c6e10 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -71,7 +71,7 @@ schedule_ue_spec_phy_test( uint16_t rnti = 0x1235; uint32_t rb_alloc = 0x1FFFFF; int32_t tpc = 1; - int32_t mcs = 28; + int32_t mcs = 10; int32_t cqi = 15; int32_t ndi = (frameP*10+subframeP)/8; int32_t dai = 0; @@ -202,7 +202,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int32_t normalized_rx_power; int32_t target_rx_power= 178; int CC_id = 0; - int nb_rb; + int nb_rb = 24; int N_RB_UL; eNB_MAC_INST *mac = RC.mac[module_idP]; COMMON_channels_t *cc = &mac->common_channels[0]; @@ -319,7 +319,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s hi_dci0_req_body->number_of_dci++; ul_req_index = 0; - dlsch_flag = 0; + dlsch_flag = 0; for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ dlsch_flag = 1; From f65c39022643925c50ca0ab9668f15f784cf204c Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Thu, 23 Aug 2018 18:34:50 +0200 Subject: [PATCH 4/5] warning removal --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 9 +++------ openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index c8ed5319ed..d924d5117d 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -549,13 +549,10 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, uint32_t tti_offset; uint8_t re; uint8_t *x0p; - uint8_t first_re,last_re; + uint8_t first_re; - last_re=12; first_re=0; - if (skip_half==1) - last_re=6; - else if (skip_half==2) + if (skip_half==2) first_re=6; re=first_re; @@ -614,7 +611,7 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ((int16_t *)&txdataF[0][tti_offset])[16]=qam_table_s0[qam64_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[17]=qam_table_s0[qam64_table_offset_im]; - qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58]; + qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58]; qam64_table_offset_im=(x0p[55]<<2)|(x0p[57]<<1)|x0p[59]; ((int16_t *)&txdataF[0][tti_offset])[18]=qam_table_s0[qam64_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[19]=qam_table_s0[qam64_table_offset_im]; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 19570c6e10..25a15781ad 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -212,7 +212,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int sched_frame=frameP; int sched_subframe = (subframeP+4)%10; uint16_t ul_req_index; - uint8_t dlsch_flag; if (sched_subframenumber_of_dci++; ul_req_index = 0; - dlsch_flag = 0; for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ - dlsch_flag = 1; LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index); break; } From b5435440cd448f862fb07ab8bf0860922448ac7e Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Fri, 24 Aug 2018 12:14:51 +0200 Subject: [PATCH 5/5] bug fix for QPSK modulation with pilot --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index d924d5117d..bfdcdc1e94 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -285,8 +285,8 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, re<6; x0p+=2) { - qpsk_table_offset_re+=x0p[0]; - qpsk_table_offset_im+=x0p[1]; + qpsk_table_offset_re=x0p[0]; + qpsk_table_offset_im=x0p[1]; ((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qpsk_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im]; tti_offset+=P1_SHIFT[re+1]; @@ -297,8 +297,8 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, re<12; x0p+=2) { - qpsk_table_offset_re+=x0p[0]; - qpsk_table_offset_im+=x0p[1]; + qpsk_table_offset_re=x0p[0]; + qpsk_table_offset_im=x0p[1]; ((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qpsk_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im]; tti_offset+=P1_SHIFT[re+1];