use commonControlResourceSet instead of CSET0 as coreset for common SearchSpaces in case of MUX pattern 3
This commit is contained in:
@@ -32,7 +32,7 @@ gNBs =
|
||||
absoluteFrequencySSB = 2078299;
|
||||
dl_frequencyBand = 257;
|
||||
# this is 27.900 GHz
|
||||
dl_absoluteFrequencyPointA = 2077915;
|
||||
dl_absoluteFrequencyPointA = 2077963;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -42,7 +42,7 @@ gNBs =
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=32 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 13475;
|
||||
initialDLBWPlocationAndBandwidth = 6349;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 3;
|
||||
@@ -62,7 +62,7 @@ gNBs =
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 13475;
|
||||
initialULBWPlocationAndBandwidth = 6349;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 3;
|
||||
@@ -143,6 +143,11 @@ gNBs =
|
||||
|
||||
);
|
||||
|
||||
first_active_bwp = 1;
|
||||
bwp_list = (
|
||||
{ scs = 3; bwpStart = 0; bwpSize = 66;}
|
||||
);
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ services:
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim
|
||||
--rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
-C 27972480000 -r 66 --numerology 3 --ssb 72 --band 257
|
||||
-C 27975360000 -r 66 --numerology 3 --ssb 48 --band 257
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
|
||||
@@ -587,7 +587,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc, uint64_t ssbmap)
|
||||
nr_rrc_config_dl_tda(dlcc->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList,
|
||||
frame_type,
|
||||
scc->tdd_UL_DL_ConfigurationCommon,
|
||||
dlcc->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth);
|
||||
NRRIV2BW(dlcc->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE));
|
||||
|
||||
if (frame_type == FDD) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_TDD_UL_DL_ConfigCommon, scc->tdd_UL_DL_ConfigurationCommon);
|
||||
|
||||
@@ -821,6 +821,15 @@ static void config_sched_ctrlSIB1(gNB_MAC_INST *nr_mac)
|
||||
fill_coresetZero(&sched_ctrlCommon->coreset, &type0_PDCCH_CSS_config);
|
||||
nr_mac->cset0_bwp_start = type0_PDCCH_CSS_config.cset_start_rb;
|
||||
nr_mac->cset0_bwp_size = type0_PDCCH_CSS_config.num_rbs;
|
||||
if (type0_PDCCH_CSS_config.type0_pdcch_ss_mux_pattern > 1) {
|
||||
int bwp_start = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,
|
||||
MAX_BWP_SIZE);
|
||||
int bwp_size = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
||||
// we need to configure a commonControlResourceSet != 0
|
||||
// because CSET0 would start from a symbol != 0 and that's unwanted for anything but SIB1
|
||||
// The network configures the commonControlResourceSet in SIB1 so that it is contained in the bandwidth of CSET0
|
||||
configure_coreset_for_mux23(scc, nr_mac->cset0_bwp_start - bwp_start, nr_mac->cset0_bwp_size, bwp_start, bwp_size);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -273,20 +273,41 @@ NR_SearchSpace_t *rrc_searchspace_config(bool is_common,
|
||||
return ss;
|
||||
}
|
||||
|
||||
static NR_ControlResourceSet_t *get_coreset_config(int bwp_id, int bwp_start, int bwp_size, uint64_t ssb_bitmap)
|
||||
static NR_ControlResourceSet_t *get_coreset_config(int bwp_id,
|
||||
int cset_offset,
|
||||
int cset_limit,
|
||||
int bwp_start,
|
||||
int bwp_size,
|
||||
uint64_t ssb_bitmap)
|
||||
{
|
||||
NR_ControlResourceSet_t *coreset = calloc(1, sizeof(*coreset));
|
||||
AssertFatal(coreset != NULL, "out of memory\n");
|
||||
// frequency domain resources depending on BWP size
|
||||
int additional_offset = (bwp_start + 5) / 6 * 6 - bwp_start;
|
||||
int cset_shift = 0;
|
||||
if (cset_offset > additional_offset) {
|
||||
cset_shift = cset_offset / 6 + (cset_offset % 6 > 0);
|
||||
additional_offset += cset_shift * 6;
|
||||
}
|
||||
int eff_bwp_size = bwp_size - additional_offset;
|
||||
if (cset_limit && eff_bwp_size > cset_limit)
|
||||
eff_bwp_size = cset_limit;
|
||||
AssertFatal(eff_bwp_size >= 24, "CORESET effective BWP size %d is less than 24 PRB, can't allocate\n", eff_bwp_size);
|
||||
coreset->frequencyDomainResources.buf = calloc(1,6);
|
||||
coreset->frequencyDomainResources.buf[0] = (eff_bwp_size < 48) ? 0xf0 : 0xff;
|
||||
coreset->frequencyDomainResources.buf[1] = (eff_bwp_size < 96) ? 0x00 : 0xff;
|
||||
coreset->frequencyDomainResources.buf[2] = (eff_bwp_size < 144) ? 0x00 : 0xff;
|
||||
coreset->frequencyDomainResources.buf[3] = (eff_bwp_size < 192) ? 0x00 : 0xff;
|
||||
coreset->frequencyDomainResources.buf[4] = (eff_bwp_size < 240) ? 0x00 : 0xff;
|
||||
coreset->frequencyDomainResources.buf[5] = 0x00;
|
||||
uint64_t buf = 0;
|
||||
if (eff_bwp_size < 48)
|
||||
buf = 0xf;
|
||||
else {
|
||||
for (int i = 0; i < eff_bwp_size / 48; i++) {
|
||||
buf <<= 8;
|
||||
buf += 0xff;
|
||||
}
|
||||
}
|
||||
buf <<= cset_shift;
|
||||
for (int b = 0; b < 6; b++) {
|
||||
uint8_t temp_buf = (buf >> (8 * b)) & 0xff;
|
||||
reverse_bits_u8(&temp_buf, 1, &coreset->frequencyDomainResources.buf[b]);
|
||||
}
|
||||
coreset->frequencyDomainResources.size = 6;
|
||||
coreset->frequencyDomainResources.bits_unused = 3;
|
||||
coreset->duration = (eff_bwp_size < 48) ? 2 : 1;
|
||||
@@ -1001,8 +1022,8 @@ void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
|
||||
void nr_rrc_config_dl_tda(struct NR_PDSCH_TimeDomainResourceAllocationList *pdsch_TimeDomainAllocationList,
|
||||
frame_type_t frame_type,
|
||||
NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,
|
||||
int curr_bwp) {
|
||||
|
||||
int curr_bwp)
|
||||
{
|
||||
// coreset duration setting to be improved in the framework of RRC harmonization, potentially using a common function
|
||||
int len_coreset = 1;
|
||||
if (curr_bwp < 48)
|
||||
@@ -1751,7 +1772,7 @@ static NR_BWP_Downlink_t *config_downlinkBWP(const NR_ServingCellConfigCommon_t
|
||||
int bwp_size = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
||||
int bwp_start = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
||||
uint64_t ssb_bitmap = get_ssb_bitmap(scc);
|
||||
NR_ControlResourceSet_t *coreset = get_coreset_config(bwp->bwp_Id, bwp_start, bwp_size, ssb_bitmap);
|
||||
NR_ControlResourceSet_t *coreset = get_coreset_config(bwp->bwp_Id, 0, 0, bwp_start, bwp_size, ssb_bitmap);
|
||||
bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = coreset;
|
||||
|
||||
bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->searchSpaceZero=NULL;
|
||||
@@ -1803,9 +1824,8 @@ static NR_BWP_Downlink_t *config_downlinkBWP(const NR_ServingCellConfigCommon_t
|
||||
bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList = calloc(1,sizeof(*bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList));
|
||||
bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList = calloc(1,sizeof(*bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList));
|
||||
|
||||
// coreset2 is identical to coreset above, but reallocated to prevent double
|
||||
// frees
|
||||
NR_ControlResourceSet_t *coreset2 = get_coreset_config(bwp->bwp_Id, bwp_start, bwp_size, ssb_bitmap);
|
||||
// coreset2 is identical to coreset above, but reallocated to prevent double frees
|
||||
NR_ControlResourceSet_t *coreset2 = get_coreset_config(bwp->bwp_Id, 0, 0, bwp_start, bwp_size, ssb_bitmap);
|
||||
asn1cSeqAdd(&bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list, coreset2);
|
||||
int rrc_num_agg_level_candidates[NUM_PDCCH_AGG_LEVELS];
|
||||
int num_cces = get_coreset_num_cces(coreset2->frequencyDomainResources.buf, coreset2->duration);
|
||||
@@ -2710,6 +2730,17 @@ static BIT_STRING_t bit_string_clone(const BIT_STRING_t *orig)
|
||||
return bs;
|
||||
}
|
||||
|
||||
|
||||
void configure_coreset_for_mux23(const NR_ServingCellConfigCommon_t *scc, int offset, int limit, int bwp_start, int bwp_size)
|
||||
{
|
||||
NR_ControlResourceSet_t *coreset = get_coreset_config(5, offset, limit, bwp_start, bwp_size, get_ssb_bitmap(scc));
|
||||
NR_PDCCH_ConfigCommon_t *pdcch_common = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup;
|
||||
pdcch_common->commonControlResourceSet = coreset;
|
||||
for (int i = 0; i < pdcch_common->commonSearchSpaceList->list.count; i++) {
|
||||
*pdcch_common->commonSearchSpaceList->list.array[i]->controlResourceSetId = coreset->controlResourceSetId;
|
||||
}
|
||||
}
|
||||
|
||||
NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc,
|
||||
const plmn_id_t *plmn,
|
||||
uint64_t cellID,
|
||||
@@ -3336,7 +3367,7 @@ static NR_BWP_DownlinkDedicated_t *configure_initial_dl_bwp(const NR_ServingCell
|
||||
NR_BWP_t *genericParameters = &scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters;
|
||||
int bwp_size = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
||||
int bwp_start = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
||||
NR_ControlResourceSet_t *coreset = get_coreset_config(0, bwp_start, bwp_size, bitmap);
|
||||
NR_ControlResourceSet_t *coreset = get_coreset_config(0, 0, 0, bwp_start, bwp_size, bitmap);
|
||||
asn1cSeqAdd(&pdcch_Config->controlResourceSetToAddModList->list, coreset);
|
||||
|
||||
int css_num_agg_level_candidates[NUM_PDCCH_AGG_LEVELS];
|
||||
|
||||
@@ -68,7 +68,7 @@ NR_BCCH_BCH_Message_t *get_new_MIB_NR(const NR_ServingCellConfigCommon_t *scc);
|
||||
void free_MIB_NR(NR_BCCH_BCH_Message_t *mib);
|
||||
int encode_MIB_NR(NR_BCCH_BCH_Message_t *mib, int frame, uint8_t *buf, int buf_size);
|
||||
int encode_MIB_NR_setup(NR_MIB_t *mib, int frame, uint8_t *buf, int buf_size);
|
||||
|
||||
void configure_coreset_for_mux23(const NR_ServingCellConfigCommon_t *scc, int offset, int limit, int bwp_start, int bwp_size);
|
||||
struct NR_MeasurementTimingConfiguration;
|
||||
struct NR_MeasurementTimingConfiguration *get_new_MeasurementTimingConfiguration(const NR_ServingCellConfigCommon_t *scc);
|
||||
int encode_MeasurementTimingConfiguration(const struct NR_MeasurementTimingConfiguration *mtc, uint8_t *buf, int buf_len);
|
||||
|
||||
Reference in New Issue
Block a user