diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 059998becd..5d98d8dd8f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -587,10 +587,10 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ret = no_iteration_ldpc; } else { - LOG_D(PHY,"CRC NOT OK\n\033[0m"); + LOG_D(PHY,"CRC NOT OK\n\033[0m"); /* ret = 1 + dlsch->max_ldpc_iterations; dump_nrdlsch(phy_vars_ue,0,nr_slot_rx,&E,0,0); - exit(-1); + exit(-1);*/ } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 1f3e10222b..c7ad6e4ee8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -452,10 +452,18 @@ void pf_dl(module_id_t module_id, if (UE_info->Msg4_ACKed[UE_id] != true) continue; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; int bwp_Id = sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Id : 0; - sched_ctrl->search_space = get_searchspace(scc,sched_ctrl->active_bwp, - sched_ctrl->active_bwp ? - NR_SearchSpace__searchSpaceType_PR_ue_Specific: - NR_SearchSpace__searchSpaceType_PR_common); + NR_BWP_DownlinkDedicated_t *bwp_Dedicated=NULL; + if (sched_ctrl->active_bwp) bwp_Dedicated = sched_ctrl->active_bwp->bwp_Dedicated; + else if (UE_info->CellGroup[UE_id] && + UE_info->CellGroup[UE_id]->spCellConfig && + UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated) + bwp_Dedicated = UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->initialDownlinkBWP; + + sched_ctrl->search_space = get_searchspace(scc,bwp_Dedicated, + bwp_Dedicated ? + NR_SearchSpace__searchSpaceType_PR_ue_Specific: + NR_SearchSpace__searchSpaceType_PR_common); + sched_ctrl->coreset = get_coreset(scc,sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */); if (sched_ctrl->coreset == NULL) sched_ctrl->coreset = mac->sched_ctrlCommon->coreset; /* get the PID of a HARQ process awaiting retrnasmission, or -1 otherwise */ diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 622a46b766..5ea321189a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -154,16 +154,15 @@ NR_ControlResourceSet_t *get_coreset(NR_ServingCellConfigCommon_t *scc, } NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc, - NR_BWP_Downlink_t *bwp, + NR_BWP_DownlinkDedicated_t *bwp_Dedicated, NR_SearchSpace__searchSpaceType_PR target_ss) { - - const int n = bwp ? - bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list.count: + const int n = bwp_Dedicated ? + bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list.count: scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList->list.count; for (int i=0;ibwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list.array[i]: + NR_SearchSpace_t *ss = bwp_Dedicated ? + bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list.array[i]: scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList->list.array[i]; AssertFatal(ss->controlResourceSetId != NULL, "ss->controlResourceSetId is null\n"); AssertFatal(ss->searchSpaceType != NULL, "ss->searchSpaceType is null\n"); @@ -171,7 +170,7 @@ NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc, return ss; } } - AssertFatal(0, "Couldn't find an adequate searchspace\n"); + AssertFatal(0, "Couldn't find an adequate searchspace bwp_Dedicated %p\n",bwp_Dedicated); } int allocate_nr_CCEs(gNB_MAC_INST *nr_mac, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 58b01d68b9..3b572e5b41 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -695,8 +695,14 @@ void pf_ul(module_id_t module_id, * every TTI if we can save it, so check whether dci_format, TDA, or * num_dmrs_cdm_grps_no_data has changed and only then recompute */ sched_ctrl->sched_pusch.time_domain_allocation = tda; - sched_ctrl->search_space = get_searchspace(scc,sched_ctrl->active_bwp, - sched_ctrl->active_bwp ? + NR_BWP_DownlinkDedicated_t *bwp_Dedicated=NULL; + if (sched_ctrl->active_bwp) bwp_Dedicated = sched_ctrl->active_bwp->bwp_Dedicated; + else if (UE_info->CellGroup[UE_id] && + UE_info->CellGroup[UE_id]->spCellConfig && + UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated) + bwp_Dedicated = UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->initialDownlinkBWP; + sched_ctrl->search_space = get_searchspace(scc,bwp_Dedicated, + bwp_Dedicated ? NR_SearchSpace__searchSpaceType_PR_ue_Specific: NR_SearchSpace__searchSpaceType_PR_common); sched_ctrl->coreset = get_coreset(scc,sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */); diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 282b20c7f3..18698635de 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -271,8 +271,8 @@ NR_ControlResourceSet_t *get_coreset(NR_ServingCellConfigCommon_t *scc, /* find a search space within a BWP */ NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc, - NR_BWP_Downlink_t *bwp, - NR_SearchSpace__searchSpaceType_PR target_ss); + NR_BWP_DownlinkDedicated_t *bwp_Dedicated, + NR_SearchSpace__searchSpaceType_PR target_ss); long get_K2(NR_ServingCellConfigCommon_t *scc, NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu);