Merge remote-tracking branch 'origin/develop-entv' into develop_integration_2019_w25

This commit is contained in:
Raphael Defosseux
2019-06-18 13:42:50 +02:00
60 changed files with 4503 additions and 97 deletions
+3
View File
@@ -34,6 +34,9 @@ MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSy
MESSAGE_DEF(RRC_MAC_BCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataReq, rrc_mac_bcch_data_req)
MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind)
MESSAGE_DEF(RRC_MAC_BCCH_MBMS_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchMbmsDataReq, rrc_mac_bcch_mbms_data_req)
MESSAGE_DEF(RRC_MAC_BCCH_MBMS_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchMbmsDataInd, rrc_mac_bcch_mbms_data_ind)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataReq, rrc_mac_ccch_data_req)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_CNF, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataCnf, rrc_mac_ccch_data_cnf)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind)
+23
View File
@@ -37,6 +37,9 @@
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind
#define RRC_MAC_BCCH_MBMS_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_req
#define RRC_MAC_BCCH_MBMS_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_ind
#define RRC_MAC_CCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_req
#define RRC_MAC_CCCH_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf
#define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind
@@ -47,6 +50,7 @@
// Some constants from "LAYER2/MAC/defs.h"
#define BCCH_SDU_SIZE (512)
#define BCCH_SDU_MBMS_SIZE (512)
#define CCCH_SDU_SIZE (512)
#define MCCH_SDU_SIZE (512)
#define PCCH_SDU_SIZE (512)
@@ -78,6 +82,25 @@ typedef struct RrcMacBcchDataInd_s {
uint8_t rsrp;
} RrcMacBcchDataInd;
typedef struct RrcMacBcchMbmsDataReq_s {
uint32_t frame;
uint32_t sdu_size;
uint8_t sdu[BCCH_SDU_MBMS_SIZE];
uint8_t enb_index;
} RrcMacBcchMbmsDataReq;
typedef struct RrcMacBcchMbmsDataInd_s {
uint32_t frame;
uint8_t sub_frame;
uint32_t sdu_size;
uint8_t sdu[BCCH_SDU_MBMS_SIZE];
uint8_t enb_index;
uint8_t rsrq;
uint8_t rsrp;
} RrcMacBcchMbmsDataInd;
typedef struct RrcMacCcchDataReq_s {
uint32_t frame;
uint32_t sdu_size;
+1
View File
@@ -166,6 +166,7 @@ typedef struct RadioResourceConfig_s {
long mpdcch_startSF_CSS_RA_r13_val;
long* prach_HoppingOffset_r13;
#endif
BOOLEAN_t mbms_dedicated_serving_cell;
} RadioResourceConfig;
// eNB: ENB_APP -> RRC messages
+65
View File
@@ -1310,6 +1310,62 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
break;
}
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (!ccparams_lte.mbms_dedicated_serving_cell)
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
}
#endif
switch (ccparams_lte.N_RB_DL) {
case 25:
if ((ccparams_lte.ue_multiple_max < 1) ||
(ccparams_lte.ue_multiple_max > 4))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
break;
case 50:
if ((ccparams_lte.ue_multiple_max < 1) ||
(ccparams_lte.ue_multiple_max > 8))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
break;
case 100:
if ((ccparams_lte.ue_multiple_max < 1) ||
(ccparams_lte.ue_multiple_max > 16))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
RC.config_file_name, i, ccparams_lte.N_RB_DL);
break;
}
if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
@@ -2825,6 +2881,15 @@ void configure_du_mac(int inst) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
}
+9 -2
View File
@@ -394,6 +394,10 @@ typedef enum {
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
#define ENB_CONFIG_STRING_UE_MULTIPLE_MAX "ue_multiple_max"
//SIB1-MBMS
#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL "mbms_dedicated_serving_cell"
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pdsch_maxNumRepetitionCEmodeA_r13"
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13"
@@ -447,7 +451,6 @@ typedef enum {
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_size"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* component carriers configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
@@ -534,6 +537,7 @@ typedef struct ccparams_lte_s {
int32_t ue_TimersAndConstants_n311;
int32_t ue_TransmissionMode;
int32_t ue_multiple_max;
char *mbms_dedicated_serving_cell;
int32_t srb1_timer_poll_retransmit;
int32_t srb1_timer_reordering;
int32_t srb1_timer_status_prohibit;
@@ -657,6 +661,7 @@ typedef struct ccparams_lte_s {
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} \
}
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
@@ -741,7 +746,8 @@ typedef struct ccparams_lte_s {
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0} \
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
}
@@ -822,6 +828,7 @@ typedef struct ccparams_lte_s {
#define ENB_CONFIG_UETIMERS_N310_IDX 73
#define ENB_CONFIG_UETIMERS_N311_IDX 74
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* SRB1 configuration parameters section name */
@@ -311,6 +311,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
break;
@@ -470,6 +479,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
}
+52 -2
View File
@@ -685,7 +685,17 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
LTE_SystemInformationBlockType1_v1310_IEs_t *
sib1_v13ext
#endif
) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint8_t FeMBMS_Flag,
LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
LTE_SystemInformationBlockType1_MBMS_r14_t * sib1_mbms_r14_fembms,
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
#endif
) {
int i;
int UE_id = -1;
eNB_MAC_INST *eNB = RC.mac[Mod_idP];
@@ -736,6 +746,13 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
config_sib1(Mod_idP,CC_idP,tdd_Config);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //TODO MBMS this must be passed through function
/*if (schedulingInfoList_MBMS!=NULL) {
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
config_sib1_mbms(Mod_idP,CC_idP,tdd_Config);
}*/
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if (sib1_v13ext != NULL) {
@@ -855,6 +872,39 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
#endif
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (nonMBSFN_SubframeConfig != NULL){
LOG_D(MAC,
"[eNB %d][CONFIG] Received a non MBSFN subframe allocation pattern (%x,%x):%x for FeMBMS-CAS\n",
Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
//RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
cfg->fembms_config.non_mbsfn_config_flag.value = 1;
cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
cfg->num_tlv++;
cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
cfg->num_tlv++;
cfg->fembms_config.radioframe_allocation_period.value = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
cfg->num_tlv++;
cfg->fembms_config.radioframe_allocation_offset.value = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
cfg->num_tlv++;
//We need to reuse current MCH scheduler
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
}
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (mbsfn_AreaInfoList != NULL) {
@@ -1283,4 +1333,4 @@ void eNB_Config_Local_DRX(
LOG_E(MAC, "Error in local DRX configuration, the drx retransmission timer value specified is unknown\n");
break;
}
}
}
+25 -6
View File
@@ -20,16 +20,18 @@
* contact@openairinterface.org
*/
/*! \file config.c
* \brief UE and eNB configuration performed by RRC or as a consequence of RRC procedures
* \author Navid Nikaein and Raymond Knopp
* \date 2010 - 2014
/*! \file config_ue.c
* \brief UE configuration performed by RRC or as a consequence of RRC procedures / This includes FeMBMS UE procedures
* \author Navid Nikaein, Raymond Knopp and Javier Morgade
* \date 2010 - 2014 / 2019
* \version 0.1
* \email: navid.nikaein@eurecom.fr
* \email: navid.nikaein@eurecom.fr, javier.morgade@ieee.org
* @ingroup _mac
*/
#include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h"
#include "nfapi/oai_integration/vendor_ext.h"
@@ -130,7 +132,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
,const uint32_t *const sourceL2Id
,const uint32_t *const destinationL2Id
#endif
) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint8_t FeMBMS_Flag,
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
#endif
)
{
int i;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
@@ -560,6 +570,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
}
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if(nonMBSFN_SubframeConfig!=NULL) {
LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
Mod_idP);
phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
}
#endif
#ifdef CBA
if (cba_rnti) {
+2 -1
View File
@@ -63,7 +63,8 @@
/*!\brief DTCH DRB1 logical channel */
#define DTCH 3 // LCID
/*!\brief MCCH logical channel */
#define MCCH 4
//#define MCCH 4
#define MCCH 62
/*!\brief MTCH logical channel */
#define MTCH 1
// DLSCH LCHAN ID
+1 -1
View File
@@ -955,7 +955,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
/* This schedules MIB */
if ((subframeP == 0) && (frameP & 3) == 0)
if ((subframeP == 0) && (frameP & 3) == 0)
schedule_mib(module_idP, frameP, subframeP);
if (get_softmodem_params()->phy_test == 0) {
+456
View File
@@ -75,6 +75,235 @@ int Sj100[size_Sj100] = { 0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15 };
int SIB1_BR_TBS_table[6] = { 208, 256, 328, 504, 712, 936 };
//------------------------------------------------------------------------------
void
schedule_SIB1_MBMS(module_id_t module_idP,
frame_t frameP, sub_frame_t subframeP)
//------------------------------------------------------------------------------
{
#ifdef SCHEDULE_SIB1_MBMS
int8_t bcch_sdu_length;
int CC_id;
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc;
uint8_t *vrb_map;
int first_rb = -1;
int N_RB_DL;
nfapi_dl_config_request_pdu_t *dl_config_pdu;
nfapi_tx_request_pdu_t *TX_req;
nfapi_dl_config_request_body_t *dl_req;
int m, i, N_S_NB;
int *Sj;
int n_NB = 0;
int TBS;
int k = 0, rvidx;
uint16_t sfn_sf = frameP<<4|subframeP;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
cc = &eNB->common_channels[CC_id];
vrb_map = (void *) &cc->vrb_map;
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
int foffset = cc->physCellId & 1;
int sfoffset = (cc->tdd_Config == NULL) ? 0 : 1;
// Time-domain scheduling
if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
continue;
else
switch ((cc->mib->message.schedulingInfoSIB1_BR_r13 - 1) % 3) {
case 0: // repetition 4
k = (frameP >> 1) & 3;
if ((subframeP != (4 + sfoffset))
|| ((frameP & 1) != foffset))
continue;
break;
case 1: // repetition 8
k = frameP & 3;
AssertFatal(N_RB_DL > 15,
"SIB1-BR repetition 8 not allowed for N_RB_DL= %d\n",
N_RB_DL);
if ((foffset == 0) && (subframeP != (4 + sfoffset)))
continue;
else if ((foffset == 1)
&& (subframeP != ((9 + sfoffset) % 10)))
continue;
break;
case 2: // repetition 16
k = ((10 * frameP) + subframeP) & 3;
AssertFatal(N_RB_DL > 15,
"SIB1-BR repetition 16 not allowed for N_RB_DL= %d\n",
N_RB_DL);
if ((sfoffset == 1)
&& ((subframeP != 0) || (subframeP != 5)))
continue;
else if ((sfoffset == 0) && (foffset == 0)
&& (subframeP != 4) && (subframeP != 9))
continue;
else if ((sfoffset == 0) && (foffset == 1)
&& (subframeP != 0) && (subframeP != 9))
continue;
break;
}
// if we get here we have to schedule SIB1_BR in this frame/subframe
// keep counter of SIB1_BR repetitions in 8 frame period to choose narrowband on which to transmit
if ((frameP & 7) == 0)
cc->SIB1_BR_cnt = 0;
else
cc->SIB1_BR_cnt++;
// Frequency-domain scheduling
switch (N_RB_DL) {
case 6:
case 15:
default:
m = 1;
n_NB = 0;
N_S_NB = 0;
Sj = NULL;
break;
case 25:
m = 2;
N_S_NB = 2;
Sj = Sj25;
break;
case 50:
m = 2;
N_S_NB = 6;
Sj = Sj50;
break;
case 75:
m = 4;
N_S_NB = 10;
Sj = Sj75;
break;
case 100:
m = 4;
N_S_NB = 14;
Sj = Sj100;
break;
}
// Note: definition of k above and rvidx from 36.321 section 5.3.1
rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
i = cc->SIB1_BR_cnt & (m - 1);
n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 1, &cc->BCCH_BR_pdu[0].payload[0], 0); // not used in this case
AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
"schedulingInfoSIB1_BR_r13 %d > 18\n",
(int) cc->mib->message.schedulingInfoSIB1_BR_r13);
AssertFatal(bcch_sdu_length > 0,
"RRC returned 0 bytes for SIB1-BR\n");
TBS =
SIB1_BR_TBS_table[(cc->mib->message.schedulingInfoSIB1_BR_r13 -
1) / 3] >> 3;
AssertFatal(bcch_sdu_length <= TBS,
"length returned by RRC %d is not compatible with the TBS %d from MIB\n",
bcch_sdu_length, TBS);
if ((frameP & 1023) < 200)
LOG_D(MAC,
"[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d) rvidx %d\n",
module_idP, frameP, subframeP, CC_id, bcch_sdu_length,
n_NB, i, m, N_S_NB, rvidx);
// allocate all 6 PRBs in narrowband for SIB1_BR
first_rb = narrowband_to_first_rb(cc, n_NB);
vrb_map[first_rb] = 1;
vrb_map[first_rb + 1] = 1;
vrb_map[first_rb + 2] = 1;
vrb_map[first_rb + 3] = 1;
vrb_map[first_rb + 4] = 1;
vrb_map[first_rb + 5] = 1;
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
// Rel10 fields
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
// Rel13 fields
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 0; // SIB1-BR
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; // absolute SFx
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
// Program TX Request
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
TX_req->pdu_length = bcch_sdu_length;
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
TX_req->num_segments = 1;
TX_req->segments[0].segment_length = bcch_sdu_length;
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[0].payload;
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[0].payload[0],
bcch_sdu_length,
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
}
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
frameP, CC_id, bcch_sdu_length);
} else {
LOG_D(MAC,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes\n",
frameP, CC_id, bcch_sdu_length);
}
}
#endif
}
//------------------------------------------------------------------------------
void
schedule_SIB1_BR(module_id_t module_idP,
@@ -304,6 +533,8 @@ schedule_SIB1_BR(module_id_t module_idP,
int si_WindowLength_BR_r13tab[LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
int si_TBS_r13tab[LTE_SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = { 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
int si_WindowLength_MBMS_r14tab[8] = { 1, 2, 5, 10, 15, 20, 40, 80 };
//------------------------------------------------------------------------------
void
schedule_SI_BR(module_id_t module_idP, frame_t frameP,
@@ -503,6 +734,231 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
} // CC_id
return;
}
//------------------------------------------------------------------------------
void
schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP)
//------------------------------------------------------------------------------
{
int8_t bcch_sdu_length;
int mcs = -1;
int CC_id;
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc;
uint8_t *vrb_map;
int first_rb = -1;
int N_RB_DL;
nfapi_dl_config_request_t *dl_config_request;
nfapi_dl_config_request_pdu_t *dl_config_pdu;
nfapi_tx_request_pdu_t *TX_req;
nfapi_dl_config_request_body_t *dl_req;
uint16_t sfn_sf = frameP << 4 | subframeP;
start_meas(&eNB->schedule_si_mbms);
// Only schedule LTE System Information in subframe 0
if (subframeP == 0) {
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
cc = &eNB->common_channels[CC_id];
vrb_map = (void *) &cc->vrb_map;
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
dl_config_request = &eNB->DL_req[CC_id];
dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_MBMS,0xFFFF, 1, &cc->BCCH_MBMS_pdu.payload[0], 0); // not used in this case
if (bcch_sdu_length > 0) {
LOG_D(MAC, "[eNB %d] Frame %d : BCCH-MBMS->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length);
// Allocate 4 PRBs in a random location
/*
while (1) {
first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
if ((vrb_map[first_rb] != 1) &&
(vrb_map[first_rb+1] != 1) &&
(vrb_map[first_rb+2] != 1) &&
(vrb_map[first_rb+3] != 1))
break;
}
*/
switch (N_RB_DL) {
case 6:
first_rb = 0;
break;
case 15:
first_rb = 6;
break;
case 25:
first_rb = 11;
break;
case 50:
first_rb = 23;
break;
case 100:
first_rb = 48;
break;
}
vrb_map[first_rb] = 1;
vrb_map[first_rb + 1] = 1;
vrb_map[first_rb + 2] = 1;
vrb_map[first_rb + 3] = 1;
// Get MCS for length of SI, 3 PRBs
if (bcch_sdu_length <= 7) {
mcs = 0;
} else if (bcch_sdu_length <= 11) {
mcs = 1;
} else if (bcch_sdu_length <= 18) {
mcs = 2;
} else if (bcch_sdu_length <= 22) {
mcs = 3;
} else if (bcch_sdu_length <= 26) {
mcs = 4;
} else if (bcch_sdu_length <= 28) {
mcs = 5;
} else if (bcch_sdu_length <= 32) {
mcs = 6;
} else if (bcch_sdu_length <= 41) {
mcs = 7;
} else if (bcch_sdu_length <= 49) {
mcs = 8;
}
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFF;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
dl_config_request->sfn_sf = sfn_sf;
if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI MBMS\n", frameP, subframeP);
dl_req->number_dci++;
dl_req->number_pdu++;
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = bcch_sdu_length;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req->number_pdu++;
// Rel10 fields
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
// Rel13 fields
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; // absolute SF
dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST;
dl_config_request->sfn_sf = sfn_sf;
// Program TX Request
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
TX_req->pdu_length = bcch_sdu_length;
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
TX_req->num_segments = 1;
TX_req->segments[0].segment_length = bcch_sdu_length;
TX_req->segments[0].segment_data = cc->BCCH_MBMS_pdu.payload;
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
} else {
LOG_E(MAC,
"[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI MBMS\n",
module_idP, CC_id, frameP, subframeP);
}
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_MBMS_pdu.payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff,
bcch_sdu_length);
}
if (0/*cc->tdd_Config != NULL*/) { //TDD not for FeMBMS
LOG_D(MAC,
"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
frameP, CC_id, bcch_sdu_length, mcs);
} else {
LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-MBMS->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n", frameP, CC_id, bcch_sdu_length, mcs);
}
eNB->eNB_stats[CC_id].total_num_bcch_pdu += 1;
eNB->eNB_stats[CC_id].bcch_buffer = bcch_sdu_length;
eNB->eNB_stats[CC_id].total_bcch_buffer += bcch_sdu_length;
eNB->eNB_stats[CC_id].bcch_mcs = mcs;
//printf("SI %d.%d\n", frameP, subframeP);/////////////////////////////////////////******************************
} else {
//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
}
}
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//schedule_SIB1_BR(module_idP, frameP, subframeP);
//schedule_SI_BR(module_idP, frameP, subframeP);
#endif
stop_meas(&eNB->schedule_si_mbms);
}
#endif
void
+28 -1
View File
@@ -66,6 +66,12 @@
#include "LTE_SystemInformationBlockType1-v1310-IEs.h"
#include "LTE_SystemInformationBlockType18-r12.h"
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_BCCH-BCH-Message-MBMS.h"
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
#include "LTE_RadioResourceConfigCommonSIB.h"
#include "nfapi_interface.h"
#include "PHY_INTERFACE/IF_Module.h"
@@ -416,6 +422,11 @@ typedef struct {
#define BCCH_SIB1_BR 6 // SIB1_BR
/*!\brief Values of BCCH SIB_BR logical channel (fake) */
#define BCCH_SI_BR 7 // SI-BR
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/*!\brief Values of BCCH SIB1_BR logical channel (fake) */
#define BCCH_SIB1_MBMS 60 // SIB1_MBMS //TODO better armonize index
#define BCCH_SI_MBMS 61 // SIB_MBMS //TODO better armonize index
#endif
/*!\brief Value of CCCH / SRB0 logical channel */
#define CCCH 0 // srb0
/*!\brief DCCH / SRB1 logical channel */
@@ -425,7 +436,8 @@ typedef struct {
/*!\brief DTCH DRB1 logical channel */
#define DTCH 3 // LCID
/*!\brief MCCH logical channel */
#define MCCH 4
//#define MCCH 4
#define MCCH 62
/*!\brief MTCH logical channel */
#define MTCH 1
// DLSCH LCHAN ID
@@ -1311,6 +1323,7 @@ typedef struct {
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
LTE_SchedulingInfoList_MBMS_r14_t *schedulingInfoList_MBMS;
#endif
LTE_TDD_Config_t *tdd_Config;
LTE_SchedulingInfoList_t *schedulingInfoList;
@@ -1338,6 +1351,9 @@ typedef struct {
uint8_t vrb_map_UL[100];
/// MBSFN SubframeConfig
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
#endif
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
@@ -1370,6 +1386,11 @@ typedef struct {
/// Outgoing BCCH-BR pdu for PHY
BCCH_PDU BCCH_BR_pdu[20];
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
BCCH_PDU BCCH_MBMS_pdu;
uint8_t FeMBMS_flag;
#endif
} COMMON_channels_t;
/*! \brief top level eNB MAC structure */
typedef struct eNB_MAC_INST_s {
@@ -1437,6 +1458,9 @@ typedef struct eNB_MAC_INST_s {
time_stats_t eNB_scheduler;
/// processing time of eNB scheduler for SI
time_stats_t schedule_si;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
time_stats_t schedule_si_mbms;
#endif
/// processing time of eNB scheduler for Random access
time_stats_t schedule_ra;
/// processing time of eNB ULSCH scheduler
@@ -1676,6 +1700,9 @@ typedef struct {
/// MBSFN_Subframe Configuration
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
#endif
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
+37
View File
@@ -67,6 +67,17 @@ void schedule_RA(module_id_t module_idP, frame_t frameP,
void schedule_SI(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/** \brief First stage of SI Scheduling. Gets a SI SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
@param Mod_id Instance ID of eNB
@param frame Frame index
@param subframe Subframe number on which to act
*/
void schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP);
#endif
/** \brief MBMS scheduling: Checking the position for MBSFN subframes. Create MSI, transfer MCCH from RRC to MAC, transfer MTCHs from RLC to MAC. Multiplexing MSI,MCCH&MTCHs. Return 1 if there are MBSFN data being allocated, otherwise return 0;
@param Mod_id Instance ID of eNB
@param frame Frame index
@@ -539,6 +550,11 @@ void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len);
#endif
void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len);
@@ -954,6 +970,12 @@ int generate_dlsch_header(unsigned char *mac_header,
@param mbsfn_AreaInfoList pointer to MBSFN Area Info list from SIB13
@param pmch_InfoList pointer to PMCH_InfoList from MBSFNAreaConfiguration Message (MCCH Message)
@param sib1_ext_r13 SI Scheduling information for SI-BR UEs
@param mib_fembms pointer to FeMBMS MIB
@param FeMBMS_Flag indicates FeMBMS transmission
@param schedulingInfo_fembms pointer to FeMBMS SI Scheduling Information
@param non_MBSFN_SubframeConfig pointer to FeMBMS Non MBSFN Subframe Config
@param sib1_mbms_r14_fembms pointer SI Scheduling infomration for SI-MBMS
@param mbsfn_AreaInfoList_fembms pointer to FeMBMS MBSFN Area Info list from SIB1-MBMS
*/
int rrc_mac_config_req_eNB(module_id_t module_idP,
@@ -1003,6 +1025,15 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
,
LTE_SystemInformationBlockType1_v1310_IEs_t *
sib1_ext_r13
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint8_t FeMBMS_Flag,
LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
LTE_SystemInformationBlockType1_MBMS_r14_t * sib1_mbms_r14_fembms,
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
#endif
);
@@ -1066,6 +1097,12 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint8_t FeMBMS_Flag,
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
#endif
);
+46 -7
View File
@@ -19,14 +19,14 @@
* contact@openairinterface.org
*/
/*! \file ue_procedures.c
* \brief procedures related to UE
* \author Navid Nikaein and Raymond Knopp
* \date 2010 - 2014
* \version 1
* \email: navid.nikaein@eurecom.fr
* @ingroup _mac
/*! \file asn1_msg.c
* \brief primitives to build the asn1 messages / primitives to build FeMBMS asn1 messages
* \author Raymond Knopp, Navid Nikaein and Javier Morgade
* \date 2011 / 2019
* \version 1.0
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, navid.nikaein@eurecom.fr javier.morgade@ieee.org
*/
#ifdef EXMIMO
@@ -594,6 +594,45 @@ ue_send_sdu(module_id_t module_idP,
#endif
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void
ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t eNB_index, void *pdu, uint16_t len)
{
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].rx_si);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
module_idP, frameP, BCCH, len);
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
SI_RNTI,
BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_si);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, len);
}
}
#endif
void
ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t eNB_index, void *pdu, uint16_t len) {
+4 -2
View File
@@ -972,8 +972,10 @@ pdcp_data_ind(
dest_addr.sin_family = AF_INET;
dest_addr.sin_port = udp_header->dest;
dest_addr.sin_addr.s_addr = ip_header->daddr;
sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
packet_forwarded = TRUE;
sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr*)&dest_addr, sizeof(dest_addr));
//packet_forwarded = TRUE;
}
#endif
@@ -137,7 +137,7 @@ void config_req_rlc_um_asn1 (
}
rlc_p = &rlc_union_p->rlc.um;
}
}else
if ((sourceL2Id >0 ) && (destinationL2Id >0)){
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
} else
+1 -1
View File
@@ -398,7 +398,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
}
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
}
}else
if (sourceL2Id && destinationL2Id) {
LOG_D (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP,
+20
View File
@@ -77,6 +77,26 @@ mac_rrc_data_req(
carrier = &rrc->carrier[0];
mib = &carrier->mib;
if(Srb_id == BCCH_SI_MBMS){
if (frameP%4 == 0){
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_MBMS,
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1 MBMS\n",Mod_idP,frameP);
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]);
}
LOG_T(RRC,"\n");
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
}
}
if((Srb_id & RAB_OFFSET) == BCCH) {
if(RC.rrc[Mod_idP]->carrier[CC_id].SI.Active==0) {
return 0;
+34
View File
@@ -138,6 +138,40 @@ mac_rrc_data_ind_ue(
*/
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, 0, rntiP, frameP, sub_frameP,eNB_indexP);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if(srb_idP == BCCH_SI_MBMS) {
LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
int msg_sdu_size = sizeof(RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu);
if (sdu_lenP > msg_sdu_size) {
LOG_E(RRC, "SDU larger than BCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
sdu_size = msg_sdu_size;
} else {
sdu_size = sdu_lenP;
}
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_MBMS_DATA_IND);
memset (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, 0, BCCH_SDU_MBMS_SIZE);
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).frame = frameP;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sub_frame = sub_frameP;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu_size = sdu_size;
memcpy (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, sduP, sdu_size);
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).enb_index = eNB_indexP;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrq = 30 /* TODO change phy to report rspq */;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrp = 45 /* TODO change phy to report rspp */;
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
}
#else
decode_BCCH_MBMS_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t*)sduP,sdu_lenP, 0, 0);
#endif
}
#endif
if(srb_idP == BCCH) {
LOG_D(RRC,"[UE %d] Received SDU for BCCH on SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
#if defined(ENABLE_ITTI)
+304
View File
@@ -78,6 +78,13 @@
#include "LTE_SBCCH-SL-BCH-MessageType.h"
#include "LTE_SBCCH-SL-BCH-Message.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_BCCH-BCH-Message-MBMS.h"
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
//#include "PHY/defs.h"
#include "LTE_MeasObjectToAddModList.h"
@@ -177,6 +184,88 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) {
return 0xFF; //error!
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFN, uint32_t frame) {
asn_enc_rval_t enc_rval;
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms;
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
uint16_t *spare = calloc(1,sizeof(uint16_t));
uint16_t *additionalNonMBSFNSubframes = calloc(1,sizeof(uint16_t));
if( spare == NULL || additionalNonMBSFNSubframes == NULL ) abort();
switch (N_RB_DL) {
case 6:
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n6;
break;
case 15:
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n15;
break;
case 25:
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n25;
break;
case 50:
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n50;
break;
case 75:
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n75;
break;
case 100:
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n100;
break;
default:
AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
}
LOG_I(RRC,"[MIB] systemBandwidth %x, additional non MBMS subframes %x, sfn %x\n",
(uint32_t)mib_fembms->message.dl_Bandwidth_MBMS_r14,
(uint32_t)additionalNonMBSFN,
(uint32_t)sfn);
mib_fembms->message.systemFrameNumber_r14.buf = &sfn;
mib_fembms->message.systemFrameNumber_r14.size = 1;
mib_fembms->message.systemFrameNumber_r14.bits_unused=0;
mib_fembms->message.spare.buf = (uint8_t *)spare;
//#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
mib_fembms->message.spare.size = 2;
mib_fembms->message.spare.bits_unused = 6; // This makes a spare of 10 bits
//#else
//mib->message.spare.size = 1;
//mib->message.spare.bits_unused = 3; // This makes a spare of 5 bits
//mib->message.schedulingInfoSIB1_BR_r13 = 0; // turn off eMTC
//#endif
//TODO additionalNonBMSFNSubframes-r14 INTEGER (0..3) ?
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
//}
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_MBMS,
NULL,
(void *)mib_fembms,
carrier->MIB_FeMBMS,
24);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
if (enc_rval.encoded==-1) {
return(-1);
}
return((enc_rval.encoded+7)/8);
}
#endif
uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
@@ -317,6 +406,221 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
return((enc_rval.encoded+7)/8);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
int Mod_id,int CC_id
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
) {
// SystemInformation_t systemInformation;
#if defined(ENABLE_ITTI)
int num_plmn = configuration->num_plmn;
#else
int num_plmn = 1;
#endif
LTE_PLMN_IdentityInfo_t PLMN_identity_info[num_plmn];
LTE_MCC_MNC_Digit_t dummy_mcc[num_plmn][3], dummy_mnc[num_plmn][3];
asn_enc_rval_t enc_rval;
LTE_SchedulingInfo_MBMS_r14_t schedulingInfo;
LTE_SIB_Type_t sib_type;
uint8_t *buffer = carrier->SIB1_MBMS;
LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message = &carrier->siblock1_MBMS;
LTE_SystemInformationBlockType1_MBMS_r14_t **sib1_MBMS = &carrier->sib1_MBMS;
int i;
//LTE_NonMBSFN_SubframeConfig_r14 nonMBSFN_SubframeConfig_r14;
struct LTE_MBSFN_AreaInfo_r9 *MBSFN_Area1/*, *MBSFN_Area2*/;
struct LTE_NonMBSFN_SubframeConfig_r14 nonMBSFN_SubframeConfig_r14;
memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_MBMS_t));
bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_MBMS_r14_PR_c1;
bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_MBMS_r14__c1_PR_systemInformationBlockType1_MBMS_r14;
// memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t));
*sib1_MBMS = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_MBMS_r14;
memset(PLMN_identity_info,0,num_plmn * sizeof(LTE_PLMN_IdentityInfo_t));
memset(&schedulingInfo,0,sizeof(LTE_SchedulingInfo_MBMS_r14_t));
memset(&sib_type,0,sizeof(LTE_SIB_Type_t));
memset(&nonMBSFN_SubframeConfig_r14,0,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
/* as per TS 36.311, up to 6 PLMN_identity_info are allowed in list -> add one by one */
for (i = 0; i < configuration->num_plmn; ++i) {
PLMN_identity_info[i].plmn_Identity.mcc = CALLOC(1,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc));
memset(PLMN_identity_info[i].plmn_Identity.mcc,0,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc));
asn_set_empty(&PLMN_identity_info[i].plmn_Identity.mcc->list);//.size=0;
#if defined(ENABLE_ITTI)
dummy_mcc[i][0] = (configuration->mcc[i] / 100) % 10;
dummy_mcc[i][1] = (configuration->mcc[i] / 10) % 10;
dummy_mcc[i][2] = (configuration->mcc[i] / 1) % 10;
#else
dummy_mcc[i][0] = 0;
dummy_mcc[i][1] = 0;
dummy_mcc[i][2] = 1;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][0]);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][1]);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][2]);
PLMN_identity_info[i].plmn_Identity.mnc.list.size=0;
PLMN_identity_info[i].plmn_Identity.mnc.list.count=0;
#if defined(ENABLE_ITTI)
if (configuration->mnc[i] >= 100) {
dummy_mnc[i][0] = (configuration->mnc[i] / 100) % 10;
dummy_mnc[i][1] = (configuration->mnc[i] / 10) % 10;
dummy_mnc[i][2] = (configuration->mnc[i] / 1) % 10;
} else {
if (configuration->mnc_digit_length[i] == 2) {
dummy_mnc[i][0] = (configuration->mnc[i] / 10) % 10;
dummy_mnc[i][1] = (configuration->mnc[i] / 1) % 10;
dummy_mnc[i][2] = 0xf;
} else {
dummy_mnc[i][0] = (configuration->mnc[i] / 100) % 100;
dummy_mnc[i][1] = (configuration->mnc[i] / 10) % 10;
dummy_mnc[i][2] = (configuration->mnc[i] / 1) % 10;
}
}
#else
dummy_mnc[i][0] = 0;
dummy_mnc[i][1] = 1;
dummy_mnc[i][2] = 0xf;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][0]);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][1]);
if (dummy_mnc[i][2] != 0xf) {
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][2]);
}
//assign_enum(&PLMN_identity_info.cellReservedForOperatorUse,PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved);
PLMN_identity_info[i].cellReservedForOperatorUse=LTE_PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
ASN_SEQUENCE_ADD(&(*sib1_MBMS)->cellAccessRelatedInfo_r14.plmn_IdentityList_r14.list,&PLMN_identity_info[i]);
}
// 16 bits
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf = MALLOC(2);
#if defined(ENABLE_ITTI)
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[0] = (configuration->tac >> 8) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[1] = (configuration->tac >> 0) & 0xff;
#else
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[0] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[1] = 0x01;
#endif
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.size=2;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.bits_unused=0;
// 28 bits
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf = MALLOC(8);
#if defined(ENABLE_ITTI)
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[0] = (configuration->cell_identity >> 20) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[1] = (configuration->cell_identity >> 12) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[2] = (configuration->cell_identity >> 4) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[3] = (configuration->cell_identity << 4) & 0xf0;
#else
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[0] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[1] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[2] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[3] = 0x10;
#endif
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.size=4;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.bits_unused=4;
(*sib1_MBMS)->freqBandIndicator_r14 =
#if defined(ENABLE_ITTI)
configuration->eutra_band[CC_id];
#else
7;
#endif
schedulingInfo.si_Periodicity_r14=LTE_SchedulingInfo__si_Periodicity_rf16;
sib_type=LTE_SIB_Type_MBMS_r14_sibType13_v920;
ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo_r14.list,&sib_type);
ASN_SEQUENCE_ADD(&(*sib1_MBMS)->schedulingInfoList_MBMS_r14.list,&schedulingInfo);
(*sib1_MBMS)->si_WindowLength_r14=LTE_SystemInformationBlockType1_MBMS_r14__si_WindowLength_r14_ms20;
(*sib1_MBMS)->systemInfoValueTag_r14=0;
// (*sib1).nonCriticalExtension = calloc(1,sizeof(*(*sib1).nonCriticalExtension));
//sib13 optional
if (1)
{
(*sib1_MBMS)->systemInformationBlockType13_r14 = CALLOC(1,sizeof(struct LTE_SystemInformationBlockType13_r9));
memset((*sib1_MBMS)->systemInformationBlockType13_r14,0,sizeof(struct LTE_SystemInformationBlockType13_r9));
((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationRepetitionCoeff_r9= LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationOffset_r9= 0;
((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationSF_Index_r9= 1;
//((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9= CALLOC(1,sizeof(LTE_MBSFN_AreaInfoList_r9_t));
//memset(((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9,0,sizeof(LTE_MBSFN_AreaInfoList_r9_t));
LTE_MBSFN_AreaInfoList_r9_t * MBSFNArea_list= &((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9;
// MBSFN-AreaInfoList
memset(MBSFNArea_list,0,sizeof(*MBSFNArea_list));
// MBSFN Area 1
MBSFN_Area1= CALLOC(1, sizeof(*MBSFN_Area1));
MBSFN_Area1->mbsfn_AreaId_r9= 1;
MBSFN_Area1->non_MBSFNregionLength= LTE_MBSFN_AreaInfo_r9__non_MBSFNregionLength_s2;
MBSFN_Area1->notificationIndicator_r9= 0;
MBSFN_Area1->mcch_Config_r9.mcch_RepetitionPeriod_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_RepetitionPeriod_r9_rf32;
MBSFN_Area1->mcch_Config_r9.mcch_Offset_r9= 1; // in accordance with mbsfn subframe configuration in sib2
MBSFN_Area1->mcch_Config_r9.mcch_ModificationPeriod_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_ModificationPeriod_r9_rf512;
// Subframe Allocation Info
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf= MALLOC(1);
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=0x20<<2; // FDD: SF1
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__signallingMCS_r9_n7;
(MBSFN_Area1)->ext1 = CALLOC (1, sizeof(*(MBSFN_Area1)->ext1));
memset((MBSFN_Area1)->ext1,0,sizeof(*(MBSFN_Area1)->ext1));
MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14 = CALLOC(1,sizeof(*( MBSFN_Area1->ext1)->subcarrierSpacingMBMS_r14));
memset(MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14,0,sizeof(*((MBSFN_Area1)->ext1)->subcarrierSpacingMBMS_r14));
*(MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14) = LTE_MBSFN_AreaInfo_r9__ext1__subcarrierSpacingMBMS_r14_khz_1dot25;
ASN_SEQUENCE_ADD(&MBSFNArea_list->list,MBSFN_Area1);
}
//nonMBSFN_SubframeConfig_r14 optional
if(1){
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14 = CALLOC(1,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
memset((*sib1_MBMS)->nonMBSFN_SubframeConfig_r14,0,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14 = LTE_NonMBSFN_SubframeConfig_r14__radioFrameAllocationPeriod_r14_rf8;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14 = 0;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf = MALLOC(2);
//100000001 byte(0)=10000000 byte(1)=xxxxxxx1
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[0] = 0x80<<0;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[1] = 0x1<<7;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.size = 2;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.bits_unused = 7;
}
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
//}
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
NULL,
(void *)bcch_message,
buffer,
100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(RRC,"[eNB] SystemInformationBlockType1_MBMS Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
if (enc_rval.encoded==-1) {
return(-1);
}
return((enc_rval.encoded+7)/8);
}
#endif
//-----------------------------------------------------------------------------
/*
* Generate the configuration structure for CDRX feature
+20
View File
@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
#endif
);
/**
<<<<<<< HEAD
\brief Generate configuration for MIB (eNB).
@param carrier pointer to Carrier information
@param N_RB_DL Number of downlink PRBs
@param additional Non MBSFN Subframes parameter
@param frame radio frame number
@return size of encoded bit stream in bytes*/
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFNSubframes, uint32_t frame);
/**
\brief Generate configuration structure for DRX_Config
@param Mod_id Instance of eNB
@@ -97,6 +106,17 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id
#endif
);
/**
\brief Generate configuration for SIB1 MBMS (eNB).
@param carrier pointer to Carrier information
@param Mod_id Instance of eNB
@param Component carrier Component carrier to configure
@param configuration Pointer Configuration Request structure
@return size of encoded bit stream in bytes*/
uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcConfigurationReq *configuration
);
/**
\brief Generate a default configuration for SIB2/SIB3 in one System Information PDU (eNB).
+876 -11
View File
File diff suppressed because it is too large Load Diff
+42
View File
@@ -404,13 +404,25 @@ typedef struct UE_RRC_INFO_s {
uint8_t SIB1systemInfoValueTag;
uint32_t SIStatus;
uint32_t SIcnt;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t SIB1systemInfoValueTag_MBMS;
uint32_t SIStatus_MBMS;
uint32_t SIcnt_MBMS;
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
#endif
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t SIwindowsize_MBMS; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
#endif
uint8_t handoverTarget;
HO_STATE_t ho_state;
uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint16_t SIperiod_MBMS; //!< Corresponds to the SIB1-MBMS si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120 TODO
#endif
unsigned short UE_index;
uint32_t T300_active;
uint32_t T300_cnt;
@@ -656,6 +668,10 @@ typedef struct {
uint8_t sizeof_SIB1_BR;
uint8_t *SIB23_BR;
uint8_t sizeof_SIB23_BR;
uint8_t *MIB_FeMBMS;
uint8_t sizeof_MIB_FeMBMS;
uint8_t *SIB1_MBMS;
uint8_t sizeof_SIB1_MBMS;
#endif
int physCellId;
int Ncp;
@@ -673,12 +689,20 @@ typedef struct {
LTE_BCCH_DL_SCH_Message_t systemInformation;
LTE_BCCH_DL_SCH_Message_t systemInformation_BR;
// SystemInformation_t systemInformation;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_BCCH_BCH_Message_MBMS_t mib_fembms;
LTE_BCCH_DL_SCH_Message_MBMS_t siblock1_MBMS;
LTE_BCCH_DL_SCH_Message_MBMS_t systemInformation_MBMS;
#endif
LTE_SystemInformationBlockType1_t *sib1;
LTE_SystemInformationBlockType2_t *sib2;
LTE_SystemInformationBlockType3_t *sib3;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformationBlockType1_t *sib1_BR;
LTE_SystemInformationBlockType2_t *sib2_BR;
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS;
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS;
uint8_t FeMBMS_flag;
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
LTE_SystemInformationBlockType13_r9_t *sib13;
@@ -774,8 +798,22 @@ typedef struct UE_RRC_INST_s {
uint8_t sizeof_SI[NB_CNX_UE];
uint8_t SIB1Status[NB_CNX_UE];
uint8_t SIStatus[NB_CNX_UE];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t *SIB1_MBMS[NB_CNX_UE];
uint8_t sizeof_SIB1_MBMS[NB_CNX_UE];
uint8_t *SI_MBMS[NB_CNX_UE];
uint8_t sizeof_SI_MBMS[NB_CNX_UE];
uint8_t SIB1Status_MBMS[NB_CNX_UE];
uint8_t SIStatus_MBMS[NB_CNX_UE];
#endif
LTE_SystemInformationBlockType1_t *sib1[NB_CNX_UE];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS[NB_CNX_UE];
#endif
LTE_SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformation_MBMS_r14_t *si_MBMS[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
#endif
LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE];
LTE_SystemInformationBlockType4_t *sib4[NB_CNX_UE];
@@ -817,6 +855,10 @@ typedef struct UE_RRC_INST_s {
LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS[NB_CNX_UE];
uint8_t FeMBMS_flag;
#endif
#ifdef CBA
uint8_t num_active_cba_groups;
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
+314 -12
View File
@@ -62,6 +62,12 @@
#include "LTE_SL-CommConfig-r12.h"
#include "LTE_PeriodicBSR-Timer-r12.h"
#include "LTE_RetxBSR-Timer-r12.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_BCCH-BCH-Message-MBMS.h"
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "x2ap_eNB.h"
@@ -142,6 +148,100 @@ init_SI(
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL;
#endif
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE){
LOG_I(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
(int)configuration->N_RB_DL[CC_id]);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
do_MIB_FeMBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
#ifdef ENABLE_ITTI
configuration->N_RB_DL[CC_id],
0 //additionalNonMBSFN
#else
50,0
#endif
,0);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
#if defined(ENABLE_ITTI)
, configuration
#endif
);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB1-MBMS\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)
);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS freqBandIndicator_r14 %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->freqBandIndicator_r14
);
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->schedulingInfoList_MBMS_r14.list.count; i++) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS contents for Scheduling Info List %d/%d(partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->schedulingInfoList_MBMS_r14.list.count);
}
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN subframe allocation (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)
);
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.count; i++) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN sync area %d/%d (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.count);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Repetition Period: %ld (just index number, not real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Offset: %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Modification Period: %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_ModificationPeriod_r9);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Signalling MCS: %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.signallingMCS_r9);
//LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13 sf_AllocInfo is = %x\n",
// PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
// RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.sf_AllocInfo_r9.buf);
if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS Subcarrier Spacing MBMS: %s\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
(*RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1->subcarrierSpacingMBMS_r14 == LTE_MBSFN_AreaInfo_r9__ext1__subcarrierSpacingMBMS_r14_khz_1dot25 ? "khz_1dot25": "khz_7dot5"));
}
}
if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationPeriod-r14 %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14
);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationOffset-r14 %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14
);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config subframeAllocation-r14 is = %s\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf);
}
//AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
}
#endif
eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id];
rrc_eNB_carrier_data_t *carrier=&rrc->carrier[CC_id];
@@ -496,9 +596,17 @@ init_SI(
,
sib1_v13ext
#endif
);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
}
/* set flag to indicate that cell information is configured. This is required
* in DU to trigger F1AP_SETUP procedure */
pthread_mutex_lock(&rrc->cell_info_mutex);
@@ -587,7 +695,16 @@ init_MCCH(
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif
);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
}
//LOG_I(RRC,"DUY: lcid after rrc_mac_config_req is %02d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9);
}
@@ -1378,6 +1495,15 @@ rrc_eNB_generate_RRCConnectionReestablishment(
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,(LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
break;
@@ -4931,10 +5057,149 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
// assign_enum(&physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax = SchedulingRequestConfig__setup__dsr_TransMax_n4;
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax =
LTE_SchedulingRequestConfig__setup__dsr_TransMax_n4;
//}
//else {
//LOG_E(RRC,"physical_config_dedicated not present in RRCConnectionReconfiguration. Not reconfiguring!\n");
//}
LOG_D(RRC,
"handover_config [FRAME %05d][RRC_eNB][MOD %02d][][--- MAC_CONFIG_REQ (SRB1 UE %x) --->][MAC_eNB][MOD %02d][]\n",
ctxt_pP->frame, ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ctxt_pP->module_id);
rrc_mac_config_req_eNB(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
0,0,0,0,0,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
0,
#endif
ue_context_pP->ue_context.rnti,
(LTE_BCCH_BCH_Message_t *) NULL,
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
#endif
ue_context_pP->ue_context.physicalConfigDedicated,
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
(LTE_SCellToAddMod_r10_t *)NULL,
//(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
(LTE_MeasObjectToAddMod_t **) NULL,
ue_context_pP->ue_context.mac_MainConfig,
1,
NULL,//SRB1_logicalChannelConfig,
ue_context_pP->ue_context.measGapConfig,
(LTE_TDD_Config_t *) NULL,
(LTE_MobilityControlInfo_t *) NULL,
(LTE_SchedulingInfoList_t *) NULL,
0,
NULL,
NULL,
(LTE_MBSFN_SubframeConfigList_t *) NULL
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
, 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
// Configure target eNB SRB2
/// SRB2
SRB2_config = CALLOC(1, sizeof(*SRB2_config));
SRB_configList2 = CALLOC(1, sizeof(*SRB_configList2));
memset(SRB_configList2, 0, sizeof(*SRB_configList2));
SRB2_config->srb_Identity = 2;
SRB2_rlc_config = CALLOC(1, sizeof(*SRB2_rlc_config));
SRB2_config->rlc_Config = SRB2_rlc_config;
SRB2_rlc_config->present = LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue;
SRB2_rlc_config->choice.explicitValue.present = LTE_RLC_Config_PR_am;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms15;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = LTE_PollPDU_p8;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = LTE_PollByte_kB1000;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t32;
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms10;
SRB2_lchan_config = CALLOC(1, sizeof(*SRB2_lchan_config));
SRB2_config->logicalChannelConfig = SRB2_lchan_config;
SRB2_lchan_config->present = LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
SRB2_ul_SpecificParameters = CALLOC(1, sizeof(*SRB2_ul_SpecificParameters));
SRB2_ul_SpecificParameters->priority = 1;
SRB2_ul_SpecificParameters->prioritisedBitRate =
LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
SRB2_ul_SpecificParameters->bucketSizeDuration =
LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
// LCG for CCCH and DCCH is 0 as defined in 36331
logicalchannelgroup = CALLOC(1, sizeof(long));
*logicalchannelgroup = 0;
SRB2_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup;
SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters = SRB2_ul_SpecificParameters;
ASN_SEQUENCE_ADD(&SRB_configList->list, SRB2_config);
ASN_SEQUENCE_ADD(&(*SRB_configList2)->list, SRB2_config);
// Configure target eNB DRB
DRB_configList2 = CALLOC(1, sizeof(*DRB_configList2));
/// DRB
DRB_config = CALLOC(1, sizeof(*DRB_config));
//DRB_config->drb_Identity = (LTE_DRB_Identity_t) 1; //allowed values 1..32
// NN: this is the 1st DRB for this ue, so set it to 1
DRB_config->drb_Identity = (LTE_DRB_Identity_t) 1; // (ue_mod_idP+1); //allowed values 1..32
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
*(DRB_config->logicalChannelIdentity) = (long)3;
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
DRB_config->rlc_Config = DRB_rlc_config;
DRB_rlc_config->present = LTE_RLC_Config_PR_um_Bi_Directional;
DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = LTE_T_Reordering_ms35;
DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
DRB_config->pdcp_Config = DRB_pdcp_config;
DRB_pdcp_config->discardTimer = NULL;
DRB_pdcp_config->rlc_AM = NULL;
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
PDCP_rlc_UM->pdcp_SN_Size = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
DRB_pdcp_config->headerCompression.present = LTE_PDCP_Config__headerCompression_PR_notUsed;
DRB_lchan_config = CALLOC(1, sizeof(*DRB_lchan_config));
DRB_config->logicalChannelConfig = DRB_lchan_config;
DRB_ul_SpecificParameters = CALLOC(1, sizeof(*DRB_ul_SpecificParameters));
DRB_lchan_config->ul_SpecificParameters = DRB_ul_SpecificParameters;
DRB_ul_SpecificParameters->priority = 2; // lower priority than srb1, srb2
DRB_ul_SpecificParameters->prioritisedBitRate =
LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
DRB_ul_SpecificParameters->bucketSizeDuration =
LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
// LCG for DTCH can take the value from 1 to 3 as defined in 36331: normally controlled by upper layers (like RRM)
logicalchannelgroup_drb = CALLOC(1, sizeof(long));
*logicalchannelgroup_drb = 1;
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
ASN_SEQUENCE_ADD(&(*DRB_configList2)->list, DRB_config);
mac_MainConfig = CALLOC(1, sizeof(*mac_MainConfig));
ue_context_pP->ue_context.mac_MainConfig = mac_MainConfig;
mac_MainConfig->ul_SCH_Config = CALLOC(1, sizeof(*mac_MainConfig->ul_SCH_Config));
maxHARQ_Tx = CALLOC(1, sizeof(long));
*maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
periodicBSR_Timer = CALLOC(1, sizeof(long));
*periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64;
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320;
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
mac_MainConfig->drx_Config = NULL;
mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
*sr_ProhibitTimer_r9 = 0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR
mac_MainConfig->ext1 = CALLOC(1, sizeof(struct LTE_MAC_MainConfig__ext1));
mac_MainConfig->ext1->sr_ProhibitTimer_r9 = sr_ProhibitTimer_r9;
//sps_RA_ConfigList_rlola = NULL;
#endif
// Measurement ID list
MeasId_list = CALLOC(1, sizeof(*MeasId_list));
memset((void *)MeasId_list, 0, sizeof(*MeasId_list));
@@ -5461,6 +5726,15 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
//#if 0
@@ -5688,9 +5962,18 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
#endif
);
}
} else { // end if (ue_context_pP->ue_context.DRB_active[drb_id] == 0) // remove LCHAN from MAC/PHY
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
}
} else { // remove LCHAN from MAC/PHY
if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) {
// DRB has just been removed so remove RLC + PDCP for DRB
/* rrc_pdcp_config_req (ctxt_pP->module_id, frameP, 1, CONFIG_ACTION_REMOVE,
@@ -5752,6 +6035,15 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
}
@@ -5920,8 +6212,18 @@ rrc_eNB_generate_RRCConnectionSetup(
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif
);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
#endif
);
break;
}
}
}
+10
View File
@@ -542,6 +542,16 @@ int decode_BCCH_DLSCH_Message(
const uint8_t rsrq,
const uint8_t rsrp );
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int decode_BCCH_MBMS_DLSCH_Message(
const protocol_ctxt_t* const ctxt_pP,
const uint8_t eNB_index,
uint8_t* const Sdu,
const uint8_t Sdu_len,
const uint8_t rsrq,
const uint8_t rsrp );
#endif
int decode_PCCH_DLSCH_Message(
const protocol_ctxt_t *const ctxt_pP,
const uint8_t eNB_index,