From 38363b10e3613c1b7fa8111e7368f28d28d2dfe2 Mon Sep 17 00:00:00 2001 From: Wu Jing Date: Tue, 15 May 2018 14:42:33 +0900 Subject: [PATCH 1/9] fix rm916 bug --- openair1/SCHED/phy_procedures_lte_eNb.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a0b13cdb7b..33fdffa536 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -889,7 +889,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) LOG_E(PHY,"Unknown number for N_RB_UL %d\n",fp->N_RB_UL); break; } - + SR_payload = 0; switch (uci->type) { case SR: case HARQ_SR: @@ -2010,6 +2010,7 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB, switch (harq_ack[0]) { case 0: + case 4: pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 0; break; case 1: // check if M=1,4,7 @@ -2018,7 +2019,9 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB, pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 1; release_harq(eNB,UE_id,0,frame,subframe,0xffff); release_harq(eNB,UE_id,1,frame,subframe,0xffff); - } + }else{ + pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 0; + } break; case 2: // check if M=2,5,8 if (uci->num_pucch_resources == 2 || tdd_config5_sf2scheds == 2 || @@ -2026,7 +2029,9 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB, pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 1; release_harq(eNB,UE_id,0,frame,subframe,0xffff); release_harq(eNB,UE_id,1,frame,subframe,0xffff); - } + }else{ + pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 0; + } break; case 3: // check if M=3,6,9 if (uci->num_pucch_resources == 3 || tdd_config5_sf2scheds == 3 || @@ -2034,7 +2039,9 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB, pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 1; release_harq(eNB,UE_id,0,frame,subframe,0xffff); release_harq(eNB,UE_id,1,frame,subframe,0xffff); - } + }else{ + pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 0; + } break; } break; From 24c669f394ee8290a8118b9e2d1053fc2d1d1233 Mon Sep 17 00:00:00 2001 From: Wu Jing Date: Tue, 15 May 2018 14:51:13 +0900 Subject: [PATCH 2/9] fix DLSCH no retransmission --- openair1/SCHED/phy_procedures_lte_eNb.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 33fdffa536..ab01b980a6 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1043,6 +1043,14 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) harq_ack[0] = 0; } uci->stat = metric[0]; + if(harq_ack[0] != 1){ + LOG_E(PHY,"PUCCH ACK/NACK(SR): frame %d subframe %d rnti %x n_pucch_1_0_sr[0] %d pucch_fmt %d harq_ack[0]:%d -> 1\n ", + frame,subframe,uci->rnti,uci->n_pucch_1_0_sr[0],uci->pucch_fmt,harq_ack[0]); + harq_ack[0] =1; + }else{ + LOG_E(PHY,"PUCCH ACK/NACK(SR): frame %d subframe %d rnti %x n_pucch_1_0_sr[0] %d pucch_fmt %d\n ", + frame,subframe,uci->rnti,uci->n_pucch_1_0_sr[0],uci->pucch_fmt); + } fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,2,0xffff); // special_bundling mode } else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==2)){ // multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2 @@ -1310,6 +1318,14 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) harq_ack[0] = pucch_b0b1[0][0]; harq_ack[1] = pucch_b0b1[0][1]; uci->stat = metric[0]; + if(harq_ack[0] != 1){ + LOG_E(PHY,"PUCCH ACK/NACK(no SR): frame %d subframe %d rnti %x n_pucch_1[0][0] %d pucch_fmt %d harq_ack[0]:%d -> 1\n", + frame,subframe,uci->rnti,uci->n_pucch_1[0][0],uci->pucch_fmt,harq_ack[0]); + harq_ack[0] =1; + }else{ + LOG_E(PHY,"PUCCH ACK/NACK(no SR): frame %d subframe %d rnti %x n_pucch_1[0][0] %d pucch_fmt %d \n", + frame,subframe,uci->rnti,uci->n_pucch_1[0][0],uci->pucch_fmt); + } fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,0,0xffff); // special_bundling mode } From 8bec50653f2a3d6971c70e6e381e0b9255190e21 Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Fri, 18 May 2018 10:01:07 +0900 Subject: [PATCH 3/9] Fix: eNB output core dump file when exiting eNB process. --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 1 + targets/RT/USER/lte-softmodem.c | 35 +++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 6bb7e2e82f..3e58f281b4 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -376,6 +376,7 @@ static void trx_usrp_end(openair0_device *device) { s->tx_md.end_of_burst = true; s->tx_stream->send("", 0, s->tx_md); s->tx_md.end_of_burst = false; + sleep(1); #if defined(USRP_REC_PLAY) } #endif diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 5861ba6cb2..a6d1a9af47 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -332,10 +332,14 @@ void exit_fun(const char* s) if (UE_flag==0) { for (ru_id=0; ru_idrfdevice.trx_end_func) - RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice); - if (RC.ru[ru_id]->ifdevice.trx_end_func) - RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice); + if (RC.ru[ru_id]->rfdevice.trx_end_func) { + RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice); + RC.ru[ru_id]->rfdevice.trx_end_func = NULL; + } + if (RC.ru[ru_id]->ifdevice.trx_end_func) { + RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice); + RC.ru[ru_id]->ifdevice.trx_end_func = NULL; + } } } @@ -346,8 +350,10 @@ void exit_fun(const char* s) for(CC_id=0; CC_idrfdevice.trx_end_func) - PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][CC_id]->rfdevice); + if (PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func) { + PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][CC_id]->rfdevice); + PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func = NULL; + } } } @@ -1473,16 +1479,21 @@ int main( int argc, char **argv ) // *** Handle per CC_id openair0 if (UE_flag==1) { - if (PHY_vars_UE_g[0][0]->rfdevice.trx_end_func) + if (PHY_vars_UE_g[0][0]->rfdevice.trx_end_func) { PHY_vars_UE_g[0][0]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][0]->rfdevice); + PHY_vars_UE_g[0][0]->rfdevice.trx_end_func = NULL; + } } else { for(ru_id=0; ru_idrfdevice.trx_end_func) - RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice); - if (RC.ru[ru_id]->ifdevice.trx_end_func) - RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice); - + if (RC.ru[ru_id]->rfdevice.trx_end_func) { + RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice); + RC.ru[ru_id]->rfdevice.trx_end_func = NULL; + } + if (RC.ru[ru_id]->ifdevice.trx_end_func) { + RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice); + RC.ru[ru_id]->ifdevice.trx_end_func = NULL; + } } } if (ouput_vcd) From 843e7c8fc4e7e53abb7f8bde43a8aac443c41c89 Mon Sep 17 00:00:00 2001 From: jftt_wangshanshan Date: Mon, 21 May 2018 16:43:12 +0800 Subject: [PATCH 4/9] Change SR detection for TDD for compliance with FDD. (try) --- openair1/SCHED/phy_procedures_lte_eNb.c | 30 +++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index ab01b980a6..3ab8f9ce04 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -973,8 +973,34 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) } else { // frame_type == TDD +#if 1 + metric[0] = rx_pucch(eNB, + uci->pucch_fmt, + i, + uci->n_pucch_1[0][0], + 0, //n2_pucch + uci->srs_active, // shortened format + pucch_b0b1[0], + frame, + subframe, + PUCCH1a_THRES); + if (uci->type==HARQ_SR && metric[0] > metric_SR) SR_payload = 0; + else if (SR_payload == 1) fill_sr_indication(eNB,uci->rnti,frame,subframe,metric_SR); - + if (uci->type==HARQ_SR && metric[0] <= metric_SR) { + SR_payload = 1; + metric[0] = rx_pucch(eNB, + pucch_format1b, + i, + uci->n_pucch_1_0_sr[0], + 0, //n2_pucch + uci->srs_active, // shortened format + pucch_b0b1[0], + frame, + subframe, + PUCCH1a_THRES); + } +#else // if SR was detected, use the n1_pucch from SR if (SR_payload==1) { #ifdef DEBUG_PHY_PROC @@ -1025,7 +1051,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) LOG_D(PHY,"RNTI %x type %d SR_payload %d Frame %d Subframe %d pucch_b0b1[0][0] %d pucch_b0b1[0][1] %d pucch_b0b1[1][0] %d pucch_b0b1[1][1] %d \n", uci->rnti,uci->type,SR_payload,frame,subframe,pucch_b0b1[0][0],pucch_b0b1[0][1],pucch_b0b1[1][0],pucch_b0b1[1][1]); #endif - +#endif if (SR_payload == 1) { // this implements Table 7.3.1 from 36.213 if (pucch_b0b1[0][0] == 4) { // there isn't a likely transmission harq_ack[0] = 4; // DTX From fadba8a1ede47daa1561455ca7296cb6e7bcc469 Mon Sep 17 00:00:00 2001 From: Wu Jing Date: Tue, 22 May 2018 18:42:35 +0900 Subject: [PATCH 5/9] fix rm917 bug --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 31 ++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 76067ab663..59e890fe72 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -175,6 +175,32 @@ rx_sdu(const module_id_t enb_mod_idP, cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); } else UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid]++; + + first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid]; + + // Program NACK for PHICH + LOG_D(MAC, + "Programming PHICH NACK for rnti %x harq_pid %d (first_rb %d)\n", + current_rnti, harq_pid, first_rb); + nfapi_hi_dci0_request_t *hi_dci0_req; + uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP] , subframeP); + hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP+sf_ahead_dl)%10]; + nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body; + + nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = + &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi]; + memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t)); + hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE; + hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_hi_pdu); + hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG; + hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = first_rb; + hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = 0; + hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0; + hi_dci0_req_body->number_of_hi++; + hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP,subframeP, 0); + hi_dci0_req_body->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG; + hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP,subframeP,sf_ahead_dl); + hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST; return; } @@ -1592,7 +1618,7 @@ schedule_ulsch_rnti(module_id_t module_idP, T_INT(UE_template->mcs_UL[harq_pid]), T_INT(first_rb[CC_id]), T_INT(rb_table[rb_table_index]), T_INT(round)); - +#if 0 // fill in NAK information hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi]; @@ -1620,6 +1646,7 @@ schedule_ulsch_rnti(module_id_t module_idP, UE_template->first_rb_ul[harq_pid], UE_template->nb_rb_ul[harq_pid], UE_template->TBS_UL[harq_pid], round); +#endif // Add UL_config PDUs LOG_D(MAC, "[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n", @@ -2143,6 +2170,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid; hi_dci0_req->number_of_dci++; +#if 0 // fill in NAK information hi_dci0_pdu = &hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci+hi_dci0_req->number_of_hi]; memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t)); @@ -2163,6 +2191,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv, ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb, ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb, UE_template->TBS_UL[harq_pid],round); +#endif // Add UL_config PDUs LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n", harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP); From 44210a0a88eb761a9f5527f6bf88c56727dbec4d Mon Sep 17 00:00:00 2001 From: Masayuki HARADA Date: Thu, 24 May 2018 13:21:37 +0900 Subject: [PATCH 6/9] Fix PUSCH decode failure when recieve power is too high situation. --- .../PHY/LTE_TRANSPORT/ulsch_demodulation.c | 24 ++++++++++--------- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 3 +++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 93c1af8d91..93f92062ea 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -1035,6 +1035,11 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, +#if defined(__x86_64__) || defined(__i386__) +__m128 avg128U; +#elif defined(__arm__) +int32x4_t avg128U; +#endif void ulsch_channel_level(int32_t **drs_ch_estimates_ext, LTE_DL_FRAME_PARMS *frame_parms, @@ -1045,24 +1050,21 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext, int16_t rb; uint8_t aarx; #if defined(__x86_64__) || defined(__i386__) - __m128i avg128U; __m128i *ul_ch128; #elif defined(__arm__) int16x4_t *ul_ch128; - int32x4_t avg128U; #endif - for (aarx=0; aarxnb_antennas_rx; aarx++) { //clear average level #if defined(__x86_64__) || defined(__i386__) - avg128U = _mm_setzero_si128(); + avg128U = _mm_setzero_ps(); ul_ch128=(__m128i *)drs_ch_estimates_ext[aarx]; for (rb=0; rbUE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid], ul_cqi); + if(ul_cqi>200){ // too high energy pattern + UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi; + } // AssertFatal(1==0,"ulsch in error\n"); if (UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] == 3) { UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= (~(1 << harq_pid)); From a37c29eb80fe3c3d04bb564b1ff840c79448e8f8 Mon Sep 17 00:00:00 2001 From: Wu Jing Date: Thu, 24 May 2018 16:44:28 +0900 Subject: [PATCH 7/9] fix rm971 bug(delete #if 0) --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 51 ----------------------- 1 file changed, 51 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 59e890fe72..79f8e8b0d6 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1618,35 +1618,6 @@ schedule_ulsch_rnti(module_id_t module_idP, T_INT(UE_template->mcs_UL[harq_pid]), T_INT(first_rb[CC_id]), T_INT(rb_table[rb_table_index]), T_INT(round)); -#if 0 - // fill in NAK information - - hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi]; - memset((void *) hi_dci0_pdu, 0, - sizeof(nfapi_hi_dci0_request_pdu_t)); - hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE; - hi_dci0_pdu->pdu_size = - 2 + sizeof(nfapi_hi_dci0_hi_pdu); - hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG; - hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = - UE_template->first_rb_ul[harq_pid]; - hi_dci0_pdu->hi_pdu.hi_pdu_rel8. - cyclic_shift_2_for_drms = - UE_template->cshift[harq_pid]; - hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0; - hi_dci0_req_body->number_of_hi++; - hi_dci0_req_body->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0); - hi_dci0_req->sfn_sf = frameP<<4|subframeP; - hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST; - - LOG_D(MAC, - "[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled (PHICH) UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, round %d)\n", - module_idP, harq_pid, rnti, CC_id, frameP, - subframeP, UE_id, UE_template->mcs_UL[harq_pid], - UE_template->first_rb_ul[harq_pid], - UE_template->nb_rb_ul[harq_pid], - UE_template->TBS_UL[harq_pid], round); -#endif // Add UL_config PDUs LOG_D(MAC, "[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n", @@ -2170,28 +2141,6 @@ void schedule_ulsch_rnti(module_id_t module_idP, hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid; hi_dci0_req->number_of_dci++; -#if 0 - // fill in NAK information - hi_dci0_pdu = &hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci+hi_dci0_req->number_of_hi]; - memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t)); - hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE; - hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_hi_pdu); - hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb; - hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = UE_template->cshift[harq_pid]; - hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0; - hi_dci0_req->number_of_hi++; - hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG; - - hi_dci0_req->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0); //(frameP, subframeP, 4) - nfapi_hi_dci0_request_t *nfapi_hi_dci0_req = &eNB->HI_DCI0_req[CC_id][subframeP]; - nfapi_hi_dci0_req->sfn_sf = frameP<<4|subframeP; // sfnsf_add_subframe(sched_frame, sched_subframeP, 0); // sunday! - nfapi_hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST; - - LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled (PHICH) UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, round %d)\n", - module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv, - ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb, ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb, - UE_template->TBS_UL[harq_pid],round); -#endif // Add UL_config PDUs LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n", harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP); From ab32cefbe23fa36393003b6663da26b3fdc8801d Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Thu, 24 May 2018 20:01:37 +0900 Subject: [PATCH 8/9] Revert "fix DLSCH no retransmission" This reverts commit 24c669f394ee8290a8118b9e2d1053fc2d1d1233. --- openair1/SCHED/phy_procedures_lte_eNb.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 3ab8f9ce04..da636a9635 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1069,14 +1069,6 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) harq_ack[0] = 0; } uci->stat = metric[0]; - if(harq_ack[0] != 1){ - LOG_E(PHY,"PUCCH ACK/NACK(SR): frame %d subframe %d rnti %x n_pucch_1_0_sr[0] %d pucch_fmt %d harq_ack[0]:%d -> 1\n ", - frame,subframe,uci->rnti,uci->n_pucch_1_0_sr[0],uci->pucch_fmt,harq_ack[0]); - harq_ack[0] =1; - }else{ - LOG_E(PHY,"PUCCH ACK/NACK(SR): frame %d subframe %d rnti %x n_pucch_1_0_sr[0] %d pucch_fmt %d\n ", - frame,subframe,uci->rnti,uci->n_pucch_1_0_sr[0],uci->pucch_fmt); - } fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,2,0xffff); // special_bundling mode } else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==2)){ // multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2 @@ -1344,14 +1336,6 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) harq_ack[0] = pucch_b0b1[0][0]; harq_ack[1] = pucch_b0b1[0][1]; uci->stat = metric[0]; - if(harq_ack[0] != 1){ - LOG_E(PHY,"PUCCH ACK/NACK(no SR): frame %d subframe %d rnti %x n_pucch_1[0][0] %d pucch_fmt %d harq_ack[0]:%d -> 1\n", - frame,subframe,uci->rnti,uci->n_pucch_1[0][0],uci->pucch_fmt,harq_ack[0]); - harq_ack[0] =1; - }else{ - LOG_E(PHY,"PUCCH ACK/NACK(no SR): frame %d subframe %d rnti %x n_pucch_1[0][0] %d pucch_fmt %d \n", - frame,subframe,uci->rnti,uci->n_pucch_1[0][0],uci->pucch_fmt); - } fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,0,0xffff); // special_bundling mode } From c652a883ffde103974c65f58bcefb8df011428fe Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Thu, 24 May 2018 20:08:27 +0900 Subject: [PATCH 9/9] Fix: TDD uci_procedures misdeal pucch format1a. --- openair1/SCHED/phy_procedures_lte_eNb.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index da636a9635..f2ba478313 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -990,7 +990,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) if (uci->type==HARQ_SR && metric[0] <= metric_SR) { SR_payload = 1; metric[0] = rx_pucch(eNB, - pucch_format1b, + uci->pucch_fmt, i, uci->n_pucch_1_0_sr[0], 0, //n2_pucch @@ -1052,6 +1052,15 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) uci->rnti,uci->type,SR_payload,frame,subframe,pucch_b0b1[0][0],pucch_b0b1[0][1],pucch_b0b1[1][0],pucch_b0b1[1][1]); #endif #endif + + if(uci->pucch_fmt == pucch_format1a) { + LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d pucch1a (TDD) payload %d (metric %d)\n", + eNB->Mod_id,uci->rnti,frame,subframe,pucch_b0b1[0][0],metric[0]); + + uci->stat = metric[0]; + fill_uci_harq_indication(eNB,uci,frame,subframe,pucch_b0b1[0],0,0xffff); + } + else if(uci->pucch_fmt == pucch_format1b) { if (SR_payload == 1) { // this implements Table 7.3.1 from 36.213 if (pucch_b0b1[0][0] == 4) { // there isn't a likely transmission harq_ack[0] = 4; // DTX @@ -1351,6 +1360,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) AssertFatal(1==0,"Unsupported UCI type %d\n",uci->type); break; } + } if (SR_payload == 1) { LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Got SR for PUSCH, transmitting to MAC\n",eNB->Mod_id,