Commit 75be22c4 authored by Nick Ho's avatar Nick Ho

First step of configuration between MAC and RRC

parent b25fc90a
......@@ -12,205 +12,525 @@
#include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
///-------------------------------------------Function---------------------------------------------///
// simulate MIB/SIB setting
void config_mib_fapi_NB_IoT(
int rntiP,
int physCellId,
uint8_t eutra_band,
int Ncp,
int Ncp_UL,
int p_eNB,
int p_rx_eNB,
int dl_CarrierFreq,
int ul_CarrierFreq,
long *eutraControlRegionSize,
BCCH_BCH_Message_NB_t *mib_NB_IoT
)
void init_rrc_NB_IoT(void)
{
int i;
MIB.message.schedulingInfoSIB1_r13 = 0;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.si_RadioFrameOffset_r13 = (long*)malloc(sizeof(long));
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.si_RadioFrameOffset_r13[0]= 0;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.si_WindowLength_r13 = SystemInformationBlockType1_NB__si_WindowLength_r13_ms480 ;
//XXX MP: one important problem to solve is how we decide when we deal with anchor or non anchor carrier?? configuration time?
//anchor carrier refers to the allowed PRBs index in the in-band operation mode at the beginning the UE is always camp on an anchor carrier from which
//receive NSSS, NPSSS ecc... but the RRCConnectionReconfiguration may could indicate non-anchor carrier to be used for data transmission
//ASSUMPTION: we always use an anchor carrier
float m_dl = 0; //this is the category offset for NB1/NB2 UE category used for EARFCN evaluation (TS 36.101 ch. 5.7.3F) (for the moment we keep this value fixed)
config_INFO->get_MIB = 1;
config_INFO->rnti = rntiP;
config_INFO->cfg->nfapi_config.rf_bands.rf_band[0] = (uint16_t)eutra_band;
config_INFO->cfg->sch_config.physical_cell_id.value = physCellId;
config_INFO->cfg->subframe_config.dl_cyclic_prefix_type.value = Ncp;
config_INFO->cfg->subframe_config.ul_cyclic_prefix_type.value = Ncp_UL;
config_INFO->cfg->rf_config.tx_antenna_ports.value = p_eNB;
config_INFO->cfg->rf_config.rx_antenna_ports.value = p_rx_eNB;
//SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13 = (SchedulingInfoList_NB_r13_t*)malloc(sizeof(SchedulingInfoList_NB_r13_t));
/// Allocate Three CE level to schedulingInfoList
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array = (SchedulingInfo_NB_r13_t**)malloc(3*sizeof(SchedulingInfo_NB_r13_t*));
for(i=0;i<3;++i)
//PROBLEM: we need to know the LTE bandwidht for In-band and Guard band operating mode in order to choose the proper PRB idex or is given at configuration time??
//The prb index allowed are the one specified in R&shwarz pag 9 NB-IoT white papaer
switch (mib_NB_IoT->message.operationModeInfo_r13.present)
{
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[i] = (SchedulingInfo_NB_r13_t*)malloc(sizeof(SchedulingInfo_NB_r13_t));
//FAPI specs pag 135
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 0;
config_INFO->cfg->config_NB_IoT.prb_index.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; //see TS 36.213 ch 16.0
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = -1; //is not defined so we put a negative value
if(eutraControlRegionSize == NULL)
LOG_E(RRC, "rrc_mac_config_req_eNB_NB_IoT: operation mode is in-band but eutraControlRegionSize is not defined");
else
config_INFO->cfg->config_NB_IoT.control_region_size.value = *eutraControlRegionSize;
//m_dl = NB_Category_Offset_anchor[rand()%4];
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 1;
//XXX problem: fapi think to define also eutra_CRS_sequenceInfo also for in band with different PCI but the problem is that we don-t have i
//XXX should pass the prb_index may defined by configuration file depending on the LTE band we are considering (see Rhode&Shwartz whitepaper pag9)
//config_INFO->config_NB_IoT.prb_index.value =
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13;
if(eutraControlRegionSize == NULL)
LOG_E(RRC, "rrc_mac_config_req_eNB_NB_IoT: operation mode is in-band but eutraControlRegionSize is not defined");
else
config_INFO->cfg->config_NB_IoT.control_region_size.value = *eutraControlRegionSize;
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 2;
//XXX should pass the prb_index may defined by configuration file depending on the LTE band we are considering (see Rhode&Shwartz whitepaper pag9)
//config_INFO->config_NB_IoT.prb_index.value =
config_INFO->cfg->config_NB_IoT.control_region_size.value = -1; //should not being defined so we put a negative value
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = -1; //is not defined so we put a negative value
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 3;
config_INFO->cfg->config_NB_IoT.prb_index.value = -1; // is not defined for this case (put a negative random value--> will be not considered for encoding, scrambling procedures)
config_INFO->cfg->config_NB_IoT.control_region_size.value = -1; //is not defined so we put a negative value
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = -1; //is not defined so we put a negative value
break;
default:
LOG_E(RRC, "rrc_mac_config_req_eNB_NB_IoT: NB-IoT operating Mode (MIB-NB) not set\n");
break;
}
/// Allocate how many SIB mapping-----------------------------------------------------------------------------------------------------///
/// CE0
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->sib_MappingInfo_r13.list.array =(SIB_Type_NB_r13_t**)malloc(2*sizeof(SIB_Type_NB_r13_t*));
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->sib_MappingInfo_r13.list.array[0] =(SIB_Type_NB_r13_t*)malloc(sizeof(SIB_Type_NB_r13_t));
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->sib_MappingInfo_r13.list.array[1] =(SIB_Type_NB_r13_t*)malloc(sizeof(SIB_Type_NB_r13_t));
/// CE1
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->sib_MappingInfo_r13.list.array =(SIB_Type_NB_r13_t**)malloc(2*sizeof(SIB_Type_NB_r13_t*));
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->sib_MappingInfo_r13.list.array[0] =(SIB_Type_NB_r13_t*)malloc(sizeof(SIB_Type_NB_r13_t));
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->sib_MappingInfo_r13.list.array[1] =(SIB_Type_NB_r13_t*)malloc(sizeof(SIB_Type_NB_r13_t));
/// CE2
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->sib_MappingInfo_r13.list.array =(SIB_Type_NB_r13_t**)malloc(2*sizeof(SIB_Type_NB_r13_t*));
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->sib_MappingInfo_r13.list.array[0] =(SIB_Type_NB_r13_t*)malloc(sizeof(SIB_Type_NB_r13_t));
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->sib_MappingInfo_r13.list.array[1] =(SIB_Type_NB_r13_t*)malloc(sizeof(SIB_Type_NB_r13_t));
/// End Allocate SIB mapping----------------------------------------------------------------------------------------------------------///
/// Setting Scheduling Information SI for Three CE level------------------------------------------------------------------------------///
/// CE0
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_Periodicity_r13 = SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_RepetitionPattern_r13 = SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF;
//SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->sib_MappingInfo_r13.list.array[0][0] = SIB_Type_NB_r13_sibType2_NB_r13;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->sib_MappingInfo_r13.list.array[1][0] = SIB_Type_NB_r13_sibType3_NB_r13;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_TB_r13 = SchedulingInfo_NB_r13__si_TB_r13_b680;
/// CE1
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->si_Periodicity_r13 = SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->si_RepetitionPattern_r13 = SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->sib_MappingInfo_r13.list.array[0][0] = SIB_Type_NB_r13_sibType4_NB_r13;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->sib_MappingInfo_r13.list.array[1][0] = SIB_Type_NB_r13_sibType5_NB_r13;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->si_TB_r13 = SchedulingInfo_NB_r13__si_TB_r13_b680;
/// CE2
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->si_Periodicity_r13 = SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->si_RepetitionPattern_r13 = SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->sib_MappingInfo_r13.list.array[0][0] = SIB_Type_NB_r13_sibType14_NB_r13;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->sib_MappingInfo_r13.list.array[1][0] = SIB_Type_NB_r13_sibType16_NB_r13;
SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->si_TB_r13 = SchedulingInfo_NB_r13__si_TB_r13_b680;
/// End Setting Scheduling Information SI---------------------------------------------------------------------------------------------///
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array = (struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member **)malloc(sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member*));
/// Allocate RACH_ConfigCommon_NB_IoT for Three CE level
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.rach_ConfigCommon_r13.rach_InfoList_r13.list.array = (RACH_Info_NB_r13_t**)malloc(3*sizeof(RACH_Info_NB_r13_t*));
for(i=0;i<3;i++){
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.rach_ConfigCommon_r13.rach_InfoList_r13.list.array[i] = (RACH_Info_NB_r13_t*)malloc(sizeof(RACH_Info_NB_r13_t));
//we shoud use dl_CarrierConfig for generating the earfcn for LTE-CAT N2 based on TS 36.101 5.7.3F
/*
* 1) takes a random number from the offset of category NB1 and NB2 based on the operating mode (we assume always the usage of anchor carrier)
* 2)evaluate the EARFCN value based on the corresponding formula
*/
config_INFO->cfg->nfapi_config.earfcn.value = to_earfcn(eutra_band,dl_CarrierFreq, m_dl);
}
void config_sib2_fapi_NB_IoT(
int physCellId,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
)
{
/*
* Following the FAPI like approach:
* 1)fill the PHY_Config_t structure (PHY_INTERFACE/IF_Module_NB_IoT.h)
* 1.1) check for how many NPRACH resources has been set and enable the corresponding parameter
* 1.2)fill the structure PHY_Config_t (shared structure of the IF_Module
* 2)Call the PHY_config_req for trigger the NB_phy_config_sib2_eNB()
*/
/*NPRACH Resources*/
NPRACH_Parameters_NB_r13_t* nprach_parameter;
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 0;
config_INFO->cfg->config_NB_IoT.nprach_config_1_enabled.value = 0;
config_INFO->cfg->config_NB_IoT.nprach_config_2_enabled.value = 0;
switch(radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.size)
{
case 0:
LOG_E(MAC, "nprach_ParametersLis is empty\n");
break;
case 1:
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_0_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13; //Rmax
config_INFO->extra_phy_parms.nprach_config_0_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break;
case 2:
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_0_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[1];
config_INFO->cfg->config_NB_IoT.nprach_config_1_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_1_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_1_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_1_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break;
case 3:
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_0_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[1];
config_INFO->cfg->config_NB_IoT.nprach_config_1_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_1_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_1_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_1_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[2];
config_INFO->cfg->config_NB_IoT.nprach_config_2_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_2_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_2_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_2_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_2_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_2_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_2_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break;
default:
LOG_E(RRC,"rrc_mac_config_req_eNB_NB_IoT: nprach_ParametersList size not valid\n");
break;
}
/// Allocate NPRACH_ConfigSIB_NB_IoT for Three CE level
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array = (NPRACH_Parameters_NB_r13_t**)malloc(3*sizeof(NPRACH_Parameters_NB_r13_t*));
for(i=0;i<3;i++){
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[i] = (NPRACH_Parameters_NB_r13_t*)malloc(sizeof(NPRACH_Parameters_NB_r13_t));
/*NPDSCH ConfigCommon*/
//FIXME: MP: FAPI specs define a range of value [0-255]==[0db - 63.75db] with 0.25db step -- corrispondence in 3GPP specs???
config_INFO->cfg->rf_config.reference_signal_power.value = radioResourceConfigCommon->npdsch_ConfigCommon_r13.nrs_Power_r13;
/*NPUSCH ConfigCommon*/
//a pointer to the first element of the list
config_INFO->extra_phy_parms.ack_nack_numRepetitions_MSG4 = radioResourceConfigCommon->npusch_ConfigCommon_r13.ack_NACK_NumRepetitions_Msg4_r13.list.array[0];
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13 != NULL)/* OPTIONAL */
{
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_BaseSequence_r13!= NULL)
config_INFO->cfg->config_NB_IoT.three_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_BaseSequence_r13);
else
config_INFO->cfg->config_NB_IoT.three_tone_base_sequence.value = physCellId%12; //see spec TS 36.331 NPUSCH-Config-NB
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_BaseSequence_r13!= NULL)
config_INFO->cfg->config_NB_IoT.six_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_BaseSequence_r13);
else
config_INFO->cfg->config_NB_IoT.six_tone_base_sequence.value = physCellId%14; //see spec TS 36.331 NPUSCH-Config-NB
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13!= NULL)
config_INFO->cfg->config_NB_IoT.twelve_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13);
else
config_INFO->cfg->config_NB_IoT.twelve_tone_base_sequence.value = physCellId%30; //see spec TS 36.331 NPUSCH-Config-NB
config_INFO->cfg->config_NB_IoT.three_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13;
config_INFO->cfg->config_NB_IoT.six_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13;
}
/// Setting RACH_ConfigCommon_NB_IoT ra_ResponseWindowSize for Three CE level
/// CE0
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.rach_ConfigCommon_r13.rach_InfoList_r13.list.array[0].ra_ResponseWindowSize_r13
/// CE1
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.rach_ConfigCommon_r13.rach_InfoList_r13.list.array[1].ra_ResponseWindowSize_r13
/// CE2
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.rach_ConfigCommon_r13.rach_InfoList_r13.list.array[2].ra_ResponseWindowSize_r13
/// Setting NPRACH_ConfigSIB_NB_IoT for Three CE level
/// CE0
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->nprach_Periodicity_r13 =NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms320;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->nprach_StartTime_r13 =NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms8;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->nprach_SubcarrierOffset_r13 =NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n0;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->nprach_NumSubcarriers_r13 =NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n12;
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->nprach_SubcarrierMSG3_RangeStart_r13 =
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->maxNumPreambleAttemptCE_r13 =
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->numRepetitionsPerPreambleAttempt_r13 =NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n1;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->npdcch_NumRepetitions_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r64;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->npdcch_StartSF_CSS_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v4;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->npdcch_Offset_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_zero;
/// CE1
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->nprach_Periodicity_r13 =NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms320;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->nprach_StartTime_r13 =NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms8;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->nprach_SubcarrierOffset_r13 =NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n12;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->nprach_NumSubcarriers_r13 =NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n12;
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->nprach_SubcarrierMSG3_RangeStart_r13 =
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->maxNumPreambleAttemptCE_r13 =
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->numRepetitionsPerPreambleAttempt_r13 =NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n2;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->npdcch_NumRepetitions_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r64;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->npdcch_StartSF_CSS_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v4;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->npdcch_Offset_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_zero;
/// CE2
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->nprach_Periodicity_r13 =NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms320;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->nprach_StartTime_r13 =NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms8;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->nprach_SubcarrierOffset_r13 =NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n24;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->nprach_NumSubcarriers_r13 =NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n24;
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->nprach_SubcarrierMSG3_RangeStart_r13 =
//SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->maxNumPreambleAttemptCE_r13 =
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->numRepetitionsPerPreambleAttempt_r13 =NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n4;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->npdcch_NumRepetitions_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r64;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->npdcch_StartSF_CSS_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v4;
SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->npdcch_Offset_RA_r13 =NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_zero;
/// Allocate RRCConnectionSetup_NB_IoT RadioResourceConfigDedicated for Three CE level
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13 = (PhysicalConfigDedicated_NB_r13_t*)malloc(3*sizeof(PhysicalConfigDedicated_NB_r13_t));
for(i=0;i<3;i++){
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[i].npdcch_ConfigDedicated_r13 = (NPDCCH_ConfigDedicated_NB_r13_t*)malloc(sizeof(NPDCCH_ConfigDedicated_NB_r13_t));
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[i].npusch_ConfigDedicated_r13 = (NPUSCH_ConfigDedicated_NB_r13_t*)malloc(sizeof(NPUSCH_ConfigDedicated_NB_r13_t));
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[i].npusch_ConfigDedicated_r13->ack_NACK_NumRepetitions_r13 = (ACK_NACK_NumRepetitions_NB_r13_t*)malloc(sizeof(ACK_NACK_NumRepetitions_NB_r13_t));
//NOTE: MP: FAPI specs for UL RS Configurations seems to be targeted for LTE and not for NB-IoT
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13 == TRUE)
config_INFO->cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 1; //RS_GROUP_HOPPING (FAPI specs pag 127)
else
config_INFO->cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 0;//RS_NO_HOPPING
config_INFO->cfg->uplink_reference_signal_config.group_assignment.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13;
//Some missed parameters are in UL_CONFIG.request message (P7) in FAPI specs. and not configured through P5 procedure
//ack_NACK_NumRepetitions_Msg4_r13
//srs_SubframeConfig_r13 /* OPTIONAL */
/*DL GAP config */
if(radioResourceConfigCommon->dl_Gap_r13 !=NULL)/* OPTIONAL */
{
config_INFO->cfg->config_NB_IoT.dl_gap_config_enable.value = 1;
config_INFO->cfg->config_NB_IoT.dl_gap_threshold.value = radioResourceConfigCommon->dl_Gap_r13->dl_GapThreshold_r13;
config_INFO->cfg->config_NB_IoT.dl_gap_duration_coefficient.value = radioResourceConfigCommon->dl_Gap_r13->dl_GapDurationCoeff_r13;
config_INFO->cfg->config_NB_IoT.dl_gap_periodicity.value = radioResourceConfigCommon->dl_Gap_r13->dl_GapPeriodicity_r13;
}
else
config_INFO->cfg->config_NB_IoT.dl_gap_config_enable.value = 0;
/*UL Power Control ConfigCommon*/
//nothing defined in FAPI specs
config_INFO->extra_phy_parms.p0_nominal_npusch = radioResourceConfigCommon->uplinkPowerControlCommon_r13.p0_NominalNPUSCH_r13;
config_INFO->extra_phy_parms.alpha = radioResourceConfigCommon->uplinkPowerControlCommon_r13.alpha_r13;
config_INFO->extra_phy_parms.delta_preamle_MSG3 = radioResourceConfigCommon->uplinkPowerControlCommon_r13.deltaPreambleMsg3_r13;
/*RACH Config Common*/
//nothing defined in FAPI specs
/// Setting Dedicated Configuration for Three CE level
/// CE0
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[0].npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_NumRepetitions_r13_r8;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[0].npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_StartSF_USS_r13_v8;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[0].npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_Offset_USS_r13_zero;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[0].npusch_ConfigDedicated_r13->ack_NACK_NumRepetitions_r13[0] =ACK_NACK_NumRepetitions_NB_r13_r1;
/// CE1
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[1].npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_NumRepetitions_r13_r16;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[1].npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_StartSF_USS_r13_v4;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[1].npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_Offset_USS_r13_zero;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[1].npusch_ConfigDedicated_r13->ack_NACK_NumRepetitions_r13[0] =ACK_NACK_NumRepetitions_NB_r13_r2;
/// CE2
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[2].npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_NumRepetitions_r13_r32;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[2].npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_StartSF_USS_r13_v2;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[2].npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_Offset_USS_r13_zero;
DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[2].npusch_ConfigDedicated_r13->ack_NACK_NumRepetitions_r13[0] =ACK_NACK_NumRepetitions_NB_r13_r4;
// printf("ack_NACK_NumRepetitions_r13 %d\n",DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[2].npusch_ConfigDedicated_r13->ack_NACK_NumRepetitions_r13[0] );
// printf("RRC Initial Success ! :D \n");
}
void rrc_mac_config_req_NB_IoT(rrc_config_NB_IoT_t *mac_config,
uint8_t mib_flag,
uint8_t sib_flag,
uint8_t ded_flag,
uint8_t ue_list_ded_num)
///-------------------------------------------Function---------------------------------------------///
void rrc_mac_config_req_NB_IoT(
module_id_t Mod_idP,
int CC_idP,
int rntiP,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
SystemInformationBlockType1_NB_t *sib1_NB_IoT,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon,
PhysicalConfigDedicated_NB_r13_t *physicalConfigDedicated,
LogicalChannelConfig_NB_r13_t *logicalChannelConfig, //FIXME: decide how to use it
rrc_config_NB_IoT_t *mac_config,
uint8_t ded_flag,
uint8_t ue_list_ded_num)
{
if (mib_flag != 0){
int UE_id = -1;
//find ue_id here
config_INFO->get_MIB = 0;
config_INFO->get_COMMON = 0;
config_INFO->get_DEDICATED = 0;
config_INFO->mod_id = Mod_idP;
config_INFO->CC_id = CC_idP;
config_INFO->cfg->subframe_config.duplex_mode.value = 2; //HD-FDD for NB-IoT
if (&carrier->mib_NB_IoT != NULL){
/*printf(MAC,
"Configuring MIB for instance %d, CCid %d : (band %ld,Nid_cell %d,TX antenna port (p) %d,DL freq %u\n",
Mod_idP,
CC_idP,
sib1_NB_IoT->freqBandIndicator_r13,
carrier->physCellId,
carrier->p_eNB,
carrier->dl_CarrierFreq
);*/
/*
* Following the FAPI like approach:
* 1)fill the PHY_Config_t structure (PHY_INTERFACE/IF_Module_NB_IoT.h)
* 2)Call the PHY_config_req for trigger the NB_phy_config_mib_eNB() at the end
*/
//XXX where allocate memory for cfg??
if(config_INFO->cfg != NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
//Mapping OAI params into FAPI params
config_mib_fapi_NB_IoT( rntiP,
carrier->physCellId,
sib1_NB_IoT->freqBandIndicator_r13,
carrier->Ncp,
carrier->Ncp_UL,
carrier->p_eNB,
carrier->p_rx_eNB,
carrier->dl_CarrierFreq,
carrier->ul_CarrierFreq,
sib1_NB_IoT->eutraControlRegionSize_r13,
&carrier->mib_NB_IoT
);
}
if(sib1_NB_IoT != NULL)
{
mac_config->sib1_NB_IoT_sched_config.repetitions = 4;
mac_config->sib1_NB_IoT_sched_config.starting_rf = sib1_NB_IoT->si_RadioFrameOffset_r13[0];
mac_config->si_window_length = sib1_NB_IoT->si_WindowLength_r13;
SchedulingInfo_NB_r13_t *scheduling_info_list;
///CE level 0
scheduling_info_list = sib1_NB_IoT->schedulingInfoList_r13.list.array[0];
mac_config->sibs_NB_IoT_sched[0].si_periodicity = scheduling_info_list->si_Periodicity_r13 ;
mac_config->sibs_NB_IoT_sched[0].si_repetition_pattern = scheduling_info_list->si_RepetitionPattern_r13 ;
mac_config->sibs_NB_IoT_sched[0].sib_mapping_info = scheduling_info_list->sib_MappingInfo_r13.list.array[0][0] | scheduling_info_list->sib_MappingInfo_r13.list.array[1][0];
mac_config->sibs_NB_IoT_sched[0].si_tb = scheduling_info_list->si_TB_r13 ;
///CE level 1
scheduling_info_list = sib1_NB_IoT->schedulingInfoList_r13.list.array[1];
mac_config->sibs_NB_IoT_sched[1].si_periodicity = scheduling_info_list->si_Periodicity_r13 ;
mac_config->sibs_NB_IoT_sched[1].si_repetition_pattern = scheduling_info_list->si_RepetitionPattern_r13 ;
mac_config->sibs_NB_IoT_sched[1].sib_mapping_info = scheduling_info_list->sib_MappingInfo_r13.list.array[0][0] | scheduling_info_list->sib_MappingInfo_r13.list.array[1][0];
mac_config->sibs_NB_IoT_sched[1].si_tb = scheduling_info_list->si_TB_r13 ;
///CE level 2
scheduling_info_list = sib1_NB_IoT->schedulingInfoList_r13.list.array[2];
mac_config->sibs_NB_IoT_sched[2].si_periodicity = scheduling_info_list->si_Periodicity_r13 ;
mac_config->sibs_NB_IoT_sched[2].si_repetition_pattern = scheduling_info_list->si_RepetitionPattern_r13 ;
mac_config->sibs_NB_IoT_sched[2].sib_mapping_info = scheduling_info_list->sib_MappingInfo_r13.list.array[0][0] | scheduling_info_list->sib_MappingInfo_r13.list.array[1][0];
mac_config->sibs_NB_IoT_sched[2].si_tb = scheduling_info_list->si_TB_r13 ;
mac_config->sibs_NB_IoT_sched[3].sib_mapping_info = 0x0;
mac_config->sibs_NB_IoT_sched[4].sib_mapping_info = 0x0;
mac_config->sibs_NB_IoT_sched[5].sib_mapping_info = 0x0;
}
if (radioResourceConfigCommon!=NULL) {
//if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
config_INFO->get_COMMON = 1;
//LOG_I(MAC,"[CONFIG]SIB2/3-NB radioResourceConfigCommon Contents (partial)\n");
//LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13= %ld\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13);
//LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13= %ld\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13);
//LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13= %d\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13);
//LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13= %ld\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13);
NPRACH_Parameters_NB_r13_t* nprach_parameter;
///CE level 0
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
mac_config->mac_NPRACH_ConfigSIB[0].mac_numRepetitionsPerPreambleAttempt_NB_IoT = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
mac_config->mac_NPRACH_ConfigSIB[0].mac_npdcch_NumRepetitions_RA_NB_IoT = nprach_parameter->npdcch_NumRepetitions_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[0].mac_npdcch_StartSF_CSS_RA_NB_IoT = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[0].mac_npdcch_Offset_RA_NB_IoT = nprach_parameter->npdcch_Offset_RA_r13;
///CE level 1
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[1];
mac_config->mac_NPRACH_ConfigSIB[1].mac_numRepetitionsPerPreambleAttempt_NB_IoT = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
mac_config->mac_NPRACH_ConfigSIB[1].mac_npdcch_NumRepetitions_RA_NB_IoT = nprach_parameter->npdcch_NumRepetitions_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[1].mac_npdcch_StartSF_CSS_RA_NB_IoT = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[1].mac_npdcch_Offset_RA_NB_IoT = nprach_parameter->npdcch_Offset_RA_r13;
///CE level 2
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[2];
mac_config->mac_NPRACH_ConfigSIB[2].mac_numRepetitionsPerPreambleAttempt_NB_IoT = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
mac_config->mac_NPRACH_ConfigSIB[2].mac_npdcch_NumRepetitions_RA_NB_IoT = nprach_parameter->npdcch_NumRepetitions_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[2].mac_npdcch_StartSF_CSS_RA_NB_IoT = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[2].mac_npdcch_Offset_RA_NB_IoT = nprach_parameter->npdcch_Offset_RA_r13;
//eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].radioResourceConfigCommon = radioResourceConfigCommon;
if (carrier->ul_CarrierFreq>0)
//eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].ul_CarrierFreq = ul_CarrierFreq;
config_sib2_fapi_NB_IoT(carrier->physCellId,radioResourceConfigCommon);
}
if (sib_flag != 0){
mac_config->sib1_NB_IoT_sched_config.repetitions = 4;
mac_config->sib1_NB_IoT_sched_config.starting_rf = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.si_RadioFrameOffset_r13[0];
mac_config->si_window_length = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.si_WindowLength_r13;
if (logicalChannelConfig!= NULL) {
mac_config->sibs_NB_IoT_sched[0].si_periodicity = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_Periodicity_r13 ;
mac_config->sibs_NB_IoT_sched[0].si_repetition_pattern = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_RepetitionPattern_r13 ;
mac_config->sibs_NB_IoT_sched[0].sib_mapping_info = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->sib_MappingInfo_r13.list.array[0][0] | SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->sib_MappingInfo_r13.list.array[1][0];
mac_config->sibs_NB_IoT_sched[0].si_tb = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_TB_r13 ;
//printf("si_tb %d\n",mac_config->sibs_NB_IoT_sched[0].si_tb);
if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
if (UE_id == -1)
{
LOG_E(MAC,"%s:%d:%s: ERROR, UE_id == -1\n", __FILE__, __LINE__, __FUNCTION__);
}
else
{
//logical channel group not defined for nb-iot --> no UL specific Parameter
// or at least LCGID should be set to 0 for NB-IoT (See TS 36.321 ch 6.1.3.1) so no make sense to store this
}
}
mac_config->sibs_NB_IoT_sched[1].si_periodicity = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->si_Periodicity_r13 ;
mac_config->sibs_NB_IoT_sched[1].si_repetition_pattern = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->si_RepetitionPattern_r13;
mac_config->sibs_NB_IoT_sched[1].sib_mapping_info = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->sib_MappingInfo_r13.list.array[0][0] | SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[1]->sib_MappingInfo_r13.list.array[1][0];
mac_config->sibs_NB_IoT_sched[1].si_tb = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_TB_r13;
if (physicalConfigDedicated != NULL) {
mac_config->sibs_NB_IoT_sched[2].si_periodicity = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->si_Periodicity_r13 ;
mac_config->sibs_NB_IoT_sched[2].si_repetition_pattern = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->si_RepetitionPattern_r13;
mac_config->sibs_NB_IoT_sched[2].sib_mapping_info = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->sib_MappingInfo_r13.list.array[0][0] | SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[2]->sib_MappingInfo_r13.list.array[1][0];
mac_config->sibs_NB_IoT_sched[2].si_tb = SIB.message.choice.c1.choice.systemInformationBlockType1_r13.schedulingInfoList_r13.list.array[0]->si_TB_r13;
if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
mac_config->sibs_NB_IoT_sched[3].sib_mapping_info = 0x0;
mac_config->sibs_NB_IoT_sched[4].sib_mapping_info = 0x0;
mac_config->sibs_NB_IoT_sched[5].sib_mapping_info = 0x0;
if (UE_id == -1)
LOG_E(MAC,"%s:%d:%s: ERROR, UE_id == -1\n", __FILE__, __LINE__, __FUNCTION__);
else
{
/// testing
mac_config->mac_NPRACH_ConfigSIB[0].mac_numRepetitionsPerPreambleAttempt_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->numRepetitionsPerPreambleAttempt_r13;
mac_config->mac_NPRACH_ConfigSIB[1].mac_numRepetitionsPerPreambleAttempt_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->numRepetitionsPerPreambleAttempt_r13;
mac_config->mac_NPRACH_ConfigSIB[2].mac_numRepetitionsPerPreambleAttempt_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->numRepetitionsPerPreambleAttempt_r13;
config_INFO->get_DEDICATED = 1;
mac_config->mac_NPRACH_ConfigSIB[0].mac_npdcch_NumRepetitions_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->npdcch_NumRepetitions_RA_r13 ;
mac_config->mac_NPRACH_ConfigSIB[1].mac_npdcch_NumRepetitions_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->npdcch_NumRepetitions_RA_r13 ;
mac_config->mac_NPRACH_ConfigSIB[2].mac_npdcch_NumRepetitions_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->npdcch_NumRepetitions_RA_r13 ;
//XXX this parameters seems to be not defined by FAPi specs
//this are UE specific information that should be transmitted to the PHY layer
//use UE-specific structure at phy layer where to store this information (NPDCCH structure) this structure will be scrambled based on the rnti
//config_INFO->rnti = UE_RNTI_NB_IoT(Mod_idP, UE_id);
config_INFO->extra_phy_parms.npdcch_NumRepetitions = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13; //Rmax
config_INFO->extra_phy_parms.npdcch_Offset_USS = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13;
config_INFO->extra_phy_parms.npdcch_StartSF_USS = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13;
mac_config->mac_NPRACH_ConfigSIB[0].mac_npdcch_StartSF_CSS_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->npdcch_StartSF_CSS_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[1].mac_npdcch_StartSF_CSS_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->npdcch_StartSF_CSS_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[2].mac_npdcch_StartSF_CSS_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->npdcch_StartSF_CSS_RA_r13;
//config_INFO->extra_phy_parms.phy_config_dedicated = physicalConfigDedicated; //for the moment fapi not allow this so not used
}
}
//Now trigger the phy_config_xxx for configuring PHY through the PHY_config_req
AssertFatal(if_inst->PHY_config_req != NULL, "rrc_mac_config_req_eNB_NB_IoT: PHY_config_req pointer function is NULL\n");
if(if_inst->PHY_config_req)
if_inst->PHY_config_req(config_INFO);
return 0;
mac_config->mac_NPRACH_ConfigSIB[0].mac_npdcch_Offset_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[0]->npdcch_Offset_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[1].mac_npdcch_Offset_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[1]->npdcch_Offset_RA_r13;
mac_config->mac_NPRACH_ConfigSIB[2].mac_npdcch_Offset_RA_NB_IoT = SIB.message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.array[0]->choice.sib2_r13.radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list.array[2]->npdcch_Offset_RA_r13;
}
if( ded_flag!=0 )
{
......@@ -229,14 +549,14 @@ void rrc_mac_config_req_NB_IoT(rrc_config_NB_IoT_t *mac_config,
*/
// now we only have 3 UE list USS
mac_config->npdcch_ConfigDedicated[ue_list_ded_num].R_max =DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[ue_list_ded_num].npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13;
mac_config->npdcch_ConfigDedicated[ue_list_ded_num].G =DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[ue_list_ded_num].npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13;
mac_config->npdcch_ConfigDedicated[ue_list_ded_num].a_offset =DED_Config.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13[ue_list_ded_num].npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13;
}
return ;
return 0;
}
\ No newline at end of file
......@@ -24,7 +24,7 @@
#include "openair2/PHY_INTERFACE/defs_NB_IoT.h"
//#include "RRC/LITE/defs_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
//#include "LAYER2/MAC/vars_NB_IoT.h"
//NB-IoT
extern IF_Module_t *if_inst;
......
......@@ -51,7 +51,7 @@ void init_mac_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst)
mac_inst->sib1_count[i] = 0;
}
rrc_mac_config_req_NB_IoT(&mac_inst->rrc_config, 1, 1, 0, 0);
//rrc_mac_config_req_NB_IoT(&mac_inst->rrc_config, 1, 1, 0, 0);
init_tool_sib1(mac_inst);
// output handler
......@@ -137,7 +137,7 @@ void init_mac_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst)
mac_inst->num_uss_list = NUM_USS_PP;
for(i=0;i<NUM_USS_PP;++i)
{
rrc_mac_config_req_NB_IoT(&mac_inst->rrc_config, 0, 0, 1, i);
//rrc_mac_config_req_NB_IoT(&mac_inst->rrc_config, 0, 0, 1, i);
(mac_inst->UE_list_spec+i)->head = -1;
(mac_inst->UE_list_spec+i)->tail = -1;
(mac_inst->UE_list_spec+i)->NPDCCH_config_dedicated.R_max = mac_inst->rrc_config.npdcch_ConfigDedicated[i].R_max;
......
......@@ -232,7 +232,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
DCI_pdu = schedule_result_list_UL->DCI_pdu;
// bug here
(ul_config_pdu + i) ->nulsch_pdu.nulsch_pdu_rel13.nulsch_format = 0;
(ul_config_pdu + i) ->nulsch_pdu.nulsch_pdu_rel13.size = UL_TBS_Table[((DCIFormatN0_t *)DCI_pdu)->mcs][((DCIFormatN0_t *)DCI)->ResAssign];
(ul_config_pdu + i) ->nulsch_pdu.nulsch_pdu_rel13.size = UL_TBS_Table[((DCIFormatN0_t *)DCI_pdu)->mcs][((DCIFormatN0_t *)DCI_pdu)->ResAssign];
//printf("test\n");
(ul_config_pdu + i) ->nulsch_pdu.nulsch_pdu_rel13.rnti = schedule_result_list_UL->rnti;
(ul_config_pdu + i) ->nulsch_pdu.nulsch_pdu_rel13.subcarrier_indication = ((DCIFormatN0_t *)DCI_pdu)->scind;
......
......@@ -33,6 +33,7 @@
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
#include "COMMON/platform_types.h"
#include "openair2/RRC/LITE/defs_NB_IoT.h"
/** \addtogroup _mac
* @{
*/
......@@ -96,11 +97,37 @@ void convert_system_number(uint32_t source_sf,uint32_t *hyperSF, uint32_t *frame
uint32_t convert_system_number_sf(uint32_t hyperSF, uint32_t frame, uint32_t subframe);
void rrc_mac_config_req_NB_IoT(rrc_config_NB_IoT_t *mac_config,
uint8_t mib_flag,
uint8_t sib_flag,
uint8_t ded_flag,
uint8_t ue_list_ded_num);
void config_mib_fapi_NB_IoT(
int rntiP,
int physCellId,
uint8_t eutra_band,
int Ncp,
int Ncp_UL,
int p_eNB,
int p_rx_eNB,
int dl_CarrierFreq,
int ul_CarrierFreq,
long *eutraControlRegionSize,
BCCH_BCH_Message_NB_t *mib_NB_IoT
);
void config_sib2_fapi_NB_IoT(
int physCellId,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
);
void rrc_mac_config_req_NB_IoT(
module_id_t Mod_idP,
int CC_idP,
int rntiP,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
SystemInformationBlockType1_NB_t *sib1_NB_IoT,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon,
PhysicalConfigDedicated_NB_r13_t *physicalConfigDedicated,
LogicalChannelConfig_NB_r13_t *logicalChannelConfig, //FIXME: decide how to use it
rrc_config_NB_IoT_t *mac_config,
uint8_t ded_flag,
uint8_t ue_list_ded_num);
// schedule helper functinons
......@@ -125,7 +152,7 @@ void insert_schedule_result(schedule_result_t **list, int subframe, schedule_res
void adjust_UL_resource_list(sched_temp_UL_NB_IoT_t *NPUSCH_info);
void generate_scheduling_result_UL(int32_t DCI_subframe, int32_t DCI_end_subframe, uint32_t UL_subframe, uint32_t UL_end_subframe, DCIFormatN0_t *DCI, rnti_t rnti, uint8_t *ul_debug_str, uint8_t *dl_debug_str);
void generate_scheduling_result_UL(int32_t DCI_subframe, int32_t DCI_end_subframe, uint32_t UL_subframe, uint32_t UL_end_subframe, DCIFormatN0_t *DCI_pdu, rnti_t rnti, uint8_t *ul_debug_str, uint8_t *dl_debug_str);
uint32_t get_I_mcs_NB_IoT(int CE_level);
......
......@@ -221,326 +221,6 @@ int32_t get_uldl_offset_NB_IoT(int eutra_band) {
void config_mib_fapi_NB_IoT(
int rntiP,
int physCellId,
uint8_t eutra_band,
int Ncp,
int Ncp_UL,
int p_eNB,
int p_rx_eNB,
int dl_CarrierFreq,
int ul_CarrierFreq,
long *eutraControlRegionSize,
BCCH_BCH_Message_NB_t *mib_NB_IoT
)
{
//XXX MP: one important problem to solve is how we decide when we deal with anchor or non anchor carrier?? configuration time?
//anchor carrier refers to the allowed PRBs index in the in-band operation mode at the beginning the UE is always camp on an anchor carrier from which
//receive NSSS, NPSSS ecc... but the RRCConnectionReconfiguration may could indicate non-anchor carrier to be used for data transmission
//ASSUMPTION: we always use an anchor carrier
float m_dl = 0; //this is the category offset for NB1/NB2 UE category used for EARFCN evaluation (TS 36.101 ch. 5.7.3F) (for the moment we keep this value fixed)
config_INFO->get_MIB = 1;
config_INFO->rnti = rntiP;
config_INFO->cfg->nfapi_config.rf_bands.rf_band[0] = (uint16_t)eutra_band;
config_INFO->cfg->sch_config.physical_cell_id.value = physCellId;
config_INFO->cfg->subframe_config.dl_cyclic_prefix_type.value = Ncp;
config_INFO->cfg->subframe_config.ul_cyclic_prefix_type.value = Ncp_UL;
config_INFO->cfg->rf_config.tx_antenna_ports.value = p_eNB;
config_INFO->cfg->rf_config.rx_antenna_ports.value = p_rx_eNB;
//PROBLEM: we need to know the LTE bandwidht for In-band and Guard band operating mode in order to choose the proper PRB idex or is given at configuration time??
//The prb index allowed are the one specified in R&shwarz pag 9 NB-IoT white papaer
switch (mib_NB_IoT->message.operationModeInfo_r13.present)
{
//FAPI specs pag 135
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 0;
config_INFO->cfg->config_NB_IoT.prb_index.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; //see TS 36.213 ch 16.0
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = -1; //is not defined so we put a negative value
if(eutraControlRegionSize == NULL)
LOG_E(RRC, "rrc_mac_config_req_eNB_NB_IoT: operation mode is in-band but eutraControlRegionSize is not defined");
else
config_INFO->cfg->config_NB_IoT.control_region_size.value = *eutraControlRegionSize;
//m_dl = NB_Category_Offset_anchor[rand()%4];
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 1;
//XXX problem: fapi think to define also eutra_CRS_sequenceInfo also for in band with different PCI but the problem is that we don-t have i
//XXX should pass the prb_index may defined by configuration file depending on the LTE band we are considering (see Rhode&Shwartz whitepaper pag9)
//config_INFO->config_NB_IoT.prb_index.value =
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13;
if(eutraControlRegionSize == NULL)
LOG_E(RRC, "rrc_mac_config_req_eNB_NB_IoT: operation mode is in-band but eutraControlRegionSize is not defined");
else
config_INFO->cfg->config_NB_IoT.control_region_size.value = *eutraControlRegionSize;
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 2;
//XXX should pass the prb_index may defined by configuration file depending on the LTE band we are considering (see Rhode&Shwartz whitepaper pag9)
//config_INFO->config_NB_IoT.prb_index.value =
config_INFO->cfg->config_NB_IoT.control_region_size.value = -1; //should not being defined so we put a negative value
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = -1; //is not defined so we put a negative value
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13:
config_INFO->cfg->config_NB_IoT.operating_mode.value = 3;
config_INFO->cfg->config_NB_IoT.prb_index.value = -1; // is not defined for this case (put a negative random value--> will be not considered for encoding, scrambling procedures)
config_INFO->cfg->config_NB_IoT.control_region_size.value = -1; //is not defined so we put a negative value
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value = -1; //is not defined so we put a negative value
break;
default:
LOG_E(RRC, "rrc_mac_config_req_eNB_NB_IoT: NB-IoT operating Mode (MIB-NB) not set\n");
break;
}
//we shoud use dl_CarrierConfig for generating the earfcn for LTE-CAT N2 based on TS 36.101 5.7.3F
/*
* 1) takes a random number from the offset of category NB1 and NB2 based on the operating mode (we assume always the usage of anchor carrier)
* 2)evaluate the EARFCN value based on the corresponding formula
*/
config_INFO->cfg->nfapi_config.earfcn.value = to_earfcn(eutra_band,dl_CarrierFreq, m_dl);
}
void config_sib2_fapi_NB_IoT(
int physCellId,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
)
{
/*
* Following the FAPI like approach:
* 1)fill the PHY_Config_t structure (PHY_INTERFACE/IF_Module_NB_IoT.h)
* 1.1) check for how many NPRACH resources has been set and enable the corresponding parameter
* 1.2)fill the structure PHY_Config_t (shared structure of the IF_Module
* 2)Call the PHY_config_req for trigger the NB_phy_config_sib2_eNB()
*/
/*NPRACH Resources*/
NPRACH_Parameters_NB_r13_t* nprach_parameter;
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 0;
config_INFO->cfg->config_NB_IoT.nprach_config_1_enabled.value = 0;
config_INFO->cfg->config_NB_IoT.nprach_config_2_enabled.value = 0;
switch(radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.size)
{
case 0:
LOG_E(MAC, "nprach_ParametersLis is empty\n");
break;
case 1:
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_0_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13; //Rmax
config_INFO->extra_phy_parms.nprach_config_0_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break;
case 2:
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_0_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[1];
config_INFO->cfg->config_NB_IoT.nprach_config_1_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_1_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_1_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_1_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break;
case 3:
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
config_INFO->cfg->config_NB_IoT.nprach_config_0_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_0_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_0_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[1];
config_INFO->cfg->config_NB_IoT.nprach_config_1_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_1_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_1_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_1_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_1_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_1_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[2];
config_INFO->cfg->config_NB_IoT.nprach_config_2_enabled.value = 1;
config_INFO->cfg->config_NB_IoT.nprach_config_2_cp_length.value = radioResourceConfigCommon->nprach_Config_r13.nprach_CP_Length_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_sf_periodicity.value = nprach_parameter->nprach_Periodicity_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_start_time.value = nprach_parameter->nprach_StartTime_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->config_NB_IoT.nprach_config_2_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_2_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_2_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
config_INFO->extra_phy_parms.nprach_config_2_npdcch_num_repetitions_RA = nprach_parameter->npdcch_NumRepetitions_RA_r13;
config_INFO->extra_phy_parms.nprach_config_2_npdcch_startSF_CSS_RA = nprach_parameter->npdcch_StartSF_CSS_RA_r13;
config_INFO->extra_phy_parms.nprach_config_2_npdcch_offset_RA = nprach_parameter->npdcch_Offset_RA_r13;
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break;
default:
LOG_E(RRC,"rrc_mac_config_req_eNB_NB_IoT: nprach_ParametersList size not valid\n");
break;
}
/*NPDSCH ConfigCommon*/
//FIXME: MP: FAPI specs define a range of value [0-255]==[0db - 63.75db] with 0.25db step -- corrispondence in 3GPP specs???
config_INFO->cfg->rf_config.reference_signal_power.value = radioResourceConfigCommon->npdsch_ConfigCommon_r13.nrs_Power_r13;
/*NPUSCH ConfigCommon*/
//a pointer to the first element of the list
config_INFO->extra_phy_parms.ack_nack_numRepetitions_MSG4 = radioResourceConfigCommon->npusch_ConfigCommon_r13.ack_NACK_NumRepetitions_Msg4_r13.list.array[0];
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13 != NULL)/* OPTIONAL */
{
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_BaseSequence_r13!= NULL)
config_INFO->cfg->config_NB_IoT.three_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_BaseSequence_r13);
else
config_INFO->cfg->config_NB_IoT.three_tone_base_sequence.value = physCellId%12; //see spec TS 36.331 NPUSCH-Config-NB
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_BaseSequence_r13!= NULL)
config_INFO->cfg->config_NB_IoT.six_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_BaseSequence_r13);
else
config_INFO->cfg->config_NB_IoT.six_tone_base_sequence.value = physCellId%14; //see spec TS 36.331 NPUSCH-Config-NB
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13!= NULL)
config_INFO->cfg->config_NB_IoT.twelve_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13);
else
config_INFO->cfg->config_NB_IoT.twelve_tone_base_sequence.value = physCellId%30; //see spec TS 36.331 NPUSCH-Config-NB
config_INFO->cfg->config_NB_IoT.three_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13;
config_INFO->cfg->config_NB_IoT.six_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13;
}
//NOTE: MP: FAPI specs for UL RS Configurations seems to be targeted for LTE and not for NB-IoT
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13 == TRUE)
config_INFO->cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 1; //RS_GROUP_HOPPING (FAPI specs pag 127)
else
config_INFO->cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 0;//RS_NO_HOPPING
config_INFO->cfg->uplink_reference_signal_config.group_assignment.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13;
//Some missed parameters are in UL_CONFIG.request message (P7) in FAPI specs. and not configured through P5 procedure
//ack_NACK_NumRepetitions_Msg4_r13
//srs_SubframeConfig_r13 /* OPTIONAL */
/*DL GAP config */
if(radioResourceConfigCommon->dl_Gap_r13 !=NULL)/* OPTIONAL */
{
config_INFO->cfg->config_NB_IoT.dl_gap_config_enable.value = 1;
config_INFO->cfg->config_NB_IoT.dl_gap_threshold.value = radioResourceConfigCommon->dl_Gap_r13->dl_GapThreshold_r13;
config_INFO->cfg->config_NB_IoT.dl_gap_duration_coefficient.value = radioResourceConfigCommon->dl_Gap_r13->dl_GapDurationCoeff_r13;
config_INFO->cfg->config_NB_IoT.dl_gap_periodicity.value = radioResourceConfigCommon->dl_Gap_r13->dl_GapPeriodicity_r13;
}
else
config_INFO->cfg->config_NB_IoT.dl_gap_config_enable.value = 0;
/*UL Power Control ConfigCommon*/
//nothing defined in FAPI specs
config_INFO->extra_phy_parms.p0_nominal_npusch = radioResourceConfigCommon->uplinkPowerControlCommon_r13.p0_NominalNPUSCH_r13;
config_INFO->extra_phy_parms.alpha = radioResourceConfigCommon->uplinkPowerControlCommon_r13.alpha_r13;
config_INFO->extra_phy_parms.delta_preamle_MSG3 = radioResourceConfigCommon->uplinkPowerControlCommon_r13.deltaPreambleMsg3_r13;
/*RACH Config Common*/
//nothing defined in FAPI specs
}
/*
* This function is used to configured MAC and PHY layer. In the latter case, we first do a mapping of OAI params to the FAPI-like once
* by filling the PHY_COnfig structure
......@@ -548,172 +228,6 @@ void config_sib2_fapi_NB_IoT(
//defined in MAC/config.c
//FIXME: this function has no implication in terms of logical channel configuration for MAC
int rrc_mac_config_req_eNB_NB_IoT(
module_id_t Mod_idP,
int CC_idP,
int rntiP,
int physCellId, // is the NcellID for NB-IoT
int p_eNB, //number of eNB TX antenna ports (1 or 2 for NB-IoT)
int p_rx_eNB, // number of eNB Rx antenna ports (1 or 2 for NB-IoT)
int Ncp,
int Ncp_UL,
long eutra_band, //requencyBandIndicator (eutra_band) in sib1. this param is set in the do_sib1_nb and is directly taken from the .config file
struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1
struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1
struct DL_Bitmap_NB_r13 *dl_bitmap, //optional SIB1
long* eutraControlRegionSize, //optional sib1, is defined only when we are in in-band operation mode (same PCI or different PCI)
long* nrs_CRS_PoweSIwindowsizerOffset, //optional
uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq,
BCCH_BCH_Message_NB_t *mib_NB_IoT,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon,
struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated,
MAC_MainConfig_NB_r13_t *mac_MainConfig, //most probably not needed since only used at UE side
long logicalChannelIdentity, //FIXME: decide how to use it
LogicalChannelConfig_NB_r13_t *logicalChannelConfig //FIXME: decide how to use it
)
{
int UE_id = -1;
//find ue_id here
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
config_INFO->get_MIB = 0;
config_INFO->get_COMMON = 0;
config_INFO->get_DEDICATED = 0;
config_INFO->mod_id = Mod_idP;
config_INFO->CC_id = CC_idP;
config_INFO->cfg->subframe_config.duplex_mode.value = 2; //HD-FDD for NB-IoT
if (mib_NB_IoT != NULL) {
//XXX possible alternative implementation (as RU-RAU splitting)
//if(eNB_mac_inst == NULL) l2_init_eNB(); //TODO MP: to be included in the MAC/main.c
//mac_top_init_eNB(); //TODO MP: to be included in the MAC/main.c
// add common channels parameters
/*eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].mib_NB_IoT = mib_NB_IoT;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].physCellId = physCellId;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].p_eNB = p_eNB;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].p_rx_eNB = p_rx_eNB;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].Ncp = Ncp;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].Ncp_UL = Ncp_UL;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].eutra_band = eutra_band;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].dl_CarrierFreq = dl_CarrierFreq;
*/
LOG_I(MAC,
"Configuring MIB for instance %d, CCid %d : (band %ld,Nid_cell %d,TX antenna port (p) %d,DL freq %u\n",
Mod_idP,
CC_idP,
eutra_band,
physCellId,
p_eNB,
dl_CarrierFreq
);
/*
* Following the FAPI like approach:
* 1)fill the PHY_Config_t structure (PHY_INTERFACE/IF_Module_NB_IoT.h)
* 2)Call the PHY_config_req for trigger the NB_phy_config_mib_eNB() at the end
*/
//XXX where allocate memory for cfg??
if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
//Mapping OAI params into FAPI params
config_mib_fapi_NB_IoT(rntiP,
physCellId,
eutra_band,
Ncp,
Ncp_UL,
p_eNB,
p_rx_eNB,
dl_CarrierFreq,
ul_CarrierFreq,
eutraControlRegionSize,
mib_NB_IoT
);
}//mib_NB_IoT!=NULL
if (radioResourceConfigCommon!=NULL) {
if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
config_INFO->get_COMMON = 1;
LOG_I(MAC,"[CONFIG]SIB2/3-NB radioResourceConfigCommon Contents (partial)\n");
LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13= %ld\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13);
LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13= %ld\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13);
LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13= %d\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13);
LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13= %ld\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13);
//eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].radioResourceConfigCommon = radioResourceConfigCommon;
if (ul_CarrierFreq>0)
//eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].ul_CarrierFreq = ul_CarrierFreq;
config_sib2_fapi_NB_IoT(physCellId,radioResourceConfigCommon);
}
if (logicalChannelConfig!= NULL) {
if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
if (UE_id == -1) {
LOG_E(MAC,"%s:%d:%s: ERROR, UE_id == -1\n", __FILE__, __LINE__, __FUNCTION__);
} else {
//logical channel group not defined for nb-iot --> no UL specific Parameter
// or at least LCGID should be set to 0 for NB-IoT (See TS 36.321 ch 6.1.3.1) so no make sense to store this
}
}
if (physicalConfigDedicated != NULL) {
if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
if (UE_id == -1)
LOG_E(MAC,"%s:%d:%s: ERROR, UE_id == -1\n", __FILE__, __LINE__, __FUNCTION__);
else
{
config_INFO->get_DEDICATED = 1;
//XXX this parameters seems to be not defined by FAPi specs
//this are UE specific information that should be transmitted to the PHY layer
//use UE-specific structure at phy layer where to store this information (NPDCCH structure) this structure will be scrambled based on the rnti
config_INFO->rnti = UE_RNTI_NB_IoT(Mod_idP, UE_id);
config_INFO->extra_phy_parms.npdcch_NumRepetitions = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13; //Rmax
config_INFO->extra_phy_parms.npdcch_Offset_USS = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13;
config_INFO->extra_phy_parms.npdcch_StartSF_USS = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13;
//config_INFO->extra_phy_parms.phy_config_dedicated = physicalConfigDedicated; //for the moment fapi not allow this so not used
}
}
//Now trigger the phy_config_xxx for configuring PHY through the PHY_config_req
AssertFatal(if_inst->PHY_config_req != NULL, "rrc_mac_config_req_eNB_NB_IoT: PHY_config_req pointer function is NULL\n");
if(if_inst->PHY_config_req)
if_inst->PHY_config_req(config_INFO);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
return(0);
}
//-------------------------------------------------------
//New
......
......@@ -37,8 +37,11 @@
//#include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h"
#include "LogicalChannelConfig-NB-r13.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
extern IF_Module_t *if_inst;
extern eNB_MAC_INST_NB_IoT *mac_inst;
//MP: NOTE:XXX some of the parameters defined in vars_nb_iot are called by the extern.h file so not replicated here
......
......@@ -52,7 +52,7 @@
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h"
//#include "LAYER2/MAC/proto.h"
//#include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h"
#include "UTIL/LOG/log.h"
#include "COMMON/mac_rrc_primitives.h"
#include "rlc.h"
......@@ -559,7 +559,7 @@ void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
//XXX: Maybe some problem if Connection Setup could be called also after security activation
//configure the MAC for SRB1bis/SRb1 (but in principle this configuration should be not LCID dependent)
rrc_mac_config_req_eNB_NB_IoT(
/*rrc_mac_config_req_eNB_NB_IoT(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
ue_context_pP->ue_context.rnti,
......@@ -584,7 +584,7 @@ void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
ue_context_pP->ue_context.mac_MainConfig_NB_IoT, //XXX most probably is not needed since is only at UE side
DCCH0_NB_IoT, //LCID = 3 of SRB1bis
SRB1bis_logicalChannelConfig
);
);*/
break;
}
}
......@@ -787,7 +787,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
}
//MP: for each DRB I send a rrc_mac_config_req--> what change is the DRB2LCHAN_NB_IoT and logicalChannelConfig_r13
rrc_mac_config_req_eNB_NB_IoT(
/*rrc_mac_config_req_eNB_NB_IoT(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
ue_context_pP->ue_context.rnti,
......@@ -812,7 +812,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
ue_context_pP->ue_context.mac_MainConfig_NB_IoT,
DRB2LCHAN_NB_IoT[i], //over the logical channel id of the DRB (>=4)
DRB_configList2->list.array[i]->logicalChannelConfig_r13
);
);*/
} else { //ue_context_pP->ue_context.DRB_active[drb_id] == 1 (means that DRB has been modified)
......@@ -831,7 +831,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
//MP: The only change w.r.t previous case is that we not put logicalChannelConfig
rrc_mac_config_req_eNB_NB_IoT(
/*rrc_mac_config_req_eNB_NB_IoT(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
ue_context_pP->ue_context.rnti,
......@@ -856,7 +856,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
ue_context_pP->ue_context.mac_MainConfig_NB_IoT,
DRB2LCHAN_NB_IoT[i], //over the logical channel id of the DRB (>=4)
(LogicalChannelConfig_NB_r13_t*)NULL
);
);*/
}
}
}
......@@ -1709,33 +1709,18 @@ static void init_SI_NB_IoT(
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
//
rrc_mac_config_req_eNB_NB_IoT(ctxt_pP->module_id,
CC_id,
0,//rnti
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].physCellId,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].p_eNB,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].p_rx_eNB,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Ncp,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Ncp_UL,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->freqBandIndicator_r13, //eutra_band
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->freqBandInfo_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->multiBandInfoList_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->downlinkBitmap_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->eutraControlRegionSize_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->nrs_CRS_PowerOffset_r13,
// &SIwindowsize,
// &SIperiod,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].dl_CarrierFreq,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].ul_CarrierFreq,
(BCCH_BCH_Message_NB_t*) &
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].mib_NB_IoT,
(RadioResourceConfigCommonSIB_NB_r13_t *) &
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib2_NB_IoT->radioResourceConfigCommon_r13,
(struct PhysicalConfigDedicated_NB_r13 *)NULL,
(MAC_MainConfig_NB_r13_t *) NULL,
0,// MP:logicalChannelID //TODO still have to be properly managed in the interface
(struct LogicalChannelConfig_NB_r13 *)NULL
);
rrc_mac_config_req_NB_IoT(ctxt_pP->module_id,
CC_id,
0,
&eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id],
(SystemInformationBlockType1_NB_t*) &eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT,
(RadioResourceConfigCommonSIB_NB_r13_t *) &eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib2_NB_IoT->radioResourceConfigCommon_r13,
(struct PhysicalConfigDedicated_NB_r13 *)NULL,
(struct LogicalChannelConfig_NB_r13 *)NULL,
&mac_inst->rrc_config,
0,
0
);
} else {
LOG_E(RRC, PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB2/3_NB allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
......
......@@ -28,6 +28,8 @@
* \email: navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/
#ifndef __RRC_VARS_NB_IOT_H__
#define __RRC_VARS_NB_IOT_H__
#include "defs_NB_IoT.h"
#include "LAYER2/RLC/rlc.h"
......@@ -106,3 +108,4 @@ uint16_t N311_NB_IoT[8] = {1,2,3,4,5,6,8,10};
/* MP: 36.133 Section 9.1.4 RSRP Measurement Report Mapping and RSRQ Mapping, Table: 9.1.4-1 --> not for NB-IoT*/
#endif
\ No newline at end of file
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