Commit 87aff44c authored by Michele Paffetti's avatar Michele Paffetti

Added new files for IF-module purposes (still to complete), review some...

Added new files for IF-module purposes (still to complete), review some configuration procedure for FAPI-like approach. Code compile
parent bd672b42
...@@ -963,6 +963,7 @@ set(SCHED_SRC ...@@ -963,6 +963,7 @@ set(SCHED_SRC
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED/phy_mac_stub.c ${OPENAIR1_DIR}/SCHED/phy_mac_stub.c
${OPENAIR1_DIR}/SCHED/IF_Module_L1_primitives_nb_iot.c
${OPENAIR1_DIR}/SCHED/pucch_pc.c ${OPENAIR1_DIR}/SCHED/pucch_pc.c
${OPENAIR1_DIR}/SCHED/pusch_pc.c ${OPENAIR1_DIR}/SCHED/pusch_pc.c
${OPENAIR1_DIR}/SCHED/srs_pc.c ${OPENAIR1_DIR}/SCHED/srs_pc.c
...@@ -1082,12 +1083,15 @@ add_library(PHY ${PHY_SRC}) ...@@ -1082,12 +1083,15 @@ add_library(PHY ${PHY_SRC})
##################### #####################
set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC) set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC)
set(RLC_DIR ${OPENAIR2_DIR}/LAYER2/RLC) set(RLC_DIR ${OPENAIR2_DIR}/LAYER2/RLC)
set(PHY_INTERFACE_DIR ${OPENAIR2_DIR}/PHY_INTERFACE)
set(RLC_UM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0) set(RLC_UM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0)
set(RLC_AM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0) set(RLC_AM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0)
set(RLC_TM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0) set(RLC_TM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0)
set(RRC_DIR ${OPENAIR2_DIR}/RRC/LITE) set(RRC_DIR ${OPENAIR2_DIR}/RRC/LITE)
set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0) set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0)
set(L2_SRC set(L2_SRC
${PHY_INTERFACE_DIR}/IF_Module_nb_iot.c
${PHY_INTERFACE_DIR}/IF_Module_L2_primitives_nb_iot.c
${OPENAIR2_DIR}/LAYER2/openair2_proc.c ${OPENAIR2_DIR}/LAYER2/openair2_proc.c
${PDCP_DIR}/pdcp.c ${PDCP_DIR}/pdcp.c
${PDCP_DIR}/pdcp_fifo.c ${PDCP_DIR}/pdcp_fifo.c
...@@ -1137,7 +1141,6 @@ set(L2_SRC ...@@ -1137,7 +1141,6 @@ set(L2_SRC
set (MAC_SRC set (MAC_SRC
${MAC_DIR}/lte_transport_init.c ${MAC_DIR}/lte_transport_init.c
${MAC_DIR}/main.c ${MAC_DIR}/main.c
${MAC_DIR}/IF_Module_nb_iot.c
${MAC_DIR}/ue_procedures.c ${MAC_DIR}/ue_procedures.c
${MAC_DIR}/ra_procedures.c ${MAC_DIR}/ra_procedures.c
${MAC_DIR}/l1_helpers.c ${MAC_DIR}/l1_helpers.c
......
...@@ -42,6 +42,7 @@ void NB_phy_config_mib_eNB(int Mod_id, ...@@ -42,6 +42,7 @@ void NB_phy_config_mib_eNB(int Mod_id,
int eutra_band, int eutra_band,
int Nid_cell, int Nid_cell,
int Ncp, int Ncp,
int Ncp_UL,
int p_eNB, int p_eNB,
uint32_t dl_CarrierFreq, uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq); uint32_t ul_CarrierFreq);
......
...@@ -44,11 +44,13 @@ extern uint16_t prach_root_sequence_map4[138]; ...@@ -44,11 +44,13 @@ extern uint16_t prach_root_sequence_map4[138];
//uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10}; //uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10};
void NB_phy_config_mib_eNB(int Mod_id, void NB_phy_config_mib_eNB(
int Mod_id,
int CC_id, int CC_id,
int eutra_band, int eutra_band,
int Nid_cell, int Nid_cell,
int Ncp, int Ncp,
int Ncp_UL,
int p_eNB, int p_eNB,
uint32_t dl_CarrierFreq, uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq) { uint32_t ul_CarrierFreq) {
...@@ -78,18 +80,25 @@ void NB_phy_config_mib_eNB(int Mod_id, ...@@ -78,18 +80,25 @@ void NB_phy_config_mib_eNB(int Mod_id,
NB_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms; //MP: PHY_VARS_eNB still to be modified NB_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms; //MP: PHY_VARS_eNB still to be modified
//LOG_I(PHY,"Configuring MIB-NB for instance %d, CCid %d : (band %d,N_RB_DL %d,Nid_cell %d,p %d,DL freq %u)\n", LOG_I(PHY,"Configuring MIB-NB for instance %d, CCid %d : (band %d,Nid_cell %d,p %d,DL freq %u)\n",
//Mod_id, CC_id, eutra_band, N_RB_DL_array[dl_Bandwidth], Nid_cell, p_eNB,dl_CarrierFreq); Mod_id, CC_id, eutra_band, Nid_cell, p_eNB,dl_CarrierFreq);
fp->Nid_cell = Nid_cell; fp->Nid_cell = Nid_cell;
fp->nushift = Nid_cell%6; fp->nushift = Nid_cell%6;
fp->eutra_band = eutra_band; fp->eutra_band = eutra_band;
fp->Ncp = Ncp; fp->Ncp = Ncp;
fp->nb_antenna_ports_eNB = p_eNB; fp->Ncp_UL = Ncp_UL;
fp->nb_antenna_ports_eNB = p_eNB; //tx antenna port
fp->dl_CarrierFreq = dl_CarrierFreq; fp->dl_CarrierFreq = dl_CarrierFreq;
fp->ul_CarrierFreq = ul_CarrierFreq; fp->ul_CarrierFreq = ul_CarrierFreq;
//fp->operating mode (in-band, guard-band, out-of-band)
//fp->nb_rx_antenna_ports_eNB
//fp->prb_index (applicable only in guard band or in-band operating mode) indicates the prb index with regard to the middle prb in LTE system / delivered by MIB-NB
//fp->eutraControlRegionSize (only if in-band operating mode)
//fp->nb_CRS_ports (valid only for in-band operating mode with different PCI)
//TODO
//init_frame_parms(fp,1); //init_frame_parms(fp,1);
//init_lte_top(fp); //init_lte_top(fp);
......
#include "../SCHED/IF_Module_L1_primitives_nb_iot.h"
//to be integrated in the scheduling procedure of L1
void schedule_response(Sched_Rsp_t Sched_INFO){
//todo
}
void PHY_config_req(PHY_Config_t* config_INFO){
if(config_INFO->get_MIB != 0){
//MIB-NB configuration
NB_phy_config_mib_eNB(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->frequency_band_indicator,
config_INFO->sch_config.physical_cell_id,
config_INFO->subframe_config.dl_cyclic_prefix_type,
config_INFO->subframe_config.ul_cyclic_prefix_type,
config_INFO->rf_config.tx_antenna_ports,
config_INFO->dl_CarrierFreq,
config_INFO->ul_CarrierFreq);
}
if(config_INFO->get_COMMON != 0)
{
//Common Configuration included in SIB2-NB
NB_phy_config_sib2_eNB(config_INFO->mod_id,
config_INFO->CC_id,
&config_INFO->nb_iot_config, // FIXME to be evaluated is should be passed a pointer
&config_INFO->rf_config); // FIXME to be evaluated is should be passed a pointer
}
if(config_INFO->get_DEDICATED!= 0)
{
//Dedicated Configuration
if(config_INFO->phy_config_dedicated != NULL){
NB_phy_config_dedicated_eNB(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->rnti,
config_INFO->phy_config_dedicated //not defined by fapi specs
);
}
}
}
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto_nb_iot.h"
#ifndef __IF_MODULE_L1_PRIMITIVES_NB_IOT_H__
#define __IF_MODULE_L1_PRIMITIVES_NB_IOT_H__
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
void schedule_response(Sched_Rsp_t Sched_INFO);
/*Interface for PHY Configuration
* Trigger the phy_config_xxx functions using parameters from the shared PHY_Config structure
* */
void PHY_config_req(PHY_Config_t* config_INFO);
#endif
...@@ -108,6 +108,7 @@ typedef struct RrcConfigurationReq_s { ...@@ -108,6 +108,7 @@ typedef struct RrcConfigurationReq_s {
uint8_t tdd_config[MAX_NUM_CCs]; uint8_t tdd_config[MAX_NUM_CCs];
uint8_t tdd_config_s[MAX_NUM_CCs]; uint8_t tdd_config_s[MAX_NUM_CCs];
lte_prefix_type_t prefix_type[MAX_NUM_CCs]; lte_prefix_type_t prefix_type[MAX_NUM_CCs];
lte_prefix_type_t prefix_type_UL[MAX_NUM_CCs];
int16_t eutra_band[MAX_NUM_CCs]; int16_t eutra_band[MAX_NUM_CCs];
uint32_t downlink_frequency[MAX_NUM_CCs]; uint32_t downlink_frequency[MAX_NUM_CCs];
int32_t uplink_frequency_offset[MAX_NUM_CCs]; int32_t uplink_frequency_offset[MAX_NUM_CCs];
......
...@@ -470,6 +470,7 @@ typedef struct { ...@@ -470,6 +470,7 @@ typedef struct {
int physCellId; int physCellId;
int p_eNB; int p_eNB;
int Ncp; int Ncp;
int Ncp_UL;
int eutra_band; int eutra_band;
uint32_t dl_CarrierFreq; uint32_t dl_CarrierFreq;
BCCH_BCH_Message_NB_t *mib_NB; BCCH_BCH_Message_NB_t *mib_NB;
......
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h" #include "IF_Module_L2_primitives_nb_iot.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto_nb_iot.h"
void UL_indication(UL_IND_t UL_INFO) void UL_indication(UL_IND_t UL_INFO)
{ {
...@@ -20,8 +18,8 @@ void UL_indication(UL_IND_t UL_INFO) ...@@ -20,8 +18,8 @@ void UL_indication(UL_IND_t UL_INFO)
UL_INFO.Preamble_list[UL_INFO.Number_SC].timing_offset, UL_INFO.Preamble_list[UL_INFO.Number_SC].timing_offset,
UL_INFO.subframe UL_INFO.subframe
); );
} }
} }
/*If there is a Uplink SDU (even MSG3, NAK) need to send to MAC*/ /*If there is a Uplink SDU (even MSG3, NAK) need to send to MAC*/
for(i=0;i<UL_INFO.UE_NUM;i++) for(i=0;i<UL_INFO.UE_NUM;i++)
{ {
...@@ -37,67 +35,10 @@ void UL_indication(UL_IND_t UL_INFO) ...@@ -37,67 +35,10 @@ void UL_indication(UL_IND_t UL_INFO)
UL_INFO.UL_SPEC_Info[i].harq_pidP, UL_INFO.UL_SPEC_Info[i].harq_pidP,
UL_INFO.UL_SPEC_Info[i].msg3_flagP UL_INFO.UL_SPEC_Info[i].msg3_flagP
); );
} }
} }
//NB_eNB_dlsch_ulsch_scheduler(UL_INFO.module_id,0,UL_INFO.frame,UL_INFO.subframe); TODO: to be implemented //NB_eNB_dlsch_ulsch_scheduler(UL_INFO.module_id,0,UL_INFO.frame,UL_INFO.subframe); TODO: to be implemented
} }
void schedule_response(Sched_Rsp_t Sched_INFO){
//todo
}
void PHY_config_req(PHY_Config_t* config_INFO){
if(config_INFO->get_MIB != 0){
//MIB-NB configuration
NB_phy_config_mib_eNB(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->frequency_band_indicator,
config_INFO->sch_config.physical_cell_id,
config_INFO->subframe_config.dl_cyclic_prefix_type,
config_INFO->rf_config.tx_antenna_ports,
config_INFO->dl_CarrierFreq,
config_INFO->ul_CarrierFreq);
}
if(config_INFO->get_COMMON != 0)
{
//Common Configuration included in SIB2-NB
NB_phy_config_sib2_eNB(config_INFO->mod_id,
config_INFO->CC_id,
&config_INFO->nb_iot_config, // FIXME to be evaluated is should be passed a pointer
&config_INFO->rf_config); // FIXME to be evaluated is should be passed a pointer
}
if(config_INFO->get_DEDICATED!= 0)
{
//Dedicated Configuration
if(config_INFO->phy_config_dedicated != NULL){
NB_phy_config_dedicated_eNB(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->rnti,
config_INFO->phy_config_dedicated //not defined by fapi specs
);
}
}
}
int IF_Module_init(IF_Module_t *if_inst){
//at initialization of the IF module assign the function to be pointed to the function pointer
if_inst->UL_indication = UL_indication;
if_inst->schedule_response = schedule_response;
if_inst->PHY_config_req = PHY_config_req;
//create the UL_IND_t , Sched_Resp_t and PHY_Config_t structures ???
return 0;
}
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto_nb_iot.h"
#ifndef __IF_MODULE_L2_PRIMITIVES_NB_IOT_H__
#define __IF_MODULE_L2_PRIMITIVES_NB_IOT_H__
/*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
*/
void UL_indication(UL_IND_t UL_INFO);
#endif
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/PHY_INTERFACE/IF_Module_L2_primitives_nb_iot.h"
#include "openair1/SCHED/IF_Module_L1_primitives_nb_iot.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto_nb_iot.h"
//called at initialization of the PHY
//TODO: define the input
IF_Module_t* IF_Module_init_L1(IF_Module_t *if_inst) //southbound IF-Module Interface
{
//fill the UL_IND_t??
if_inst->UL_indication = UL_indication;
return 0;
}
//called at initialization of L2
//TODO: define the input
IF_Module_t* IF_Module_init_L2(IF_Module_t *if_inst) //northbound IF-Module Interface
{
//fill the Sched_Rsp_t
//fill the PHY_Config_t -->already done in rrc_mac_config
if_inst->schedule_response = schedule_response;
if_inst->PHY_config_req = PHY_config_req;
return 0;
}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h" #include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h"
#include "PhysicalConfigDedicated-NB-r13.h" #include "PhysicalConfigDedicated-NB-r13.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#define SCH_PAYLOAD_SIZE_MAX 4096 #define SCH_PAYLOAD_SIZE_MAX 4096
#define BCCH_PAYLOAD_SIZE_MAX 128 #define BCCH_PAYLOAD_SIZE_MAX 128
...@@ -317,34 +317,22 @@ typedef struct{ ...@@ -317,34 +317,22 @@ typedef struct{
}Sched_Rsp_t; }Sched_Rsp_t;
// Calvin 20170531 start
/*IF_Module_t*/ /*IF_Module_t*/
typedef struct IF_Module_s{ typedef struct IF_Module_s{
//define the function pointer //define the function pointer
void (*UL_indication)(UL_IND_t UL_INFO); void (*UL_indication)(UL_IND_t UL_INFO);
void (*schedule_response)(Sched_Rsp_t Sched_INFO); void (*schedule_response)(Sched_Rsp_t Sched_INFO);
void (*PHY_config_req)(PHY_Config_t config_INFO); void (*PHY_config_req)(PHY_Config_t* config_INFO);
}IF_Module_t; }IF_Module_t;
/*Initial */ /*Initial */
int IF_Module_init(IF_Module_t *if_inst);
// Calvin 20170531 end
/*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
*/
void UL_indication(UL_IND_t UL_INFO);
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/ //int IF_Module_init(IF_Module_t *if_inst);
void schedule_response(Sched_Rsp_t Sched_INFO);
/*Interface for PHY Configuration IF_Module_t* IF_Module_init_L1(IF_Module_t *if_inst);
* Trigger the phy_config_xxx functions using parameters from the shared PHY_Config structure IF_Module_t* IF_Module_init_L2(IF_Module_t *if_inst);
* */
void PHY_config_req(PHY_Config_t* config_INFO);
#endif #endif
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "pdcp_sequence_manager.h" #include "pdcp_sequence_manager.h"
#include "UTIL/OTG/otg_rx.h" #include "UTIL/OTG/otg_rx.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h" #include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair1/SCHED/IF_Module_L1_primitives_nb_iot.h"
#ifdef PHY_EMUL #ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h" #include "SIMULATION/simulation_defs.h"
...@@ -119,11 +120,12 @@ int NB_rrc_mac_config_req_eNB( ...@@ -119,11 +120,12 @@ int NB_rrc_mac_config_req_eNB(
int physCellId, int physCellId,
int p_eNB, //number of eNB TX antenna ports int p_eNB, //number of eNB TX antenna ports
int Ncp, int Ncp,
int Ncp_UL,
long eutra_band,//FIXME: frequencyBandIndicator in sib1 (is a long not an int!!) long eutra_band,//FIXME: frequencyBandIndicator in sib1 (is a long not an int!!)
struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1 struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1
struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1 struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1
struct DL_Bitmap_NB_r13 *dl_bitmap, //optional SIB1 struct DL_Bitmap_NB_r13 *dl_bitmap, //optional SIB1
long* eutraControlRegionSize, //optional sib1 long* eutraControlRegionSize, //optional sib1, is defined only when we are in in-band operation mode (same PCI or different PCI)
long* nrs_CRS_PoweSIwindowsizerOffset, //optional long* nrs_CRS_PoweSIwindowsizerOffset, //optional
// uint8_t *SIwindowsize, //maybe no more needed because TDD only // uint8_t *SIwindowsize, //maybe no more needed because TDD only
// uint16_t *SIperiod, //maybe no more needed because TDD only // uint16_t *SIperiod, //maybe no more needed because TDD only
...@@ -140,7 +142,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -140,7 +142,7 @@ int NB_rrc_mac_config_req_eNB(
//no ul_Bandwidth //no ul_Bandwidth
//------------ //------------
PHY_Config_t *config_INFO; //TODO should be seen as a global variable PHY_Config_t *config_INFO; //TODO should be seen as a global variable (who initialize this???)
//------------ //------------
int UE_id = -1; int UE_id = -1;
...@@ -168,6 +170,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -168,6 +170,7 @@ int NB_rrc_mac_config_req_eNB(
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].physCellId = physCellId; eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].physCellId = physCellId;
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].p_eNB = p_eNB; eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].p_eNB = p_eNB;
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].Ncp = Ncp; eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].Ncp = Ncp;
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].Ncp_UL = Ncp_UL;
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].eutra_band = eutra_band; eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].eutra_band = eutra_band;
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].dl_CarrierFreq = dl_CarrierFreq; eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].dl_CarrierFreq = dl_CarrierFreq;
...@@ -192,6 +195,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -192,6 +195,7 @@ int NB_rrc_mac_config_req_eNB(
config_INFO->frequency_band_indicator = (uint8_t)eutra_band; config_INFO->frequency_band_indicator = (uint8_t)eutra_band;
config_INFO->sch_config.physical_cell_id = physCellId; config_INFO->sch_config.physical_cell_id = physCellId;
config_INFO->subframe_config.dl_cyclic_prefix_type = Ncp; config_INFO->subframe_config.dl_cyclic_prefix_type = Ncp;
config_INFO->subframe_config.ul_cyclic_prefix_type = Ncp_UL;
config_INFO->rf_config.tx_antenna_ports = p_eNB; config_INFO->rf_config.tx_antenna_ports = p_eNB;
config_INFO->dl_CarrierFreq = dl_CarrierFreq; config_INFO->dl_CarrierFreq = dl_CarrierFreq;
config_INFO->ul_CarrierFreq = ul_CarrierFreq; config_INFO->ul_CarrierFreq = ul_CarrierFreq;
...@@ -201,15 +205,34 @@ int NB_rrc_mac_config_req_eNB( ...@@ -201,15 +205,34 @@ int NB_rrc_mac_config_req_eNB(
//FAPI specs pag 135 //FAPI specs pag 135
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13:
config_INFO->nb_iot_config.operating_mode = 0; config_INFO->nb_iot_config.operating_mode = 0;
config_INFO->nb_iot_config.prb_index = mib_NB->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13;
config_INFO->nb_iot_config.assumed_crs_aps = -1; //is not defined so we put a negative value
if(eutraControlRegionSize == NULL)
LOG_E(RRC, "NB_rrc_mac_config_req_eNB: oepration mode is in-band but eutraControlRegionSize is not defined");
else
config_INFO->nb_iot_config.control_region_size = *eutraControlRegionSize;
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13:
config_INFO->nb_iot_config.operating_mode = 1; config_INFO->nb_iot_config.operating_mode = 1;
//config_INFO->nb_iot_config.prb_index = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13
config_INFO->nb_iot_config.assumed_crs_aps = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13;
if(eutraControlRegionSize == NULL)
LOG_E(RRC, "NB_rrc_mac_config_req_eNB: oepration mode is in-band but eutraControlRegionSize is not defined");
else
config_INFO->nb_iot_config.control_region_size = *eutraControlRegionSize;
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13:
config_INFO->nb_iot_config.operating_mode = 2; config_INFO->nb_iot_config.operating_mode = 2;
//config_INFO->nb_iot_config.prb_index = mib_NB->message.operationModeInfo_r13.choice.guardband_r13
config_INFO->nb_iot_config.control_region_size = -1; //should not being defined so we put a negative value
config_INFO->nb_iot_config.assumed_crs_aps = -1; //is not defined so we put a negative value
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13:
config_INFO->nb_iot_config.operating_mode = 3; config_INFO->nb_iot_config.operating_mode = 3;
config_INFO->nb_iot_config.prb_index = -1; // is not defined for this case (put a negative value)
config_INFO->nb_iot_config.control_region_size = -1;//is not defined so we put a negative value
config_INFO->nb_iot_config.assumed_crs_aps = -1; //is not defined so we put a negative value
break; break;
default: default:
LOG_E(RRC, "NB_rrc_mac_config_req_eNB: NB-IoT operating Mode (MIB-NB) not valid\n"); LOG_E(RRC, "NB_rrc_mac_config_req_eNB: NB-IoT operating Mode (MIB-NB) not valid\n");
...@@ -217,6 +240,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -217,6 +240,7 @@ int NB_rrc_mac_config_req_eNB(
} }
PHY_config_req(config_INFO); //for trigger the NB_phy_config_mib_eNB() PHY_config_req(config_INFO); //for trigger the NB_phy_config_mib_eNB()
//IF_Module->PHY_config_req(config_INFO);
// mac_init_cell_params(Mod_idP,CC_idP); //TODO MP: to be defined in MAC/main.c (in the old implementation was inside the mac_top_init but raymond have separated // mac_init_cell_params(Mod_idP,CC_idP); //TODO MP: to be defined in MAC/main.c (in the old implementation was inside the mac_top_init but raymond have separated
} }
...@@ -275,7 +299,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -275,7 +299,7 @@ int NB_rrc_mac_config_req_eNB(
//npdcch_NumRepetitions_RA_r13 //npdcch_NumRepetitions_RA_r13
//npdcch_StartSF_CSS_RA_r13 //npdcch_StartSF_CSS_RA_r13
//npdcch_Offset_RA_r13 //npdcch_Offset_RA_r13
//rsrp_ThresholdsPrachInfoList_r13 //rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break; break;
case 2: case 2:
......
...@@ -142,7 +142,6 @@ uint8_t do_MIB_NB( ...@@ -142,7 +142,6 @@ uint8_t do_MIB_NB(
mib_NB->message.operationModeInfo_r13.present = MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13; mib_NB->message.operationModeInfo_r13.present = MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13;
mib_NB->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13 = 0; mib_NB->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13 = 0;
printf("[MIB] something to write HERE ,sfn_MSB %x, hsfn_LSB %x\n", printf("[MIB] something to write HERE ,sfn_MSB %x, hsfn_LSB %x\n",
(uint32_t)sfn_MSB, (uint32_t)sfn_MSB,
(uint32_t)hsfn_LSB); (uint32_t)hsfn_LSB);
...@@ -184,7 +183,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, ...@@ -184,7 +183,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
attachWithoutPDN_Connectivity = CALLOC(1,sizeof(long)); attachWithoutPDN_Connectivity = CALLOC(1,sizeof(long));
long *nrs_CRS_PowerOffset=NULL; long *nrs_CRS_PowerOffset=NULL;
nrs_CRS_PowerOffset = CALLOC(1, sizeof(long)); nrs_CRS_PowerOffset = CALLOC(1, sizeof(long));
long *eutraControlRegionSize=NULL; long *eutraControlRegionSize=NULL; //this parameter should be set only if we are considering in-band operating mode (samePCI or differentPCI)
eutraControlRegionSize = CALLOC(1,sizeof(long)); eutraControlRegionSize = CALLOC(1,sizeof(long));
long systemInfoValueTagSI = 0; long systemInfoValueTagSI = 0;
......
...@@ -491,7 +491,8 @@ typedef struct { ...@@ -491,7 +491,8 @@ typedef struct {
uint8_t sizeof_SIB22_NB; uint8_t sizeof_SIB22_NB;
//implicit parameters needed //implicit parameters needed
int Ncp; //extended cyclic prefix int Ncp; //cyclic prefix for DL
int Ncp_UL; //cyclic prefix for UL
int p_eNB; //number of antenna port (getting from the CRS of the MIB-NB) int p_eNB; //number of antenna port (getting from the CRS of the MIB-NB)
uint32_t dl_CarrierFreq; //detected by the UE uint32_t dl_CarrierFreq; //detected by the UE
uint32_t ul_CarrierFreq; //detected by the UE uint32_t ul_CarrierFreq; //detected by the UE
......
...@@ -74,6 +74,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -74,6 +74,7 @@ int NB_rrc_mac_config_req_eNB(
int physCellId, int physCellId,
int p_eNB, int p_eNB,
int Ncp, int Ncp,
int Ncp_UL,
long eutra_band,//FIXME: frequencyBandIndicator in sib1 (is a long not an int!!) long eutra_band,//FIXME: frequencyBandIndicator in sib1 (is a long not an int!!)
struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1 struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1
struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1 struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1
......
...@@ -572,11 +572,12 @@ rrc_eNB_generate_RRCConnectionSetup_NB( ...@@ -572,11 +572,12 @@ rrc_eNB_generate_RRCConnectionSetup_NB(
0, //physCellID 0, //physCellID
0, //p_eNB 0, //p_eNB
0, //Ncp 0, //Ncp
0, //Ncp_UL
0, //eutraband 0, //eutraband
(NS_PmaxList_NB_r13_t*) NULL, (NS_PmaxList_NB_r13_t*) NULL,
(MultiBandInfoList_NB_r13_t*) NULL, (MultiBandInfoList_NB_r13_t*) NULL,
(DL_Bitmap_NB_r13_t*) NULL, (DL_Bitmap_NB_r13_t*) NULL,
(long*) NULL, (long*) NULL,//eutraControlRegionSize
(long*)NULL, (long*)NULL,
// (uint8_t*) NULL, //SIWindowSize // (uint8_t*) NULL, //SIWindowSize
// (uint16_t*)NULL, //SIperiod // (uint16_t*)NULL, //SIperiod
...@@ -800,6 +801,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete_NB( ...@@ -800,6 +801,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete_NB(
0,//physCellId --> this parameters could be set to 0 since no MIB is present 0,//physCellId --> this parameters could be set to 0 since no MIB is present
0,// p_eNB 0,// p_eNB
0, //Ncp 0, //Ncp
0, //Ncp_UL
0, //eutra_band 0, //eutra_band
(struct NS_PmaxList_NB_r13*) NULL, (struct NS_PmaxList_NB_r13*) NULL,
(struct MultiBandInfoList_NB_r13*) NULL, (struct MultiBandInfoList_NB_r13*) NULL,
...@@ -842,6 +844,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete_NB( ...@@ -842,6 +844,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete_NB(
0,//physCellId --> this parameters could be set to 0 since no MIB is present 0,//physCellId --> this parameters could be set to 0 since no MIB is present
0,// p_eNB 0,// p_eNB
0, //Ncp 0, //Ncp
0, //Ncp_UL
0, //eutra_band 0, //eutra_band
(struct NS_PmaxList_NB_r13*) NULL, (struct NS_PmaxList_NB_r13*) NULL,
(struct MultiBandInfoList_NB_r13*) NULL, (struct MultiBandInfoList_NB_r13*) NULL,
...@@ -1606,7 +1609,7 @@ static void ...@@ -1606,7 +1609,7 @@ static void
init_SI_NB( init_SI_NB(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
const int CC_id, const int CC_id,
RrcConfigurationReq* configuration RrcConfigurationReq* configuration //openair2/COMMON/rrc_messages_types
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
...@@ -1618,7 +1621,8 @@ init_SI_NB( ...@@ -1618,7 +1621,8 @@ init_SI_NB(
//copy basic parameters //copy basic parameters
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].physCellId = configuration->Nid_cell[CC_id]; eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].physCellId = configuration->Nid_cell[CC_id];
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_eNB = configuration->nb_antenna_ports[CC_id]; eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_eNB = configuration->nb_antenna_ports[CC_id];
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp = configuration->prefix_type[CC_id]; eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp = configuration->prefix_type[CC_id]; //DL Cyclic prefix
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp_UL = configuration->prefix_type_UL[CC_id];//UL cyclic prefix
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id]; eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id]; eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
...@@ -1716,6 +1720,7 @@ init_SI_NB( ...@@ -1716,6 +1720,7 @@ init_SI_NB(
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].physCellId, eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].physCellId,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_eNB, eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_eNB,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp, eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp_UL,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].sib1_NB->freqBandIndicator_r13, //eutra_band eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].sib1_NB->freqBandIndicator_r13, //eutra_band
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].sib1_NB->freqBandInfo_r13, eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].sib1_NB->freqBandInfo_r13,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].sib1_NB->multiBandInfoList_r13, eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].sib1_NB->multiBandInfoList_r13,
......
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