Commit 3ff4554d authored by Francesco Mani's avatar Francesco Mani

CellID taken from config file

parent 5633e597
...@@ -184,6 +184,7 @@ void config_nr_mib(int Mod_idP, ...@@ -184,6 +184,7 @@ void config_nr_mib(int Mod_idP,
void config_common(int Mod_idP, void config_common(int Mod_idP,
int CC_idP, int CC_idP,
int cellid,
int nr_bandP, int nr_bandP,
uint64_t dl_CarrierFreqP, uint64_t dl_CarrierFreqP,
uint32_t dl_BandwidthP uint32_t dl_BandwidthP
...@@ -193,6 +194,8 @@ void config_common(int Mod_idP, ...@@ -193,6 +194,8 @@ void config_common(int Mod_idP,
int mu = 1; int mu = 1;
cfg->sch_config.physical_cell_id.value = cellid;
// FDD // FDD
cfg->subframe_config.duplex_mode.value = 1; cfg->subframe_config.duplex_mode.value = 1;
cfg->subframe_config.duplex_mode.tl.tag = NFAPI_SUBFRAME_CONFIG_DUPLEX_MODE_TAG; cfg->subframe_config.duplex_mode.tl.tag = NFAPI_SUBFRAME_CONFIG_DUPLEX_MODE_TAG;
...@@ -232,6 +235,7 @@ void config_common(int Mod_idP, ...@@ -232,6 +235,7 @@ void config_common(int Mod_idP,
int rrc_mac_config_req_gNB(module_id_t Mod_idP, int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int CC_idP, int CC_idP,
int cellid,
int p_gNB, int p_gNB,
int nr_bandP, int nr_bandP,
uint64_t dl_CarrierFreqP, uint64_t dl_CarrierFreqP,
...@@ -261,6 +265,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ...@@ -261,6 +265,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
if( servingcellconfigcommon != NULL ){ if( servingcellconfigcommon != NULL ){
config_common(Mod_idP, config_common(Mod_idP,
CC_idP, CC_idP,
cellid,
nr_bandP, nr_bandP,
dl_CarrierFreqP, dl_CarrierFreqP,
dl_BandwidthP dl_BandwidthP
......
...@@ -38,6 +38,7 @@ void mac_top_init_gNB(void); ...@@ -38,6 +38,7 @@ void mac_top_init_gNB(void);
int rrc_mac_config_req_gNB(module_id_t Mod_idP, int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int CC_id, int CC_id,
int cellid,
int p_gNB, int p_gNB,
int nr_bandP, int nr_bandP,
uint64_t dl_CarrierFreqP, uint64_t dl_CarrierFreqP,
......
...@@ -236,7 +236,7 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP, ...@@ -236,7 +236,7 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Ncp_UL = configuration->UL_prefix_type[CC_id]; RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Ncp_UL = configuration->UL_prefix_type[CC_id];
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id]; RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id]; RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
///MIB ///MIB
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB = 0; RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB = 0;
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].MIB = (uint8_t*) malloc16(4); RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].MIB = (uint8_t*) malloc16(4);
...@@ -264,6 +264,7 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP, ...@@ -264,6 +264,7 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
rrc_mac_config_req_gNB(ctxt_pP->module_id, rrc_mac_config_req_gNB(ctxt_pP->module_id,
CC_id, CC_id,
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB, RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB,
configuration->nr_band[CC_id], configuration->nr_band[CC_id],
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq, RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq,
......
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