From b0887a1b85ed4c23c5ff5809abde80446dd0b7bb Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 10 Oct 2016 16:33:12 +0200 Subject: [PATCH 1/3] issue 137 - correct computation of G G was wrongly computed in some places, not taking into account CQI and RI bits. This commit saves the correct value computed in ulsch_decoding so we can reuse it in ulsch_decoding_data (and the like). Only the file openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c has been checked. If the computation is done somewhere else the problem might still exist. --- openair1/PHY/LTE_TRANSPORT/defs.h | 2 ++ openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/defs.h b/openair1/PHY/LTE_TRANSPORT/defs.h index 26e2d40460..0cd98f98a9 100644 --- a/openair1/PHY/LTE_TRANSPORT/defs.h +++ b/openair1/PHY/LTE_TRANSPORT/defs.h @@ -374,6 +374,8 @@ typedef struct { uint32_t TBS; /// The payload + CRC size in bits uint32_t B; + /// Number of soft channel bits + uint32_t G; /// CQI CRC status uint8_t cqi_crc_status; /// Pointer to CQI data diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index afcce70b7f..45117a64c2 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -236,7 +236,7 @@ int ulsch_decoding_data_2thread0(td_params* tdp) { LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id]; LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid]; int Q_m = get_Qm_ul(ulsch_harq->mcs); - int G = ulsch_harq->nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch; + int G = ulsch_harq->G; uint32_t E; uint32_t Gp,GpmodC,Nl=1; uint32_t C = ulsch_harq->C; @@ -458,7 +458,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id]; LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid]; int Q_m = get_Qm_ul(ulsch_harq->mcs); - int G = ulsch_harq->nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch; + int G = ulsch_harq->G; unsigned int E; int Cby2; @@ -666,7 +666,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id]; LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid]; int Q_m = get_Qm_ul(ulsch_harq->mcs); - int G = ulsch_harq->nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch; + int G = ulsch_harq->G; unsigned int E; uint8_t (*tc)(int16_t *y, @@ -1044,6 +1044,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, #endif G = G - Q_RI - Q_CQI; + ulsch_harq->G = G; if ((int)G < 0) { LOG_E(PHY,"FATAL: ulsch_decoding.c G < 0 (%d) : Q_RI %d, Q_CQI %d\n",G,Q_RI,Q_CQI); From 190fc96af4fb5663134e7318a47e1893d4f1184c Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 10 Oct 2016 16:36:52 +0200 Subject: [PATCH 2/3] issue 137 - fix RI bits decoding RI bits are present only in some transmission modes. For aperiodic reporting (the mode we do as of today), 36.213 7.2.1 (release 10) says: "RI is only reported for transmission modes 3 and 4, as well as transmission modes 8 and 9 with PMI/RI reporting" This commit activates decoding of RI bits only for transmission modes 3 and 4. 8 and 9 are not done today (as far as I know). --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 2f578d9cc1..8f4bc4d45f 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -7213,7 +7213,17 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB, if (cqi_req == 1) { - ulsch->harq_processes[harq_pid]->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table + /* 36.213 7.2.1 (release 10) says: + * "RI is only reported for transmission modes 3 and 4, + * as well as transmission modes 8 and 9 with PMI/RI reporting" + * This is for aperiodic reporting. + * TODO: deal with TM 8&9 correctly when they are implemented. + * TODO: deal with periodic reporting if we implement it. + */ + if (transmission_mode == 3 || transmission_mode == 4) + ulsch->harq_processes[harq_pid]->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table + else + ulsch->harq_processes[harq_pid]->O_RI = 0; switch(transmission_mode) { // The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling From 5894f3e6c213cf71b90bb18f9964f8dccf67ecb4 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 10 Oct 2016 16:40:42 +0200 Subject: [PATCH 3/3] issue 137 - remove hack: MCS reduction in case of CQI reporting This hack was probably put in place in an attempt to circumvent problems solved by previous commits. As far as I checked (with my knowledge of the day) we can't exhaust uplink physical bits with ULSCH data bits when there is CQI reporting at the same time. To be refined if this idea is proved wrong. --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index aa3b5554e2..b6395fe191 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -838,9 +838,6 @@ void schedule_ulsch_rnti(module_id_t module_idP, UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power=target_rx_power; UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1=UE_template->pre_assigned_mcs_ul; mcs = UE_template->pre_assigned_mcs_ul;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS - if ((cqi_req==1) && (mcs>19)) { - mcs=19; - } if (UE_template->pre_allocated_rb_table_index_ul >=0) { rb_table_index=UE_template->pre_allocated_rb_table_index_ul; } else {