From 6e61393f7e22dd421ca6dd89434088ee93889135 Mon Sep 17 00:00:00 2001 From: Shruthi Date: Sat, 6 Mar 2021 15:18:02 +0530 Subject: [PATCH] DCI payload corrections in nFAPI mode --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 92cb65aa57..fb704dc964 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -57,6 +57,9 @@ #define WORD 32 //#define SIZE_OF_POINTER sizeof (void *) +int harq_rounds = 0; +int harq_pid = 0; + // Compute and write all MAC CEs and subheaders, and return number of written // bytes int nr_write_ce_dlsch_pdu(module_id_t module_idP, @@ -821,6 +824,14 @@ void nr_schedule_ue_spec(module_id_t module_id, pdsch_pdu->mcsIndex[0] = sched_ctrl->mcs; pdsch_pdu->mcsTable[0] = sched_ctrl->mcsTableIdx; pdsch_pdu->rvIndex[0] = nr_rv_round_map[harq->round]; + if (NFAPI_MODE == NFAPI_MODE_VNF){ // done since uplink isnt operational yet which means harq structures dont get filled properly + pdsch_pdu->rvIndex[0] = nr_rv_round_map[harq_rounds]; + if (harq_rounds % 5 == 0 && harq_rounds!=0){ + harq_rounds = 0; + harq_pid = (harq_pid + 1) % 16; + } + harq_rounds++; + } pdsch_pdu->TBSize[0] = TBS; pdsch_pdu->dataScramblingId = *scc->physCellId; @@ -932,6 +943,10 @@ void nr_schedule_ue_spec(module_id_t module_id, const int dci_format = f ? NR_DL_DCI_FORMAT_1_1 : NR_DL_DCI_FORMAT_1_0; const int rnti_type = NR_RNTI_C; + if (NFAPI_MODE == NFAPI_MODE_VNF){ + dci_payload.harq_pid = harq_pid; + dci_payload.tpc = 2; + } fill_dci_pdu_rel15(scc, UE_info->secondaryCellGroup[UE_id], dci_pdu,