Improve CORESET selection
This commit is contained in:
@@ -686,7 +686,8 @@ static void other_sib_sched_control(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
AssertFatal(nr_of_candidates > 0, "nr_of_candidates is 0\n");
|
AssertFatal(nr_of_candidates > 0, "nr_of_candidates is 0\n");
|
||||||
NR_ControlResourceSet_t *coreset = get_coreset(gNB_mac, scc, NULL, ss, NR_SearchSpace__searchSpaceType_PR_common);
|
AssertFatal(ss->controlResourceSetId, "ss->controlResourceSetId is NULL\n");
|
||||||
|
NR_ControlResourceSet_t *coreset = get_coreset(gNB_mac, scc, NULL, *ss->controlResourceSetId);
|
||||||
if (!gNB_mac->sched_pdcch_otherSI) {
|
if (!gNB_mac->sched_pdcch_otherSI) {
|
||||||
gNB_mac->sched_pdcch_otherSI = calloc(1, sizeof(*gNB_mac->sched_pdcch_otherSI));
|
gNB_mac->sched_pdcch_otherSI = calloc(1, sizeof(*gNB_mac->sched_pdcch_otherSI));
|
||||||
*gNB_mac->sched_pdcch_otherSI = set_pdcch_structure(gNB_mac, ss, coreset, scc, NULL, type0_PDCCH_CSS_config);
|
*gNB_mac->sched_pdcch_otherSI = set_pdcch_structure(gNB_mac, ss, coreset, scc, NULL, type0_PDCCH_CSS_config);
|
||||||
|
|||||||
@@ -369,39 +369,31 @@ NR_pdsch_dmrs_t get_dl_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
|
|||||||
|
|
||||||
NR_ControlResourceSet_t *get_coreset(gNB_MAC_INST *nrmac,
|
NR_ControlResourceSet_t *get_coreset(gNB_MAC_INST *nrmac,
|
||||||
NR_ServingCellConfigCommon_t *scc,
|
NR_ServingCellConfigCommon_t *scc,
|
||||||
void *bwp,
|
NR_BWP_DownlinkDedicated_t *bwp_dedicated,
|
||||||
NR_SearchSpace_t *ss,
|
NR_ControlResourceSetId_t coreset_id)
|
||||||
NR_SearchSpace__searchSpaceType_PR ss_type) {
|
{
|
||||||
|
if (coreset_id == 0) {
|
||||||
NR_ControlResourceSetId_t coreset_id = *ss->controlResourceSetId;
|
return nrmac->sched_ctrlCommon->coreset; // this is coreset 0
|
||||||
|
}
|
||||||
if (ss_type == NR_SearchSpace__searchSpaceType_PR_common) { // common search space
|
if (bwp_dedicated) {
|
||||||
NR_ControlResourceSet_t *coreset;
|
const int n = bwp_dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.count;
|
||||||
if(coreset_id == 0) {
|
|
||||||
coreset = nrmac->sched_ctrlCommon->coreset; // this is coreset 0
|
|
||||||
} else if (bwp) {
|
|
||||||
coreset = ((NR_BWP_Downlink_t*)bwp)->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet;
|
|
||||||
} else if (scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet) {
|
|
||||||
coreset = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet;
|
|
||||||
} else {
|
|
||||||
coreset = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (coreset) AssertFatal(coreset_id == coreset->controlResourceSetId,
|
|
||||||
"ID of common ss coreset does not correspond to id set in the "
|
|
||||||
"search space\n");
|
|
||||||
return coreset;
|
|
||||||
} else {
|
|
||||||
const int n = ((NR_BWP_DownlinkDedicated_t*)bwp)->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.count;
|
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
NR_ControlResourceSet_t *coreset =
|
NR_ControlResourceSet_t *coreset = bwp_dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.array[i];
|
||||||
((NR_BWP_DownlinkDedicated_t*)bwp)->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.array[i];
|
if (coreset->controlResourceSetId == coreset_id) {
|
||||||
if (coreset_id == coreset->controlResourceSetId) {
|
|
||||||
return coreset;
|
return coreset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssertFatal(0, "Couldn't find coreset with id %ld\n", coreset_id);
|
AssertFatal(false, "Couldn't find CORESET with id %ld in BWP_DownlinkDedicated\n", coreset_id);
|
||||||
}
|
}
|
||||||
|
if (scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet) {
|
||||||
|
NR_ControlResourceSet_t *coreset =
|
||||||
|
scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet;
|
||||||
|
if (coreset->controlResourceSetId == coreset_id) {
|
||||||
|
return coreset;
|
||||||
|
}
|
||||||
|
AssertFatal(false, "Couldn't find CORESET with id %ld in commonControlResourceSet\n", coreset_id);
|
||||||
|
}
|
||||||
|
AssertFatal(false, "Couldn't find coreset with id %ld\n", coreset_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc,
|
static NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc,
|
||||||
@@ -2594,7 +2586,7 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
|||||||
|
|
||||||
// setting PDCCH related structures for sched_ctrl
|
// setting PDCCH related structures for sched_ctrl
|
||||||
sched_ctrl->search_space = get_searchspace(scc, bwpd, target_ss);
|
sched_ctrl->search_space = get_searchspace(scc, bwpd, target_ss);
|
||||||
sched_ctrl->coreset = get_coreset(nr_mac, scc, bwpd, sched_ctrl->search_space, target_ss);
|
sched_ctrl->coreset = get_coreset(nr_mac, scc, bwpd, *sched_ctrl->search_space->controlResourceSetId);
|
||||||
|
|
||||||
sched_ctrl->sched_pdcch = set_pdcch_structure(nr_mac,
|
sched_ctrl->sched_pdcch = set_pdcch_structure(nr_mac,
|
||||||
sched_ctrl->search_space,
|
sched_ctrl->search_space,
|
||||||
@@ -2635,7 +2627,7 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
|||||||
}
|
}
|
||||||
AssertFatal(sched_ctrl->search_space != NULL, "SearchSpace cannot be null for RA\n");
|
AssertFatal(sched_ctrl->search_space != NULL, "SearchSpace cannot be null for RA\n");
|
||||||
|
|
||||||
sched_ctrl->coreset = get_coreset(nr_mac, scc, dl_bwp, sched_ctrl->search_space, NR_SearchSpace__searchSpaceType_PR_common);
|
sched_ctrl->coreset = get_coreset(nr_mac, scc, bwpd, *sched_ctrl->search_space->controlResourceSetId);
|
||||||
NR_COMMON_channels_t *cc = &nr_mac->common_channels[0];
|
NR_COMMON_channels_t *cc = &nr_mac->common_channels[0];
|
||||||
int ssb_index = cc->ssb_index[UE->UE_beam_index];
|
int ssb_index = cc->ssb_index[UE->UE_beam_index];
|
||||||
sched_ctrl->sched_pdcch = set_pdcch_structure(nr_mac,
|
sched_ctrl->sched_pdcch = set_pdcch_structure(nr_mac,
|
||||||
|
|||||||
@@ -283,9 +283,8 @@ void set_r_pucch_parms(int rsetindex,
|
|||||||
/* find coreset within the search space */
|
/* find coreset within the search space */
|
||||||
NR_ControlResourceSet_t *get_coreset(gNB_MAC_INST *nrmac,
|
NR_ControlResourceSet_t *get_coreset(gNB_MAC_INST *nrmac,
|
||||||
NR_ServingCellConfigCommon_t *scc,
|
NR_ServingCellConfigCommon_t *scc,
|
||||||
void *bwp,
|
NR_BWP_DownlinkDedicated_t *bwp_dedicated,
|
||||||
NR_SearchSpace_t *ss,
|
NR_ControlResourceSetId_t coreset_id);
|
||||||
NR_SearchSpace__searchSpaceType_PR ss_type);
|
|
||||||
|
|
||||||
long get_K2(NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList,
|
long get_K2(NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList,
|
||||||
int time_domain_assignment,
|
int time_domain_assignment,
|
||||||
|
|||||||
Reference in New Issue
Block a user