Merge remote-tracking branch 'origin/NR_gNB_SIB2' into integration_2025_w15 (!3184)
NR SIB2 - Transmission of SIB2 - Fixes for transmission and reception of SIB19 Closes #901
This commit is contained in:
@@ -1141,7 +1141,7 @@ static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cf
|
||||
css_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n1;
|
||||
} else {
|
||||
css_num_agg_level_candidates[PDCCH_AGG_LEVEL2] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
|
||||
css_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n1;
|
||||
css_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n2;
|
||||
css_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0;
|
||||
}
|
||||
css_num_agg_level_candidates[PDCCH_AGG_LEVEL16] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n0;
|
||||
@@ -1312,7 +1312,7 @@ static f1ap_fdd_info_t read_fdd_config(const NR_ServingCellConfigCommon_t *scc)
|
||||
return fdd;
|
||||
}
|
||||
|
||||
f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCCH_DL_SCH_Message_t *sib1)
|
||||
f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCCH_DL_SCH_Message_t *sib1, seq_arr_t *du_SIBs)
|
||||
{
|
||||
int buf_len = 3;
|
||||
f1ap_gnb_du_system_info_t *sys_info = calloc_or_fail(1, sizeof(*sys_info));
|
||||
@@ -1329,15 +1329,24 @@ f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCC
|
||||
AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded);
|
||||
sys_info->sib1_length = (enc_rval.encoded + 7) / 8;
|
||||
|
||||
if (du_SIBs) {
|
||||
for (int i = 0; i < du_SIBs->size; i++) {
|
||||
nr_SIBs_t *si = (nr_SIBs_t *)seq_arr_at(du_SIBs, i);
|
||||
// other SIB in gNB-DU System Information not implemented yet
|
||||
// only DU SIB not included in this message is SIB19
|
||||
AssertFatal(si->SIB_type == 19, "Cannot handle SIB%d in gNB-DU System Information\n", si->SIB_type);
|
||||
}
|
||||
}
|
||||
return sys_info;
|
||||
}
|
||||
|
||||
f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
const char *name,
|
||||
const f1ap_served_cell_info_t *info,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
NR_BCCH_BCH_Message_t *mib,
|
||||
const NR_BCCH_DL_SCH_Message_t *sib1)
|
||||
const NR_BCCH_DL_SCH_Message_t *sib1,
|
||||
seq_arr_t *du_SIBs)
|
||||
{
|
||||
f1ap_setup_req_t *req = calloc(1, sizeof(*req));
|
||||
AssertFatal(req != NULL, "out of memory\n");
|
||||
@@ -1381,7 +1390,7 @@ f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
// in NSA we don't transmit SIB1, so cannot fill DU system information
|
||||
// so cannot send MIB either
|
||||
req->cell[0].sys_info = get_sys_info(mib, sib1);
|
||||
req->cell[0].sys_info = get_sys_info(mib, sib1, du_SIBs);
|
||||
}
|
||||
|
||||
int num = read_version(TO_STRING(NR_RRC_VERSION), &req->rrc_ver[0], &req->rrc_ver[1], &req->rrc_ver[2]);
|
||||
@@ -1421,6 +1430,31 @@ static nr_redcap_config_t *get_redcap_config(int gnb_idx)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static seq_arr_t *fill_du_sibs(paramdef_t *GNBparamarray)
|
||||
{
|
||||
if (NODE_IS_DU(get_node_type()))
|
||||
AssertFatal(GNBparamarray[GNB_CU_SIBS_IDX].numelt == 0, "This is DU, do not input CU SIBs\n");
|
||||
|
||||
if (!config_isparamset(GNBparamarray, GNB_DU_SIBS_IDX))
|
||||
return NULL;
|
||||
|
||||
seq_arr_t *du_SIBs = malloc(sizeof(seq_arr_t));
|
||||
seq_arr_init(du_SIBs, sizeof(nr_SIBs_t));
|
||||
for (int i = 0; i < GNBparamarray[GNB_DU_SIBS_IDX].numelt; i++) {
|
||||
int sib_value = GNBparamarray[GNB_DU_SIBS_IDX].iptr[i];
|
||||
// SIB10, SIB12, SIB13, SIB14, SIB15, SIB17, SIB18, SIB19 and SIB20 are generated by the DU
|
||||
// all the rest in the DU
|
||||
AssertFatal((sib_value > 9 && sib_value < 21) && sib_value != 11 && sib_value != 16,
|
||||
"SIB%d is not a DU SIB, to be configured in DU section\n",
|
||||
sib_value);
|
||||
nr_SIBs_t *du_sib = calloc_or_fail(1, sizeof(nr_SIBs_t));
|
||||
du_sib->SIB_type = sib_value;
|
||||
LOG_I(GNB_APP, "activate SIB%d at DU\n", sib_value);
|
||||
seq_arr_push_back(du_SIBs, du_sib, sizeof(nr_SIBs_t));
|
||||
}
|
||||
return du_SIBs;
|
||||
}
|
||||
|
||||
void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
{
|
||||
int j = 0;
|
||||
@@ -1693,17 +1727,18 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
f1ap_served_cell_info_t info;
|
||||
read_du_cell_info(cfg, NODE_IS_DU(node_type), &gnb_id, &gnb_du_id, &name, &info, 1);
|
||||
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
NR_COMMON_channels_t *cc = &RC.nrmac[0]->common_channels[0];
|
||||
cc->du_SIBs = fill_du_sibs(GNBParamList.paramarray[0]);
|
||||
|
||||
if (IS_SA_MODE(get_softmodem_params()))
|
||||
nr_mac_configure_sib1(RC.nrmac[0], &info.plmn, info.nr_cellid, *info.tac);
|
||||
if (scc->ext2 && scc->ext2->ntn_Config_r17)
|
||||
nr_mac_configure_sib19(RC.nrmac[0]);
|
||||
}
|
||||
|
||||
// read F1 Setup information from config and generated MIB/SIB1
|
||||
// and store it at MAC for sending later
|
||||
NR_BCCH_BCH_Message_t *mib = RC.nrmac[0]->common_channels[0].mib;
|
||||
const NR_BCCH_DL_SCH_Message_t *sib1 = RC.nrmac[0]->common_channels[0].sib1;
|
||||
f1ap_setup_req_t *req = RC_read_F1Setup(gnb_du_id, name, &info, scc, mib, sib1);
|
||||
seq_arr_t *du_SIBs = RC.nrmac[0]->common_channels[0].du_SIBs;
|
||||
f1ap_setup_req_t *req = RC_read_F1Setup(gnb_du_id, name, &info, scc, mib, sib1, du_SIBs);
|
||||
AssertFatal(req != NULL, "could not read F1 Setup information\n");
|
||||
RC.nrmac[0]->f1_config.setup_req = req;
|
||||
RC.nrmac[0]->f1_config.gnb_id = gnb_id;
|
||||
@@ -1847,6 +1882,31 @@ static int sort_neighbour_cell_config_by_cell_id(const void *a, const void *b)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static seq_arr_t *fill_cu_sibs(paramdef_t *GNBparamarray)
|
||||
{
|
||||
if (NODE_IS_CU(get_node_type()))
|
||||
AssertFatal(GNBparamarray[GNB_DU_SIBS_IDX].numelt == 0, "This is CU, do not input DU SIBs\n");
|
||||
|
||||
if (!config_isparamset(GNBparamarray, GNB_CU_SIBS_IDX))
|
||||
return NULL;
|
||||
|
||||
seq_arr_t *SIBs = malloc(sizeof(seq_arr_t));
|
||||
seq_arr_init(SIBs, sizeof(nr_SIBs_t));
|
||||
for (int i = 0; i < GNBparamarray[GNB_CU_SIBS_IDX].numelt; i++) {
|
||||
int sib_value = GNBparamarray[GNB_CU_SIBS_IDX].iptr[i];
|
||||
// SIB10, SIB12, SIB13, SIB14, SIB15, SIB17, SIB18, SIB19 and SIB20 are generated by the DU
|
||||
// all the rest in the CU
|
||||
AssertFatal((sib_value > 1 && sib_value < 10) || sib_value == 11 || sib_value == 16,
|
||||
"SIB%d is not a CU SIB, to be configured in DU section\n",
|
||||
sib_value);
|
||||
nr_SIBs_t *cu_sib = calloc_or_fail(1, sizeof(*cu_sib));
|
||||
cu_sib->SIB_type = sib_value;
|
||||
LOG_I(GNB_APP, "activate SIB%d at CU\n", sib_value);
|
||||
seq_arr_push_back(SIBs, cu_sib, sizeof(nr_SIBs_t));
|
||||
}
|
||||
return SIBs;
|
||||
}
|
||||
|
||||
static void fill_neighbour_cell_configuration(uint8_t gnb_idx, gNB_RRC_INST *rrc)
|
||||
{
|
||||
char gnbpath[MAX_OPTNAME_SIZE + 8];
|
||||
@@ -2086,6 +2146,8 @@ gNB_RRC_INST *RCconfig_NRRRC()
|
||||
|
||||
fill_measurement_configuration(k, rrc);
|
||||
|
||||
rrc->SIBs = fill_cu_sibs(GNBParamList.paramarray[i]);
|
||||
|
||||
paramdef_t PLMNParams[] = GNBPLMNPARAMS_DESC;
|
||||
|
||||
paramlist_def_t PLMNParamList = {GNB_CONFIG_STRING_PLMN_LIST, NULL, 0};
|
||||
|
||||
@@ -95,14 +95,8 @@ gNB_RRC_INST *RCconfig_NRRRC();
|
||||
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
|
||||
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
|
||||
void wait_f1_setup_response(void);
|
||||
f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
const char *name,
|
||||
const f1ap_served_cell_info_t *info,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
NR_BCCH_BCH_Message_t *mib,
|
||||
const NR_BCCH_DL_SCH_Message_t *sib1);
|
||||
f1ap_tdd_info_t read_tdd_config(const NR_ServingCellConfigCommon_t *scc);
|
||||
f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCCH_DL_SCH_Message_t *sib1);
|
||||
f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCCH_DL_SCH_Message_t *sib1, seq_arr_t *du_SIBs);
|
||||
int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update);
|
||||
MessageDef *RCconfig_NR_CU_E1(const E1_t *entity);
|
||||
ngran_node_t get_node_type(void);
|
||||
|
||||
@@ -139,6 +139,8 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_NUM_UL_HARQPROCESSES "num_ulharq"
|
||||
#define GNB_CONFIG_STRING_BEAM_WEIGHTS_LIST "beam_weights"
|
||||
#define GNB_CONFIG_STRING_UESS_AGG_LEVEL_LIST "uess_agg_levels"
|
||||
#define GNB_CONFIG_STRING_CU_SIB_LIST "cu_sibs"
|
||||
#define GNB_CONFIG_STRING_DU_SIB_LIST "du_sibs"
|
||||
|
||||
#define GNB_CONFIG_HLP_STRING_ENABLE_SDAP "enable the SDAP layer\n"
|
||||
#define GNB_CONFIG_HLP_FORCE256QAMOFF "suppress activation of 256 QAM despite UE support"
|
||||
@@ -150,6 +152,8 @@ typedef enum {
|
||||
#define GNB_CONFIG_HLP_NUM_DL_HARQ "Set Num DL harq processes. Valid values 2,4,6,8,10,12,16,32. Default 16"
|
||||
#define GNB_CONFIG_HLP_NUM_UL_HARQ "Set Num UL harq processes. Valid values 16,32. Default 16"
|
||||
#define GNB_CONFIG_HLP_UESS_AGG_LEVEL_LIST "List of aggregation levels with number of candidates per level. Element 0 - aggregation level 1"
|
||||
#define GNB_CONFIG_HLP_CU_SIBS "List of CU generated SIBs to be transmitted"
|
||||
#define GNB_CONFIG_HLP_DU_SIBS "List of DU generated SIBs to be transmitted"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* cell configuration parameters */
|
||||
@@ -195,6 +199,8 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_BEAM_WEIGHTS_LIST, NULL, 0, .iptr=NULL, .defintarrayval=0, TYPE_INTARRAY, 0}, \
|
||||
{GNB_CONFIG_STRING_UESS_AGG_LEVEL_LIST, \
|
||||
GNB_CONFIG_HLP_UESS_AGG_LEVEL_LIST, 0, .iptr=NULL, .defintarrayval=NULL, TYPE_INTARRAY, 0}, \
|
||||
{GNB_CONFIG_STRING_CU_SIB_LIST, GNB_CONFIG_HLP_CU_SIBS, 0, .iptr=NULL, .defintarrayval=0, TYPE_INTARRAY, 0}, \
|
||||
{GNB_CONFIG_STRING_DU_SIB_LIST, GNB_CONFIG_HLP_DU_SIBS, 0, .iptr=NULL, .defintarrayval=0, TYPE_INTARRAY, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -236,6 +242,8 @@ typedef enum {
|
||||
#define GNB_NUM_UL_HARQ_IDX 34
|
||||
#define GNB_BEAMWEIGHTS_IDX 35
|
||||
#define GNB_UESS_AGG_LEVEL_LIST_IDX 36
|
||||
#define GNB_CU_SIBS_IDX 37
|
||||
#define GNB_DU_SIBS_IDX 38
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define NUM_DL_HARQ_OKVALUES {2,4,6,8,10,12,16,32}
|
||||
@@ -279,6 +287,8 @@ typedef enum {
|
||||
{ .s1 = { config_check_intval, NUM_UL_HARQ_OKVALUES,2 } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user