Commit d4483259 authored by islam.galal's avatar islam.galal

Merge branch 'RU-RAU-split' of...

Merge branch 'RU-RAU-split' of http://gitlab.eurecom.fr/raymond.knopp/openairinterface5g into RU-RAU-split
parents 44fc7753 aeda8e5c
......@@ -250,7 +250,7 @@ typedef struct RrcConfigurationReq_s {
long prach_HoppingConfig_r13 [MAX_NUM_CCs][4];
int prach_parameters_list_size [MAX_NUM_CCs];
long max_available_narrow_band [MAX_NUM_CCs][4][2];
int max_available_narrow_band_size [MAX_NUM_CCs];
int max_available_narrow_band_size [MAX_NUM_CCs][4];
// end kogo
......@@ -259,6 +259,12 @@ typedef struct RrcConfigurationReq_s {
int pucch_info_value_size [MAX_NUM_CCs];
// end kogo
// +kogo
bool pcch_config_v1310 [MAX_NUM_CCs];
long paging_narrowbands_r13 [MAX_NUM_CCs];
long mpdcch_numrepetition_paging_r13 [MAX_NUM_CCs];
long *nb_v1310 [MAX_NUM_CCs];
#endif
} RrcConfigurationReq;
......
......@@ -160,6 +160,12 @@ EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
#define ENB_CONFIG_STRING_MAX_AVAILABLE_NARROWBAND "maxavailablenarrowband"
#define ENB_CONFIG_STRING_PUCCH_INFO_VALUE "pucch_info_value"
#define ENB_CONFIG_STRING_PCCH_CONFIG_V1310 "pcch_config_v1310"
#define ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13 "paging_narrowbands_r13"
#define ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13 "mpdcch_numrepetition_paging_r13"
#define ENB_CONFIG_STRING_NB_V1310 "nb_v1310"
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
#define ENB_CONFIG_STRING_PDSCH_PB "pdsch_p_b"
......@@ -1007,6 +1013,8 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
config_setting_t *n1_pucch_AN_info_r13_list = NULL;
config_setting_t *n1_pucch_AN_info_r13 = NULL;
config_setting_t *setting_pcch_config_v1310 = NULL;
#if defined(Rel14)
config_setting_t *setting_br13 = NULL;
#endif // REL14
......@@ -1134,6 +1142,11 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
libconfig_int maxavailablenarrowband = 0;
libconfig_int pucch_info_value = 0;
libconfig_int paging_narrowbands_r13 = 0;
libconfig_int mpdcch_numrepetition_paging_r13 = 0;
libconfig_int nb_v1310 = 0;
libconfig_int srb1_timer_poll_retransmit = 0;
libconfig_int srb1_timer_reordering = 0;
libconfig_int srb1_timer_status_prohibit = 0;
......@@ -2579,18 +2592,27 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
}
system_info_value_tag_SI_list = config_setting_get_member(setting_br13, ENB_CONFIG_STRING_SYSTEM_INFO_VALUE_TAG_LIST);
int num_system_info = config_setting_length(system_info_value_tag_SI_list);
RRC_CONFIGURATION_REQ (msg_p).system_info_value_tag_SI_size[j] = num_system_info;
for (sys_info_idx = 0; sys_info_idx < num_system_info; ++sys_info_idx)
int num_system_info;
if (system_info_value_tag_SI_list != NULL)
{
system_info_value_tag_SI = config_setting_get_elem(system_info_value_tag_SI_list, sys_info_idx);
if ( !(config_setting_lookup_int(system_info_value_tag_SI, ENB_CONFIG_STRING_SYSTEM_INFO_VALUE_TAG_SI_R13, &systemInfoValueTagSi_r13)) )
{
AssertFatal (0, "Failed to parse eNB configuration file %s, system info value tag %d!\n", RC.config_file_name, nb_cc++);
}
RRC_CONFIGURATION_REQ (msg_p).systemInfoValueTagSi_r13[j][sys_info_idx] = systemInfoValueTagSi_r13;
num_system_info = config_setting_length(system_info_value_tag_SI_list);
for (sys_info_idx = 0; sys_info_idx < num_system_info; ++sys_info_idx)
{
system_info_value_tag_SI = config_setting_get_elem(system_info_value_tag_SI_list, sys_info_idx);
if ( !(config_setting_lookup_int(system_info_value_tag_SI, ENB_CONFIG_STRING_SYSTEM_INFO_VALUE_TAG_SI_R13, &systemInfoValueTagSi_r13)) )
{
AssertFatal (0, "Failed to parse eNB configuration file %s, system info value tag %d!\n", RC.config_file_name, nb_cc++);
}
RRC_CONFIGURATION_REQ (msg_p).systemInfoValueTagSi_r13[j][sys_info_idx] = systemInfoValueTagSi_r13;
}
}
else
{
num_system_info = 0;
}
RRC_CONFIGURATION_REQ (msg_p).system_info_value_tag_SI_size[j] = num_system_info;
rach_ce_level_info_r13_list = config_setting_get_member(setting_br13, ENB_CONFIG_STRING_RACH_CE_LEVEL_INFO_LIST);
......@@ -2683,11 +2705,18 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
RRC_CONFIGURATION_REQ (msg_p).maxNumPreambleAttemptCE_r13[j][prach_parameters_index] = NULL;
}
}
max_available_narrow_band_list = config_setting_get_member(prach_parameters_ce_r13_list, ENB_CONFIG_STRING_MAX_AVAILABLE_NARROW_BAND);
int num_available_narrow_bands = config_setting_length(max_available_narrow_band_list);
RRC_CONFIGURATION_REQ (msg_p).maxNumPreambleAttemptCE_r13[j][prach_parameters_index] = num_available_narrow_bands;
int narrow_band_index;
for (narrow_band_index = 0; narrow_band_index < num_available_narrow_bands; narrow_band_index++)
{
max_available_narrow_band = config_setting_get_elem(max_available_narrow_band_list, narrow_band_index);
RRC_CONFIGURATION_REQ (msg_p).max_available_narrow_band[j][prach_parameters_index][narrow_band_index] = config_setting_get_int(max_available_narrow_band);
}
// TODO
// max_available_narrow_band = config_setting_get_member(prach_parameters_ce_r13, ENB_CONFIG_STRING_MAX_AVAILABLE_NARROW_BAND);
}
n1_pucch_AN_info_r13_list = config_setting_get_member(setting_br13, ENB_CONFIG_STRING_N1_PUCCH_AN_INFO_LIST);
......@@ -3716,6 +3745,35 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
char* prach_ConfigCommon_v1310 = NULL;
char* mpdcch_startSF_CSS_RA_r13;
setting_pcch_config_v1310 = config_setting_get_member(setting_br13, ENB_CONFIG_STRING_PCCH_CONFIG_V1310);
if (setting_pcch_config_v1310 != NULL)
{
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[j] = TRUE;
if (!config_setting_lookup_int(setting_pcch_config_v1310, ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13, &paging_narrowbands_r13)
|| !config_setting_lookup_int(setting_pcch_config_v1310, ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13, &mpdcch_numrepetition_paging_r13)
)
AssertFatal(0,
"Failed to parse eNB configuration file %s, enb %d pcch_config_v1310!\n",
RC.config_file_name, i);
RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[j] = paging_narrowbands_r13;
RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[j] = mpdcch_numrepetition_paging_r13;
if (config_setting_lookup_int(setting_pcch_config_v1310, ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13, &nb_v1310))
{
RRC_CONFIGURATION_REQ(msg_p).nb_v1310[j] = CALLOC(1, sizeof(long));
*RRC_CONFIGURATION_REQ(msg_p).nb_v1310[j] = nb_v1310;
}
else
{
RRC_CONFIGURATION_REQ(msg_p).nb_v1310[j] = NULL;
}
}
else
{
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[j] = FALSE;
}
if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_schedulingInfoSIB1, &schedulingInfoSIB1_BR_r13))
AssertFatal(0,
......
......@@ -874,20 +874,7 @@ schedule_ue_spec_br(
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.drms_table_flag = 0;
dl_req->number_pdu++;
// Program UL processing for Msg3, same as regular LTE
//get_Msg3alloc(&cc[CC_idP], subframeP, frameP, &RA_template->Msg3_frame, &RA_template->Msg3_subframe);
//fill_rar_br(eNB, CC_idP, RA_template, frameP, subframeP, cc[CC_idP].RAR_pdu.payload, RA_template->rach_resource_type - 1);
//// DL request
//eNB->TX_req[CC_idP].sfn_sf = (frameP << 3) + subframeP;
//TX_req = &eNB->TX_req[CC_idP].tx_request_body.tx_pdu_list[eNB->TX_req[CC_idP].tx_request_body.number_of_pdus];
//TX_req->pdu_length = 7; // This should be changed if we have more than 1 preamble
//TX_req->pdu_index = eNB->pdu_index[CC_idP]++;
//TX_req->num_segments = 1;
//TX_req->segments[0].segment_length = 7;
//TX_req->segments[0].segment_data = cc[CC_idP].RAR_pdu.payload;
//eNB->TX_req[CC_idP].tx_request_body.number_of_pdus++;
}
}
......@@ -895,23 +882,6 @@ schedule_ue_spec_br(
//dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
//memset((void*)dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
//dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
//dl_config_pdu->pdu_size = (uint8_t)(2 + sizeof(nfapi_dl_config_dci_dl_pdu));
//dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
//dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id), eNB_UE_stats->dl_cqi, format1);
// dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
//dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
//dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
//dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
//dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting
// dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
// dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid];
// dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3;
}
......
......@@ -490,7 +490,7 @@ int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t
struct PRACH_ConfigSIB_v1310 *ext4_prach = eNB->common_channels[CC_id].radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
// EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11= eNB->UE_list ->UE_template[CC_id][UE_id].physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0] ;
EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11= &eNB->UE_list.UE_template[CC_id][UE_id].physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0] ;
int T;
......@@ -517,13 +517,13 @@ int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t
AssertFatal(1==0,"MPDCCH Type 2A not handled yet\n");
break;
case TYPEUESPEC:
// AssertFatal(epdcch_setconfig_r11 != NULL," epdcch_setconfig_r11 is null for UE specific \n");
// AssertFatal(epdcch_setconfig_r11->ext2 != NULL," ext2 doesn't exist in epdcch config ' \n");
AssertFatal(epdcch_setconfig_r11 != NULL," epdcch_setconfig_r11 is null for UE specific \n");
AssertFatal(epdcch_setconfig_r11->ext2 != NULL," ext2 doesn't exist in epdcch config ' \n");
// if (eNB->common_channels[CC_id].tdd_Config==NULL) //FDD
// T = rmax*startSF_fdd_RA_times2[epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.fdd_r13]>>1;
// else //TDD
// T = rmax*startSF_tdd_RA[epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.tdd_r13];
if (eNB->common_channels[CC_id].tdd_Config==NULL) //FDD
T = rmax*startSF_fdd_RA_times2[epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.fdd_r13]>>1;
else //TDD
T = rmax*startSF_tdd_RA[epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.tdd_r13];
break;
default:
......
......@@ -653,21 +653,29 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = NULL;
}
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(SystemInfoValueTagList_r13_t));
SystemInfoValueTagSI_r13_t systemInfoValueTagSi_r13;
int num_system_info_value_tag = configuration->system_info_value_tag_SI_size[CC_id];
for (index = 0; index < num_system_info_value_tag; ++index)
if (num_system_info_value_tag > 0)
{
if (configuration->systemInfoValueTagSi_r13[CC_id][index])
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(SystemInfoValueTagList_r13_t));
SystemInfoValueTagSI_r13_t systemInfoValueTagSi_r13;
for (index = 0; index < num_system_info_value_tag; ++index)
{
systemInfoValueTagSi_r13 = configuration->systemInfoValueTagSi_r13[CC_id][index];
if (configuration->systemInfoValueTagSi_r13[CC_id][index])
{
systemInfoValueTagSi_r13 = configuration->systemInfoValueTagSi_r13[CC_id][index];
}
else
{
systemInfoValueTagSi_r13 = 0;
}
ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, &systemInfoValueTagSi_r13);
}
else
{
systemInfoValueTagSi_r13 = 0;
}
ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, &systemInfoValueTagSi_r13);
}
else
{
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = NULL;
}
}
......@@ -1170,7 +1178,28 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310 = calloc(1, sizeof(BCCH_Config_v1310_t));
memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t));
(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64;
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL;
if (configuration->pcch_config_v1310)
{
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = CALLOC(1, sizeof(PCCH_Config_v1310_t));
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->paging_narrowBands_r13 = configuration->paging_narrowbands_r13[CC_id];
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->mpdcch_NumRepetition_Paging_r13 = configuration->mpdcch_numrepetition_paging_r13[CC_id];
if (configuration->nb_v1310[CC_id])
{
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = CALLOC(1, sizeof(long));
*(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = *configuration->nb_v1310[CC_id];
}
else
{
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = NULL;
}
}
else
{
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL;
}
(*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = NULL;
......@@ -1273,8 +1302,14 @@ uint8_t do_SIB23(uint8_t Mod_id,
prach_parametersce_r13->prach_HoppingConfig_r13 = PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off;
}
long maxavailablenarrowband = 2;
ASN_SEQUENCE_ADD(&prach_parametersce_r13->mpdcch_NarrowbandsToMonitor_r13.list, &maxavailablenarrowband);
long maxavailablenarrowband;
int num_narrow_bands = configuration->max_available_narrow_band_size[CC_id][prach_parameters_index];
int narrow_band_index;
for (narrow_band_index = 0; narrow_band_index < num_narrow_bands; narrow_band_index++)
{
maxavailablenarrowband = configuration->max_available_narrow_band[CC_id][prach_parameters_index][narrow_band_index];
ASN_SEQUENCE_ADD(&prach_parametersce_r13->mpdcch_NarrowbandsToMonitor_r13.list, &maxavailablenarrowband);
}
prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1;
prach_parametersce_r13->prach_HoppingConfig_r13 = PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off;
......
......@@ -181,14 +181,8 @@ eNBs =
numRepetitionPerPreambleAttempt_r13 = 0;
mpdcch_NumRepetition_RA_r13 = 0;
prach_HoppingConfig_r13 = 0;
max_available_narrow_band =
(
{
maxavailablenarrowband = 2;
}
);
}
max_available_narrow_band = [2];
}
);
n1PUCCH_AN_InfoList_r13 =
......@@ -197,6 +191,13 @@ eNBs =
pucch_info_value = 12;
}
);
pcch_config_v1310 :
{
paging_narrowbands_r13 = 1;
mpdcch_numrepetition_paging_r13 = 2;
nb_v1310 = 3;
}
mpdcch_startSF_CSS_RA_r13 = "fdd-r13"
mpdcch_startSF_CSS_RA_r13_val = 5;
......
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