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