Commit 6e33fcfe authored by Francesco Mani's avatar Francesco Mani
Browse files

SSB periodicity at gNB from config file

parent 8950a779
......@@ -91,7 +91,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
uint8_t *pbch_pdu=&gNB->pbch_pdu[0];
uint8_t ssb_index, n_hf;
int ssb_start_symbol, rel_slot;
printf("Frame %d\n",frame);
n_hf = cfg->sch_config.half_frame_index.value;
// if SSB periodicity is 5ms, they are transmitted in both half frames
......
......@@ -187,6 +187,7 @@ void config_common(int Mod_idP,
int cellid,
int nr_bandP,
uint64_t ssb_pattern,
uint16_t ssb_periodicity,
uint64_t dl_CarrierFreqP,
uint32_t dl_BandwidthP
){
......@@ -242,6 +243,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int p_gNB,
int nr_bandP,
uint64_t ssb_pattern,
uint16_t ssb_enum_periodicity,
uint64_t dl_CarrierFreqP,
int dl_BandwidthP,
NR_BCCH_BCH_Message_t *mib,
......@@ -249,6 +251,30 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
){
uint16_t ssb_periodicity;
switch (ssb_enum_periodicity) {
case 0:
ssb_periodicity = 5;
break;
case 1:
ssb_periodicity = 10;
break;
case 2:
ssb_periodicity = 20;
break;
case 3:
ssb_periodicity = 40;
break;
case 4:
ssb_periodicity = 80;
break;
case 5:
ssb_periodicity = 160;
break;
}
if( mib != NULL ){
config_nr_mib(Mod_idP,
CC_idP,
......@@ -273,6 +299,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
cellid,
nr_bandP,
ssb_pattern,
ssb_periodicity,
dl_CarrierFreqP,
dl_BandwidthP
);
......
......@@ -38,10 +38,11 @@ void mac_top_init_gNB(void);
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int CC_id,
int cellid,
int cellid,
int p_gNB,
int nr_bandP,
uint64_t ssb_pattern,
uint16_t ssb_periodicity,
uint64_t dl_CarrierFreqP,
int dl_BandwidthP,
NR_BCCH_BCH_Message_t *mib,
......
......@@ -260,13 +260,13 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
);
LOG_I(NR_RRC,"Done init_NR_SI\n");
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],
configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id],
configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id],
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq,
configuration->N_RB_DL[CC_id],
......
......@@ -71,7 +71,7 @@ gNBs =
UL_timeAlignmentTimerCommon = "infinity";
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01;
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_ssb_periodicityServingCell = 20;
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15";
ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
......
......@@ -71,7 +71,7 @@ gNBs =
UL_timeAlignmentTimerCommon = "infinity";
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01;
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_ssb_periodicityServingCell = 20;
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15";
ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
......
......@@ -71,7 +71,7 @@ gNBs =
UL_timeAlignmentTimerCommon = "infinity";
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01;
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_ssb_periodicityServingCell = 20;
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15";
ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
......
......@@ -71,7 +71,7 @@ gNBs =
UL_timeAlignmentTimerCommon = "infinity";
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01;
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_ssb_periodicityServingCell = 20;
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15";
ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
......
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