Commit c97e0546 authored by Cedric Roux's avatar Cedric Roux

bugfix: fix CQI reporting

- don't use o_flip anymore in ulsch_decoding
- remove dl_cqi from eNB_UE_STATS
- put dl_cqi[NFAPI_CC_MAX] in UE_sched_ctrl
- adapt code for this dl_cqi change (from eNB_UE_STATS to UE_sched_ctrl)
- extract_pusch_csi has been fixed for CQI_ReportModeAperiodic_rm30,
  the others need to be done. Program will exit if one uses them.
  Not sure if setting sched_ctl->dl_cqi[CC_idP]  has to be done in this
  function...
parent 0c6015cf
Branches unavailable
2024.w43 2024.w42 2024.w41 2024.w40 2024.w39 2024.w38 2024.w36 2024.w35 2024.w34 2024.w33 2024.w32 2024.w31 2024.w30 2024.w29 2024.w28 2024.w27 2024.w26 2024.w25 2024.w24 2024.w23 2024.w22 2024.w21 2024.w18 2024.w17 2024.w16 2024.w15 2024.w14 2024.w13 2024.w12 2024.w11 2024.w10 2024.w09 2024.w08 2024.w06 2024.w05 2024.w04 2024.w03 2024.w02 2024.w01 2023.w51 2023.w50 2023.w49 2023.w48 2023.w47 2023.w45 2023.w43 2023.w42 2023.w41 2023.w40 2023.w39 2023.w38 2023.w37 2023.w36 2023.w34 2023.w33 2023.w32 2023.w31 2023.w30 2023.w29 2023.w28 2023.w27 2023.w26 2023.w25 2023.w24 2023.w23 2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 2021.wk46 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w51_c 2021.w51_a 2021.w50_a 2021.w49_b 2021.w49_a 2021.w48 2021.w47 2021.w46 2021.w46-powder 2021.w45 2021.w45_b 2021.w44 2021.w43 2021.w42 2021.w37 2021.w36 2021.w35 2021.w34 2021.w33 2021.w32 2021.w31 2021.w30 2021.w29 2021.w28 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 2019.w08 2019.w07 2019.w06 2019.w04 2019.w03 2018.w51 2018.w48 2018.w47 2018.w46 2018.w44 2018.w41 2018.w40 2018.w39 2018.w36 2018.w33 2018.w31 2018.w29 2018.w25 2018.w19 2018.w15 2018.w12 2018.w11 2018.w10 2018.w09 2018.w08 2018.w07 2018.w06 2018.w05 2018.w04 2018.w03 2018.w02 2017.w48 2017.w46 2017.w43 2017.w42 v2.1.0 v2.0.0 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 v1.0.3 v1.0.2 v1.0.1 v1.0.0 setparam osa-etsi-ws-ue osa-etsi-ws-try2 osa-etsi-ws-try1 osa-etsi-ws-gNB oai_nr_sync nr-ip-over-lte nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 flexran-eol develop-nr-pdcch develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 develop-nr-2019w28 develop-nr-2019w23 benetel_phase_rotation benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 benetel_enb_rel_1.0 ARC_1.3
No related merge requests found
...@@ -321,8 +321,8 @@ typedef struct { ...@@ -321,8 +321,8 @@ typedef struct {
uint8_t srs_active; uint8_t srs_active;
/// Pointers to 8 HARQ processes for the ULSCH /// Pointers to 8 HARQ processes for the ULSCH
LTE_UL_UE_HARQ_t *harq_processes[8]; LTE_UL_UE_HARQ_t *harq_processes[8];
/// Pointer to CQI data /// Pointer to CQI data (+1 for 8 bits crc)
uint8_t o[MAX_CQI_BYTES]; uint8_t o[1+MAX_CQI_BYTES];
/// Length of CQI data (bits) /// Length of CQI data (bits)
uint8_t O; uint8_t O;
/// Format of CQI data /// Format of CQI data
......
...@@ -864,7 +864,6 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -864,7 +864,6 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
unsigned int Qprime_ACK,Qprime_RI,len_ACK=0,len_RI=0; unsigned int Qprime_ACK,Qprime_RI,len_ACK=0,len_RI=0;
// uint8_t q_ACK[MAX_ACK_PAYLOAD],q_RI[MAX_RI_PAYLOAD]; // uint8_t q_ACK[MAX_ACK_PAYLOAD],q_RI[MAX_RI_PAYLOAD];
int metric,metric_new; int metric,metric_new;
uint8_t o_flip[8];
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
int16_t ys,c; int16_t ys,c;
uint32_t wACK_idx; uint32_t wACK_idx;
...@@ -1561,29 +1560,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1561,29 +1560,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
&ulsch_harq->o_d[96], &ulsch_harq->o_d[96],
&ulsch_harq->o_w[0]); &ulsch_harq->o_w[0]);
memset(o_flip,0,1+((8+ulsch_harq->Or1)/8)); memset(ulsch_harq->o,0,(7+8+ulsch_harq->Or1) / 8);
phy_viterbi_lte_sse2(ulsch_harq->o_d+96,o_flip,8+ulsch_harq->Or1); phy_viterbi_lte_sse2(ulsch_harq->o_d+96,ulsch_harq->o,8+ulsch_harq->Or1);
if (extract_cqi_crc(o_flip,ulsch_harq->Or1) == (crc8(o_flip,ulsch_harq->Or1)>>24)) if (extract_cqi_crc(ulsch_harq->o,ulsch_harq->Or1) == (crc8(ulsch_harq->o,ulsch_harq->Or1)>>24))
ulsch_harq->cqi_crc_status = 1; ulsch_harq->cqi_crc_status = 1;
if (ulsch->harq_processes[harq_pid]->Or1<=32) {
ulsch_harq->o[3] = o_flip[0] ;
ulsch_harq->o[2] = o_flip[1] ;
ulsch_harq->o[1] = o_flip[2] ;
ulsch_harq->o[0] = o_flip[3] ;
} else {
ulsch_harq->o[7] = o_flip[0] ;
ulsch_harq->o[6] = o_flip[1] ;
ulsch_harq->o[5] = o_flip[2] ;
ulsch_harq->o[4] = o_flip[3] ;
ulsch_harq->o[3] = o_flip[4] ;
ulsch_harq->o[2] = o_flip[5] ;
ulsch_harq->o[1] = o_flip[6] ;
ulsch_harq->o[0] = o_flip[7] ;
}
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
printf("ulsch_decoding: Or1=%d\n",ulsch_harq->Or1); printf("ulsch_decoding: Or1=%d\n",ulsch_harq->Or1);
...@@ -1591,9 +1573,9 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1591,9 +1573,9 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
printf("ulsch_decoding: O[%d] %d\n",i,ulsch_harq->o[i]); printf("ulsch_decoding: O[%d] %d\n",i,ulsch_harq->o[i]);
if (ulsch_harq->cqi_crc_status == 1) if (ulsch_harq->cqi_crc_status == 1)
printf("RX CQI CRC OK (%x)\n",extract_cqi_crc(o_flip,ulsch_harq->Or1)); printf("RX CQI CRC OK (%x)\n",extract_cqi_crc(ulsch_harq->o,ulsch_harq->Or1));
else else
printf("RX CQI CRC NOT OK (%x)\n",extract_cqi_crc(o_flip,ulsch_harq->Or1)); printf("RX CQI CRC NOT OK (%x)\n",extract_cqi_crc(ulsch_harq->o,ulsch_harq->Or1));
#endif #endif
} }
......
...@@ -515,8 +515,6 @@ typedef struct { ...@@ -515,8 +515,6 @@ typedef struct {
uint8_t harq_pid; uint8_t harq_pid;
/// harq rounf /// harq rounf
uint8_t harq_round; uint8_t harq_round;
/// DL Wideband CQI index (2 TBs)
uint8_t dl_cqi;
/// total available number of PRBs for a new transmission /// total available number of PRBs for a new transmission
uint16_t rbs_used; uint16_t rbs_used;
/// total available number of PRBs for a retransmission /// total available number of PRBs for a retransmission
...@@ -843,6 +841,7 @@ typedef struct { ...@@ -843,6 +841,7 @@ typedef struct {
uint8_t aperiodic_wideband_pmi[NFAPI_CC_MAX]; uint8_t aperiodic_wideband_pmi[NFAPI_CC_MAX];
uint8_t aperiodic_wideband_cqi1[NFAPI_CC_MAX]; uint8_t aperiodic_wideband_cqi1[NFAPI_CC_MAX];
uint8_t aperiodic_wideband_pmi1[NFAPI_CC_MAX]; uint8_t aperiodic_wideband_pmi1[NFAPI_CC_MAX];
uint8_t dl_cqi[NFAPI_CC_MAX];
} UE_sched_ctrl; } UE_sched_ctrl;
/*! \brief eNB template for the Random access information */ /*! \brief eNB template for the Random access information */
typedef struct { typedef struct {
......
...@@ -314,7 +314,6 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id, ...@@ -314,7 +314,6 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id,
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list; UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
nfapi_dl_config_request_t *DL_req = &RC.mac[module_idP]->DL_req[0]; nfapi_dl_config_request_t *DL_req = &RC.mac[module_idP]->DL_req[0];
uint16_t rnti = UE_RNTI(module_idP,UE_id); uint16_t rnti = UE_RNTI(module_idP,UE_id);
eNB_UE_STATS *eNB_UE_stats = &RC.mac[module_idP]->UE_list.eNB_UE_stats[CC_id][UE_id];
COMMON_channels_t *cc = RC.mac[module_idP]->common_channels; COMMON_channels_t *cc = RC.mac[module_idP]->common_channels;
// check uplink failure // check uplink failure
...@@ -331,7 +330,7 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id, ...@@ -331,7 +330,7 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id,
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1A); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format1A);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
...@@ -472,7 +471,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame ...@@ -472,7 +471,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
LOG_D(MAC,"UE rnti %x : %s, PHR %d dB CQI %d\n", rnti, LOG_D(MAC,"UE rnti %x : %s, PHR %d dB CQI %d\n", rnti,
UE_list->UE_sched_ctrl[i].ul_out_of_sync==0 ? "in synch" : "out of sync", UE_list->UE_sched_ctrl[i].ul_out_of_sync==0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][i].phr_info, UE_list->UE_template[CC_id][i].phr_info,
eNB_UE_stats->dl_cqi); UE_list->UE_sched_ctrl[i].dl_cqi[CC_id]);
} }
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP*10)+subframeP]=-63; RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP*10)+subframeP]=-63;
......
...@@ -567,12 +567,12 @@ schedule_ue_spec( ...@@ -567,12 +567,12 @@ schedule_ue_spec(
case 2: case 2:
case 7: case 7:
aggregation = get_aggregation(get_bw_index(module_idP,CC_id), aggregation = get_aggregation(get_bw_index(module_idP,CC_id),
eNB_UE_stats->dl_cqi, ue_sched_ctl->dl_cqi[CC_id],
format1); format1);
break; break;
case 3: case 3:
aggregation = get_aggregation(get_bw_index(module_idP,CC_id), aggregation = get_aggregation(get_bw_index(module_idP,CC_id),
eNB_UE_stats->dl_cqi, ue_sched_ctl->dl_cqi[CC_id],
format2A); format2A);
break; break;
default: default:
...@@ -642,12 +642,12 @@ schedule_ue_spec( ...@@ -642,12 +642,12 @@ schedule_ue_spec(
DevCheck(((eNB_UE_stats->dl_cqi < MIN_CQI_VALUE) || (eNB_UE_stats->dl_cqi > MAX_CQI_VALUE)), DevCheck(((eNB_UE_stats->dl_cqi < MIN_CQI_VALUE) || (eNB_UE_stats->dl_cqi > MAX_CQI_VALUE)),
eNB_UE_stats->dl_cqi, MIN_CQI_VALUE, MAX_CQI_VALUE); eNB_UE_stats->dl_cqi, MIN_CQI_VALUE, MAX_CQI_VALUE);
*/ */
eNB_UE_stats->dlsch_mcs1 = cqi_to_mcs[eNB_UE_stats->dl_cqi]; eNB_UE_stats->dlsch_mcs1 = cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]];
eNB_UE_stats->dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;//cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); eNB_UE_stats->dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;//cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs);
// store stats // store stats
UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi= eNB_UE_stats->dl_cqi; //UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi= eNB_UE_stats->dl_cqi;
// initializing the rb allocation indicator for each UE // initializing the rb allocation indicator for each UE
for(j=0; j<N_RBG[CC_id]; j++) { for(j=0; j<N_RBG[CC_id]; j++) {
...@@ -656,7 +656,7 @@ schedule_ue_spec( ...@@ -656,7 +656,7 @@ schedule_ue_spec(
LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n", LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n",
module_idP, frameP, UE_id,CC_id,rnti,harq_pid, round,nb_available_rb, module_idP, frameP, UE_id,CC_id,rnti,harq_pid, round,nb_available_rb,
eNB_UE_stats->dl_cqi, eNB_UE_stats->dlsch_mcs1, ue_sched_ctl->dl_cqi[CC_id], eNB_UE_stats->dlsch_mcs1,
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status); UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status);
...@@ -722,7 +722,7 @@ schedule_ue_spec( ...@@ -722,7 +722,7 @@ schedule_ue_spec(
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),ue_sched_ctl->dl_cqi[CC_id],format1);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
...@@ -1207,7 +1207,7 @@ schedule_ue_spec( ...@@ -1207,7 +1207,7 @@ schedule_ue_spec(
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),ue_sched_ctl->dl_cqi[CC_id],format1);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
......
...@@ -3416,6 +3416,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP, ...@@ -3416,6 +3416,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP,
int v[6]; int v[6];
int i; int i;
uint64_t p = *(uint64_t*)pdu; uint64_t p = *(uint64_t*)pdu;
int curbyte, curbit;
CQI_ReportModeAperiodic_t *cqi_ReportModeAperiodic; CQI_ReportModeAperiodic_t *cqi_ReportModeAperiodic;
AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated != NULL, "physicalConfigDedicated is null for UE %d\n",UE_id); AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated != NULL, "physicalConfigDedicated is null for UE %d\n",UE_id);
...@@ -3433,6 +3434,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP, ...@@ -3433,6 +3434,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP,
switch(*cqi_ReportModeAperiodic) { switch(*cqi_ReportModeAperiodic) {
case CQI_ReportModeAperiodic_rm12: case CQI_ReportModeAperiodic_rm12:
AssertFatal(0==1, "to be fixed, don't use p but pdu directly\n");
// wideband multiple PMI (TM4/6), Table 5.2.2.6.1-1 (for TM4/6) // wideband multiple PMI (TM4/6), Table 5.2.2.6.1-1 (for TM4/6)
AssertFatal(tmode==4 || tmode==6 || tmode==8|| tmode==9 || tmode==10,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm12\n",tmode); AssertFatal(tmode==4 || tmode==6 || tmode==8|| tmode==9 || tmode==10,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm12\n",tmode);
if (tmode <= 6) { //Table 5.2.2.6.1-1 36.213 if (tmode <= 6) { //Table 5.2.2.6.1-1 36.213
...@@ -3473,6 +3475,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP, ...@@ -3473,6 +3475,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP,
break; break;
case CQI_ReportModeAperiodic_rm20: case CQI_ReportModeAperiodic_rm20:
AssertFatal(0==1, "to be fixed, don't use p but pdu directly\n");
// UE-selected subband CQI no PMI (TM1/2/3/7) , Table 5.2.2.6.3-1 from 36.213 // UE-selected subband CQI no PMI (TM1/2/3/7) , Table 5.2.2.6.3-1 from 36.213
AssertFatal(tmode==1 || tmode==2 || tmode==3 || tmode==7,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm20\n",tmode); AssertFatal(tmode==1 || tmode==2 || tmode==3 || tmode==7,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm20\n",tmode);
...@@ -3483,6 +3486,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP, ...@@ -3483,6 +3486,7 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP,
for (m=0;m<Mtab_uesel[bw];m++) sched_ctl->aperiodic_subband_diffcqi0[CC_idP][v[m]] = diffcqi0; for (m=0;m<Mtab_uesel[bw];m++) sched_ctl->aperiodic_subband_diffcqi0[CC_idP][v[m]] = diffcqi0;
break; break;
case CQI_ReportModeAperiodic_rm22: case CQI_ReportModeAperiodic_rm22:
AssertFatal(0==1, "to be fixed, don't use p but pdu directly\n");
// UE-selected subband CQI multiple PMI (TM4/6) Table 5.2.2.6.3-2 from 36.213 // UE-selected subband CQI multiple PMI (TM4/6) Table 5.2.2.6.3-2 from 36.213
AssertFatal(tmode==4 || tmode==6 || tmode==8|| tmode==9 || tmode==10,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm22\n",tmode); AssertFatal(tmode==4 || tmode==6 || tmode==8|| tmode==9 || tmode==10,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm22\n",tmode);
...@@ -3517,13 +3521,21 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP, ...@@ -3517,13 +3521,21 @@ void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP,
case CQI_ReportModeAperiodic_rm30: case CQI_ReportModeAperiodic_rm30:
//subband CQI no PMI (TM1/2/3/7) //subband CQI no PMI (TM1/2/3/7)
AssertFatal(tmode==1 || tmode==2 || tmode==3 || tmode==7,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm30\n",tmode); AssertFatal(tmode==1 || tmode==2 || tmode==3 || tmode==7,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm30\n",tmode);
sched_ctl->aperiodic_wideband_cqi0[CC_idP] = (uint8_t)(p&0x0F); p>>=4; sched_ctl->aperiodic_wideband_cqi0[CC_idP] = pdu[0]>>4;
curbyte = 0;
curbit = 3;
for (i=0;i<N;i++) { for (i=0;i<N;i++) {
sched_ctl->aperiodic_subband_diffcqi0[CC_idP][i] = (uint8_t)(p&0x03); sched_ctl->aperiodic_subband_diffcqi0[CC_idP][i] = (pdu[curbyte] >> (curbit-1)) & 0x03;
p>>=2; curbit -= 2;
if (curbit < 0) {
curbit = 7;
curbyte++;
}
} }
sched_ctl->dl_cqi[CC_idP] = sched_ctl->aperiodic_wideband_cqi0[CC_idP];
break; break;
case CQI_ReportModeAperiodic_rm31: case CQI_ReportModeAperiodic_rm31:
AssertFatal(0==1, "to be fixed, don't use p but pdu directly\n");
//subband CQI single PMI (TM4/5/6) //subband CQI single PMI (TM4/5/6)
AssertFatal(tmode==4 || tmode==5 || tmode==6 || tmode==8|| tmode==9|| tmode==10,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm31\n",tmode); AssertFatal(tmode==4 || tmode==5 || tmode==6 || tmode==8|| tmode==9|| tmode==10,"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm31\n",tmode);
......
...@@ -830,7 +830,6 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -830,7 +830,6 @@ void schedule_ulsch_rnti(module_id_t module_idP,
rnti_t rnti = -1; rnti_t rnti = -1;
uint8_t round = 0; uint8_t round = 0;
uint8_t harq_pid = 0; uint8_t harq_pid = 0;
eNB_UE_STATS *eNB_UE_stats = NULL;
uint8_t status = 0; uint8_t status = 0;
uint8_t rb_table_index = -1; uint8_t rb_table_index = -1;
uint32_t cqi_req,cshift,ndi,tpc; uint32_t cqi_req,cshift,ndi,tpc;
...@@ -932,7 +931,6 @@ abort(); ...@@ -932,7 +931,6 @@ abort();
// This is the actual CC_id in the list // This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id]; CC_id = UE_list->ordered_ULCCids[n][UE_id];
N_RB_UL = to_prb(cc[CC_id].ul_Bandwidth); N_RB_UL = to_prb(cc[CC_id].ul_Bandwidth);
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
/* /*
aggregation=get_aggregation(get_bw_index(module_idP,CC_id), aggregation=get_aggregation(get_bw_index(module_idP,CC_id),
...@@ -988,7 +986,6 @@ abort(); ...@@ -988,7 +986,6 @@ abort();
else else
cqi_req = 0; cqi_req = 0;
cqi_req = 0;
//power control //power control
//compute the expected ULSCH RX power (for the stats) //compute the expected ULSCH RX power (for the stats)
......
...@@ -196,7 +196,7 @@ void assign_rbs_required (module_id_t Mod_id, ...@@ -196,7 +196,7 @@ void assign_rbs_required (module_id_t Mod_id,
CC_id = UE_list->ordered_CCids[n][UE_id]; CC_id = UE_list->ordered_CCids[n][UE_id];
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
eNB_UE_stats->dlsch_mcs1=cqi_to_mcs[eNB_UE_stats->dl_cqi]; eNB_UE_stats->dlsch_mcs1=cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]];
} }
...@@ -288,22 +288,19 @@ int maxround(module_id_t Mod_id,uint16_t rnti,int frame,sub_frame_t subframe,uin ...@@ -288,22 +288,19 @@ int maxround(module_id_t Mod_id,uint16_t rnti,int frame,sub_frame_t subframe,uin
// it returns -1 if the UE is not found in PHY layer (get_eNB_UE_stats gives NULL) // it returns -1 if the UE is not found in PHY layer (get_eNB_UE_stats gives NULL)
int maxcqi(module_id_t Mod_id,int32_t UE_id) int maxcqi(module_id_t Mod_id,int32_t UE_id)
{ {
eNB_UE_STATS *eNB_UE_stats = NULL;
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
int CC_id,n; int CC_id,n;
int CQI = 0; int CQI = 0;
for (n=0; n<UE_list->numactiveCCs[UE_id]; n++) { for (n=0; n<UE_list->numactiveCCs[UE_id]; n++) {
CC_id = UE_list->ordered_CCids[n][UE_id]; CC_id = UE_list->ordered_CCids[n][UE_id];
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
if (eNB_UE_stats->dl_cqi > CQI) { if (UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id] > CQI) {
CQI = eNB_UE_stats->dl_cqi; CQI = UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id];
} }
} }
return(CQI); return CQI;
} }
struct sort_ue_dl_params { struct sort_ue_dl_params {
......
...@@ -175,7 +175,7 @@ int dump_eNB_l2_stats(char *buffer, int length) ...@@ -175,7 +175,7 @@ int dump_eNB_l2_stats(char *buffer, int length)
UE_id, UE_id,
map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status), map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status),
UE_list->eNB_UE_stats[CC_id][UE_id].crnti, UE_list->eNB_UE_stats[CC_id][UE_id].crnti,
UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi, UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1, UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1,
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2, UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2,
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used, UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment