Commit 8f68d596 authored by Raphael Defosseux's avatar Raphael Defosseux

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

parents 56eb818d 8b4c23cf
...@@ -290,6 +290,8 @@ const char* eurecomFunctionsNames[] = { ...@@ -290,6 +290,8 @@ const char* eurecomFunctionsNames[] = {
/* PHY signals */ /* PHY signals */
"ue_synch", "ue_synch",
"ue_slot_fep", "ue_slot_fep",
"ue_slot_fep_mbsfn",
"ue_slot_fep_mbsfn_khz_1dot25",
"ue_rrc_measurements", "ue_rrc_measurements",
"ue_gain_control", "ue_gain_control",
"ue_adjust_synch", "ue_adjust_synch",
...@@ -356,9 +358,12 @@ const char* eurecomFunctionsNames[] = { ...@@ -356,9 +358,12 @@ const char* eurecomFunctionsNames[] = {
"dlsch_decoding5", "dlsch_decoding5",
"dlsch_decoding6", "dlsch_decoding6",
"dlsch_decoding7", "dlsch_decoding7",
"dlsch_pmch_decoding",
"rx_pdcch", "rx_pdcch",
"dci_decoding", "dci_decoding",
"rx_phich", "rx_phich",
"rx_pmch",
"rx_pmch_khz_1dot25",
"pdsch_procedures", "pdsch_procedures",
"pdsch_procedures_si", "pdsch_procedures_si",
"pdsch_procedures_p", "pdsch_procedures_p",
......
...@@ -268,6 +268,8 @@ typedef enum { ...@@ -268,6 +268,8 @@ typedef enum {
/* PHY signals */ /* PHY signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN_KHZ_1DOT25,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH,
...@@ -334,9 +336,12 @@ typedef enum { ...@@ -334,9 +336,12 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5, VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6, VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7, VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_DECODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH, VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH,
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH_KHZ_1DOT25,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P,
......
...@@ -2138,6 +2138,16 @@ ID = VCD_FUNCTION_UE_SLOT_FEP ...@@ -2138,6 +2138,16 @@ ID = VCD_FUNCTION_UE_SLOT_FEP
GROUP = ALL:VCD:UE:VCD_FUNCTION GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = ue_slot_fep VCD_NAME = ue_slot_fep
ID = VCD_FUNCTION_UE_SLOT_FEP_MBSFN
DESC = VCD function UE_SLOT_FEP_MBSFN
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = ue_slot_fep_mbsfn
ID = VCD_FUNCTION_UE_SLOT_FEP_MBSFN_KHZ_1DOT25
DESC = VCD function UE_SLOT_FEP_MBSFN_KHZ_1DOT25
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = ue_slot_fep_mbsfn_khz_1dot25
ID = VCD_FUNCTION_UE_RRC_MEASUREMENTS ID = VCD_FUNCTION_UE_RRC_MEASUREMENTS
DESC = VCD function UE_RRC_MEASUREMENTS DESC = VCD function UE_RRC_MEASUREMENTS
GROUP = ALL:VCD:UE:VCD_FUNCTION GROUP = ALL:VCD:UE:VCD_FUNCTION
...@@ -2468,6 +2478,11 @@ ID = VCD_FUNCTION_DLSCH_DECODING7 ...@@ -2468,6 +2478,11 @@ ID = VCD_FUNCTION_DLSCH_DECODING7
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = dlsch_decoding7 VCD_NAME = dlsch_decoding7
ID = VCD_FUNCTION_DLSCH_PMCH_DECODING
DESC = VCD function DLSCH_PMCH_DECODING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = dlsch_pmch_decoding
ID = VCD_FUNCTION_RX_PDCCH ID = VCD_FUNCTION_RX_PDCCH
DESC = VCD function RX_PDCCH DESC = VCD function RX_PDCCH
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
...@@ -2483,6 +2498,16 @@ ID = VCD_FUNCTION_RX_PHICH ...@@ -2483,6 +2498,16 @@ ID = VCD_FUNCTION_RX_PHICH
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = rx_phich VCD_NAME = rx_phich
ID = VCD_FUNCTION_RX_PMCH
DESC = VCD function RX_PMCH
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = rx_pmch
ID = VCD_FUNCTION_RX_PMCH_KHZ_1DOT25
DESC = VCD function RX_PMCH_KHZ_1DOT25
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = rx_pmch_khz_1dot25
ID = VCD_FUNCTION_PDSCH_PROC ID = VCD_FUNCTION_PDSCH_PROC
DESC = VCD function PDSCH_PROC DESC = VCD function PDSCH_PROC
GROUP = ALL:VCD:UE:VCD_FUNCTION GROUP = ALL:VCD:UE:VCD_FUNCTION
......
...@@ -702,6 +702,18 @@ typedef struct { ...@@ -702,6 +702,18 @@ typedef struct {
#define NFAPI_PUCCH_CONFIG_N_AN_CS_TAG 0x003E #define NFAPI_PUCCH_CONFIG_N_AN_CS_TAG 0x003E
#define NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG 0x003F #define NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG 0x003F
typedef struct {
nfapi_uint8_tlv_t radioframe_allocation_period;
nfapi_uint8_tlv_t radioframe_allocation_offset;
nfapi_uint8_tlv_t non_mbsfn_config_flag;
nfapi_uint16_tlv_t non_mbsfn_subframeconfig;
} nfapi_fembms_config_t;
#define NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG 0x0042
#define NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG 0x0043
#define NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG 0x0044
#define NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG 0x0045
typedef struct { typedef struct {
nfapi_uint16_tlv_t bandwidth_configuration; nfapi_uint16_tlv_t bandwidth_configuration;
nfapi_uint16_tlv_t max_up_pts; nfapi_uint16_tlv_t max_up_pts;
...@@ -1097,6 +1109,7 @@ typedef struct { ...@@ -1097,6 +1109,7 @@ typedef struct {
nfapi_prach_config_t prach_config; nfapi_prach_config_t prach_config;
nfapi_pusch_config_t pusch_config; nfapi_pusch_config_t pusch_config;
nfapi_pucch_config_t pucch_config; nfapi_pucch_config_t pucch_config;
nfapi_fembms_config_t fembms_config;
nfapi_srs_config_t srs_config; nfapi_srs_config_t srs_config;
nfapi_uplink_reference_signal_config_t uplink_reference_signal_config; nfapi_uplink_reference_signal_config_t uplink_reference_signal_config;
nfapi_tdd_frame_structure_t tdd_frame_structure_config; nfapi_tdd_frame_structure_t tdd_frame_structure_config;
...@@ -1118,6 +1131,7 @@ typedef struct { ...@@ -1118,6 +1131,7 @@ typedef struct {
nfapi_prach_config_t prach_config; nfapi_prach_config_t prach_config;
nfapi_pusch_config_t pusch_config; nfapi_pusch_config_t pusch_config;
nfapi_pucch_config_t pucch_config; nfapi_pucch_config_t pucch_config;
nfapi_fembms_config_t fembms_config;
nfapi_srs_config_t srs_config; nfapi_srs_config_t srs_config;
nfapi_uplink_reference_signal_config_t uplink_reference_signal_config; nfapi_uplink_reference_signal_config_t uplink_reference_signal_config;
nfapi_laa_config_t laa_config; nfapi_laa_config_t laa_config;
......
...@@ -461,6 +461,12 @@ static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_ ...@@ -461,6 +461,12 @@ static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_
pack_tlv(NFAPI_PUCCH_CONFIG_N_AN_CS_TAG, &(pNfapiMsg->pucch_config.n_an_cs), ppWritePackedMsg, end, &pack_uint16_tlv_value) && pack_tlv(NFAPI_PUCCH_CONFIG_N_AN_CS_TAG, &(pNfapiMsg->pucch_config.n_an_cs), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG, &(pNfapiMsg->pucch_config.n1_pucch_an), ppWritePackedMsg, end, &pack_uint16_tlv_value) && pack_tlv(NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG, &(pNfapiMsg->pucch_config.n1_pucch_an), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG, &(pNfapiMsg->fembms_config.radioframe_allocation_period), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
pack_tlv(NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG, &(pNfapiMsg->fembms_config.radioframe_allocation_offset), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
pack_tlv(NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG, &(pNfapiMsg->fembms_config.non_mbsfn_config_flag), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
pack_tlv(NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG, &(pNfapiMsg->fembms_config.non_mbsfn_subframeconfig), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_SRS_CONFIG_BANDWIDTH_CONFIGURATION_TAG, &(pNfapiMsg->srs_config.bandwidth_configuration), ppWritePackedMsg, end, &pack_uint16_tlv_value) && pack_tlv(NFAPI_SRS_CONFIG_BANDWIDTH_CONFIGURATION_TAG, &(pNfapiMsg->srs_config.bandwidth_configuration), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_SRS_CONFIG_MAX_UP_PTS_TAG, &(pNfapiMsg->srs_config.max_up_pts), ppWritePackedMsg, end, &pack_uint16_tlv_value) && pack_tlv(NFAPI_SRS_CONFIG_MAX_UP_PTS_TAG, &(pNfapiMsg->srs_config.max_up_pts), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_SRS_CONFIG_SRS_SUBFRAME_CONFIGURATION_TAG, &(pNfapiMsg->srs_config.srs_subframe_configuration), ppWritePackedMsg, end, &pack_uint16_tlv_value) && pack_tlv(NFAPI_SRS_CONFIG_SRS_SUBFRAME_CONFIGURATION_TAG, &(pNfapiMsg->srs_config.srs_subframe_configuration), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
......
...@@ -310,6 +310,12 @@ void phy_config_request(PHY_Config_t *phy_config) { ...@@ -310,6 +310,12 @@ void phy_config_request(PHY_Config_t *phy_config) {
fp->num_MBSFN_config = 0; fp->num_MBSFN_config = 0;
fp->NonMBSFN_config_flag =cfg->fembms_config.non_mbsfn_config_flag.value;
fp->NonMBSFN_config.non_mbsfn_SubframeConfig = cfg->fembms_config.non_mbsfn_subframeconfig.value;
fp->NonMBSFN_config.radioframeAllocationPeriod = cfg->fembms_config.radioframe_allocation_period.value;
fp->NonMBSFN_config.radioframeAllocationOffset = cfg->fembms_config.radioframe_allocation_offset.value;
LOG_D(PHY,"eNB %d/%d frame NonMBSFN configured: %d (%x) %d/%d\n",Mod_id,CC_id,fp->NonMBSFN_config_flag,fp->NonMBSFN_config.non_mbsfn_SubframeConfig,fp->NonMBSFN_config.radioframeAllocationPeriod,fp->NonMBSFN_config.radioframeAllocationOffset);
init_ncs_cell (fp, RC.eNB[Mod_id][CC_id]->ncs_cell); init_ncs_cell (fp, RC.eNB[Mod_id][CC_id]->ncs_cell);
...@@ -335,6 +341,10 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx, ...@@ -335,6 +341,10 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
} }
lte_gold_mbsfn (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table, fp->Nid_cell_mbsfn); lte_gold_mbsfn (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table, fp->Nid_cell_mbsfn);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
lte_gold_mbsfn_khz_1dot25 (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table, fp->Nid_cell_mbsfn);
#endif
} }
......
...@@ -165,8 +165,29 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A ...@@ -165,8 +165,29 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A
} }
lte_gold_mbsfn(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn); lte_gold_mbsfn(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
lte_gold_mbsfn_khz_1dot25(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table,fp->Nid_cell_mbsfn);
#endif
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
uint8_t eNB_id,
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig){
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
if (nonMBSFN_SubframeConfig != NULL) {
fp->NonMBSFN_config_flag = 0;
fp->NonMBSFN_config.radioframeAllocationPeriod=nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
fp->NonMBSFN_config.radioframeAllocationOffset=nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
fp->NonMBSFN_config.non_mbsfn_SubframeConfig=(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
}
}
#endif
/* /*
* Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover * Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover
...@@ -872,4 +893,4 @@ void init_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) { ...@@ -872,4 +893,4 @@ void init_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) {
ue->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; ue->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
ue->dlsch_MCH[0] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS_MBSFN,ue->frame_parms.N_RB_DL,0); ue->dlsch_MCH[0] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS_MBSFN,ue->frame_parms.N_RB_DL,0);
} }
\ No newline at end of file
...@@ -125,6 +125,12 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) { ...@@ -125,6 +125,12 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) {
frame_parms->nb_prefix_samples0>>=(2-log2_osf); frame_parms->nb_prefix_samples0>>=(2-log2_osf);
frame_parms->N_RBGS = 2; frame_parms->N_RBGS = 2;
frame_parms->N_RBG = 13; frame_parms->N_RBG = 13;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
frame_parms->ofdm_symbol_size_khz_1dot25 = 6144*osf;
frame_parms->first_carrier_offset_khz_1dot25 = frame_parms->ofdm_symbol_size_khz_1dot25 - 1800; //4344
frame_parms->nb_prefix_samples_khz_1dot25>>=(2-log2_osf);
frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
#endif
break; break;
case 15: case 15:
......
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "LTE_SCellToAddMod-r10.h" #include "LTE_SCellToAddMod-r10.h"
#endif #endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
/** @addtogroup _PHY_STRUCTURES_ /** @addtogroup _PHY_STRUCTURES_
* @{ * @{
*/ */
...@@ -147,7 +150,6 @@ void phy_config_sib1_ue(module_id_t Mod_id, ...@@ -147,7 +150,6 @@ void phy_config_sib1_ue(module_id_t Mod_id,
uint8_t SIwindowsize, uint8_t SIwindowsize,
uint16_t SIperiod); uint16_t SIperiod);
/*! /*!
\fn void phy_config_sib2_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index, \fn void phy_config_sib2_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon, RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
...@@ -258,6 +260,10 @@ void phy_config_sib13_ue(module_id_t Mod_id, ...@@ -258,6 +260,10 @@ void phy_config_sib13_ue(module_id_t Mod_id,
int CC_id,uint8_t CH_index,int mbsfn_Area_idx, int CC_id,uint8_t CH_index,int mbsfn_Area_idx,
long mbsfn_AreaId_r9); long mbsfn_AreaId_r9);
void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
uint8_t eNB_id,
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig);
/** /**
\brief Configure eNB MBSFN common parameters. \brief Configure eNB MBSFN common parameters.
\details Invoked upon transmission of SIB13 from eNB. \details Invoked upon transmission of SIB13 from eNB.
......
This diff is collapsed.
...@@ -19,11 +19,24 @@ ...@@ -19,11 +19,24 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file config_ue.c
* \brief This includes FeMBMS UE Channel Estimation Procedures for FeMBMS 1.25KHz Carrier Spacing
* \author Javier Morgade
* \date 2019
* \version 0.1
* \email: javier.morgade@ieee.org
* @ingroup _phy
*/
#include <string.h> #include <string.h>
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "lte_estimation.h" #include "lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_REFSIG/lte_refsig.h"
#include "filt96_32_khz_1dot25.h"
//#define DEBUG_CH //#define DEBUG_CH
int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
module_id_t eNB_id, module_id_t eNB_id,
...@@ -769,3 +782,180 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -769,3 +782,180 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
return(0); return(0);
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
module_id_t eNB_id,
uint8_t eNB_offset,
int subframe)
{
int pilot_khz_1dot25[600] __attribute__((aligned(16)));
unsigned char aarx/*,aa*/;
//unsigned int rb;
int16_t ch[2];
short *pil,*rxF,*dl_ch/*,*ch0,*ch1,*ch11,*chp,*ch_prev*/;
int ch_offset,symbol_offset;
int pilot_cnt;
int16_t *f,*f2,*fl,*f2l2,*fr,*f2r2/*,*f2_dc,*f_dc*/;
unsigned int k;
// unsigned int n;
// int i;
int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
ch_offset = 0;//(l*(ue->frame_parms.ofdm_symbol_size));
symbol_offset = 0;//ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
AssertFatal( ue->frame_parms.N_RB_DL==25,"OFDM symbol size %d not yet supported for FeMBMS\n",ue->frame_parms.N_RB_DL);
if( (subframe&0x1) == 0){
f=filt24_0_khz_1dot25;
f2=filt24_2_khz_1dot25;
fl=filt24_0_khz_1dot25;
f2l2=filt24_2_khz_1dot25;
fr=filt24_0r2_khz_1dot25;
f2r2=filt24_2r_khz_1dot25;
//f_dc=filt24_0_dcr_khz_1dot25;
//f2_dc=filt24_2_dcl_khz_1dot25;
}else{
f=filt24_0_khz_1dot25;
f2=filt24_2_khz_1dot25;
fl=filt24_0_khz_1dot25;
f2l2=filt24_2_khz_1dot25;
fr=filt24_0r2_khz_1dot25;
f2r2=filt24_2r_khz_1dot25;
//f_dc=filt24_0_dcr_khz_1dot25;
//f2_dc=filt24_2_dcl_khz_1dot25;
}
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
// generate pilot
lte_dl_mbsfn_khz_1dot25_rx(ue,
&pilot_khz_1dot25[0],
subframe);
pil = (short *)&pilot_khz_1dot25[0];
rxF = (short *)&rxdataF[aarx][((ue->frame_parms.first_carrier_offset_khz_1dot25))];
dl_ch = (short *)&dl_ch_estimates[aarx][ch_offset];
memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size_khz_1dot25));
if( (subframe&0x1) == 0){
rxF+=0;
k=0;
}else{
rxF+=6;//2*3;
k=3;
}
if(ue->frame_parms.N_RB_DL==25){
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(fl,
ch,
dl_ch,
24);
pil+=2; // Re Im
rxF+=12;
dl_ch+=8;
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(f2l2,
ch,
dl_ch,
24);
pil+=2; // Re Im
rxF+=12;
dl_ch+=16;
for(pilot_cnt=2;pilot_cnt<299;pilot_cnt+=2){
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(f,
ch,
dl_ch,
24);
pil+=2; // Re Im
rxF+=12;
dl_ch+=8;
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(f2,
ch,
dl_ch,
24);
pil+=2;
rxF+=12;
dl_ch+=16;
}
rxF = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))]; //Skip DC offset
for(pilot_cnt=0; pilot_cnt<297; pilot_cnt+=2){
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(f,
ch,
dl_ch,
24);
pil+=2;
rxF+=12;
dl_ch+=8;
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(f2,
ch,
dl_ch,
24);
pil+=2;
rxF+=12;
dl_ch+=16;
}
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(fr,
ch,
dl_ch,
24);
pil+=2; // Re Im
rxF+=12;
dl_ch+=8;
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(f2r2,
ch,
dl_ch,
24);
}
}
return(0);
}
#endif
...@@ -141,6 +141,11 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -141,6 +141,11 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *phy_vars_ue,
int subframe, int subframe,
unsigned char l); unsigned char l);
int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
module_id_t eNB_id,
uint8_t eNB_offset,
int subframe);
/*! /*!
\brief Frequency offset estimation for LTE \brief Frequency offset estimation for LTE
We estimate the frequency offset by calculating the phase difference between channel estimates for symbols carrying pilots (l==0 or l==3/4). We take a moving average of the phase difference. We estimate the frequency offset by calculating the phase difference between channel estimates for symbols carrying pilots (l==0 or l==3/4). We take a moving average of the phase difference.
......
...@@ -341,7 +341,6 @@ int lte_sync_time(int **rxdata, ///rx data in time domain ...@@ -341,7 +341,6 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
{ {
// perform a time domain correlation using the oversampled sync sequence // perform a time domain correlation using the oversampled sync sequence
unsigned int n, ar, s, peak_pos, peak_val, sync_source; unsigned int n, ar, s, peak_pos, peak_val, sync_source;
......
...@@ -131,3 +131,92 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *ue, ...@@ -131,3 +131,92 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *ue,
return(0); return(0);
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output,
short amp,
int subframe)
{
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0,a;
int32_t qpsk[4];
a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a;
((short *)&qpsk[0])[1] = a;
((short *)&qpsk[1])[0] = -a;
((short *)&qpsk[1])[1] = a;
((short *)&qpsk[2])[0] = a;
((short *)&qpsk[2])[1] = -a;
((short *)&qpsk[3])[0] = -a;
((short *)&qpsk[3])[1] = -a;
mprime = 3*(110 - eNB->frame_parms.N_RB_DL);
for (m=0; m<eNB->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
{
if ((subframe&0x1)==0) // n_sf mod 2 == 0: even
k = 6*m;
else
k = 6*m + 3;
k+=eNB->frame_parms.first_carrier_offset_khz_1dot25;
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
if (k >= eNB->frame_parms.ofdm_symbol_size_khz_1dot25) {
k++; // skip DC carrier
k-=eNB->frame_parms.ofdm_symbol_size_khz_1dot25;
}
output[k] = qpsk[(eNB->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
mprime++;
}
return(0);
}
int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
int *output,
int subframe)
{
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0;
unsigned int qpsk[4];
// This includes complex conjugate for channel estimation
((short *)&qpsk[0])[0] = ONE_OVER_SQRT2_Q15;
((short *)&qpsk[0])[1] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[1])[0] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[1])[1] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[2])[0] = ONE_OVER_SQRT2_Q15;
((short *)&qpsk[2])[1] = ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[0] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[1] = ONE_OVER_SQRT2_Q15;
mprime = 3*(110 - ue->frame_parms.N_RB_DL);
for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
{ mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(ue->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
mprime++;
k++;
}
return(0);
}
#endif // MAKE Rel14
...@@ -95,6 +95,34 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl ...@@ -95,6 +95,34 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150],uint16_t Nid_mbsfn){
unsigned char sfn;
unsigned int n,x1,x2;//,x1tmp,x2tmp;
for (sfn=0; sfn<10; sfn++) {
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + (7*(1+sfn))))<<9); //cinit
x1 = 1+ (1<<31);
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
for (n=1; n<50; n++) {
x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
}
for (n=0; n<150; n++) {
x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
lte_gold_mbsfn_khz_1dot25_table[sfn][n] = x1^x2;
}
}
}
#endif
#ifdef LTE_GOLD_MAIN #ifdef LTE_GOLD_MAIN
main() main()
{ {
......
...@@ -57,6 +57,8 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_ ...@@ -57,6 +57,8 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN); void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN);
void lte_gold_mbsfn_khz_1dot25 (LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_1khz_1dot25_table[10][150],uint16_t Nid_MBSFN);
/*! \brief This function generates the cell-specific reference signal sequence (36-211, Sec 6.10.1.1) /*! \brief This function generates the cell-specific reference signal sequence (36-211, Sec 6.10.1.1)
@param phy_vars_eNB Pointer to eNB variables @param phy_vars_eNB Pointer to eNB variables
...@@ -144,6 +146,10 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *phy_vars_ue, ...@@ -144,6 +146,10 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *phy_vars_ue,
int subframe, int subframe,
unsigned char l); unsigned char l);
int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
int *output,
int subframe);
......
...@@ -349,6 +349,43 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint ...@@ -349,6 +349,43 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
} }
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
{
//int G_adj;
/*if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
G_adj= adjust_G(frame_parms,rb_alloc,mod_order,subframe);
//printf("get_G subframe %d mod_order %d, nb_rb %d: rb_alloc %x,%x,%x,%x, G_adj %d\n",subframe,mod_order,nb_rb,rb_alloc[3],rb_alloc[2],rb_alloc[1],rb_alloc[0], G_adj);
if (frame_parms->Ncp==NORMAL) { // normal prefix
// PDDDPDD PDDDPDD - 13 PDSCH symbols, 10 full, 3 w/ pilots = 10*12 + 3*8
// PCDDPDD PDDDPDD - 12 PDSCH symbols, 9 full, 3 w/ pilots = 9*12 + 3*8
// PCCDPDD PDDDPDD - 11 PDSCH symbols, 8 full, 3 w/pilots = 8*12 + 3*8
if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1)
return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
else if(beamforming_mode==7)
return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj);
else //SISO
return(((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*10)) - G_adj);
} else {
// PDDPDD PDDPDD - 11 PDSCH symbols, 8 full, 3 w/ pilots = 8*12 + 3*8
// PCDPDD PDDPDD - 10 PDSCH symbols, 7 full, 3 w/ pilots = 7*12 + 3*8
// PCCPDD PDDPDD - 9 PDSCH symbols, 6 full, 3 w/pilots = 6*12 + 3*8
if (frame_parms->nb_antenna_ports_eNB!=1)
return((((int)nb_rb * mod_order * ((9-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
else if(beamforming_mode==7)
return(((int)nb_rb * mod_order * ((5-num_pdcch_symbols)*12 + 3*8 + 4*9)) - G_adj);
else //SISO
return(((int)nb_rb * mod_order * ((9-num_pdcch_symbols)*12 + 3*10)) - G_adj);
}
} else { // This is an MBSFN subframe
return((int)frame_parms->N_RB_DL * mod_order * 102);
}*/
return((int)frame_parms->N_RB_DL * mod_order * 120);
}
#endif
// following function requires dlsch_tbs_full.h // following function requires dlsch_tbs_full.h
#include "PHY/LTE_TRANSPORT/dlsch_tbs_full.h" #include "PHY/LTE_TRANSPORT/dlsch_tbs_full.h"
......
...@@ -33,7 +33,13 @@ ...@@ -33,7 +33,13 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
uint8_t get_mi(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) { uint8_t get_mi(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
{
// for FeMBMS
if(frame_parms->FeMBMS_active!=0){
return(0);
}
// for FDD // for FDD
if (frame_parms->frame_type == FDD) if (frame_parms->frame_type == FDD)
return 1; return 1;
......
...@@ -22,6 +22,88 @@ ...@@ -22,6 +22,88 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
/*! \file PHY/LTE_TRANSPORT/pmch_common.c
* \brief This includes routines for decoding the UE FeMBMS/PMCH physical/multicast/transport channel 3GPP TS 36.211 version 14.2.0 Release 14 Sections 6.5/6.10.2
* \author J. Morgade
* \date 2019
* \version 0.1
* \company Vicomtech
* \email: javier.morgade@ieee.org
* \note
* \warning
*/
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms){
uint32_t period;
if(frame_parms->NonMBSFN_config_flag ) {
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
switch (subframe) {
case 0:
return(1); //This should be CAS
break;
}
}
}
return (0);
}
int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
{
uint32_t period;
if(frame_parms->NonMBSFN_config_flag ) {
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
switch (subframe) {
case 1:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
return(1);
break;
case 2:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
return(1);
break;
case 3:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
return(1);
break;
case 4:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
return(1);
break;
case 5:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
return(1);
break;
case 6:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
return(1);
break;
case 7:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
return(1);
break;
case 8:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
return(1);
break;
case 9:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
return(1);
break;
}
} else { //Then regular MBSFN FeMBMS subframe
return(1);
}
}
return(0);
}
#endif
int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
{ {
......
...@@ -96,6 +96,8 @@ uint32_t conv_nprb(uint8_t ra_header,uint32_t rb_alloc,int N_RB_DL); ...@@ -96,6 +96,8 @@ uint32_t conv_nprb(uint8_t ra_header,uint32_t rb_alloc,int N_RB_DL);
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe, uint8_t beamforming_mode); int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe, uint8_t beamforming_mode);
int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe, uint8_t beamforming_mode);
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe); int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe);
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol); int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol);
...@@ -256,6 +258,27 @@ void init_prach_tables(int N_ZC); ...@@ -256,6 +258,27 @@ void init_prach_tables(int N_ZC);
*/ */
int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms); int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/*!
\brief Return the status of CAS in this frame/subframe
@param frame Frame index
@param subframe Subframe index
@param frame_parms Pointer to frame parameters
@returns 1 if subframe is for CAS
*/
int is_fembms_cas_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
/*!
\brief Return the status of MBSFN in this frame/subframe
@param frame Frame index
@param subframe Subframe index
@param frame_parms Pointer to frame parameters
@returns 1 if subframe is for MBSFN
*/
int is_fembms_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
#endif
/** \brief This routine expands a single (wideband) PMI to subband PMI bitmap similar to the one used in the UCI and in the dlsch_modulation routine /** \brief This routine expands a single (wideband) PMI to subband PMI bitmap similar to the one used in the UCI and in the dlsch_modulation routine
@param frame_parms Pointer to DL frame configuration parameters @param frame_parms Pointer to DL frame configuration parameters
......
...@@ -1930,7 +1930,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, ...@@ -1930,7 +1930,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
if (((L>1) && ((crc == si_rnti)|| if (((L>1) && ((crc == si_rnti)||
(crc == p_rnti)|| (crc == p_rnti)||
(crc == ra_rnti)))|| (crc == ra_rnti)/*||(crc == 0xfff9)*/))||
(crc == pdcch_vars[eNB_id]->crnti)) { (crc == pdcch_vars[eNB_id]->crnti)) {
dci_alloc[*dci_cnt].dci_length = sizeof_bits; dci_alloc[*dci_cnt].dci_length = sizeof_bits;
dci_alloc[*dci_cnt].rnti = crc; dci_alloc[*dci_cnt].rnti = crc;
...@@ -1965,7 +1965,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, ...@@ -1965,7 +1965,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
#endif #endif
} }
if (crc==si_rnti) { if (crc==si_rnti /*|| crc==0xfff9*/) {
dci_alloc[*dci_cnt].format = format_si; dci_alloc[*dci_cnt].format = format_si;
*dci_cnt = *dci_cnt+1; *dci_cnt = *dci_cnt+1;
} else if (crc==p_rnti) { } else if (crc==p_rnti) {
......
...@@ -120,26 +120,54 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) { ...@@ -120,26 +120,54 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
pbch_decoded = 0; pbch_decoded = 0;
for (frame_mod4=0; frame_mod4<4; frame_mod4++) { for (frame_mod4=0; frame_mod4<4; frame_mod4++) {
pbch_tx_ant = rx_pbch(&ue->common_vars, #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ue->FeMBMS_active != 2){
#endif
pbch_tx_ant = rx_pbch(&ue->common_vars,
ue->pbch_vars[0], ue->pbch_vars[0],
frame_parms, frame_parms,
0, 0,
SISO, SISO,
ue->high_speed_flag, ue->high_speed_flag,
frame_mod4); frame_mod4);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
}else{
pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
ue->pbch_vars[0],
frame_parms,
0,
SISO,
ue->high_speed_flag,
frame_mod4);
}
#endif
if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) { if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
pbch_decoded = 1; pbch_decoded = 1;
break; break;
} }
pbch_tx_ant = rx_pbch(&ue->common_vars, #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ue->FeMBMS_active != 2){
#endif
pbch_tx_ant = rx_pbch(&ue->common_vars,
ue->pbch_vars[0],
frame_parms,
0,
ALAMOUTI,
ue->high_speed_flag,
frame_mod4);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
}else{
pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
ue->pbch_vars[0], ue->pbch_vars[0],
frame_parms, frame_parms,
0, 0,
ALAMOUTI, ALAMOUTI,
ue->high_speed_flag, ue->high_speed_flag,
frame_mod4); frame_mod4);
}
#endif
if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) { if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
pbch_decoded = 1; pbch_decoded = 1;
...@@ -189,6 +217,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) { ...@@ -189,6 +217,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
break; break;
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if(ue->FeMBMS_active != 2) {
#endif
// now check for PHICH parameters // now check for PHICH parameters
frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((ue->pbch_vars[0]->decoded_output[2]>>4)&1); frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((ue->pbch_vars[0]->decoded_output[2]>>4)&1);
dummy = (ue->pbch_vars[0]->decoded_output[2]>>2)&3; dummy = (ue->pbch_vars[0]->decoded_output[2]>>2)&3;
...@@ -235,6 +266,26 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) { ...@@ -235,6 +266,26 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
frame_parms->N_RB_DL, frame_parms->N_RB_DL,
frame_parms->phich_config_common.phich_duration, frame_parms->phich_config_common.phich_duration,
phich_resource); //frame_parms->phich_config_common.phich_resource); phich_resource); //frame_parms->phich_config_common.phich_resource);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
}else{
for(int i=0; i<RX_NB_TH;i++)
{
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&31)<<1) + (ue->pbch_vars[0]->decoded_output[1]>>7))<<4;
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
}
LOG_D(PHY,"[UE%d] Initial sync: FeMBMS pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, AdditionalNonMBSFN_SF %d, frame_mod4 %d\n",
ue->Mod_id,
frame_parms->nb_antenna_ports_eNB,
pbch_tx_ant,
ue->proc.proc_rxtx[0].frame_rx,
frame_parms->N_RB_DL,
0,
frame_mod4
);
}
#endif
return(0); return(0);
} else { } else {
return(-1); return(-1);
...@@ -301,8 +352,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) { ...@@ -301,8 +352,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
// LOG_M("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1); // LOG_M("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
LOG_D(PHY,"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n", LOG_D(PHY,"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ret==-1){
ue->FeMBMS_active = 2;
ret = pbch_detection(ue,mode);
if (ret==-1){
ue->FeMBMS_active = 0;
frame_parms->FeMBMS_active = 0;
}
else frame_parms->FeMBMS_active = 1;
LOG_D(PHY,"FeMBMS Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret); frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
}
#endif
} else { } else {
LOG_D(PHY,"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot); LOG_D(PHY,"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
} }
...@@ -342,6 +406,23 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) { ...@@ -342,6 +406,23 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
// LOG_M("rxdata3.m","rxd3",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1); // LOG_M("rxdata3.m","rxd3",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
LOG_D(PHY,"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n", LOG_D(PHY,"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret); frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ret==-1){
ue->FeMBMS_active = 2;
ret = pbch_detection(ue,mode);
if (ret==-1){
ue->FeMBMS_active = 0;
frame_parms->FeMBMS_active = 0;
}
else frame_parms->FeMBMS_active = 1;
LOG_I(PHY,"FeMBMS CAS Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
}
#endif
} else { } else {
LOG_D(PHY,"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot); LOG_D(PHY,"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
} }
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
* \note * \note
* \warning * \warning
*/ */
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/CODING/coding_defs.h" #include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/coding_extern.h" #include "PHY/CODING/coding_extern.h"
...@@ -630,3 +632,201 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars, ...@@ -630,3 +632,201 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
int8_t* llr,
uint32_t length,
uint8_t frame_mod4)
{
int i;
uint8_t reset;
uint32_t x1, x2, s=0;
reset = 1;
// x1 is set in first call to lte_gold_generic
x2 = frame_parms->Nid_cell+(1<<9); //this is c_init for FeMBMS in 36.211 Sec 6.6.1
//msg("pbch_unscrambling: Nid_cell = %d, x2 = %d, frame_mod4 %d length %d\n",frame_parms->Nid_cell,x2,frame_mod4,length);
for (i=0; i<length; i++) {
if (i%32==0) {
s = lte_gold_generic(&x1, &x2, reset);
// printf("lte_gold[%d]=%x\n",i,s);
reset = 0;
}
// take the quarter of the PBCH that corresponds to this frame
if ((i>=(frame_mod4*(length>>2))) && (i<((1+frame_mod4)*(length>>2)))) {
if (((s>>(i%32))&1)==0)
llr[i] = -llr[i];
}
}
}
uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
LTE_UE_PBCH *lte_ue_pbch_vars,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
MIMO_mode_t mimo_mode,
uint32_t high_speed_flag,
uint8_t frame_mod4)
{
uint8_t log2_maxh;//,aatx,aarx;
int max_h=0;
int symbol,i;
uint32_t nsymb = (frame_parms->Ncp==0) ? 14:12;
uint16_t pbch_E;
uint8_t pbch_a[8];
uint8_t RCC;
int8_t *pbch_e_rx;
uint8_t *decoded_output = lte_ue_pbch_vars->decoded_output;
uint16_t crc;
// pbch_D = 16+PBCH_A;
pbch_E = (frame_parms->Ncp==0) ? 1920 : 1728; //RE/RB * #RB * bits/RB (QPSK)
pbch_e_rx = &lte_ue_pbch_vars->llr[frame_mod4*(pbch_E>>2)];
#ifdef DEBUG_PBCH
LOG_D(PHY,"[PBCH] starting symbol loop (Ncp %d, frame_mod4 %d,mimo_mode %d\n",frame_parms->Ncp,frame_mod4,mimo_mode);
#endif
// clear LLR buffer
memset(lte_ue_pbch_vars->llr,0,pbch_E);
for (symbol=(nsymb>>1); symbol<(nsymb>>1)+4; symbol++) {
#ifdef DEBUG_PBCH
LOG_D(PHY,"[PBCH] starting extract\n");
#endif
pbch_extract(lte_ue_common_vars->common_vars_rx_data_per_thread[0].rxdataF,
lte_ue_common_vars->common_vars_rx_data_per_thread[0].dl_ch_estimates[eNB_id],
lte_ue_pbch_vars->rxdataF_ext,
lte_ue_pbch_vars->dl_ch_estimates_ext,
symbol,
high_speed_flag,
frame_parms);
#ifdef DEBUG_PBCH
LOG_D(PHY,"[PHY] PBCH Symbol %d\n",symbol);
LOG_D(PHY,"[PHY] PBCH starting channel_level\n");
#endif
max_h = pbch_channel_level(lte_ue_pbch_vars->dl_ch_estimates_ext,
frame_parms,
symbol);
log2_maxh = 3+(log2_approx(max_h)/2);
#ifdef DEBUG_PBCH
LOG_D(PHY,"[PHY] PBCH log2_maxh = %d (%d)\n",log2_maxh,max_h);
#endif
pbch_channel_compensation(lte_ue_pbch_vars->rxdataF_ext,
lte_ue_pbch_vars->dl_ch_estimates_ext,
lte_ue_pbch_vars->rxdataF_comp,
frame_parms,
symbol,
log2_maxh); // log2_maxh+I0_shift
if (frame_parms->nb_antennas_rx > 1)
pbch_detection_mrc(frame_parms,
lte_ue_pbch_vars->rxdataF_comp,
symbol);
if (mimo_mode == ALAMOUTI) {
pbch_alamouti(frame_parms,lte_ue_pbch_vars->rxdataF_comp,symbol);
} else if (mimo_mode != SISO) {
LOG_D(PHY,"[PBCH][RX] Unsupported MIMO mode\n");
return(-1);
}
if (symbol>(nsymb>>1)+1) {
pbch_quantize(pbch_e_rx,
(short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
144);
pbch_e_rx+=144;
} else {
pbch_quantize(pbch_e_rx,
(short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
96);
pbch_e_rx+=96;
}
}
pbch_e_rx = lte_ue_pbch_vars->llr;
//un-scrambling
#ifdef DEBUG_PBCH
LOG_D(PHY,"[PBCH] doing unscrambling\n");
#endif
pbch_unscrambling_fembms(frame_parms,
pbch_e_rx,
pbch_E,
frame_mod4);
//un-rate matching
#ifdef DEBUG_PBCH
LOG_D(PHY,"[PBCH] doing un-rate-matching\n");
#endif
memset(dummy_w_rx,0,3*3*(16+PBCH_A));
RCC = generate_dummy_w_cc(16+PBCH_A,
dummy_w_rx);
lte_rate_matching_cc_rx(RCC,pbch_E,pbch_w_rx,dummy_w_rx,pbch_e_rx);
sub_block_deinterleaving_cc((unsigned int)(PBCH_A+16),
&pbch_d_rx[96],
&pbch_w_rx[0]);
memset(pbch_a,0,((16+PBCH_A)>>3));
phy_viterbi_lte_sse2(pbch_d_rx+96,pbch_a,16+PBCH_A);
// Fix byte endian of PBCH (bit 23 goes in first)
for (i=0; i<(PBCH_A>>3); i++)
decoded_output[(PBCH_A>>3)-i-1] = pbch_a[i];
#ifdef DEBUG_PBCH
for (i=0; i<(PBCH_A>>3); i++)
LOG_I(PHY,"[PBCH] pbch_a[%d] = %x\n",i,decoded_output[i]);
#endif //DEBUG_PBCH
#ifdef DEBUG_PBCH
LOG_I(PHY,"PBCH CRC %x : %x\n",
crc16(pbch_a,PBCH_A),
((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
#endif
crc = (crc16(pbch_a,PBCH_A)>>16) ^
(((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
if (crc == 0x0000)
return(1);
else if (crc == 0xffff)
return(2);
else if (crc == 0x5555)
return(4);
else
return(-1);
}
#endif
This diff is collapsed.
...@@ -72,6 +72,12 @@ int rx_pmch(PHY_VARS_UE *phy_vars_ue, ...@@ -72,6 +72,12 @@ int rx_pmch(PHY_VARS_UE *phy_vars_ue,
uint8_t subframe, uint8_t subframe,
unsigned char symbol); unsigned char symbol);
int rx_pmch_khz_1dot25(PHY_VARS_UE *ue,
unsigned char eNB_id,
uint8_t subframe/*,
unsigned char symbol*/
,int mcs);
/** \brief Dump OCTAVE/MATLAB files for PMCH debugging /** \brief Dump OCTAVE/MATLAB files for PMCH debugging
@param phy_vars_ue Pointer to UE variables @param phy_vars_ue Pointer to UE variables
@param eNB_id index of eNB in ue variables @param eNB_id index of eNB in ue variables
...@@ -1125,6 +1131,20 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars, ...@@ -1125,6 +1131,20 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
uint32_t high_speed_flag, uint32_t high_speed_flag,
uint8_t frame_mod4); uint8_t frame_mod4);
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/*! \brief receiver for the PBCH FeMBMS
\returns number of tx antennas or -1 if error
*/
uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
LTE_UE_PBCH *lte_ue_pbch_vars,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
MIMO_mode_t mimo_mode,
uint32_t high_speed_flag,
uint8_t frame_mod4);
#endif
uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue, uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t eNB_id, uint8_t eNB_id,
uint8_t pbch_phase); uint8_t pbch_phase);
......
...@@ -52,6 +52,10 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, ...@@ -52,6 +52,10 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
int sample_offset, int sample_offset,
int no_prefix); int no_prefix);
int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *phy_vars_ue,
int subframe,
int sample_offset);
int front_end_fft(PHY_VARS_UE *ue, int front_end_fft(PHY_VARS_UE *ue,
unsigned char l, unsigned char l,
unsigned char Ns, unsigned char Ns,
......
...@@ -204,3 +204,112 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue, ...@@ -204,3 +204,112 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
#endif #endif
return(0); return(0);
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
int subframe,
int sample_offset)
{
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
LTE_UE_COMMON *common_vars = &ue->common_vars;
uint8_t eNB_id = 0;//ue_common_vars->eNb_id;
unsigned char aa;
//unsigned char frame_type = frame_parms->frame_type; // Frame Type: 0 - FDD, 1 - TDD;
unsigned int nb_prefix_samples;
int ofdm_symbol_size;
unsigned int subframe_offset;
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
void (*dft)(int16_t *,int16_t *, int);
AssertFatal(frame_parms->frame_type == FDD, "Frame is TDD!\n");
switch (frame_parms->ofdm_symbol_size) {
case 128:
dft = dft1536;
ofdm_symbol_size=1536;
nb_prefix_samples=384;
break;
case 256:
AssertFatal(1==0,"FeMBMS dft3072 not implemented\n");
dft = dft3072;
ofdm_symbol_size=3072;
nb_prefix_samples=768;
break;
case 512:
dft = dft6144;
nb_prefix_samples=1536;
ofdm_symbol_size=6144;
break;
case 1024:
dft = dft12288;
nb_prefix_samples=3072;
ofdm_symbol_size=12288;
break;
case 1536:
dft = dft18432;
nb_prefix_samples=4608;
ofdm_symbol_size=18432;
break;
case 2048:
dft = dft24576;
nb_prefix_samples=6144;
ofdm_symbol_size=24576;
break;
default:
AssertFatal(1==0,"Illegal ofdm symbol size %d\n",frame_parms->ofdm_symbol_size);
break;
}
subframe_offset = frame_parms->samples_per_tti * subframe;
#ifdef DEBUG_FEP
LOG_D(PHY,"slot_fep_mbsfn125: subframe %d, nb_prefix_samples %d, subframe_offset %d, sample_offset %d\n", subframe, nb_prefix_samples,subframe_offset,
sample_offset);
#endif
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
memset(&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][0],0,ofdm_symbol_size*sizeof(int));
#if UE_TIMING_TRACE
start_meas(&ue->rx_dft_stats);
#endif
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
nb_prefix_samples +
subframe_offset -
SOFFSET) % frame_length_samples],
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][0],1);
#if UE_TIMING_TRACE
stop_meas(&ue->rx_dft_stats);
#endif
}
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
if (ue->perfect_ce == 0) {
#ifdef DEBUG_FEP
LOG_D(PHY,"Channel estimation eNB %d, aatx %d, subframe %d\n",eNB_id,aa,subframe);
#endif
lte_dl_mbsfn_khz_1dot25_channel_estimation(ue,
eNB_id,
0,
subframe);
}
}
#ifdef DEBUG_FEP
LOG_D(PHY,"slot_fep_mbsfn: done\n");
#endif
return(0);
}
#endif
...@@ -569,6 +569,10 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { ...@@ -569,6 +569,10 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
uint32_t lte_gold_uespec_table[2][20][2][21]; uint32_t lte_gold_uespec_table[2][20][2][21];
/// mbsfn reference symbols /// mbsfn reference symbols
uint32_t lte_gold_mbsfn_table[10][3][42]; uint32_t lte_gold_mbsfn_table[10][3][42];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mbsfn reference symbols
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150]; //Not sure whether we need this here
#endif
/// ///
uint32_t X_u[64][839]; uint32_t X_u[64][839];
/// ///
...@@ -841,6 +845,10 @@ typedef struct { ...@@ -841,6 +845,10 @@ typedef struct {
uint32_t lte_gold_uespec_table[2][20][2][21]; uint32_t lte_gold_uespec_table[2][20][2][21];
//mbsfn reference symbols //mbsfn reference symbols
uint32_t lte_gold_mbsfn_table[10][3][42]; uint32_t lte_gold_mbsfn_table[10][3][42];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mbsfn reference symbols
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150]; //Not sure whether we need this here
#endif
/// ///
uint32_t X_u[64][839]; uint32_t X_u[64][839];
/// ///
......
...@@ -621,6 +621,11 @@ typedef struct { ...@@ -621,6 +621,11 @@ typedef struct {
//uint8_t local_flag; //uint8_t local_flag;
/// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach) /// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
runmode_t mode; runmode_t mode;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// \brief Indicator that UE is configured for FeMBMS functionality (This flag should be avoided) ... just kept for PBCH initical scan (TODO)
int FeMBMS_active;
#endif
/// \brief Indicator that UE should perform band scanning /// \brief Indicator that UE should perform band scanning
int UE_scan; int UE_scan;
/// \brief Indicator that UE should perform coarse scanning around carrier /// \brief Indicator that UE should perform coarse scanning around carrier
...@@ -703,6 +708,10 @@ typedef struct { ...@@ -703,6 +708,10 @@ typedef struct {
/// mbsfn reference symbols /// mbsfn reference symbols
uint32_t lte_gold_mbsfn_table[10][3][42]; uint32_t lte_gold_mbsfn_table[10][3][42];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mbsfn reference symbols
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150];
#endif
uint32_t X_u[64][839]; uint32_t X_u[64][839];
......
...@@ -583,6 +583,15 @@ typedef struct { ...@@ -583,6 +583,15 @@ typedef struct {
int mbsfn_SubframeConfig; int mbsfn_SubframeConfig;
} MBSFN_config_t; } MBSFN_config_t;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
typedef struct {
int radioframeAllocationPeriod;
int radioframeAllocationOffset;
int non_mbsfn_SubframeConfig;
} NonMBSFN_config_t;
#endif
typedef struct { typedef struct {
/// Number of resource blocks (RB) in DL /// Number of resource blocks (RB) in DL
uint8_t N_RB_DL; uint8_t N_RB_DL;
...@@ -626,12 +635,29 @@ typedef struct { ...@@ -626,12 +635,29 @@ typedef struct {
uint8_t threequarter_fs; uint8_t threequarter_fs;
/// Size of FFT /// Size of FFT
uint16_t ofdm_symbol_size; uint16_t ofdm_symbol_size;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t FeMBMS_active;
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// Size of FFT
uint16_t ofdm_symbol_size_khz_1dot25;
#endif
/// Number of prefix samples in all but first symbol of slot /// Number of prefix samples in all but first symbol of slot
uint16_t nb_prefix_samples; uint16_t nb_prefix_samples;
/// Number of prefix samples in first symbol of slot /// Number of prefix samples in first symbol of slot
uint16_t nb_prefix_samples0; uint16_t nb_prefix_samples0;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// Number of prefix samples in all but first symbol of slot
uint16_t nb_prefix_samples_khz_1dot25;
/// Number of prefix samples in first symbol of slot
uint16_t nb_prefix_samples0_khz_1dot25;
#endif
/// Carrier offset in FFT buffer for first RE in PRB0 /// Carrier offset in FFT buffer for first RE in PRB0
uint16_t first_carrier_offset; uint16_t first_carrier_offset;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// Carrier offset in FFT buffer for first RE in PRB0 (FeMBMS
uint16_t first_carrier_offset_khz_1dot25;
#endif
/// Number of samples in a subframe /// Number of samples in a subframe
uint32_t samples_per_tti; uint32_t samples_per_tti;
/// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL) /// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL)
...@@ -668,6 +694,10 @@ typedef struct { ...@@ -668,6 +694,10 @@ typedef struct {
int num_MBSFN_config; int num_MBSFN_config;
/// Array of MBSFN Configurations (max 8 (maxMBSFN-Allocations) elements as per 36.331) /// Array of MBSFN Configurations (max 8 (maxMBSFN-Allocations) elements as per 36.331)
MBSFN_config_t MBSFN_config[8]; MBSFN_config_t MBSFN_config[8];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t NonMBSFN_config_flag;
NonMBSFN_config_t NonMBSFN_config;
#endif
/// Maximum Number of Retransmissions of RRCConnectionRequest (from 36-331 RRC Spec) /// Maximum Number of Retransmissions of RRCConnectionRequest (from 36-331 RRC Spec)
uint8_t maxHARQ_Msg3Tx; uint8_t maxHARQ_Msg3Tx;
/// Size of SI windows used for repetition of one SI message (in frames) /// Size of SI windows used for repetition of one SI message (in frames)
...@@ -682,6 +712,9 @@ typedef struct { ...@@ -682,6 +712,9 @@ typedef struct {
uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3]; uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[MAX_MBSFN_AREA]; struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[MAX_MBSFN_AREA];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
struct NonMBSFN_SubframeConfig *non_mbsfn_SubframeConfig;
#endif
/// for fair RR scheduler /// for fair RR scheduler
uint32_t ue_multiple_max; uint32_t ue_multiple_max;
} LTE_DL_FRAME_PARMS; } LTE_DL_FRAME_PARMS;
......
...@@ -1071,6 +1071,10 @@ typedef struct PHY_VARS_eNB_s { ...@@ -1071,6 +1071,10 @@ typedef struct PHY_VARS_eNB_s {
/// mbsfn reference symbols /// mbsfn reference symbols
uint32_t lte_gold_mbsfn_table[10][3][42]; uint32_t lte_gold_mbsfn_table[10][3][42];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mbsfn reference symbols
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150];
#endif
// PRACH energy detection parameters // PRACH energy detection parameters
/// Detection threshold for LTE PRACH /// Detection threshold for LTE PRACH
......
This diff is collapsed.
...@@ -34,6 +34,9 @@ void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame, ...@@ -34,6 +34,9 @@ void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame,
void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame, void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len){} uint8_t CH_index, void *pdu, uint16_t len){}
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){}
void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame, void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame,
sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len, sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len,
uint8_t CH_index){} uint8_t CH_index){}
......
...@@ -34,6 +34,9 @@ MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSy ...@@ -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_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_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_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_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) MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind)
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req #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_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_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_CNF(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf
#define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind #define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind
...@@ -47,6 +50,7 @@ ...@@ -47,6 +50,7 @@
// Some constants from "LAYER2/MAC/defs.h" // Some constants from "LAYER2/MAC/defs.h"
#define BCCH_SDU_SIZE (512) #define BCCH_SDU_SIZE (512)
#define BCCH_SDU_MBMS_SIZE (512)
#define CCCH_SDU_SIZE (512) #define CCCH_SDU_SIZE (512)
#define MCCH_SDU_SIZE (512) #define MCCH_SDU_SIZE (512)
#define PCCH_SDU_SIZE (512) #define PCCH_SDU_SIZE (512)
...@@ -78,6 +82,25 @@ typedef struct RrcMacBcchDataInd_s { ...@@ -78,6 +82,25 @@ typedef struct RrcMacBcchDataInd_s {
uint8_t rsrp; uint8_t rsrp;
} RrcMacBcchDataInd; } 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 { typedef struct RrcMacCcchDataReq_s {
uint32_t frame; uint32_t frame;
uint32_t sdu_size; uint32_t sdu_size;
......
...@@ -166,6 +166,7 @@ typedef struct RadioResourceConfig_s { ...@@ -166,6 +166,7 @@ typedef struct RadioResourceConfig_s {
long mpdcch_startSF_CSS_RA_r13_val; long mpdcch_startSF_CSS_RA_r13_val;
long* prach_HoppingOffset_r13; long* prach_HoppingOffset_r13;
#endif #endif
BOOLEAN_t mbms_dedicated_serving_cell;
} RadioResourceConfig; } RadioResourceConfig;
// eNB: ENB_APP -> RRC messages // eNB: ENB_APP -> RRC messages
......
...@@ -1310,6 +1310,62 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) { ...@@ -1310,6 +1310,62 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
break; 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) { 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; 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) { } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
...@@ -2825,6 +2881,15 @@ void configure_du_mac(int inst) { ...@@ -2825,6 +2881,15 @@ void configure_du_mac(int inst) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
, ,
NULL 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 #endif
); );
} }
......
...@@ -394,6 +394,10 @@ typedef enum { ...@@ -394,6 +394,10 @@ typedef enum {
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311" #define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode" #define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
#define ENB_CONFIG_STRING_UE_MULTIPLE_MAX "ue_multiple_max" #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_A_R13 "pdsch_maxNumRepetitionCEmodeA_r13"
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13" #define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13"
...@@ -447,7 +451,6 @@ typedef enum { ...@@ -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_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" #define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* component carriers configuration parameters */ /* component carriers configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
...@@ -534,6 +537,7 @@ typedef struct ccparams_lte_s { ...@@ -534,6 +537,7 @@ typedef struct ccparams_lte_s {
int32_t ue_TimersAndConstants_n311; int32_t ue_TimersAndConstants_n311;
int32_t ue_TransmissionMode; int32_t ue_TransmissionMode;
int32_t ue_multiple_max; int32_t ue_multiple_max;
char *mbms_dedicated_serving_cell;
int32_t srb1_timer_poll_retransmit; int32_t srb1_timer_poll_retransmit;
int32_t srb1_timer_reordering; int32_t srb1_timer_reordering;
int32_t srb1_timer_status_prohibit; int32_t srb1_timer_status_prohibit;
...@@ -657,6 +661,7 @@ typedef struct ccparams_lte_s { ...@@ -657,6 +661,7 @@ typedef struct ccparams_lte_s {
{ .s5= {NULL }} , \ { .s5= {NULL }} , \
{ .s5= {NULL }} , \ { .s5= {NULL }} , \
{ .s5= {NULL }} , \ { .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} \ { .s5= {NULL }} \
} }
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
...@@ -741,7 +746,8 @@ typedef struct ccparams_lte_s { ...@@ -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_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_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_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 { ...@@ -822,6 +828,7 @@ typedef struct ccparams_lte_s {
#define ENB_CONFIG_UETIMERS_N310_IDX 73 #define ENB_CONFIG_UETIMERS_N310_IDX 73
#define ENB_CONFIG_UETIMERS_N311_IDX 74 #define ENB_CONFIG_UETIMERS_N311_IDX 74
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75 #define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* SRB1 configuration parameters section name */ /* SRB1 configuration parameters section name */
......
...@@ -311,6 +311,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -311,6 +311,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
, ,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL (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 #endif
); );
break; break;
...@@ -470,6 +479,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -470,6 +479,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
, ,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL (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 #endif
); );
} }
......
...@@ -685,7 +685,17 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -685,7 +685,17 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
LTE_SystemInformationBlockType1_v1310_IEs_t * LTE_SystemInformationBlockType1_v1310_IEs_t *
sib1_v13ext sib1_v13ext
#endif #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 i;
int UE_id = -1; int UE_id = -1;
eNB_MAC_INST *eNB = RC.mac[Mod_idP]; eNB_MAC_INST *eNB = RC.mac[Mod_idP];
...@@ -736,6 +746,13 @@ int rrc_mac_config_req_eNB(module_id_t 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); 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 (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if (sib1_v13ext != NULL) { if (sib1_v13ext != NULL) {
...@@ -855,6 +872,39 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -855,6 +872,39 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
#endif #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 (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (mbsfn_AreaInfoList != NULL) { if (mbsfn_AreaInfoList != NULL) {
...@@ -1283,4 +1333,4 @@ void eNB_Config_Local_DRX( ...@@ -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"); LOG_E(MAC, "Error in local DRX configuration, the drx retransmission timer value specified is unknown\n");
break; break;
} }
} }
\ No newline at end of file
...@@ -20,16 +20,18 @@ ...@@ -20,16 +20,18 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file config.c
* \brief UE and eNB configuration performed by RRC or as a consequence of RRC procedures /*! \file config_ue.c
* \author Navid Nikaein and Raymond Knopp * \brief UE configuration performed by RRC or as a consequence of RRC procedures / This includes FeMBMS UE procedures
* \date 2010 - 2014 * \author Navid Nikaein, Raymond Knopp and Javier Morgade
* \date 2010 - 2014 / 2019
* \version 0.1 * \version 0.1
* \email: navid.nikaein@eurecom.fr * \email: navid.nikaein@eurecom.fr, javier.morgade@ieee.org
* @ingroup _mac * @ingroup _mac
*/ */
#include "COMMON/platform_types.h" #include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h" #include "COMMON/platform_constants.h"
#include "nfapi/oai_integration/vendor_ext.h" #include "nfapi/oai_integration/vendor_ext.h"
...@@ -130,7 +132,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, ...@@ -130,7 +132,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
,const uint32_t *const sourceL2Id ,const uint32_t *const sourceL2Id
,const uint32_t *const destinationL2Id ,const uint32_t *const destinationL2Id
#endif #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; int i;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN); (VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
...@@ -560,6 +570,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, ...@@ -560,6 +570,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
} }
#endif #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 #ifdef CBA
if (cba_rnti) { if (cba_rnti) {
......
...@@ -63,7 +63,8 @@ ...@@ -63,7 +63,8 @@
/*!\brief DTCH DRB1 logical channel */ /*!\brief DTCH DRB1 logical channel */
#define DTCH 3 // LCID #define DTCH 3 // LCID
/*!\brief MCCH logical channel */ /*!\brief MCCH logical channel */
#define MCCH 4 //#define MCCH 4
#define MCCH 62
/*!\brief MTCH logical channel */ /*!\brief MTCH logical channel */
#define MTCH 1 #define MTCH 1
// DLSCH LCHAN ID // DLSCH LCHAN ID
......
...@@ -955,7 +955,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -955,7 +955,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
} }
/* This schedules MIB */ /* This schedules MIB */
if ((subframeP == 0) && (frameP & 3) == 0) if ((subframeP == 0) && (frameP & 3) == 0)
schedule_mib(module_idP, frameP, subframeP); schedule_mib(module_idP, frameP, subframeP);
if (get_softmodem_params()->phy_test == 0) { if (get_softmodem_params()->phy_test == 0) {
......
This diff is collapsed.
...@@ -66,6 +66,12 @@ ...@@ -66,6 +66,12 @@
#include "LTE_SystemInformationBlockType1-v1310-IEs.h" #include "LTE_SystemInformationBlockType1-v1310-IEs.h"
#include "LTE_SystemInformationBlockType18-r12.h" #include "LTE_SystemInformationBlockType18-r12.h"
#endif #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 "LTE_RadioResourceConfigCommonSIB.h"
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include "PHY_INTERFACE/IF_Module.h" #include "PHY_INTERFACE/IF_Module.h"
...@@ -416,6 +422,11 @@ typedef struct { ...@@ -416,6 +422,11 @@ typedef struct {
#define BCCH_SIB1_BR 6 // SIB1_BR #define BCCH_SIB1_BR 6 // SIB1_BR
/*!\brief Values of BCCH SIB_BR logical channel (fake) */ /*!\brief Values of BCCH SIB_BR logical channel (fake) */
#define BCCH_SI_BR 7 // SI-BR #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 */ /*!\brief Value of CCCH / SRB0 logical channel */
#define CCCH 0 // srb0 #define CCCH 0 // srb0
/*!\brief DCCH / SRB1 logical channel */ /*!\brief DCCH / SRB1 logical channel */
...@@ -425,7 +436,8 @@ typedef struct { ...@@ -425,7 +436,8 @@ typedef struct {
/*!\brief DTCH DRB1 logical channel */ /*!\brief DTCH DRB1 logical channel */
#define DTCH 3 // LCID #define DTCH 3 // LCID
/*!\brief MCCH logical channel */ /*!\brief MCCH logical channel */
#define MCCH 4 //#define MCCH 4
#define MCCH 62
/*!\brief MTCH logical channel */ /*!\brief MTCH logical channel */
#define MTCH 1 #define MTCH 1
// DLSCH LCHAN ID // DLSCH LCHAN ID
...@@ -1311,6 +1323,7 @@ typedef struct { ...@@ -1311,6 +1323,7 @@ typedef struct {
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon; LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR; LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
LTE_SchedulingInfoList_MBMS_r14_t *schedulingInfoList_MBMS;
#endif #endif
LTE_TDD_Config_t *tdd_Config; LTE_TDD_Config_t *tdd_Config;
LTE_SchedulingInfoList_t *schedulingInfoList; LTE_SchedulingInfoList_t *schedulingInfoList;
...@@ -1338,6 +1351,9 @@ typedef struct { ...@@ -1338,6 +1351,9 @@ typedef struct {
uint8_t vrb_map_UL[100]; uint8_t vrb_map_UL[100];
/// MBSFN SubframeConfig /// MBSFN SubframeConfig
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; 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 /// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern; uint8_t num_sf_allocation_pattern;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
...@@ -1370,6 +1386,11 @@ typedef struct { ...@@ -1370,6 +1386,11 @@ typedef struct {
/// Outgoing BCCH-BR pdu for PHY /// Outgoing BCCH-BR pdu for PHY
BCCH_PDU BCCH_BR_pdu[20]; BCCH_PDU BCCH_BR_pdu[20];
#endif #endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
BCCH_PDU BCCH_MBMS_pdu;
uint8_t FeMBMS_flag;
#endif
} COMMON_channels_t; } COMMON_channels_t;
/*! \brief top level eNB MAC structure */ /*! \brief top level eNB MAC structure */
typedef struct eNB_MAC_INST_s { typedef struct eNB_MAC_INST_s {
...@@ -1437,6 +1458,9 @@ typedef struct eNB_MAC_INST_s { ...@@ -1437,6 +1458,9 @@ typedef struct eNB_MAC_INST_s {
time_stats_t eNB_scheduler; time_stats_t eNB_scheduler;
/// processing time of eNB scheduler for SI /// processing time of eNB scheduler for SI
time_stats_t schedule_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 /// processing time of eNB scheduler for Random access
time_stats_t schedule_ra; time_stats_t schedule_ra;
/// processing time of eNB ULSCH scheduler /// processing time of eNB ULSCH scheduler
...@@ -1676,6 +1700,9 @@ typedef struct { ...@@ -1676,6 +1700,9 @@ typedef struct {
/// MBSFN_Subframe Configuration /// MBSFN_Subframe Configuration
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA? 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 /// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern; uint8_t num_sf_allocation_pattern;
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
......
...@@ -67,6 +67,17 @@ void schedule_RA(module_id_t module_idP, frame_t frameP, ...@@ -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, void schedule_SI(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP); 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; /** \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 Mod_id Instance ID of eNB
@param frame Frame index @param frame Frame index
...@@ -539,6 +550,11 @@ void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP, ...@@ -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, void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len); 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, void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len); uint8_t CH_index, void *pdu, uint16_t len);
...@@ -954,6 +970,12 @@ int generate_dlsch_header(unsigned char *mac_header, ...@@ -954,6 +970,12 @@ int generate_dlsch_header(unsigned char *mac_header,
@param mbsfn_AreaInfoList pointer to MBSFN Area Info list from SIB13 @param mbsfn_AreaInfoList pointer to MBSFN Area Info list from SIB13
@param pmch_InfoList pointer to PMCH_InfoList from MBSFNAreaConfiguration Message (MCCH Message) @param pmch_InfoList pointer to PMCH_InfoList from MBSFNAreaConfiguration Message (MCCH Message)
@param sib1_ext_r13 SI Scheduling information for SI-BR UEs @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, 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, ...@@ -1003,6 +1025,15 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
, ,
LTE_SystemInformationBlockType1_v1310_IEs_t * LTE_SystemInformationBlockType1_v1310_IEs_t *
sib1_ext_r13 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 #endif
); );
...@@ -1066,6 +1097,12 @@ int rrc_mac_config_req_ue(module_id_t module_idP, ...@@ -1066,6 +1097,12 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
,config_action_t config_action ,config_action_t config_action
,const uint32_t * const sourceL2Id ,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id ,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 #endif
); );
......
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
* contact@openairinterface.org * 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 #ifdef EXMIMO
...@@ -594,6 +594,45 @@ ue_send_sdu(module_id_t module_idP, ...@@ -594,6 +594,45 @@ ue_send_sdu(module_id_t module_idP,
#endif #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 void
ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP, ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t eNB_index, void *pdu, uint16_t len) { uint8_t eNB_index, void *pdu, uint16_t len) {
......
...@@ -972,8 +972,10 @@ pdcp_data_ind( ...@@ -972,8 +972,10 @@ pdcp_data_ind(
dest_addr.sin_family = AF_INET; dest_addr.sin_family = AF_INET;
dest_addr.sin_port = udp_header->dest; dest_addr.sin_port = udp_header->dest;
dest_addr.sin_addr.s_addr = ip_header->daddr; 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 #endif
......
...@@ -137,7 +137,7 @@ void config_req_rlc_um_asn1 ( ...@@ -137,7 +137,7 @@ void config_req_rlc_um_asn1 (
} }
rlc_p = &rlc_union_p->rlc.um; rlc_p = &rlc_union_p->rlc.um;
} }else
if ((sourceL2Id >0 ) && (destinationL2Id >0)){ 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); 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 } else
......
...@@ -398,7 +398,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP, ...@@ -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); 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) { 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, 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,
......
...@@ -77,6 +77,26 @@ mac_rrc_data_req( ...@@ -77,6 +77,26 @@ mac_rrc_data_req(
carrier = &rrc->carrier[0]; carrier = &rrc->carrier[0];
mib = &carrier->mib; 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((Srb_id & RAB_OFFSET) == BCCH) {
if(RC.rrc[Mod_idP]->carrier[CC_id].SI.Active==0) { if(RC.rrc[Mod_idP]->carrier[CC_id].SI.Active==0) {
return 0; return 0;
......
...@@ -138,6 +138,40 @@ mac_rrc_data_ind_ue( ...@@ -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); 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) { 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); 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) #if defined(ENABLE_ITTI)
......
This diff is collapsed.
...@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich ...@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
#endif #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 \brief Generate configuration structure for DRX_Config
@param Mod_id Instance of eNB @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 ...@@ -97,6 +106,17 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id
#endif #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). \brief Generate a default configuration for SIB2/SIB3 in one System Information PDU (eNB).
......
This diff is collapsed.
...@@ -404,13 +404,25 @@ typedef struct UE_RRC_INFO_s { ...@@ -404,13 +404,25 @@ typedef struct UE_RRC_INFO_s {
uint8_t SIB1systemInfoValueTag; uint8_t SIB1systemInfoValueTag;
uint32_t SIStatus; uint32_t SIStatus;
uint32_t SIcnt; 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)) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
#endif #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 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; uint8_t handoverTarget;
HO_STATE_t ho_state; 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 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; unsigned short UE_index;
uint32_t T300_active; uint32_t T300_active;
uint32_t T300_cnt; uint32_t T300_cnt;
...@@ -656,6 +668,10 @@ typedef struct { ...@@ -656,6 +668,10 @@ typedef struct {
uint8_t sizeof_SIB1_BR; uint8_t sizeof_SIB1_BR;
uint8_t *SIB23_BR; uint8_t *SIB23_BR;
uint8_t sizeof_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 #endif
int physCellId; int physCellId;
int Ncp; int Ncp;
...@@ -673,12 +689,20 @@ typedef struct { ...@@ -673,12 +689,20 @@ typedef struct {
LTE_BCCH_DL_SCH_Message_t systemInformation; LTE_BCCH_DL_SCH_Message_t systemInformation;
LTE_BCCH_DL_SCH_Message_t systemInformation_BR; LTE_BCCH_DL_SCH_Message_t systemInformation_BR;
// SystemInformation_t systemInformation; // 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_SystemInformationBlockType1_t *sib1;
LTE_SystemInformationBlockType2_t *sib2; LTE_SystemInformationBlockType2_t *sib2;
LTE_SystemInformationBlockType3_t *sib3; LTE_SystemInformationBlockType3_t *sib3;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformationBlockType1_t *sib1_BR; LTE_SystemInformationBlockType1_t *sib1_BR;
LTE_SystemInformationBlockType2_t *sib2_BR; LTE_SystemInformationBlockType2_t *sib2_BR;
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS;
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS;
uint8_t FeMBMS_flag;
#endif #endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
LTE_SystemInformationBlockType13_r9_t *sib13; LTE_SystemInformationBlockType13_r9_t *sib13;
...@@ -774,8 +798,22 @@ typedef struct UE_RRC_INST_s { ...@@ -774,8 +798,22 @@ typedef struct UE_RRC_INST_s {
uint8_t sizeof_SI[NB_CNX_UE]; uint8_t sizeof_SI[NB_CNX_UE];
uint8_t SIB1Status[NB_CNX_UE]; uint8_t SIB1Status[NB_CNX_UE];
uint8_t SIStatus[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]; 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(). 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_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE]; LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE];
LTE_SystemInformationBlockType4_t *sib4[NB_CNX_UE]; LTE_SystemInformationBlockType4_t *sib4[NB_CNX_UE];
...@@ -817,6 +855,10 @@ typedef struct UE_RRC_INST_s { ...@@ -817,6 +855,10 @@ typedef struct UE_RRC_INST_s {
LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE]; LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE]; LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
#endif #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 #ifdef CBA
uint8_t num_active_cba_groups; uint8_t num_active_cba_groups;
uint16_t cba_rnti[NUM_MAX_CBA_GROUP]; uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
......
This diff is collapsed.
...@@ -542,6 +542,16 @@ int decode_BCCH_DLSCH_Message( ...@@ -542,6 +542,16 @@ int decode_BCCH_DLSCH_Message(
const uint8_t rsrq, const uint8_t rsrq,
const uint8_t rsrp ); 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( int decode_PCCH_DLSCH_Message(
const protocol_ctxt_t *const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
const uint8_t eNB_index, const uint8_t eNB_index,
......
...@@ -105,7 +105,8 @@ eNBs = ...@@ -105,7 +105,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000; ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20; ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1; ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2; ue_TransmissionMode = 1;
mbms_dedicated_serving_cell = "ENABLE"
} }
); );
......
...@@ -618,7 +618,7 @@ int main( int argc, char **argv ) { ...@@ -618,7 +618,7 @@ int main( int argc, char **argv ) {
if (config_mod == NULL) { if (config_mod == NULL) {
exit_fun("[SOFTMODEM] Error, configuration module init failed\n"); exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
} }
mode = normal_txrx; mode = normal_txrx;
memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS); memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS);
set_latency_target(); set_latency_target();
......
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