From b20954f6c00fc2cbbda692577f48f8d18576b653 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Nov 2020 16:45:01 +0100 Subject: [PATCH] Isolate TDA in ULSCH --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index c20cbac9a8..3c0f45c7a1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -562,6 +562,18 @@ void nr_schedule_ulsch(module_id_t module_id, uint16_t rnti = UE_info->rnti[UE_id]; + const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; + int dci_formats[2] = { f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0 , 0 }; + int rnti_types[2] = { NR_RNTI_C, 0 }; + + //Resource Allocation in time domain + const int tda = sched_ctrl->sched_pusch.time_domain_allocation; + const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList = + sched_ctrl->active_ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; + const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength; + int StartSymbolIndex, NrOfSymbols; + SLIV2SL(startSymbolAndLength,&StartSymbolIndex,&NrOfSymbols); + NR_PUSCH_Config_t *pusch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pusch_Config->choice.setup; uint8_t transform_precoding = 0; if (!pusch_Config->transformPrecoder) @@ -587,21 +599,6 @@ void nr_schedule_ulsch(module_id_t module_id, LOG_D(MAC, "%4d.%2d Scheduling UE specific PUSCH\n", frame, slot); - int dci_formats[2]; - if (sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats) - dci_formats[0] = NR_UL_DCI_FORMAT_0_1; - else - dci_formats[0] = NR_UL_DCI_FORMAT_0_0; - int rnti_types[2] = { NR_RNTI_C, 0 }; - - //Resource Allocation in time domain - const int tda = sched_ctrl->sched_pusch.time_domain_allocation; - const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList = - sched_ctrl->active_ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; - const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength; - int StartSymbolIndex, NrOfSymbols; - SLIV2SL(startSymbolAndLength,&StartSymbolIndex,&NrOfSymbols); - pusch_pdu->start_symbol_index = StartSymbolIndex; pusch_pdu->nr_of_symbols = NrOfSymbols;