Commit 2ba71e74 authored by francescomani's avatar francescomani

using bwp id to configure coreset id

parent 03e869ee
......@@ -1045,7 +1045,7 @@ void fill_default_downlinkBWP(NR_BWP_Downlink_t *bwp,
NR_ControlResourceSet_t *coreset = calloc(1,sizeof(*coreset));
uint64_t bitmap = get_ssb_bitmap(scc);
rrc_coreset_config(coreset, curr_bwp, bitmap);
rrc_coreset_config(coreset, bwp->bwp_Id, curr_bwp, bitmap);
bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = coreset;
bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->searchSpaceZero=NULL;
......@@ -1103,7 +1103,7 @@ void fill_default_downlinkBWP(NR_BWP_Downlink_t *bwp,
bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList = calloc(1,sizeof(*bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList));
NR_ControlResourceSet_t *coreset2 = calloc(1,sizeof(*coreset2));
rrc_coreset_config(coreset2, curr_bwp, bitmap);
rrc_coreset_config(coreset2, bwp->bwp_Id, curr_bwp, bitmap);
ASN_SEQUENCE_ADD(&bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list, coreset2);
bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList = calloc(1,sizeof(*bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList));
......@@ -1740,7 +1740,7 @@ void fill_initial_SpCellConfig(int uid,
NR_ControlResourceSet_t *coreset = calloc(1,sizeof(*coreset));
uint64_t bitmap = get_ssb_bitmap(scc);
rrc_coreset_config(coreset, curr_bwp, bitmap);
rrc_coreset_config(coreset, 0, curr_bwp, bitmap);
ASN_SEQUENCE_ADD(&bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list,
coreset);
......
......@@ -35,6 +35,7 @@ const uint8_t slotsperframe[5] = {10, 20, 40, 80, 160};
void rrc_coreset_config(NR_ControlResourceSet_t *coreset,
int bwp_id,
int curr_bwp,
uint64_t ssb_bitmap) {
......@@ -54,12 +55,7 @@ void rrc_coreset_config(NR_ControlResourceSet_t *coreset,
coreset->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle;
// The ID space is used across the BWPs of a Serving Cell as per 38.331
// Unique ID depending on BWP size
coreset->controlResourceSetId = (coreset->frequencyDomainResources.buf[0] > 0) +
(coreset->frequencyDomainResources.buf[1] > 0) +
(coreset->frequencyDomainResources.buf[2] > 0) +
(coreset->frequencyDomainResources.buf[3] > 0) +
(coreset->frequencyDomainResources.buf[4] > 0);
coreset->controlResourceSetId = bwp_id + 1;
coreset->tci_StatesPDCCH_ToAddList=calloc(1,sizeof(*coreset->tci_StatesPDCCH_ToAddList));
NR_TCI_StateId_t *tci[64];
......
......@@ -113,6 +113,7 @@ typedef struct physicalcellgroup_s{
uint64_t get_ssb_bitmap(NR_ServingCellConfigCommon_t *scc);
void rrc_coreset_config(NR_ControlResourceSet_t *coreset,
int bwp_id,
int curr_bwp,
uint64_t ssb_bitmap);
void nr_rrc_config_dl_tda(NR_ServingCellConfigCommon_t *scc,
......
......@@ -119,7 +119,7 @@ void fill_default_nsa_downlinkBWP(NR_BWP_Downlink_t *bwp,
int curr_bwp = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth,275);
NR_ControlResourceSet_t *coreset = calloc(1,sizeof(*coreset));
rrc_coreset_config(coreset, curr_bwp, bitmap);
rrc_coreset_config(coreset, bwp->bwp_Id, curr_bwp, bitmap);
bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = coreset;
bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->searchSpaceZero=NULL;
......
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