Commit 6e494638 authored by Matthieu Kanj's avatar Matthieu Kanj

Separation completed for PHY/INIT/ (for files:defs_nb_iot.h lte_init_nb_iot.c)

parent b139eeb8
......@@ -20,26 +20,24 @@
*/
#ifndef __INIT_DEFS_NB_IoT__H__
#define __INIT_DEFS_NB_IoT__H__
#ifndef __INIT_DEFS_NB_IOT__H__
#define __INIT_DEFS_NB_IOT__H__
//#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "SystemInformationBlockType2.h"
//#include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "MobilityControlInfo.h"
#if defined(Rel10) || defined(Rel14)
#include "SCellToAddMod-r10.h"
#endif
//#include "RadioResourceConfigDedicated.h"
//#include "TDD-Config.h"
//#include "MBSFN-SubframeConfigList.h"
//#include "MobilityControlInfo.h"
//#if defined(Rel10) || defined(Rel14)
//#include "SCellToAddMod-r10.h"
//#endif
/*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/
void NB_phy_config_mib_eNB(
int Mod_id,
void phy_config_mib_eNB_NB_IoT(int Mod_id,
int CC_id,
int eutra_band,
int Nid_cell,
......@@ -61,15 +59,14 @@ void NB_phy_config_mib_eNB(
// RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
// );
void NB_phy_config_sib2_eNB(uint8_t Mod_id,
void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id,
int CC_id,
nfapi_nb_iot_config_t *config,
nfapi_config_NB_IoT_t *config,
nfapi_rf_config_t *rf_config,
nfapi_uplink_reference_signal_config_t* ul_nrs_config,
extra_phyConfig_t* extra_phy_parms
);
extra_phyConfig_t* extra_phy_parms);
void NB_phy_config_dedicated_eNB(module_id_t Mod_id,
void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id,
int CC_id,
rnti_t rnti,
extra_phyConfig_t* extra_phy_parms);
......
......@@ -19,18 +19,18 @@
* contact@openairinterface.org
*/
#include "defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
//#include "defs.h"
//#include "SCHED/defs.h"
//#include "PHY/extern.h"
#include "PHY/extern_NB_IoT.h"
#include "RRC/LITE/proto_nb_iot.h"
#include "SIMULATION/TOOLS/defs.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
//#include "SIMULATION/TOOLS/defs.h"
//#include "RadioResourceConfigCommonSIB.h"
//#include "RadioResourceConfigDedicated.h"
//#include "TDD-Config.h"
//#include "LAYER2/MAC/extern.h"
//#include "MBSFN-SubframeConfigList.h"
//#include "UTIL/LOG/vcd_signal_dumper.h"
#define DEBUG_PHY
#include "assertions.h"
#include <math.h>
......@@ -41,13 +41,12 @@
#include "RadioResourceConfigDedicated-NB-r13.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
extern uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map4[138];
//extern uint16_t prach_root_sequence_map0_3[838];
//extern uint16_t prach_root_sequence_map4[138];
//uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10};
void NB_phy_config_mib_eNB(
int Mod_id,
void phy_config_mib_eNB_NB_IoT(int Mod_id,
int CC_id,
int eutra_band,
int Nid_cell,
......@@ -190,13 +189,12 @@ void NB_phy_config_mib_eNB(
//
//}
void NB_phy_config_sib2_eNB(uint8_t Mod_id,
void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id,
int CC_id,
nfapi_nb_iot_config_t *config,
nfapi_config_NB_IoT_t *config,
nfapi_rf_config_t *rf_config,
nfapi_uplink_reference_signal_config_t* ul_nrs_config,
extra_phyConfig_t* extra_phy_parms
)
extra_phyConfig_t* extra_phy_parms)
{
NB_IoT_DL_FRAME_PARMS *fp = &PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->frame_parms;
LOG_D(PHY,"[eNB%d] CCid %d: Applying nb_iot_config from sib2_NB\n",Mod_id,CC_id);
......@@ -351,15 +349,14 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
void NB_phy_config_dedicated_eNB(uint8_t Mod_id,
void phy_config_dedicated_eNB_NB_IoT(uint8_t Mod_id,
int CC_id,
uint16_t rnti,
extra_phyConfig_t *extra_parms
)
extra_phyConfig_t *extra_parms)
{
PHY_VARS_eNB_NB_IoT *eNB = PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id];
NB_IoT_eNB_NPDCCH_t *npdcch;
uint8_t UE_id = find_ue(rnti,eNB);
uint8_t UE_id = find_ue_NB_IoT(rnti,eNB);
if (UE_id == -1) {
LOG_E( PHY, "[eNB %"PRIu8"] find_ue() returns -1\n", Mod_id);
......@@ -376,7 +373,7 @@ void NB_phy_config_dedicated_eNB(uint8_t Mod_id,
// npdcch->npdcch_Offset_USS = extra_parms->npdcch_Offset_USS;
// npdcch->npdcch_StartSF_USS = extra_parms->npdcch_StartSF_USS;
LOG_I(PHY,"NB_phy_config_dedicated_eNB: npdcch_NumRepetitions = %d\n",
LOG_I(PHY,"phy_config_dedicated_eNB_NB_IoT: npdcch_NumRepetitions = %d\n",
npdcch->npdcch_NumRepetitions);
} else {
......
......@@ -321,7 +321,7 @@ 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,
phy_config_mib_eNB_NB_IoT(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->cfg->nfapi_config.rf_bands.rf_band[0],//eutraband
config_INFO->cfg->sch_config.physical_cell_id.value,
......@@ -339,13 +339,12 @@ void PHY_config_req(PHY_Config_t* config_INFO){
if(config_INFO->get_COMMON != 0)
{
//Common Configuration included in SIB2-NB
NB_phy_config_sib2_eNB(config_INFO->mod_id,
phy_config_sib2_eNB_NB_IoT(config_INFO->mod_id,
config_INFO->CC_id,
&config_INFO->cfg->nb_iot_config, // FIXME to be evaluated is should be passed a pointer
&config_INFO->cfg->rf_config,
&config_INFO->cfg->uplink_reference_signal_config,
&config_INFO->extra_phy_parms
);
&config_INFO->extra_phy_parms);
}
///FOR FAPI is not specified
......@@ -353,11 +352,10 @@ void PHY_config_req(PHY_Config_t* config_INFO){
{
//Dedicated Configuration
NB_phy_config_dedicated_eNB(config_INFO->mod_id,
phy_config_dedicated_eNB_NB_IoT(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->rnti,
&config_INFO->extra_phy_parms
);
&config_INFO->extra_phy_parms);
}
}
......
......@@ -855,7 +855,7 @@ typedef struct {
nfapi_uint16_tlv_t dl_gap_threshold;
nfapi_uint16_tlv_t dl_gap_periodicity;
nfapi_uint16_tlv_t dl_gap_duration_coefficient;
} nfapi_nb_iot_config_t;
} nfapi_config_NB_IoT_t;
#define NFAPI_NB_IOT_CONFIG_OPERATING_MODE_TAG 0x00A5
#define NFAPI_NB_IOT_CONFIG_ANCHOR_TAG 0x00A6
......@@ -1102,7 +1102,7 @@ typedef struct {
nfapi_uplink_reference_signal_config_t uplink_reference_signal_config;
nfapi_tdd_frame_structure_t tdd_frame_structure_config;
nfapi_l23_config_t l23_config;
nfapi_nb_iot_config_t nb_iot_config;
nfapi_config_NB_IoT_t nb_iot_config;
// addition nfapi tlvs as per table 2-16 in idle or configure
nfapi_nfapi_t nfapi_config;
......@@ -1125,7 +1125,7 @@ typedef struct {
nfapi_emtc_config_t emtc_config;
nfapi_tdd_frame_structure_t tdd_frame_structure_config;
nfapi_l23_config_t l23_config;
nfapi_nb_iot_config_t nb_iot_config;
nfapi_config_NB_IoT_t nb_iot_config;
// addition nfapi tlvs as per table 2-16 in idle or configure
nfapi_nfapi_t nfapi_config;
......
......@@ -9,8 +9,8 @@ Add: openair1/PHY/INIT/defs_nb_iot.h
Add: openair1/PHY/INIT/Lte_init_nb_iot.c
Comment:
Functions: NB_phy_config_mib_eNB(), NB_phy_config_sib2_eNB(), NB_phy_config_dedicated_eNB().
Parameters: NB_DL_FRAME_PARAMS(Original LTE_DL_FRAME_PARAMS)
Functions: phy_config_mib_eNB_NB_IoT(), phy_config_sib2_eNB_NB_IoT(), phy_config_dedicated_eNB_NB_IoT().
Parameters: NB_IoT_DL_FRAME_PARAMS(Original LTE_DL_FRAME_PARAMS)
5/14
Add: openair2/Layer2/MAC/defs_nb_iot.h
......
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