Commit aa3991db authored by Francesco Mani's avatar Francesco Mani

SSB positions in burst from config file

parent 6f398aa9
......@@ -361,7 +361,7 @@ typedef struct NRRrcConfigurationReq_s {
lte_prefix_type_t UL_BWP_prefix_type[MAX_NUM_CCs];
long UL_timeAlignmentTimerCommon[MAX_NUM_CCs];
long ServingCellConfigCommon_n_TimingAdvanceOffset[MAX_NUM_CCs];
long ServingCellConfigCommon_ssb_PositionsInBurst_PR[MAX_NUM_CCs];
uint64_t ServingCellConfigCommon_ssb_PositionsInBurst_PR[MAX_NUM_CCs];
long ServingCellConfigCommon_ssb_periodicityServingCell[MAX_NUM_CCs]; //ServingCellConfigCommon
long ServingCellConfigCommon_dmrs_TypeA_Position[MAX_NUM_CCs]; //ServingCellConfigCommon
long NIA_SubcarrierSpacing[MAX_NUM_CCs]; //ServingCellConfigCommon Used only for non-initial access
......
......@@ -103,7 +103,6 @@ void RCconfig_nr_flexran()
*UL_frequencyShift7p5khz, *UL_SCS_SubcarrierSpacing, *UL_BWP_SubcarrierSpacing,
*UL_BWP_prefix_type, *UL_timeAlignmentTimerCommon,
*ServingCellConfigCommon_n_TimingAdvanceOffset,
*ServingCellConfigCommon_ssb_PositionsInBurst_PR,
*NIA_SubcarrierSpacing, *referenceSubcarrierSpacing, *dl_UL_TransmissionPeriodicity,
*rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,
*rach_groupBconfigured, *rach_messagePowerOffsetGroupB,
......@@ -118,7 +117,7 @@ void RCconfig_nr_flexran()
*SearchSpace_searchSpaceType, *ue_Specific__dci_Formats,
*RateMatchPatternLTE_CRS_subframeAllocation_choice;
uint64_t downlink_frequency;
uint64_t downlink_frequency, ServingCellConfigCommon_ssb_PositionsInBurst_PR;
int32_t nr_band, uplink_frequency_offset, N_RB_DL, nb_antenna_ports,
MIB_subCarrierSpacingCommon, MIB_ssb_SubcarrierOffset, MIB_dmrs_TypeA_Position,
......@@ -484,7 +483,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
char* UL_timeAlignmentTimerCommon = 0;
char* ServingCellConfigCommon_n_TimingAdvanceOffset = 0;
char* ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0;
uint64_t ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0;
int32_t ServingCellConfigCommon_ssb_periodicityServingCell = 0;
int32_t ServingCellConfigCommon_dmrs_TypeA_Position = 0;
char* NIA_SubcarrierSpacing = 0;
......@@ -1125,19 +1124,23 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
RC.config_file_name, i, ServingCellConfigCommon_n_TimingAdvanceOffset);
}
if (strcmp(ServingCellConfigCommon_ssb_PositionsInBurst_PR,"shortBitmap")==0) {
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_PositionsInBurst_PR[j] = NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap;
}else if (strcmp(ServingCellConfigCommon_ssb_PositionsInBurst_PR,"mediumBitmap")==0) {
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_PositionsInBurst_PR[j] = NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap;
}else if (strcmp(ServingCellConfigCommon_ssb_PositionsInBurst_PR,"longBitmap")==0) {
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_PositionsInBurst_PR[j] = NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_longBitmap;
}else if (strcmp(ServingCellConfigCommon_ssb_PositionsInBurst_PR,"NOTHING")==0) {
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_PositionsInBurst_PR[j] = NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_NOTHING;
}else {
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for ServingCellConfigCommon_ssb_PositionsInBurst_PR choice !\n",
RC.config_file_name, i, ServingCellConfigCommon_ssb_PositionsInBurst_PR);
}
uint64_t t_freq;
if(nr_band == 41 || (nr_band > 76 && nr_band < 80))
t_freq = 2400000000;
else
t_freq = 3000000000;
if (downlink_frequency<t_freq && (ServingCellConfigCommon_ssb_PositionsInBurst_PR > 15))
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unvalid value \"%ld\" for ssb_PositionsInBurst at DL frequency %ld !\n",
RC.config_file_name, i, ServingCellConfigCommon_ssb_PositionsInBurst_PR, downlink_frequency);
else {
if(downlink_frequency<6000000000 && (ServingCellConfigCommon_ssb_PositionsInBurst_PR > 255))
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unvalid value \"%ld\" for ssb_PositionsInBurst at DL frequency %ld !\n",
RC.config_file_name, i, ServingCellConfigCommon_ssb_PositionsInBurst_PR, downlink_frequency);
else
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_PositionsInBurst_PR[j] = ServingCellConfigCommon_ssb_PositionsInBurst_PR;
}
switch (ServingCellConfigCommon_ssb_periodicityServingCell) {
case 5:
......
......@@ -640,7 +640,7 @@ typedef enum {
{GNB_CONFIG_STRING_UL_BWP_PREFIX_TYPE, NULL, 0, strptr:&UL_BWP_prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_UL_TIMEALIGNMENTTIMERCOMMON, NULL, 0, strptr:&UL_timeAlignmentTimerCommon, defstrval:"infinity", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_N_TIMINGADVANCEOFFSET, NULL, 0, strptr:&ServingCellConfigCommon_n_TimingAdvanceOffset, defstrval:"n0", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_SSB_POSITIONSINBURST_PR, NULL, 0, strptr:&ServingCellConfigCommon_ssb_PositionsInBurst_PR, defstrval:"shortBitmap", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_SSB_POSITIONSINBURST_PR, NULL, 0, i64ptr:(int64_t *)&ServingCellConfigCommon_ssb_PositionsInBurst_PR, defint64val:0, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_SSB_PERIODICITYSERVINGCELL, NULL, 0, iptr:&ServingCellConfigCommon_ssb_periodicityServingCell, defintval:10, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_DMRS_TYPEA_POSITION, NULL, 0, iptr:&ServingCellConfigCommon_dmrs_TypeA_Position, defintval:0, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_NIA_SUBCARRIERSPACING, NULL, 0, strptr:&NIA_SubcarrierSpacing, defstrval:"kHz15", TYPE_STRING, 0}, \
......
......@@ -266,8 +266,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
}// END if( mib != NULL )
if( servingcellconfigcommon != NULL ){
config_common(Mod_idP,
CC_idP,
......
......@@ -747,15 +747,21 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
//ssb_PositionsInBurst
(*servingcellconfigcommon)->ssb_PositionsInBurst->present = configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id];
if((*servingcellconfigcommon)->ssb_PositionsInBurst->present == NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap){
uint64_t t_freq;
if(configuration->nr_band[CC_id] == 41 || (configuration->nr_band[CC_id] > 76 && configuration->nr_band[CC_id] < 80))
t_freq = 2400000000;
else
t_freq = 3000000000;
if(configuration->downlink_frequency[CC_id]<t_freq){
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.shortBitmap.size = 1;
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.shortBitmap.bits_unused = 4;
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.shortBitmap.buf[0] = 0x0f;
}else if((*servingcellconfigcommon)->ssb_PositionsInBurst->present == NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap){
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.shortBitmap.buf[0] = configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id];
}else if(configuration->downlink_frequency[CC_id]<6000000000){
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.size = 1;
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.bits_unused = 0;
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = 0xff;
}else if((*servingcellconfigcommon)->ssb_PositionsInBurst->present == NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_longBitmap){
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id];
}else {
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.size = 8;
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.bits_unused = 0;
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[0] = 0xff;
......@@ -768,6 +774,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
(*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[7] = 0xff;
}
//ssb_periodicityServingCell
*(*servingcellconfigcommon)->ssb_periodicityServingCell = configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id];
//dmrs_TypeA_Position
......
......@@ -261,13 +261,13 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
LOG_I(NR_RRC,"Done init_NR_SI\n");
uint64_t ssb_pattern = 255;
rrc_mac_config_req_gNB(ctxt_pP->module_id,
CC_id,
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB,
configuration->nr_band[CC_id],
ssb_pattern,
configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id],
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq,
configuration->N_RB_DL[CC_id],
(NR_BCCH_BCH_Message_t *)&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].mib,
......@@ -332,7 +332,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
gnb_mod_idP, RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[0],
RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[1],
RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[2],
RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[3],
RC.nrrrc[ctxt.module_id]->caNRRRC_CONFIGURATION_REQrrier[CC_id].cba_rnti[3],
RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups);
}
......
......@@ -70,7 +70,7 @@ gNBs =
UL_BWP_prefix_type = "NORMAL";
UL_timeAlignmentTimerCommon = "infinity";
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR = "shortBitmap";
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0xff;
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15";
......
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