Commit 03c6604f authored by Matthieu Kanj's avatar Matthieu Kanj

bug fix for configuration part

parent b5a55c13
......@@ -54,7 +54,7 @@
#include "PHY/extern.h"
///////// for NB-IoT /////////////////////////
//#include "SystemInformationBlockType2-NB-r13.h"
#include "SystemInformationBlockType2-NB-r13.h"
//////////////////END/////////////////////
/* those macros are here to help diagnose problems in configuration files
......@@ -251,7 +251,7 @@
//
/////////////////////////////////////////////////NB-IoT parameters ///////////////////////////////////////////////
//
/*
///////////////////////////////////////////////// RRC parameters in the config file of merge branch
#define ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT "rach_powerRampingStep_NB"
#define ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT "rach_preambleInitialReceivedTargetPower_NB"
......@@ -297,7 +297,7 @@
#define ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT "npdcch_NumRepetitions_RA"
#define ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT "npdcch_StartSF_CSS_RA"
#define ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT "npdcch_Offset_RA"
*/
/////////////////////////////////////////////////END///////////////////////////////////////////////
#define KHz (1000UL)
......@@ -551,7 +551,7 @@ static int enb_check_band_frequencies(char* lib_config_file_name_pP,
if (band == eutra_bands[band_index].band) {
uint32_t uplink_frequency = downlink_frequency + uplink_frequency_offset;
/* AssertError (eutra_bands[band_index].dl_min < downlink_frequency, errors ++,
AssertError (eutra_bands[band_index].dl_min < downlink_frequency, errors ++,
"Failed to parse eNB configuration file %s, enb %d downlink frequency %u too low (%u) for band %d!",
lib_config_file_name_pP, enb_properties_index, downlink_frequency, eutra_bands[band_index].dl_min, band);
AssertError (downlink_frequency < eutra_bands[band_index].dl_max, errors ++,
......@@ -564,7 +564,7 @@ static int enb_check_band_frequencies(char* lib_config_file_name_pP,
AssertError (uplink_frequency < eutra_bands[band_index].ul_max, errors ++,
"Failed to parse eNB configuration file %s, enb %d uplink frequency %u too high (%u) for band %d!",
lib_config_file_name_pP, enb_properties_index, uplink_frequency, eutra_bands[band_index].ul_max, band);
*/
AssertError (eutra_bands[band_index].frame_type == frame_type, errors ++,
"Failed to parse eNB configuration file %s, enb %d invalid frame type (%d/%d) for band %d!",
lib_config_file_name_pP, enb_properties_index, eutra_bands[band_index].frame_type, frame_type, band);
......@@ -763,7 +763,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
//
/////////////////////////////////////////////////NB-IoT parameters ///////////////////////////////////////////////
//
/*
libconfig_int rach_raResponseWindowSize_NB = 0;
libconfig_int rach_macContentionResolutionTimer_NB = 0;
libconfig_int rach_powerRampingStep_NB = 0;
......@@ -804,7 +804,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int npdcch_NumRepetitions_RA = 0;
libconfig_int npdcch_StartSF_CSS_RA = 0;
const char* npdcch_Offset_RA = NULL;
*/
////////////////////////////////////////////////END///////////////////////////////////////////////
......@@ -949,7 +949,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
for (j = 0; j < num_component_carriers /*&& j < MAX_NUM_CCs*/; j++) {
component_carrier = config_setting_get_elem(setting_component_carriers, j);
//printf("Component carrier %d\n",component_carrier);
if (!(config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_CC_NODE_FUNCTION, &cc_node_function)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_CC_NODE_TIMING, &cc_node_timing)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_CC_NODE_SYNCH_REF, &cc_node_synch_ref)
......@@ -1020,10 +1020,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N310, &ue_TimersAndConstants_n310)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N311, &ue_TimersAndConstants_n311)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, &ue_TransmissionMode)
/*
//
/////////////////////////////////////////////// NB-IoT ///////////////////////////////////////////////
//
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT, &rach_raResponseWindowSize_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT, &rach_macContentionResolutionTimer_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT, &rach_powerRampingStep_NB)
......@@ -1046,14 +1042,12 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT, &npusch_p0_NominalNPUSCH)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_NPUSCH_ALPHA_NB_IOT, &npusch_alpha)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT, &deltaPreambleMsg3)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT, &ue_TimersAndConstants_t300_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T301_NB_IOT, &ue_TimersAndConstants_t301_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T310_NB_IOT, &ue_TimersAndConstants_t310_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T311_NB_IOT, &ue_TimersAndConstants_t311_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N310_NB_IOT, &ue_TimersAndConstants_n310_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N311_NB_IOT, &ue_TimersAndConstants_n311_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_PERIODICITY_NB_IOT, &nprach_Periodicity)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT, &nprach_StartTime)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT, &nprach_SubcarrierOffset)
......@@ -1064,8 +1058,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT, &npdcch_NumRepetitions_RA)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT, &npdcch_StartSF_CSS_RA)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT, &npdcch_Offset_RA)
*/
////////////////////////////////////////////////////END///////////////////////////////////////////////
#if defined(Rel10) || defined(Rel14)
......@@ -2119,7 +2111,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
lib_config_file_name_pP, i, ue_TransmissionMode);
break;
}
/*
//////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////// NB-IoT part ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -2729,6 +2721,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
break;
}
switch (ue_TimersAndConstants_t301_NB) {
case 2500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms2500;
......@@ -3010,23 +3003,23 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
}
switch (nprach_SubcarrierOffset) {
case 40:
case 0:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n0;
break;
case 80:
case 12:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n12;
break;
case 160:
case 24:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n24;
break;
case 240:
case 36:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n36;
break;
case 32:
case 2:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n2;
break;
......@@ -3277,7 +3270,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for npdcch_Offset_RA choice: zero,oneEighth,oneFourth,threeEighth !\n",
lib_config_file_name_pP, i, npdcch_Offset_RA);
*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////END//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -4119,7 +4112,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
"Failed to parse eNB configuration file %s, mismatch between %u active eNBs and %u corresponding defined eNBs !\n",
lib_config_file_name_pP, num_enb_properties, enb_properties_index);
enb_config_display();
//enb_config_display();
return &enb_properties;
}
......
......@@ -209,7 +209,7 @@ typedef struct Enb_properties_s {
#endif
long ue_TransmissionMode[1+MAX_NUM_CCs];
//
//*************************************** NB-IoT **********************************************
/////////////////////////////////////////// NB-IoT ///////////////////////////////////////////////////
//
long rach_raResponseWindowSize_NB[1+MAX_NUM_CCs];
long rach_macContentionResolutionTimer_NB[1+MAX_NUM_CCs];
......@@ -220,7 +220,7 @@ typedef struct Enb_properties_s {
long pcch_defaultPagingCycle_NB[1+MAX_NUM_CCs];
long nprach_CP_Length[1+MAX_NUM_CCs];
long nprach_rsrp_range[1+MAX_NUM_CCs];
char* nprach_SubcarrierMSG3_RangeStart;
long nprach_SubcarrierMSG3_RangeStart[1+MAX_NUM_CCs];
long maxNumPreambleAttemptCE_NB[1+MAX_NUM_CCs];
long npdsch_nrs_Power[1+MAX_NUM_CCs];
long npusch_ack_nack_numRepetitions_NB[1+MAX_NUM_CCs];
......@@ -231,7 +231,7 @@ typedef struct Enb_properties_s {
long npusch_groupAssignmentNPUSCH_r13[1+MAX_NUM_CCs];
long dl_GapThreshold_NB[1+MAX_NUM_CCs];
long dl_GapPeriodicity_NB[1+MAX_NUM_CCs];
char* dl_GapDurationCoeff_NB;
long dl_GapDurationCoeff_NB[1+MAX_NUM_CCs];
long npusch_p0_NominalNPUSCH[1+MAX_NUM_CCs];
long npusch_alpha[1+MAX_NUM_CCs];
long deltaPreambleMsg3[1+MAX_NUM_CCs];
......@@ -250,9 +250,9 @@ typedef struct Enb_properties_s {
long numRepetitionsPerPreambleAttempt[1+MAX_NUM_CCs];
long npdcch_NumRepetitions_RA[1+MAX_NUM_CCs];
long npdcch_StartSF_CSS_RA[1+MAX_NUM_CCs];
char* npdcch_Offset_RA;
long npdcch_Offset_RA[1+MAX_NUM_CCs];
//********************************************END******************************************************
/////////////////////////////////////////////END/////////////////////////////////////////////
long srb1_timer_poll_retransmit;
long srb1_timer_reordering;
long srb1_timer_status_prohibit;
......
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