Commit cd18c09f authored by Raymond Knopp's avatar Raymond Knopp

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5740 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent d2bf4ddc
...@@ -78,10 +78,10 @@ typedef struct CellInfo_s { ...@@ -78,10 +78,10 @@ typedef struct CellInfo_s {
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// eNB: ENB_APP -> PHY messages // eNB: ENB_APP -> PHY messages
typedef struct PhyConfigurationReq_s { typedef struct PhyConfigurationReq_s {
lte_frame_type_t frame_type; lte_frame_type_t frame_type[MAX_NUM_CCs];
lte_prefix_type_t prefix_type; lte_prefix_type_t prefix_type[MAX_NUM_CCs];
uint32_t downlink_frequency; uint32_t downlink_frequency[MAX_NUM_CCs];
int32_t uplink_frequency_offset; int32_t uplink_frequency_offset[MAX_NUM_CCs];
} PhyConfigurationReq; } PhyConfigurationReq;
// UE: RRC -> PHY messages // UE: RRC -> PHY messages
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "as_message.h" #include "as_message.h"
#include "rrc_types.h" #include "rrc_types.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages for RRC logging // Messages for RRC logging
...@@ -95,12 +96,86 @@ typedef struct RrcConfigurationReq_s { ...@@ -95,12 +96,86 @@ typedef struct RrcConfigurationReq_s {
uint16_t mnc; uint16_t mnc;
uint8_t mnc_digit_length; uint8_t mnc_digit_length;
/*
paging_drx_t default_drx; paging_drx_t default_drx;
lte_frame_type_t frame_type; lte_frame_type_t frame_type;
uint8_t tdd_config; uint8_t tdd_config;
uint8_t tdd_config_s; uint8_t tdd_config_s;
int16_t eutra_band; int16_t eutra_band;
*/
int16_t nb_cc;
lte_frame_type_t frame_type[MAX_NUM_CCs];
uint8_t tdd_config[MAX_NUM_CCs];
uint8_t tdd_config_s[MAX_NUM_CCs];
lte_prefix_type_t prefix_type[MAX_NUM_CCs];
int16_t eutra_band[MAX_NUM_CCs];
uint32_t downlink_frequency[MAX_NUM_CCs];
int32_t uplink_frequency_offset[MAX_NUM_CCs];
int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
int nb_antennas_tx[MAX_NUM_CCs];
int nb_antennas_rx[MAX_NUM_CCs];
long prach_root[MAX_NUM_CCs];
long prach_config_index[MAX_NUM_CCs];
BOOLEAN_t prach_high_speed[MAX_NUM_CCs];
long prach_zero_correlation[MAX_NUM_CCs];
long prach_freq_offset[MAX_NUM_CCs];
long pucch_delta_shift[MAX_NUM_CCs];
long pucch_nRB_CQI[MAX_NUM_CCs];
long pucch_nCS_AN[MAX_NUM_CCs];
#ifndef Rel10
long pucch_n1_AN[MAX_NUM_CCs];
#endif
long pdsch_referenceSignalPower[MAX_NUM_CCs];
long pdsch_p_b[MAX_NUM_CCs];
long pusch_n_SB[MAX_NUM_CCs];
long pusch_hoppingMode[MAX_NUM_CCs];
long pusch_hoppingOffset[MAX_NUM_CCs];
BOOLEAN_t pusch_enable64QAM[MAX_NUM_CCs];
BOOLEAN_t pusch_groupHoppingEnabled[MAX_NUM_CCs];
long pusch_groupAssignment[MAX_NUM_CCs];
BOOLEAN_t pusch_sequenceHoppingEnabled[MAX_NUM_CCs];
long pusch_nDMRS1[MAX_NUM_CCs];
long phich_duration[MAX_NUM_CCs];
long phich_resource[MAX_NUM_CCs];
BOOLEAN_t srs_enable[MAX_NUM_CCs];
long srs_BandwidthConfig[MAX_NUM_CCs];
long srs_SubframeConfig[MAX_NUM_CCs];
BOOLEAN_t srs_ackNackST[MAX_NUM_CCs];
BOOLEAN_t srs_MaxUpPts[MAX_NUM_CCs];
long pusch_p0_Nominal[MAX_NUM_CCs];
long pusch_alpha[MAX_NUM_CCs];
long pucch_p0_Nominal[MAX_NUM_CCs];
long msg3_delta_Preamble[MAX_NUM_CCs];
long ul_CyclicPrefixLength[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
long rach_numberOfRA_Preambles[MAX_NUM_CCs];
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs];
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];
long rach_messageSizeGroupA[MAX_NUM_CCs];
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
long rach_powerRampingStep[MAX_NUM_CCs];
long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs];
long rach_preambleTransMax[MAX_NUM_CCs];
long rach_raResponseWindowSize[MAX_NUM_CCs];
long rach_macContentionResolutionTimer[MAX_NUM_CCs];
long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs];
long bcch_modificationPeriodCoeff[MAX_NUM_CCs];
long pcch_defaultPagingCycle[MAX_NUM_CCs];
long pcch_nB[MAX_NUM_CCs];
long ue_TimersAndConstants_t300[MAX_NUM_CCs];
long ue_TimersAndConstants_t301[MAX_NUM_CCs];
long ue_TimersAndConstants_t310[MAX_NUM_CCs];
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
} RrcConfigurationReq; } RrcConfigurationReq;
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
......
...@@ -3,5 +3,5 @@ ENB_APP_DIR = $(OPENAIR2_TOP)/ENB_APP ...@@ -3,5 +3,5 @@ ENB_APP_DIR = $(OPENAIR2_TOP)/ENB_APP
ENB_APP_OBJS = $(ENB_APP_DIR)/enb_app.o \ ENB_APP_OBJS = $(ENB_APP_DIR)/enb_app.o \
$(ENB_APP_DIR)/enb_config.o $(ENB_APP_DIR)/enb_config.o
ENB_APP_incl = \ ENB_APP_incl = \
-I$(ENB_APP_DIR) -I$(ENB_APP_DIR) -I$(OPENAIR2_TOP)
...@@ -71,14 +71,15 @@ extern unsigned char NB_eNB_INST; ...@@ -71,14 +71,15 @@ extern unsigned char NB_eNB_INST;
static void configure_phy(uint32_t enb_id, const Enb_properties_array_t *enb_properties) static void configure_phy(uint32_t enb_id, const Enb_properties_array_t *enb_properties)
{ {
MessageDef *msg_p; MessageDef *msg_p;
int CC_id;
msg_p = itti_alloc_new_message (TASK_ENB_APP, PHY_CONFIGURATION_REQ); msg_p = itti_alloc_new_message (TASK_ENB_APP, PHY_CONFIGURATION_REQ);
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
PHY_CONFIGURATION_REQ (msg_p).frame_type = enb_properties->properties[enb_id]->frame_type; PHY_CONFIGURATION_REQ (msg_p).frame_type[CC_id] = enb_properties->properties[enb_id]->frame_type[CC_id];
PHY_CONFIGURATION_REQ (msg_p).prefix_type = enb_properties->properties[enb_id]->prefix_type; PHY_CONFIGURATION_REQ (msg_p).prefix_type[CC_id] = enb_properties->properties[enb_id]->prefix_type[CC_id];
PHY_CONFIGURATION_REQ (msg_p).downlink_frequency = enb_properties->properties[enb_id]->downlink_frequency; PHY_CONFIGURATION_REQ (msg_p).downlink_frequency[CC_id] = enb_properties->properties[enb_id]->downlink_frequency[CC_id];
PHY_CONFIGURATION_REQ (msg_p).uplink_frequency_offset = enb_properties->properties[enb_id]->uplink_frequency_offset; PHY_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[CC_id] = enb_properties->properties[enb_id]->uplink_frequency_offset[CC_id];
}
itti_send_msg_to_task (TASK_PHY_ENB, enb_id, msg_p); itti_send_msg_to_task (TASK_PHY_ENB, enb_id, msg_p);
} }
...@@ -86,6 +87,7 @@ static void configure_phy(uint32_t enb_id, const Enb_properties_array_t *enb_pro ...@@ -86,6 +87,7 @@ static void configure_phy(uint32_t enb_id, const Enb_properties_array_t *enb_pro
static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_properties) static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_properties)
{ {
MessageDef *msg_p = NULL; MessageDef *msg_p = NULL;
int CC_id;
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ); msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
...@@ -94,12 +96,13 @@ static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_pro ...@@ -94,12 +96,13 @@ static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_pro
RRC_CONFIGURATION_REQ (msg_p).mcc = enb_properties->properties[enb_id]->mcc; RRC_CONFIGURATION_REQ (msg_p).mcc = enb_properties->properties[enb_id]->mcc;
RRC_CONFIGURATION_REQ (msg_p).mnc = enb_properties->properties[enb_id]->mnc; RRC_CONFIGURATION_REQ (msg_p).mnc = enb_properties->properties[enb_id]->mnc;
RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length = enb_properties->properties[enb_id]->mnc_digit_length; RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length = enb_properties->properties[enb_id]->mnc_digit_length;
RRC_CONFIGURATION_REQ (msg_p).default_drx = enb_properties->properties[enb_id]->default_drx; for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
RRC_CONFIGURATION_REQ (msg_p).frame_type = enb_properties->properties[enb_id]->frame_type; RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[CC_id] = enb_properties->properties[enb_id]->pcch_defaultPagingCycle[CC_id];
RRC_CONFIGURATION_REQ (msg_p).tdd_config = enb_properties->properties[enb_id]->tdd_config; RRC_CONFIGURATION_REQ (msg_p).frame_type[CC_id] = enb_properties->properties[enb_id]->frame_type[CC_id];
RRC_CONFIGURATION_REQ (msg_p).tdd_config_s = enb_properties->properties[enb_id]->tdd_config_s; RRC_CONFIGURATION_REQ (msg_p).tdd_config[CC_id] = enb_properties->properties[enb_id]->tdd_config[CC_id];
RRC_CONFIGURATION_REQ (msg_p).eutra_band = enb_properties->properties[enb_id]->eutra_band; RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[CC_id] = enb_properties->properties[enb_id]->tdd_config_s[CC_id];
RRC_CONFIGURATION_REQ (msg_p).eutra_band[CC_id] = enb_properties->properties[enb_id]->eutra_band[CC_id];
}
itti_send_msg_to_task (TASK_RRC_ENB, enb_id, msg_p); itti_send_msg_to_task (TASK_RRC_ENB, enb_id, msg_p);
} }
...@@ -139,7 +142,7 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end, con ...@@ -139,7 +142,7 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end, con
s1ap_register_eNB->mcc = enb_properties->properties[enb_id]->mcc; s1ap_register_eNB->mcc = enb_properties->properties[enb_id]->mcc;
s1ap_register_eNB->mnc = enb_properties->properties[enb_id]->mnc; s1ap_register_eNB->mnc = enb_properties->properties[enb_id]->mnc;
s1ap_register_eNB->mnc_digit_length = enb_properties->properties[enb_id]->mnc_digit_length; s1ap_register_eNB->mnc_digit_length = enb_properties->properties[enb_id]->mnc_digit_length;
s1ap_register_eNB->default_drx = enb_properties->properties[enb_id]->default_drx; s1ap_register_eNB->default_drx = enb_properties->properties[enb_id]->pcch_defaultPagingCycle[0];
s1ap_register_eNB->nb_mme = enb_properties->properties[enb_id]->nb_mme; s1ap_register_eNB->nb_mme = enb_properties->properties[enb_id]->nb_mme;
AssertFatal (s1ap_register_eNB->nb_mme <= S1AP_MAX_NB_MME_IP_ADDRESS, "Too many MME for eNB %d (%d/%d)!", enb_id, s1ap_register_eNB->nb_mme, S1AP_MAX_NB_MME_IP_ADDRESS); AssertFatal (s1ap_register_eNB->nb_mme <= S1AP_MAX_NB_MME_IP_ADDRESS, "Too many MME for eNB %d (%d/%d)!", enb_id, s1ap_register_eNB->nb_mme, S1AP_MAX_NB_MME_IP_ADDRESS);
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
# include "sctp_eNB_task.h" # include "sctp_eNB_task.h"
# endif # endif
#endif #endif
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs" #define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
#define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mobile_country_code" #define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mobile_country_code"
#define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE "mobile_network_code" #define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE "mobile_network_code"
#define ENB_CONFIG_STRING_DEFAULT_PAGING_DRX "default_paging_drx" #define ENB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers"
#define ENB_CONFIG_STRING_FRAME_TYPE "frame_type" #define ENB_CONFIG_STRING_FRAME_TYPE "frame_type"
#define ENB_CONFIG_STRING_TDD_CONFIG "tdd_config" #define ENB_CONFIG_STRING_TDD_CONFIG "tdd_config"
...@@ -78,9 +78,68 @@ ...@@ -78,9 +78,68 @@
#define ENB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency" #define ENB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency"
#define ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset" #define ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset"
#define ENB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers" #define ENB_CONFIG_STRING_NID_CELL "Nid_cell"
#define ENB_CONFIG_STRING_CELL_ID "cell_id"
#define ENB_CONFIG_STRING_N_RB_DL "N_RB_DL" #define ENB_CONFIG_STRING_N_RB_DL "N_RB_DL"
#define ENB_CONFIG_STRING_CELL_MBSFN "Nid_cell_mbsfn"
#define ENB_CONFIG_STRING_NB_ANT_TX "nb_antennas_tx"
#define ENB_CONFIG_STRING_NB_ANT_RX "nb_antennas_rx"
#define ENB_CONFIG_STRING_PRACH_ROOT "prach_root"
#define ENB_CONFIG_STRING_PRACH_CONFIG_INDEX "prach_config_index"
#define ENB_CONFIG_STRING_PRACH_HIGH_SPEED "prach_high_speed"
#define ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION "prach_zero_correlation"
#define ENB_CONFIG_STRING_PRACH_FREQ_OFFSET "prach_freq_offset"
#define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift"
#define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI"
#define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN"
#ifndef Rel10
#define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN"
#endif
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
#define ENB_CONFIG_STRING_PDSCH_PB "pdsch_p_b"
#define ENB_CONFIG_STRING_PUSCH_N_SB "pusch_n_SB"
#define ENB_CONFIG_STRING_PUSCH_HOPPINGMODE "pusch_hoppingMode"
#define ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET "pusch_hoppingOffset"
#define ENB_CONFIG_STRING_PUSCH_ENABLE64QAM "pusch_enable64QAM"
#define ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN "pusch_groupHoppingEnabled"
#define ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT "pusch_groupAssignment"
#define ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN "pusch_sequenceHoppingEnabled"
#define ENB_CONFIG_STRING_PUSCH_NDMRS1 "pusch_nDMRS1"
#define ENB_CONFIG_STRING_PHICH_DURATION "phich_duration"
#define ENB_CONFIG_STRING_PHICH_RESOURCE "phich_resource"
#define ENB_CONFIG_STRING_SRS_ENABLE "srs_enable"
#define ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG "srs_BandwidthConfig"
#define ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG "srs_SubframeConfig"
#define ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG "srs_ackNackST"
#define ENB_CONFIG_STRING_SRS_MAXUPPTS "srs_MaxUpPts"
#define ENB_CONFIG_STRING_PUSCH_PO_NOMINAL "pusch_p0_Nominal"
#define ENB_CONFIG_STRING_PUSCH_ALPHA "pusch_alpha"
#define ENB_CONFIG_STRING_PUCCH_PO_NOMINAL "pucch_p0_Nominal"
#define ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE "msg3_delta_Preamble"
#define ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1 "pucch_deltaF_Format1"
#define ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b "pucch_deltaF_Format1b"
#define ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2 "pucch_deltaF_Format2"
#define ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A "pucch_deltaF_Format2a"
#define ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B "pucch_deltaF_Format2b"
#define ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES "rach_numberOfRA_Preambles"
#define ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG "rach_preamblesGroupAConfig"
#define ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA "rach_sizeOfRA_PreamblesGroupA"
#define ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA "rach_messageSizeGroupA"
#define ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB "rach_messagePowerOffsetGroupB"
#define ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP "rach_powerRampingStep"
#define ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER "rach_preambleInitialReceivedTargetPower"
#define ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX "rach_preambleTransMax"
#define ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE "rach_raResponseWindowSize"
#define ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER "rach_macContentionResolutionTimer"
#define ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX "rach_maxHARQ_Msg3Tx"
#define ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE "pcch_default_PagingCycle"
#define ENB_CONFIG_STRING_PCCH_NB "pcch_nB"
#define ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF "bcch_modificationPeriodCoeff"
#define ENB_CONFIG_STRING_UETIMERS_T300 "ue_TimersAndConstants_t300"
#define ENB_CONFIG_STRING_UETIMERS_T301 "ue_TimersAndConstants_t301"
#define ENB_CONFIG_STRING_UETIMERS_T310 "ue_TimersAndConstants_t310"
#define ENB_CONFIG_STRING_UETIMERS_T311 "ue_TimersAndConstants_t311"
#define ENB_CONFIG_STRING_UETIMERS_N310 "ue_TimersAndConstants_n310"
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address" #define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address"
#define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4" #define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4"
...@@ -179,12 +238,13 @@ static void enb_config_display(void) { ...@@ -179,12 +238,13 @@ static void enb_config_display(void) {
printf( "\tTAC: \t%u:\n",enb_properties.properties[i]->tac); printf( "\tTAC: \t%u:\n",enb_properties.properties[i]->tac);
printf( "\tMCC: \t%u:\n",enb_properties.properties[i]->mcc); printf( "\tMCC: \t%u:\n",enb_properties.properties[i]->mcc);
printf( "\tMNC: \t%u:\n",enb_properties.properties[i]->mnc); printf( "\tMNC: \t%u:\n",enb_properties.properties[i]->mnc);
printf( "\teutra band: \t%d:\n",enb_properties.properties[i]->eutra_band);
printf( "\tdownlink freq: \t%u:\n",enb_properties.properties[i]->downlink_frequency);
printf( "\tuplink freq: \t%d:\n",enb_properties.properties[i]->uplink_frequency_offset);
for (j=0; j< enb_properties.properties[i]->nb_cc; j++) { for (j=0; j< enb_properties.properties[i]->nb_cc; j++) {
printf( "\n\tCell ID for CC %d:\t%d:\n",j,enb_properties.properties[i]->cell_id[j]); printf( "\teutra band for CC %d: \t%d:\n",j,enb_properties.properties[i]->eutra_band[j]);
printf( "\tdownlink freq for CC %d: \t%llu:\n",j,enb_properties.properties[i]->downlink_frequency[j]);
printf( "\tuplink freq for CC %d: \t%d:\n",j,enb_properties.properties[i]->uplink_frequency_offset[j]);
printf( "\n\tCell ID for CC %d:\t%d:\n",j,enb_properties.properties[i]->Nid_cell[j]);
printf( "\tN_RB_DL for CC %d:\t%d:\n",j,enb_properties.properties[i]->N_RB_DL[j]); printf( "\tN_RB_DL for CC %d:\t%d:\n",j,enb_properties.properties[i]->N_RB_DL[j]);
} }
...@@ -271,7 +331,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -271,7 +331,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
const char* enb_name = NULL; const char* enb_name = NULL;
const char* mcc = 0; const char* mcc = 0;
const char* mnc = 0; const char* mnc = 0;
const char* default_drx = NULL;
const char* frame_type; const char* frame_type;
long int tdd_config; long int tdd_config;
long int tdd_config_s; long int tdd_config_s;
...@@ -279,8 +338,73 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -279,8 +338,73 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
long int eutra_band; long int eutra_band;
long long int downlink_frequency; long long int downlink_frequency;
long int uplink_frequency_offset; long int uplink_frequency_offset;
long int cell_id[MAX_NUM_CCs]; long int Nid_cell;
long int N_RB_DL[MAX_NUM_CCs]; long int Nid_cell_mbsfn;
long int N_RB_DL;
long int nb_antennas_tx;
long int nb_antennas_rx;
long int prach_root;
long int prach_config_index;
const char* prach_high_speed;
long int prach_zero_correlation;
long int prach_freq_offset;
long int pucch_delta_shift;
long int pucch_nRB_CQI;
long int pucch_nCS_AN;
#ifndef Rel10
long int pucch_n1_AN;
#endif
long int pdsch_referenceSignalPower;
long int pdsch_p_b;
long int pusch_n_SB;
const char * pusch_hoppingMode;
long int pusch_hoppingOffset;
const char* pusch_enable64QAM;
const char* pusch_groupHoppingEnabled;
long int pusch_groupAssignment;
const char* pusch_sequenceHoppingEnabled;
long int pusch_nDMRS1;
const char* phich_duration;
const char* phich_resource;
const char* srs_enable;
long int srs_BandwidthConfig;
long int srs_SubframeConfig;
const char* srs_ackNackST;
const char* srs_MaxUpPts;
long int pusch_p0_Nominal;
const char* pusch_alpha;
long int pucch_p0_Nominal;
long int msg3_delta_Preamble;
long int ul_CyclicPrefixLength;
const char* pucch_deltaF_Format1;
const char* pucch_deltaF_Format1a;
const char* pucch_deltaF_Format1b;
const char* pucch_deltaF_Format2;
const char* pucch_deltaF_Format2a;
const char* pucch_deltaF_Format2b;
long rach_numberOfRA_Preambles;
const char* rach_preamblesGroupAConfig;
long rach_sizeOfRA_PreamblesGroupA;
long rach_messageSizeGroupA;
const char* rach_messagePowerOffsetGroupB;
long rach_powerRampingStep;
long rach_preambleInitialReceivedTargetPower;
long rach_preambleTransMax;
long rach_raResponseWindowSize;
long rach_macContentionResolutionTimer;
long rach_maxHARQ_Msg3Tx;
long pcch_defaultPagingCycle;
const char* pcch_nB;
long bcch_modificationPeriodCoeff;
long ue_TimersAndConstants_t300;
long ue_TimersAndConstants_t301;
long ue_TimersAndConstants_t310;
long ue_TimersAndConstants_t311;
long ue_TimersAndConstants_n310;
long ue_TimersAndConstants_n311;
char* ipv4 = NULL; char* ipv4 = NULL;
char* ipv6 = NULL; char* ipv6 = NULL;
char* active = NULL; char* active = NULL;
...@@ -388,7 +512,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -388,7 +512,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac) && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc) && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc) && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_DEFAULT_PAGING_DRX, &default_drx)
) )
) { ) {
...@@ -417,132 +541,903 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -417,132 +541,903 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
enb_properties.properties[enb_properties_index]->mnc = (uint16_t)atoi(mnc); enb_properties.properties[enb_properties_index]->mnc = (uint16_t)atoi(mnc);
enb_properties.properties[enb_properties_index]->mnc_digit_length = strlen(mnc); enb_properties.properties[enb_properties_index]->mnc_digit_length = strlen(mnc);
if (strcmp(default_drx, "PAGING_DRX_32") == 0) {
enb_properties.properties[enb_properties_index]->default_drx = PAGING_DRX_32; // Parse optional physical parameters
} else if (strcmp(default_drx, "PAGING_DRX_64") == 0) {
enb_properties.properties[enb_properties_index]->default_drx = PAGING_DRX_64;
} else if (strcmp(default_drx, "PAGING_DRX_128") == 0) { setting_component_carriers = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_COMPONENT_CARRIERS);
enb_properties.properties[enb_properties_index]->default_drx = PAGING_DRX_128; enb_properties.properties[enb_properties_index]->nb_cc = 0;
} else if (strcmp(default_drx, "PAGING_DRX_256") == 0) { if(setting_component_carriers != NULL) {
enb_properties.properties[enb_properties_index]->default_drx = PAGING_DRX_256;
num_component_carriers = config_setting_length(setting_component_carriers);
printf("num component carrier %d \n", num_component_carriers);
//enb_properties.properties[enb_properties_index]->nb_cc = num_component_carriers;
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_FRAME_TYPE, &frame_type)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_TDD_CONFIG, &tdd_config)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_TDD_CONFIG_S, &tdd_config_s)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PREFIX_TYPE, &prefix_type)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_EUTRA_BAND, &eutra_band)
&& config_setting_lookup_int64(component_carrier, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NID_CELL, &Nid_cell)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_N_RB_DL, &N_RB_DL)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_CELL_MBSFN, &Nid_cell_mbsfn)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_TX, &nb_antennas_tx)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_RX, &nb_antennas_rx)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PRACH_ROOT, &prach_root)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, &prach_config_index)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PRACH_HIGH_SPEED, &prach_high_speed)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, &prach_zero_correlation)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, &prach_freq_offset)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, &pucch_delta_shift)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_NRB_CQI, &pucch_nRB_CQI)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_NCS_AN, &pucch_nCS_AN)
#ifndef Rel10
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_N1_AN, &pucch_n1_AN)
#endif
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PDSCH_RS_EPRE, &pdsch_referenceSignalPower)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PDSCH_PB, &pdsch_p_b)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUSCH_N_SB, &pusch_n_SB)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, &pusch_hoppingMode)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, &pusch_hoppingOffset)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, &pusch_enable64QAM)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, &pusch_groupHoppingEnabled)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, &pusch_groupAssignment)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, &pusch_sequenceHoppingEnabled)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUSCH_NDMRS1, &pusch_nDMRS1)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PHICH_DURATION, &phich_duration)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PHICH_RESOURCE, &phich_resource)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_SRS_ENABLE, &srs_enable)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, &pusch_p0_Nominal)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUSCH_ALPHA, &pusch_alpha)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, &pucch_p0_Nominal)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, &msg3_delta_Preamble)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, &pucch_deltaF_Format1)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, &pucch_deltaF_Format1b)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, &pucch_deltaF_Format2)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, &pucch_deltaF_Format2a)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, &pucch_deltaF_Format2b)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, &rach_numberOfRA_Preambles)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, &rach_preamblesGroupAConfig)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, &rach_powerRampingStep)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, &rach_preambleInitialReceivedTargetPower)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, &rach_preambleTransMax)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, &rach_raResponseWindowSize)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, &rach_macContentionResolutionTimer)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, &rach_maxHARQ_Msg3Tx)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, &bcch_modificationPeriodCoeff)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, &pcch_defaultPagingCycle)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PCCH_NB, &pcch_nB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, &bcch_modificationPeriodCoeff)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T300, &ue_TimersAndConstants_t300)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T301, &ue_TimersAndConstants_t301)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T310, &ue_TimersAndConstants_t310)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T311, &ue_TimersAndConstants_t311)
&& 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)
#ifdef Rel10
#endif
)){
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, Component Carrier %d!\n",
lib_config_file_name_pP, enb_properties.properties[enb_properties_index]->nb_cc++);
}
enb_properties.properties[enb_properties_index]->nb_cc++;
enb_properties.properties[enb_properties_index]->tdd_config[j] = tdd_config;
AssertError (tdd_config <= TDD_Config__subframeAssignment_sa6, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config %ld (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config, TDD_Config__subframeAssignment_sa6);
enb_properties.properties[enb_properties_index]->tdd_config_s[j] = tdd_config_s;
AssertError (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %ld (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8);
if (strcmp(prefix_type, "NORMAL") == 0) {
enb_properties.properties[enb_properties_index]->prefix_type[j] = NORMAL;
} else if (strcmp(prefix_type, "EXTENDED") == 0) {
enb_properties.properties[enb_properties_index]->prefix_type[j] = EXTENDED;
} else { } else {
AssertError (0, parse_errors ++, AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for default_drx choice: PAGING_DRX_32..PAGING_DRX_256 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
lib_config_file_name_pP, i, default_drx); lib_config_file_name_pP, i, prefix_type);
}
enb_properties.properties[enb_properties_index]->eutra_band[j] = eutra_band;
enb_properties.properties[enb_properties_index]->downlink_frequency[j] = (uint32_t) downlink_frequency;
enb_properties.properties[enb_properties_index]->uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset;
enb_properties.properties[enb_properties_index]->Nid_cell[j]= Nid_cell;
if (Nid_cell>503) {
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n",
lib_config_file_name_pP, i, Nid_cell);
}
enb_properties.properties[enb_properties_index]->N_RB_DL[j]= N_RB_DL;
if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) {
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n",
lib_config_file_name_pP, i, N_RB_DL);
} }
// Parse optional physical parameters
if(config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_FRAME_TYPE, &frame_type)) {
if (strcmp(frame_type, "FDD") == 0) { if (strcmp(frame_type, "FDD") == 0) {
enb_properties.properties[enb_properties_index]->frame_type = FDD; enb_properties.properties[enb_properties_index]->frame_type[j] = FDD;
} else if (strcmp(frame_type, "TDD") == 0) { } else if (strcmp(frame_type, "TDD") == 0) {
enb_properties.properties[enb_properties_index]->frame_type = TDD; enb_properties.properties[enb_properties_index]->frame_type[j] = TDD;
} else { } else {
AssertError (0, parse_errors ++, AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
lib_config_file_name_pP, i, frame_type); lib_config_file_name_pP, i, frame_type);
} }
} else {
enb_properties.properties[enb_properties_index]->frame_type = FDD; // Default frame type
}
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_TDD_CONFIG, &tdd_config)) {
enb_properties.properties[enb_properties_index]->tdd_config = tdd_config; enb_properties.properties[enb_properties_index]->tdd_config[j] = tdd_config;
AssertError (tdd_config <= TDD_Config__subframeAssignment_sa6, parse_errors ++, AssertError (tdd_config <= TDD_Config__subframeAssignment_sa6, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config %ld (should be 0-%d)!", "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %ld (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config, TDD_Config__subframeAssignment_sa6); lib_config_file_name_pP, i, tdd_config, TDD_Config__subframeAssignment_sa6);
} else {
enb_properties.properties[enb_properties_index]->tdd_config = 3; // Default TDD sub-frame configuration
}
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_TDD_CONFIG_S, &tdd_config_s)) {
enb_properties.properties[enb_properties_index]->tdd_config_s = tdd_config_s; enb_properties.properties[enb_properties_index]->tdd_config_s[j] = tdd_config_s;
AssertError (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, parse_errors ++, AssertError (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %ld (should be 0-%d)!", "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %ld (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); lib_config_file_name_pP, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8);
} else {
enb_properties.properties[enb_properties_index]->tdd_config_s = 0; // Default TDD S-sub-frame configuration
}
if(config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_PREFIX_TYPE, &prefix_type)) {
if (strcmp(prefix_type, "NORMAL") == 0) { if (strcmp(prefix_type, "NORMAL") == 0) {
enb_properties.properties[enb_properties_index]->prefix_type = NORMAL; enb_properties.properties[enb_properties_index]->prefix_type[j] = NORMAL;
} else if (strcmp(prefix_type, "EXTENDED") == 0) { } else if (strcmp(prefix_type, "EXTENDED") == 0) {
enb_properties.properties[enb_properties_index]->prefix_type = EXTENDED; enb_properties.properties[enb_properties_index]->prefix_type[j] = EXTENDED;
} else { } else {
AssertError (0, parse_errors ++, AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
lib_config_file_name_pP, i, prefix_type); lib_config_file_name_pP, i, prefix_type);
} }
} else {
enb_properties.properties[enb_properties_index]->prefix_type = NORMAL; // Default prefix type
}
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_EUTRA_BAND, &eutra_band)) {
enb_properties.properties[enb_properties_index]->eutra_band = eutra_band;
enb_properties.properties[enb_properties_index]->eutra_band[j] = eutra_band;
// printf( "\teutra band:\t%d\n",enb_properties.properties[enb_properties_index]->eutra_band); // printf( "\teutra band:\t%d\n",enb_properties.properties[enb_properties_index]->eutra_band);
} else {
enb_properties.properties[enb_properties_index]->eutra_band = 7; // Default band
//printf( "\teutra band:\t%d (default)\n",enb_properties.properties[enb_properties_index]->eutra_band);
}
if(config_setting_lookup_int64(setting_enb, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)) {
enb_properties.properties[enb_properties_index]->downlink_frequency = (uint32_t) downlink_frequency;
enb_properties.properties[enb_properties_index]->downlink_frequency[j] = (uint32_t) downlink_frequency;
//printf( "\tdownlink freq:\t%u\n",enb_properties.properties[enb_properties_index]->downlink_frequency); //printf( "\tdownlink freq:\t%u\n",enb_properties.properties[enb_properties_index]->downlink_frequency);
} else {
enb_properties.properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency
// printf( "\tdownlink freq:\t%u (default)\n",enb_properties.properties[enb_properties_index]->downlink_frequency); enb_properties.properties[enb_properties_index]->uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset;
parse_errors += enb_check_band_frequencies(lib_config_file_name_pP,
enb_properties_index,
enb_properties.properties[enb_properties_index]->eutra_band[j],
enb_properties.properties[enb_properties_index]->downlink_frequency[j],
enb_properties.properties[enb_properties_index]->uplink_frequency_offset[j],
enb_properties.properties[enb_properties_index]->frame_type[j]);
enb_properties.properties[enb_properties_index]->nb_antennas_tx[j] = nb_antennas_tx;
if ((nb_antennas_tx <1) || (nb_antennas_tx > 4))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_tx choice: 1..4 !\n",
lib_config_file_name_pP, i, nb_antennas_tx);
enb_properties.properties[enb_properties_index]->nb_antennas_rx[j] = nb_antennas_rx;
if ((nb_antennas_rx <1) || (nb_antennas_rx > 4))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_rx choice: 1..4 !\n",
lib_config_file_name_pP, i, nb_antennas_rx);
enb_properties.properties[enb_properties_index]->prach_root[j] = prach_root;
if ((prach_root <0) || (prach_root > 1023))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n",
lib_config_file_name_pP, i, prach_root);
enb_properties.properties[enb_properties_index]->prach_config_index[j] = prach_config_index;
if ((prach_config_index <0) || (prach_config_index > 63))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n",
lib_config_file_name_pP, i, prach_config_index);
if (strcmp(prach_high_speed, "ENABLE") == 0)
enb_properties.properties[enb_properties_index]->prach_high_speed[j] = TRUE;
else if (strcmp(prach_high_speed, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->prach_high_speed[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
lib_config_file_name_pP, i, prach_high_speed);
enb_properties.properties[enb_properties_index]->prach_zero_correlation[j] =prach_zero_correlation;
if ((prach_zero_correlation <0) || (prach_zero_correlation > 63))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
lib_config_file_name_pP, i, prach_zero_correlation);
enb_properties.properties[enb_properties_index]->prach_freq_offset[j] = prach_freq_offset;
if ((prach_freq_offset <0) || (prach_freq_offset > 94))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
lib_config_file_name_pP, i, prach_freq_offset);
enb_properties.properties[enb_properties_index]->pucch_delta_shift[j] = pucch_delta_shift-1;
if ((pucch_delta_shift <1) || (pucch_delta_shift > 3))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n",
lib_config_file_name_pP, i, pucch_delta_shift);
enb_properties.properties[enb_properties_index]->pucch_nRB_CQI[j] = pucch_nRB_CQI;
if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n",
lib_config_file_name_pP, i, pucch_nRB_CQI);
enb_properties.properties[enb_properties_index]->pucch_nCS_AN[j] = pucch_nCS_AN;
if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
lib_config_file_name_pP, i, pucch_nCS_AN);
#ifndef Rel10
enb_properties.properties[enb_properties_index]->pucch_n1_AN[j] = pucch_n1_AN;
if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
lib_config_file_name_pP, i, pucch_n1_AN);
#endif
enb_properties.properties[enb_properties_index]->pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower;
if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n",
lib_config_file_name_pP, i, pdsch_referenceSignalPower);
enb_properties.properties[enb_properties_index]->pdsch_p_b[j] = pdsch_p_b;
if ((pdsch_p_b <0) || (pdsch_p_b > 3))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n",
lib_config_file_name_pP, i, pdsch_p_b);
enb_properties.properties[enb_properties_index]->pusch_n_SB[j] = pusch_n_SB;
if ((pusch_n_SB <1) || (pusch_n_SB > 4))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n",
lib_config_file_name_pP, i, pusch_n_SB);
if (strcmp(pusch_hoppingMode,"interSubFrame")==0)
enb_properties.properties[enb_properties_index]->pusch_n_SB[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame;
else if (strcmp(pusch_hoppingMode,"intraAndInterSubFrame")==0)
enb_properties.properties[enb_properties_index]->pusch_n_SB[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n",
lib_config_file_name_pP, i, pusch_hoppingMode);
enb_properties.properties[enb_properties_index]->pusch_hoppingOffset[j] = pusch_hoppingOffset;
if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%f\" for pusch_hoppingOffset choice: 0..98!\n",
lib_config_file_name_pP, i, pusch_hoppingMode);
if (strcmp(pusch_enable64QAM, "ENABLE") == 0)
enb_properties.properties[enb_properties_index]->pusch_enable64QAM[j] = TRUE;
else if (strcmp(pusch_enable64QAM, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->pusch_enable64QAM[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, pusch_enable64QAM);
if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0)
enb_properties.properties[enb_properties_index]->pusch_groupHoppingEnabled[j] = TRUE;
else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->pusch_groupHoppingEnabled[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, pusch_groupHoppingEnabled);
enb_properties.properties[enb_properties_index]->pusch_groupAssignment[j] = pusch_groupAssignment;
if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n",
lib_config_file_name_pP, i, pusch_groupAssignment);
if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0)
enb_properties.properties[enb_properties_index]->pusch_groupHoppingEnabled[j] = TRUE;
else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->pusch_sequenceHoppingEnabled[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, pusch_sequenceHoppingEnabled);
enb_properties.properties[enb_properties_index]->pusch_nDMRS1[j] = pusch_nDMRS1; //cyclic_shift in RRC!
if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n",
lib_config_file_name_pP, i, pusch_nDMRS1);
if (strcmp(phich_duration,"NORMAL")==0)
enb_properties.properties[enb_properties_index]->phich_duration[j] = normal;
else if (strcmp(phich_duration,"EXTENDED")==0)
enb_properties.properties[enb_properties_index]->phich_duration[j] = extended;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n",
lib_config_file_name_pP, i, phich_duration);
if (strcmp(phich_resource,"ONESIXTH")==0)
enb_properties.properties[enb_properties_index]->phich_resource[j] = oneSixth;
else if (strcmp(phich_duration,"HALF")==0)
enb_properties.properties[enb_properties_index]->phich_resource[j] = half;
else if (strcmp(phich_duration,"ONE")==0)
enb_properties.properties[enb_properties_index]->phich_resource[j] = one;
else if (strcmp(phich_duration,"TWO")==0)
enb_properties.properties[enb_properties_index]->phich_resource[j] = two;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n",
lib_config_file_name_pP, i, phich_resource);
if (strcmp(srs_enable, "ENABLE") == 0)
enb_properties.properties[enb_properties_index]->srs_enable[j] = TRUE;
else if (strcmp(srs_enable, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->srs_enable[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
lib_config_file_name_pP, i, srs_enable);
if (enb_properties.properties[enb_properties_index]->srs_enable[j] == TRUE) {
if (!(config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, &srs_BandwidthConfig)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, &srs_SubframeConfig)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, &srs_ackNackST)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_SRS_MAXUPPTS, &srs_MaxUpPts)
))
AssertError(0, parse_errors++,"Failed to parse eNB configuration file %s, enb %d unknown values for srs_BandwidthConfig, srs_SubframeConfig, srs_ackNackST, srs_MaxUpPts\n",
lib_config_file_name_pP, i, srs_BandwidthConfig);
enb_properties.properties[enb_properties_index]->srs_BandwidthConfig[j] = srs_BandwidthConfig;
if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7))
AssertError (0, parse_errors ++, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n",
lib_config_file_name_pP, i, srs_BandwidthConfig);
enb_properties.properties[enb_properties_index]->srs_SubframeConfig[j] = srs_SubframeConfig;
if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n",
lib_config_file_name_pP, i, srs_SubframeConfig);
if (strcmp(srs_ackNackST, "ENABLE") == 0)
enb_properties.properties[enb_properties_index]->srs_ackNackST[j] = TRUE;
else if (strcmp(srs_ackNackST, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->srs_ackNackST[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
lib_config_file_name_pP, i, srs_ackNackST);
if (strcmp(srs_MaxUpPts, "ENABLE") == 0)
enb_properties.properties[enb_properties_index]->srs_MaxUpPts[j] = TRUE;
else if (strcmp(srs_MaxUpPts, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->srs_MaxUpPts[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
lib_config_file_name_pP, i, srs_MaxUpPts);
} }
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)) {
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = (unsigned int) uplink_frequency_offset; enb_properties.properties[enb_properties_index]->pusch_p0_Nominal[j] = pusch_p0_Nominal;
//printf( "\tuplink freq offset:\t%ld\n",enb_properties.properties[enb_properties_index]->uplink_frequency_offset);
} else { if ((pusch_p0_Nominal<-126) || (pusch_p0_Nominal>24))
// Default uplink frequency offset AssertError (0, parse_errors ++,
if (enb_properties.properties[enb_properties_index]->frame_type == FDD) { "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = -120000000; lib_config_file_name_pP, i, pusch_p0_Nominal);
} else {
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = 0; if (strcmp(pusch_alpha,"AL0"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0;
else if (strcmp(pusch_alpha,"AL04"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al04;
else if (strcmp(pusch_alpha,"AL05"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al05;
else if (strcmp(pusch_alpha,"AL06"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al06;
else if (strcmp(pusch_alpha,"AL07"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al07;
else if (strcmp(pusch_alpha,"AL08"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al08;
else if (strcmp(pusch_alpha,"AL09"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al09;
else if (strcmp(pusch_alpha,"AL1"))
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_p0_Nominal choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
lib_config_file_name_pP, i, pusch_alpha);
enb_properties.properties[enb_properties_index]->pucch_p0_Nominal[j] = pucch_p0_Nominal;
if ((pucch_p0_Nominal<-127) || (pucch_p0_Nominal>-96))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
lib_config_file_name_pP, i, pucch_p0_Nominal);
enb_properties.properties[enb_properties_index]->msg3_delta_Preamble[j] = msg3_delta_Preamble;
if ((msg3_delta_Preamble<-1) || (msg3_delta_Preamble>6))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n",
lib_config_file_name_pP, i, msg3_delta_Preamble);
if (strcmp(pucch_deltaF_Format1,"deltaF_2")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2;
else if (strcmp(pucch_deltaF_Format1,"deltaF0")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0;
else if (strcmp(pucch_deltaF_Format1,"deltaF2")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n",
lib_config_file_name_pP, i, pucch_deltaF_Format1);
if (strcmp(pucch_deltaF_Format1b,"deltaF1")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1;
else if (strcmp(pucch_deltaF_Format1b,"deltaF3")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3;
else if (strcmp(pucch_deltaF_Format1b,"deltaF5"))
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n",
lib_config_file_name_pP, i, pucch_deltaF_Format1b);
if (strcmp(pucch_deltaF_Format2,"deltaF_2")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2;
else if (strcmp(pucch_deltaF_Format2,"deltaF0")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0;
else if (strcmp(pucch_deltaF_Format2,"deltaF1"))
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1;
else if (strcmp(pucch_deltaF_Format2,"deltaF2"))
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n",
lib_config_file_name_pP, i, pucch_deltaF_Format2);
if (strcmp(pucch_deltaF_Format2a,"deltaF_2")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2;
else if (strcmp(pucch_deltaF_Format2a,"deltaF0")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0;
else if (strcmp(pucch_deltaF_Format2a,"deltaF2"))
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n",
lib_config_file_name_pP, i, pucch_deltaF_Format2a);
if (strcmp(pucch_deltaF_Format2b,"deltaF_2")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2;
else if (strcmp(pucch_deltaF_Format2b,"deltaF0")==0)
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0;
else if (strcmp(pucch_deltaF_Format2b,"deltaF2"))
enb_properties.properties[enb_properties_index]->pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n",
lib_config_file_name_pP, i, pucch_deltaF_Format2b);
enb_properties.properties[enb_properties_index]->rach_numberOfRA_Preambles[j] = (rach_numberOfRA_Preambles/4)-1;
if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>64) || ((rach_numberOfRA_Preambles&3)!=0))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n",
lib_config_file_name_pP, i, rach_numberOfRA_Preambles);
if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) {
enb_properties.properties[enb_properties_index]->rach_preamblesGroupAConfig[j] = TRUE;
if (!(config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, &rach_sizeOfRA_PreamblesGroupA)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, &rach_messageSizeGroupA)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, &rach_messagePowerOffsetGroupB)))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d rach_sizeOfRA_PreamblesGroupA, messageSizeGroupA,messagePowerOffsetGroupB!\n",
lib_config_file_name_pP, i, pucch_deltaF_Format2b);
enb_properties.properties[enb_properties_index]->rach_sizeOfRA_PreamblesGroupA[j] = (rach_sizeOfRA_PreamblesGroupA/4)-1;
if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=0))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n",
lib_config_file_name_pP, i, rach_sizeOfRA_PreamblesGroupA);
switch (rach_messageSizeGroupA) {
case 56:
enb_properties.properties[enb_properties_index]->rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56;
break;
case 144:
enb_properties.properties[enb_properties_index]->rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144;break;
case 208:
enb_properties.properties[enb_properties_index]->rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208;break;
case 256:
enb_properties.properties[enb_properties_index]->rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256;break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n",
lib_config_file_name_pP, i, rach_messageSizeGroupA);
break;
} }
//printf( "\tuplink freq offset:\t%ld (default)\n",enb_properties.properties[enb_properties_index]->uplink_frequency_offset);
if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity;
else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0;
else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5;
else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8;
else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10;
else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12;
else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15;
else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0)
enb_properties.properties[enb_properties_index]->rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
lib_config_file_name_pP, i, rach_messagePowerOffsetGroupB);
} }
else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0)
enb_properties.properties[enb_properties_index]->rach_preamblesGroupAConfig[j] = FALSE;
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
lib_config_file_name_pP, i, rach_preamblesGroupAConfig);
parse_errors += enb_check_band_frequencies(lib_config_file_name_pP, enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower[j] = (rach_preambleInitialReceivedTargetPower+120)/2;
enb_properties_index, if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0))
enb_properties.properties[enb_properties_index]->eutra_band, AssertError (0, parse_errors ++,
enb_properties.properties[enb_properties_index]->downlink_frequency, "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n",
enb_properties.properties[enb_properties_index]->uplink_frequency_offset, lib_config_file_name_pP, i, rach_preambleInitialReceivedTargetPower);
enb_properties.properties[enb_properties_index]->frame_type);
setting_component_carriers = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_COMPONENT_CARRIERS);
enb_properties.properties[enb_properties_index]->nb_cc = 0;
if(setting_component_carriers != NULL) {
num_component_carriers = config_setting_length(setting_component_carriers); enb_properties.properties[enb_properties_index]->rach_powerRampingStep[j] = rach_powerRampingStep/2;
//printf("num component carrier %d \n", num_component_carriers); if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0))
//enb_properties.properties[enb_properties_index]->nb_cc = num_component_carriers;
for (j = 0; j < num_component_carriers /*&& j < MAX_NUM_CCs*/; j++) {
component_carrier = config_setting_get_elem(setting_component_carriers, j);
if(!(config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_CELL_ID, &cell_id[j]) &&
config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_N_RB_DL, &N_RB_DL[j]) )
){
AssertError (0, parse_errors ++, AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, Component Carrier!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n",
lib_config_file_name_pP); lib_config_file_name_pP, i, rach_powerRampingStep);
switch (rach_preambleTransMax) {
case 3:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4;
break;
case 5:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5;
break;
case 6:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6;
break;
case 7:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7;
break;
case 8:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
break;
case 20:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20;
break;
case 50:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50;
break;
case 100:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100;
break;
case 200:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n",
lib_config_file_name_pP, i, rach_preambleTransMax);
break;
} }
enb_properties.properties[enb_properties_index]->nb_cc++; enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize[j] = (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2;
enb_properties.properties[enb_properties_index]->cell_id[j]= cell_id[j]; if ((rach_raResponseWindowSize<0)||(rach_raResponseWindowSize==9)||(rach_raResponseWindowSize>10))
enb_properties.properties[enb_properties_index]->N_RB_DL[j]= N_RB_DL[j]; AssertError (0, parse_errors ++,
//printf("adding component carrier %d\n", j); "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n",
lib_config_file_name_pP, i, rach_preambleTransMax);
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer[j] = (rach_macContentionResolutionTimer/8)-1;
if ((rach_macContentionResolutionTimer<8) || (rach_macContentionResolutionTimer>64) || ((rach_macContentionResolutionTimer&7)!=0))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n",
lib_config_file_name_pP, i, rach_preambleTransMax);
enb_properties.properties[enb_properties_index]->rach_maxHARQ_Msg3Tx[j] = rach_maxHARQ_Msg3Tx;
if ((rach_maxHARQ_Msg3Tx<0) || (rach_maxHARQ_Msg3Tx>8))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n",
lib_config_file_name_pP, i, rach_preambleTransMax);
switch (pcch_defaultPagingCycle) {
case 32:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf32;
break;
case 64:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf64;
break;
case 128:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf128;
break;
case 256:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf256;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n",
lib_config_file_name_pP, i, pcch_defaultPagingCycle);
break;
} }
} else { if (strcmp(pcch_nB, "fourT") == 0) {
for (j=0; j< MAX_NUM_CCs; j++) { enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_fourT;
enb_properties.properties[enb_properties_index]->nb_cc +=1; }
enb_properties.properties[enb_properties_index]->cell_id[j]=j; else if (strcmp(pcch_nB, "twoT") == 0) {
enb_properties.properties[enb_properties_index]->N_RB_DL[j]=25; enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_twoT;
}
else if (strcmp(pcch_nB, "oneT") == 0) {
enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_oneT;
} }
else if (strcmp(pcch_nB, "halfT") == 0) {
enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_halfT;
} }
else if (strcmp(pcch_nB, "quarterT") == 0) {
enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_quarterT;
}
else if (strcmp(pcch_nB, "oneEighthT") == 0) {
enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_oneEighthT;
}
else if (strcmp(pcch_nB, "oneSixteenthT") == 0) {
enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_oneSixteenthT;
}
else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) {
enb_properties.properties[enb_properties_index]->pcch_nB[j] = PCCH_Config__nB_oneThirtySecondT;
}
else
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
lib_config_file_name_pP, i, pcch_defaultPagingCycle);
switch (bcch_modificationPeriodCoeff) {
case 2:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n2;
break;
case 4:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n4;
break;
case 8:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n8;
break;
case 16:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n16;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for bcch_modificationPeriodCoeff choice: 2,4,8,16",
lib_config_file_name_pP, i, bcch_modificationPeriodCoeff);
break;
}
switch (ue_TimersAndConstants_t300) {
case 100:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms100;
break;
case 200:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms200;
break;
case 300:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms300;
break;
case 400:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms400;
break;
case 600:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms600;
break;
case 1000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms1000;
break;
case 1500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms1500;
break;
case 2000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms2000;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for ue_TimersAndConstants_t300 choice: 100,200,300,400,600,1000,1500,2000 ",
lib_config_file_name_pP, i, ue_TimersAndConstants_t300);
break;
}
switch (ue_TimersAndConstants_t301) {
case 100:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms100;
break;
case 200:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms200;
break;
case 300:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms300;
break;
case 400:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms400;
break;
case 600:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms600;
break;
case 1000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms1000;
break;
case 1500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms1500;
break;
case 2000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms2000;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for ue_TimersAndConstants_t301 choice: 100,200,300,400,600,1000,1500,2000 ",
lib_config_file_name_pP, i, ue_TimersAndConstants_t301);
break;
}
switch (ue_TimersAndConstants_t310) {
case 0:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms0;
break;
case 50:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms50;
break;
case 100:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms100;
break;
case 200:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms200;
break;
case 500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms500;
break;
case 1000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms1000;
break;
case 2000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms2000;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for ue_TimersAndConstants_t310 choice: 0,50,100,200,500,1000,1500,2000 ",
lib_config_file_name_pP, i, ue_TimersAndConstants_t310);
break;
}
switch (ue_TimersAndConstants_t311) {
case 1000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms1000;
break;
case 3110:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms3000;
break;
case 5000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms5000;
break;
case 10000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms10000;
break;
case 15000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms15000;
break;
case 20000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms20000;
break;
case 31100:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms30000;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for ue_TimersAndConstants_t311 choice: 1000,3000,5000,10000,150000,20000,30000",
lib_config_file_name_pP, i, ue_TimersAndConstants_t311);
break;
}
switch (ue_TimersAndConstants_n310) {
case 1:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n1;
break;
case 2:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n2;
break;
case 3:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n4;
break;
case 6:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n6;
break;
case 8:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n10;
break;
case 20:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n20;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for ue_TimersAndConstants_n310 choice: 1,2,3,4,6,6,8,10,20",
lib_config_file_name_pP, i, ue_TimersAndConstants_n311);
break;
}
switch (ue_TimersAndConstants_n311) {
case 1:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n1;
break;
case 2:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n2;
break;
case 3:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n4;
break;
case 5:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n5;
break;
case 6:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n6;
break;
case 8:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n10;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for ue_TimersAndConstants_t311 choice: 1,2,3,4,5,6,8,10",
lib_config_file_name_pP, i, ue_TimersAndConstants_t311);
break;
}
}
}
setting_mme_addresses = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_MME_IP_ADDRESS); setting_mme_addresses = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_MME_IP_ADDRESS);
num_mme_address = config_setting_length(setting_mme_addresses); num_mme_address = config_setting_length(setting_mme_addresses);
enb_properties.properties[enb_properties_index]->nb_mme = 0; enb_properties.properties[enb_properties_index]->nb_mme = 0;
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "commonDef.h" #include "commonDef.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
// Hard to find a defined value for max enb... // Hard to find a defined value for max enb...
#define MAX_ENB 16 #define MAX_ENB 16
...@@ -89,22 +90,81 @@ typedef struct Enb_properties_s { ...@@ -89,22 +90,81 @@ typedef struct Enb_properties_s {
uint16_t mnc; uint16_t mnc;
uint8_t mnc_digit_length; uint8_t mnc_digit_length;
/* Default Paging DRX of the eNB as defined in TS 36.304 */
paging_drx_t default_drx;
/* Physical parameters */ /* Physical parameters */
lte_frame_type_t frame_type;
uint8_t tdd_config;
uint8_t tdd_config_s;
lte_prefix_type_t prefix_type;
int16_t eutra_band;
uint32_t downlink_frequency;
int32_t uplink_frequency_offset;
/* Nb of component carrier for a given enb */
int16_t nb_cc; int16_t nb_cc;
int16_t cell_id[2];//cell_id[MAX_NUM_CCs];// for testing, change later lte_frame_type_t frame_type[1+MAX_NUM_CCs];
int16_t N_RB_DL[2];//N_RB_DL[MAX_NUM_CCs];// for testing, change later uint8_t tdd_config[1+MAX_NUM_CCs];
uint8_t tdd_config_s[1+MAX_NUM_CCs];
lte_prefix_type_t prefix_type[1+MAX_NUM_CCs];
int16_t eutra_band[1+MAX_NUM_CCs];
uint64_t downlink_frequency[1+MAX_NUM_CCs];
int32_t uplink_frequency_offset[1+MAX_NUM_CCs];
int16_t Nid_cell[1+MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[1+MAX_NUM_CCs];// for testing, change later
int nb_antennas_tx[1+MAX_NUM_CCs];
int nb_antennas_rx[1+MAX_NUM_CCs];
long prach_root[1+MAX_NUM_CCs];
long prach_config_index[1+MAX_NUM_CCs];
BOOLEAN_t prach_high_speed[1+MAX_NUM_CCs];
long prach_zero_correlation[1+MAX_NUM_CCs];
long prach_freq_offset[1+MAX_NUM_CCs];
long pucch_delta_shift[1+MAX_NUM_CCs];
long pucch_nRB_CQI[1+MAX_NUM_CCs];
long pucch_nCS_AN[1+MAX_NUM_CCs];
#ifndef Rel10
long pucch_n1_AN[1+MAX_NUM_CCs];
#endif
long pdsch_referenceSignalPower[1+MAX_NUM_CCs];
long pdsch_p_b[1+MAX_NUM_CCs];
long pusch_n_SB[1+MAX_NUM_CCs];
long pusch_hoppingMode[1+MAX_NUM_CCs];
long pusch_hoppingOffset[1+MAX_NUM_CCs];
BOOLEAN_t pusch_enable64QAM[1+MAX_NUM_CCs];
BOOLEAN_t pusch_groupHoppingEnabled[1+MAX_NUM_CCs];
long pusch_groupAssignment[1+MAX_NUM_CCs];
BOOLEAN_t pusch_sequenceHoppingEnabled[1+MAX_NUM_CCs];
long pusch_nDMRS1[1+MAX_NUM_CCs];
long phich_duration[1+MAX_NUM_CCs];
long phich_resource[1+MAX_NUM_CCs];
BOOLEAN_t srs_enable[1+MAX_NUM_CCs];
long srs_BandwidthConfig[1+MAX_NUM_CCs];
long srs_SubframeConfig[1+MAX_NUM_CCs];
BOOLEAN_t srs_ackNackST[1+MAX_NUM_CCs];
BOOLEAN_t srs_MaxUpPts[1+MAX_NUM_CCs];
long pusch_p0_Nominal[1+MAX_NUM_CCs];
long pusch_alpha[1+MAX_NUM_CCs];
long pucch_p0_Nominal[1+MAX_NUM_CCs];
long msg3_delta_Preamble[1+MAX_NUM_CCs];
long ul_CyclicPrefixLength[1+MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[1+MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[1+MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[1+MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[1+MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[1+MAX_NUM_CCs];
long rach_numberOfRA_Preambles[1+MAX_NUM_CCs];
BOOLEAN_t rach_preamblesGroupAConfig[1+MAX_NUM_CCs];
long rach_sizeOfRA_PreamblesGroupA[1+MAX_NUM_CCs];
long rach_messageSizeGroupA[1+MAX_NUM_CCs];
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[1+MAX_NUM_CCs];
long rach_powerRampingStep[1+MAX_NUM_CCs];
long rach_preambleInitialReceivedTargetPower[1+MAX_NUM_CCs];
long rach_preambleTransMax[1+MAX_NUM_CCs];
long rach_raResponseWindowSize[1+MAX_NUM_CCs];
long rach_macContentionResolutionTimer[1+MAX_NUM_CCs];
long rach_maxHARQ_Msg3Tx[1+MAX_NUM_CCs];
long bcch_modificationPeriodCoeff[1+MAX_NUM_CCs];
long pcch_defaultPagingCycle[1+MAX_NUM_CCs];
long pcch_nB[1+MAX_NUM_CCs];
long ue_TimersAndConstants_t300[1+MAX_NUM_CCs];
long ue_TimersAndConstants_t301[1+MAX_NUM_CCs];
long ue_TimersAndConstants_t310[1+MAX_NUM_CCs];
long ue_TimersAndConstants_t311[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n310[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n311[1+MAX_NUM_CCs];
/* Nb of MME to connect to */ /* Nb of MME to connect to */
uint8_t nb_mme; uint8_t nb_mme;
......
...@@ -365,6 +365,7 @@ void schedule_ue_spec(module_id_t module_idP, ...@@ -365,6 +365,7 @@ void schedule_ue_spec(module_id_t module_idP,
stop_meas(&eNB->schedule_dlsch_preprocessor); stop_meas(&eNB->schedule_dlsch_preprocessor);
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,VCD_FUNCTION_OUT); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,VCD_FUNCTION_OUT);
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) { for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
if (mbsfn_flag[CC_id]>0) if (mbsfn_flag[CC_id]>0)
continue; continue;
...@@ -400,7 +401,7 @@ void schedule_ue_spec(module_id_t module_idP, ...@@ -400,7 +401,7 @@ void schedule_ue_spec(module_id_t module_idP,
nb_available_rb = pre_nb_available_rbs[CC_id][UE_id]; nb_available_rb = pre_nb_available_rbs[CC_id][UE_id];
UE_list->eNB_UE_stats[CC_id][UE_id].crnti= rnti; UE_list->eNB_UE_stats[CC_id][UE_id].crnti= rnti;
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status=mac_get_rrc_status(module_idP,1,UE_id); UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status=mac_get_rrc_status(module_idP,1,UE_id);
mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,subframeP,&harq_pid,&round,0); mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,0);
UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid; UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid;
UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round; UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round;
...@@ -1640,7 +1641,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP ...@@ -1640,7 +1641,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
LOG_I(MAC,"[eNB %d][RAPROC] Frame %d, subframeP %d: Checking if Msg4 was acknowledged: \n", LOG_I(MAC,"[eNB %d][RAPROC] Frame %d, subframeP %d: Checking if Msg4 was acknowledged: \n",
module_idP,frameP,subframeP); module_idP,frameP,subframeP);
// Get candidate harq_pid from PHY // Get candidate harq_pid from PHY
mac_xface->get_ue_active_harq_pid(module_idP,CC_id,RA_template->rnti,subframeP,&harq_pid,&round,0); mac_xface->get_ue_active_harq_pid(module_idP,CC_id,RA_template->rnti,frameP,subframeP,&harq_pid,&round,0);
if (round>0) { if (round>0) {
// we have to schedule a retransmission // we have to schedule a retransmission
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD)
...@@ -1688,16 +1689,16 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP ...@@ -1688,16 +1689,16 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
} }
} // RA is scheduled in this subframeP } // RA is scheduled in this subframeP
LOG_I(MAC,"Doing UE_spec DCIs\n");
// UE specific DCIs // UE specific DCIs
for (UE_id=UE_list->head;UE_id>=0;UE_id=UE_list->next[UE_id]) { for (UE_id=UE_list->head;UE_id>=0;UE_id=UE_list->next[UE_id]) {
LOG_I(MAC,"UE_id: %d => status %d\n",UE_id,eNB_dlsch_info[module_idP][UE_id].status); // printf("UE_id: %d => status %d\n",UE_id,eNB_dlsch_info[module_idP][UE_id].status);
if (eNB_dlsch_info[module_idP][UE_id].status == S_DL_SCHEDULED) { if (eNB_dlsch_info[module_idP][UE_id].status == S_DL_SCHEDULED) {
// clear scheduling flag // clear scheduling flag
eNB_dlsch_info[module_idP][UE_id].status = S_DL_WAITING; eNB_dlsch_info[module_idP][UE_id].status = S_DL_WAITING;
rnti = UE_RNTI(module_idP,UE_id); rnti = UE_RNTI(module_idP,UE_id);
mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,subframeP,&harq_pid,&round,0); mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,0);
nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
DLSCH_dci = (void *)UE_list->UE_template[CC_id][UE_id].DLSCH_DCI[harq_pid]; DLSCH_dci = (void *)UE_list->UE_template[CC_id][UE_id].DLSCH_DCI[harq_pid];
......
...@@ -194,6 +194,15 @@ uint8_t find_num_active_UEs_in_cbagroup(module_id_t module_idP, int CC_id,unsign ...@@ -194,6 +194,15 @@ uint8_t find_num_active_UEs_in_cbagroup(module_id_t module_idP, int CC_id,unsign
return(nb_ue_in_pusch); return(nb_ue_in_pusch);
} }
#endif #endif
void dump_ue_list(UE_list_t *listP) {
int j;
for (j=listP->head;j>=0;j=listP->next[j]) {
LOG_T(MAC,"node %d => %d\n",j,listP->next[j]);
}
}
int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP) { int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP) {
int UE_id; int UE_id;
int j; int j;
...@@ -201,6 +210,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP) { ...@@ -201,6 +210,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP) {
UE_list_t *UE_list = &eNB_mac_inst[mod_idP].UE_list; UE_list_t *UE_list = &eNB_mac_inst[mod_idP].UE_list;
LOG_D(MAC,"[eNB %d, CC_id %d] Adding UE with rnti %x (next avail %d, num_UEs %d)\n",mod_idP,cc_idP,rntiP,UE_list->avail,UE_list->num_UEs); LOG_D(MAC,"[eNB %d, CC_id %d] Adding UE with rnti %x (next avail %d, num_UEs %d)\n",mod_idP,cc_idP,rntiP,UE_list->avail,UE_list->num_UEs);
dump_ue_list(UE_list);
if (UE_list->avail>=0) { if (UE_list->avail>=0) {
UE_id = UE_list->avail; UE_id = UE_list->avail;
...@@ -224,8 +234,12 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP) { ...@@ -224,8 +234,12 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP) {
eNB_ulsch_info[mod_idP][UE_id].status = S_UL_WAITING; eNB_ulsch_info[mod_idP][UE_id].status = S_UL_WAITING;
eNB_dlsch_info[mod_idP][UE_id].status = S_UL_WAITING; eNB_dlsch_info[mod_idP][UE_id].status = S_UL_WAITING;
LOG_D(MAC,"[eNB %d] Add UE_id %d on Primary CC_id %d: rnti %x\n",mod_idP,UE_id,cc_idP,rntiP); LOG_D(MAC,"[eNB %d] Add UE_id %d on Primary CC_id %d: rnti %x\n",mod_idP,UE_id,cc_idP,rntiP);
dump_ue_list(UE_list);
return(UE_id); return(UE_id);
} }
LOG_E(MAC,"error in add_new_ue(), could not find space in UE_list, Dumping UE list\n");
dump_ue_list(UE_list);
return(-1); return(-1);
} }
...@@ -237,6 +251,7 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP) { ...@@ -237,6 +251,7 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP) {
int pCC_id = UE_PCCID(mod_idP,ue_idP); int pCC_id = UE_PCCID(mod_idP,ue_idP);
LOG_I(MAC,"Removing UE %d from Primary CC_id %d (rnti %x)\n",ue_idP,pCC_id, UE_list->UE_template[pCC_id][ue_idP].rnti); LOG_I(MAC,"Removing UE %d from Primary CC_id %d (rnti %x)\n",ue_idP,pCC_id, UE_list->UE_template[pCC_id][ue_idP].rnti);
dump_ue_list(UE_list);
// clear all remaining pending transmissions // clear all remaining pending transmissions
UE_list->UE_template[pCC_id][ue_idP].bsr_info[LCGID0] = 0; UE_list->UE_template[pCC_id][ue_idP].bsr_info[LCGID0] = 0;
...@@ -266,18 +281,23 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP) { ...@@ -266,18 +281,23 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP) {
UE_list->next[i] = UE_list->avail; UE_list->next[i] = UE_list->avail;
UE_list->avail = i; UE_list->avail = i;
UE_list->active[i] = FALSE; UE_list->active[i] = FALSE;
UE_list->num_UEs--;
return(0); return(0);
} }
prev=i; prev=i;
} }
UE_list->num_UEs--;
LOG_E(MAC,"error in mac_remove_ue(), could not find previous to %d in UE_list, should never happen, Dumping UE list\n",ue_idP);
dump_ue_list(UE_list);
mac_xface->macphy_exit("");
return(-1); return(-1);
} }
int prev(UE_list_t *listP, int nodeP) { int prev(UE_list_t *listP, int nodeP) {
int j; int j;
...@@ -287,35 +307,75 @@ int prev(UE_list_t *listP, int nodeP) { ...@@ -287,35 +307,75 @@ int prev(UE_list_t *listP, int nodeP) {
if (listP->next[j]==nodeP) if (listP->next[j]==nodeP)
return(j); return(j);
} }
LOG_E(MAC,"error in prev(), could not find previous in UE_list, should never happen\n");
LOG_E(MAC,"error in prev(), could not find previous to %d in UE_list, should never happen, Dumping UE list\n",nodeP);
dump_ue_list(listP);
return(-1); return(-1);
} }
void swap_UEs(UE_list_t *listP,int nodeiP, int nodejP) { void swap_UEs(UE_list_t *listP,int nodeiP, int nodejP) {
int prev_i,prev_j,next_i; int prev_i,prev_j,next_i,next_j;
LOG_D(MAC,"Swapping UE %d,%d\n",nodeiP,nodejP);
dump_ue_list(listP);
prev_i = prev(listP,nodeiP); prev_i = prev(listP,nodeiP);
prev_j = prev(listP,nodejP); prev_j = prev(listP,nodejP);
if ((prev_i<0) || (prev_j<0))
mac_xface->macphy_exit("");
next_i = listP->next[nodeiP]; next_i = listP->next[nodeiP];
listP->next[nodeiP] = listP->next[nodejP]; next_j = listP->next[nodejP];
LOG_D(MAC,"next_i %d, next_i, next_j %d, head %d\n",next_i,next_j,listP->head);
if (next_i == nodejP) { // case ... p(i) i j n(j) ... => ... p(j) j i n(i) ...
LOG_D(MAC,"Case ... p(i) i j n(j) ... => ... p(j) j i n(i) ...\n");
listP->next[nodeiP] = next_j;
listP->next[nodejP] = nodeiP;
if (nodeiP==listP->head) // case i j n(j)
listP->head = nodejP;
else
listP->next[prev_i] = nodejP;
}
else if (next_j == nodeiP) { // case ... p(j) j i n(i) ... => ... p(i) i j n(j) ...
LOG_D(MAC,"Case ... p(j) j i n(i) ... => ... p(i) i j n(j) ...\n");
listP->next[nodejP] = next_i;
listP->next[nodeiP] = nodejP;
if (nodejP==listP->head) // case j i n(i)
listP->head = nodeiP;
else
listP->next[prev_j] = nodeiP;
}
else { // case ... p(i) i n(i) ... p(j) j n(j) ...
listP->next[nodejP] = next_i; listP->next[nodejP] = next_i;
listP->next[nodeiP] = next_j;
if (nodeiP==listP->head) { if (nodeiP==listP->head) {
LOG_D(MAC,"changing head to %d\n",nodejP);
listP->head=nodejP; listP->head=nodejP;
listP->next[prev_j] = nodeiP;
} }
else { else if (nodejP==listP->head){
listP->next[prev_i] = nodejP; LOG_D(MAC,"changing head to %d\n",nodeiP);
}
if (nodejP==listP->head) {
listP->head=nodeiP; listP->head=nodeiP;
listP->next[prev_i] = nodejP;
} }
else { else {
listP->next[prev_i] = nodejP;
listP->next[prev_j] = nodeiP; listP->next[prev_j] = nodeiP;
} }
}
LOG_D(MAC,"After swap\n");
dump_ue_list(listP);
} }
void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, rnti_t rntiP, sub_frame_t subframeP) { void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, rnti_t rntiP, sub_frame_t subframeP) {
......
...@@ -527,8 +527,9 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -527,8 +527,9 @@ void schedule_ulsch_rnti(module_id_t module_idP,
if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
int8_t ret; int8_t ret;
// Get candidate harq_pid from PHY // Get candidate harq_pid from PHY
ret = mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,subframeP,&harq_pid,&round,1); ret = mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,1);
LOG_I(MAC,"Got harq_pid %d, round %d, UE_id %d\n",harq_pid,round,UE_id); LOG_I(MAC,"Got harq_pid %d, round %d, UE_id %d (UE_to_be_scheduled %d)\n",harq_pid,round,UE_id,
UE_is_to_be_scheduled(module_idP,CC_id,UE_id));
/* [SR] 01/07/13: Don't schedule UE if we cannot get harq pid */ /* [SR] 01/07/13: Don't schedule UE if we cannot get harq pid */
#ifndef EXMIMO_IOT #ifndef EXMIMO_IOT
...@@ -538,8 +539,8 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -538,8 +539,8 @@ void schedule_ulsch_rnti(module_id_t module_idP,
if (round==0) if (round==0)
#endif #endif
{ {
LOG_D(MAC,"[eNB %d][PUSCH %x] Frame %d subframeP %d Scheduling UE %d (SR %d)\n", LOG_D(MAC,"[eNB %d][PUSCH %d] Frame %d subframeP %d Scheduling UE %d round %d (SR %d)\n",
module_idP,rnti,frameP,subframeP,UE_id, module_idP,harq_pid,frameP,subframeP,UE_id,round,
UE_template->ul_SR); UE_template->ul_SR);
// reset the scheduling request // reset the scheduling request
...@@ -559,7 +560,10 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -559,7 +560,10 @@ void schedule_ulsch_rnti(module_id_t module_idP,
if (round > 0) { if (round > 0) {
ndi = UE_template->oldNDI_UL[harq_pid]; ndi = UE_template->oldNDI_UL[harq_pid];
mcs = rvidx_tab[round&3] + 29; //not correct for round==4! if ((round&3)==0)
mcs = openair_daq_vars.target_ue_ul_mcs;
else
mcs = rvidx_tab[round&3] + 28; //not correct for round==4!
} }
else { else {
ndi = 1-UE_template->oldNDI_UL[harq_pid]; ndi = 1-UE_template->oldNDI_UL[harq_pid];
...@@ -569,13 +573,14 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -569,13 +573,14 @@ void schedule_ulsch_rnti(module_id_t module_idP,
LOG_D(MAC,"[eNB %d] ULSCH scheduler: Ndi %d, mcs %d\n",module_idP,ndi,mcs); LOG_D(MAC,"[eNB %d] ULSCH scheduler: Ndi %d, mcs %d\n",module_idP,ndi,mcs);
if((cooperation_flag > 0) && (UE_id == 1)) { // Allocation on same set of RBs /* if((cooperation_flag > 0) && (UE_id == 1)) { // Allocation on same set of RBs
// RIV:resource indication value // function in openair1/PHY/LTE_TRANSPORT/dci_tools.c // RIV:resource indication value // function in openair1/PHY/LTE_TRANSPORT/dci_tools.c
rballoc = mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL, rballoc = mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL,
((UE_id-1)*4),//openair_daq_vars.ue_ul_nb_rb), ((UE_id-1)*4),//openair_daq_vars.ue_ul_nb_rb),
4);//openair_daq_vars.ue_ul_nb_rb); 4);//openair_daq_vars.ue_ul_nb_rb);
} }*/
else if ((round==0) && (mcs < 29)) {
if (round==0) {
rb_table_index = 1; rb_table_index = 1;
TBS = mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]); TBS = mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]);
buffer_occupancy = ((UE_template->bsr_info[LCGID0] == 0) && buffer_occupancy = ((UE_template->bsr_info[LCGID0] == 0) &&
...@@ -618,7 +623,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -618,7 +623,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
//rb_table_index = 8; //rb_table_index = 8;
LOG_I(MAC,"[eNB %d][PUSCH %d/%x] Frame %d subframeP %d Scheduled UE (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n", LOG_I(MAC,"[eNB %d][PUSCH %d/%x] Frame %d subframeP %d Scheduled UE (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n",
module_idP,UE_id,rnti,frameP,subframeP,mcs, module_idP,harq_pid,rnti,frameP,subframeP,mcs,
*first_rb,rb_table[rb_table_index], *first_rb,rb_table[rb_table_index],
rb_table_index,mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]), rb_table_index,mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]),
harq_pid); harq_pid);
...@@ -628,6 +633,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -628,6 +633,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
rb_table[rb_table_index]);//openair_daq_vars.ue_ul_nb_rb); rb_table[rb_table_index]);//openair_daq_vars.ue_ul_nb_rb);
*first_rb+=rb_table[rb_table_index]; // increment for next UE allocation *first_rb+=rb_table[rb_table_index]; // increment for next UE allocation
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index]; //store for possible retransmission UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index]; //store for possible retransmission
buffer_occupancy -= mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]); buffer_occupancy -= mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]);
......
...@@ -219,13 +219,13 @@ void assign_rbs_required (module_id_t Mod_id, ...@@ -219,13 +219,13 @@ void assign_rbs_required (module_id_t Mod_id,
// This function scans all CC_ids for a particular UE to find the maximum round index of its HARQ processes // This function scans all CC_ids for a particular UE to find the maximum round index of its HARQ processes
int maxround(module_id_t Mod_id,uint16_t rnti,sub_frame_t subframe) { int maxround(module_id_t Mod_id,uint16_t rnti,int frame,sub_frame_t subframe) {
uint8_t round,round_max=0,harq_pid; uint8_t round,round_max=0,harq_pid;
int CC_id; int CC_id;
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++){ for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++){
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframe,&harq_pid,&round,0); mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,frame,subframe,&harq_pid,&round,0);
if (round > round_max) if (round > round_max)
round_max = round; round_max = round;
} }
...@@ -252,8 +252,9 @@ int maxcqi(module_id_t Mod_id,uint16_t rnti) { ...@@ -252,8 +252,9 @@ int maxcqi(module_id_t Mod_id,uint16_t rnti) {
// This fuction sorts the UE in order their dlsch buffer and CQI // This fuction sorts the UE in order their dlsch buffer and CQI
void sort_UEs (module_id_t Mod_id, void sort_UEs (module_id_t Mod_idP,
sub_frame_t subframe) { int frameP,
sub_frame_t subframeP) {
int UE_id1,UE_id2; int UE_id1,UE_id2;
...@@ -262,30 +263,30 @@ void sort_UEs (module_id_t Mod_id, ...@@ -262,30 +263,30 @@ void sort_UEs (module_id_t Mod_id,
int i=0,ii=0,j=0; int i=0,ii=0,j=0;
rnti_t rnti1,rnti2; rnti_t rnti1,rnti2;
UE_list_t *UE_list = &eNB_mac_inst[Mod_id].UE_list; UE_list_t *UE_list = &eNB_mac_inst[Mod_idP].UE_list;
for (i=UE_list->head;i>=0;i=UE_list->next[i]) { for (i=UE_list->head;i>=0;i=UE_list->next[i]) {
rnti1 = UE_RNTI(Mod_id,i); rnti1 = UE_RNTI(Mod_idP,i);
if(rnti1 == 0) if(rnti1 == 0)
continue; continue;
UE_id1 = i; UE_id1 = i;
pCC_id1 = UE_PCCID(Mod_id,UE_id1); pCC_id1 = UE_PCCID(Mod_idP,UE_id1);
cqi1 = maxcqi(Mod_id,rnti1); // cqi1 = maxcqi(Mod_idP,rnti1); //
round1 = maxround(Mod_id,rnti1,subframe); round1 = maxround(Mod_idP,rnti1,frameP,subframeP);
for(ii=UE_list->next[i];ii>=0;ii=UE_list->next[ii]){ for(ii=UE_list->next[i];ii>=0;ii=UE_list->next[ii]){
UE_id2 = ii; UE_id2 = ii;
rnti2 = UE_RNTI(Mod_id,UE_id2); rnti2 = UE_RNTI(Mod_idP,UE_id2);
if(rnti2 == 0) if(rnti2 == 0)
continue; continue;
cqi2 = maxcqi(Mod_id,rnti2); cqi2 = maxcqi(Mod_idP,rnti2);
round2 = maxround(Mod_id,rnti2,subframe); //mac_xface->get_ue_active_harq_pid(Mod_id,rnti2,subframe,&harq_pid2,&round2,0); round2 = maxround(Mod_idP,rnti2,frameP,subframeP); //mac_xface->get_ue_active_harq_pid(Mod_id,rnti2,subframe,&harq_pid2,&round2,0);
pCC_id2 = UE_PCCID(Mod_id,UE_id2); pCC_id2 = UE_PCCID(Mod_idP,UE_id2);
if(round2 > round1){ // Check first if one of the UEs has an active HARQ process which needs service and swap order if(round2 > round1){ // Check first if one of the UEs has an active HARQ process which needs service and swap order
swap_UEs(UE_list,UE_id1,UE_id2); swap_UEs(UE_list,UE_id1,UE_id2);
...@@ -331,8 +332,8 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -331,8 +332,8 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX], unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
int *mbsfn_flag){ int *mbsfn_flag){
unsigned char rballoc_sub[MAX_NUM_CCs][13],harq_pid=0,harq_pid1=0,harq_pid2=0,round=0,round1=0,round2=0,total_ue_count; unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX],harq_pid=0,harq_pid1=0,harq_pid2=0,round=0,round1=0,round2=0,total_ue_count;
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]; unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX];
int UE_id, UE_id2, i; int UE_id, UE_id2, i;
uint16_t ii,j; uint16_t ii,j;
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
...@@ -357,11 +358,14 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -357,11 +358,14 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
continue; continue;
frame_parms[CC_id] = mac_xface->get_lte_frame_parms(Mod_id,CC_id); frame_parms[CC_id] = mac_xface->get_lte_frame_parms(Mod_id,CC_id);
min_rb_unit[CC_id]=get_min_rb_unit(Mod_id,CC_id); min_rb_unit[CC_id]=get_min_rb_unit(Mod_id,CC_id);
for (i=UE_list->head;i>=0;i=UE_list->next[i]) { for (i=UE_list->head;i>=0;i=UE_list->next[i]) {
UE_id = i; UE_id = i;
// Initialize scheduling information for all active UEs // Initialize scheduling information for all active UEs
dlsch_scheduler_pre_processor_reset(UE_id, dlsch_scheduler_pre_processor_reset(UE_id,
CC_id, CC_id,
N_RBG[CC_id], N_RBG[CC_id],
...@@ -376,14 +380,22 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -376,14 +380,22 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
} }
} }
// Store the DLSCH buffer for each logical channel // Store the DLSCH buffer for each logical channel
store_dlsch_buffer (Mod_id,frameP,subframeP); store_dlsch_buffer (Mod_id,frameP,subframeP);
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer // Calculate the number of RBs required by each UE on the basis of logical channel's buffer
assign_rbs_required (Mod_id,frameP,subframeP,nb_rbs_required,min_rb_unit); assign_rbs_required (Mod_id,frameP,subframeP,nb_rbs_required,min_rb_unit);
// Sorts the user on the basis of dlsch logical channel buffer and CQI // Sorts the user on the basis of dlsch logical channel buffer and CQI
sort_UEs (Mod_id,subframeP); sort_UEs (Mod_id,frameP,subframeP);
total_ue_count =0; total_ue_count =0;
// loop over all active UEs // loop over all active UEs
...@@ -402,7 +414,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -402,7 +414,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
average_rbs_per_user[CC_id]=0; average_rbs_per_user[CC_id]=0;
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframeP,&harq_pid,&round,0); mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,frameP,subframeP,&harq_pid,&round,0);
if(round>0) if(round>0)
nb_rbs_required[CC_id][UE_id] = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; nb_rbs_required[CC_id][UE_id] = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
//nb_rbs_required_remaining[UE_id] = nb_rbs_required[UE_id]; //nb_rbs_required_remaining[UE_id] = nb_rbs_required[UE_id];
...@@ -480,7 +492,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -480,7 +492,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
if(rnti == 0) if(rnti == 0)
continue; continue;
transmission_mode = mac_xface->get_transmission_mode(Mod_id,CC_id,rnti); transmission_mode = mac_xface->get_transmission_mode(Mod_id,CC_id,rnti);
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframeP,&harq_pid,&round,0); mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,frameP,subframeP,&harq_pid,&round,0);
rrc_status = mac_get_rrc_status(Mod_id,1,UE_id); rrc_status = mac_get_rrc_status(Mod_id,1,UE_id);
/* 1st allocate for the retx */ /* 1st allocate for the retx */
...@@ -523,7 +535,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -523,7 +535,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
continue; continue;
eNB_UE_stats2 = mac_xface->get_eNB_UE_stats(Mod_id,CC_id,rnti2); eNB_UE_stats2 = mac_xface->get_eNB_UE_stats(Mod_id,CC_id,rnti2);
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti2,subframeP,&harq_pid2,&round2,0); mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti2,frameP,subframeP,&harq_pid2,&round2,0);
if ((mac_get_rrc_status(Mod_id,1,UE_id2) >= RRC_RECONFIGURED) && if ((mac_get_rrc_status(Mod_id,1,UE_id2) >= RRC_RECONFIGURED) &&
(round2==0) && (round2==0) &&
...@@ -635,8 +647,8 @@ void dlsch_scheduler_pre_processor_reset (int UE_id, ...@@ -635,8 +647,8 @@ void dlsch_scheduler_pre_processor_reset (int UE_id,
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX], unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
unsigned char rballoc_sub[MAX_NUM_CCs][13], unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX],
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]){ unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]){
int i; int i;
nb_rbs_required[CC_id][UE_id]=0; nb_rbs_required[CC_id][UE_id]=0;
pre_nb_available_rbs[CC_id][UE_id] = 0; pre_nb_available_rbs[CC_id][UE_id] = 0;
...@@ -662,8 +674,8 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id, ...@@ -662,8 +674,8 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX], unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
unsigned char rballoc_sub[MAX_NUM_CCs][13], unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX],
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]){ unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]){
int i; int i;
......
...@@ -178,8 +178,8 @@ void dlsch_scheduler_pre_processor_reset (int UE_id, ...@@ -178,8 +178,8 @@ void dlsch_scheduler_pre_processor_reset (int UE_id,
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX], unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
unsigned char rballoc_sub[MAX_NUM_CCs][13], unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX],
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]); unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]);
// eNB functions // eNB functions
/* \brief This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done /* \brief This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done
...@@ -215,8 +215,8 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id, ...@@ -215,8 +215,8 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX], unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
unsigned char rballoc_sub[MAX_NUM_CCs][13], unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX],
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]); unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]);
/* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f /* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f
and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f. The resultant DCI_PDU is and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f. The resultant DCI_PDU is
......
...@@ -236,7 +236,7 @@ typedef struct ...@@ -236,7 +236,7 @@ typedef struct
uint16_t (*get_TBS_UL)(uint8_t mcs, uint16_t nb_rb); uint16_t (*get_TBS_UL)(uint8_t mcs, uint16_t nb_rb);
/// Function to retrieve the HARQ round index for a particular UL/DLSCH and harq_pid /// Function to retrieve the HARQ round index for a particular UL/DLSCH and harq_pid
int (*get_ue_active_harq_pid)(module_id_t Mod_id, uint8_t CC_id,rnti_t rnti, uint8_t subframe, uint8_t *harq_pid, uint8_t *round, uint8_t ul_flag); int (*get_ue_active_harq_pid)(module_id_t Mod_id, uint8_t CC_id,rnti_t rnti, int frame, uint8_t subframe, uint8_t *harq_pid, uint8_t *round, uint8_t ul_flag);
/// Function to retrieve number of CCE /// Function to retrieve number of CCE
uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t CC_id); uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t CC_id);
......
...@@ -506,7 +506,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -506,7 +506,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
//*((*sib1)->p_Max) = 23; //*((*sib1)->p_Max) = 23;
(*sib1)->freqBandIndicator = (*sib1)->freqBandIndicator =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->eutra_band; configuration->eutra_band[0];
#else #else
7; 7;
#endif #endif
...@@ -521,21 +521,21 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -521,21 +521,21 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
// ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL); // ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
if (configuration->frame_type == TDD) if (configuration->frame_type[0] == TDD)
#endif #endif
{ {
(*sib1)->tdd_Config = CALLOC(1,sizeof(struct TDD_Config)); (*sib1)->tdd_Config = CALLOC(1,sizeof(struct TDD_Config));
(*sib1)->tdd_Config->subframeAssignment = (*sib1)->tdd_Config->subframeAssignment =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->tdd_config; configuration->tdd_config[0];
#else #else
frame_parms->tdd_config; frame_parms->tdd_config;
#endif #endif
(*sib1)->tdd_Config->specialSubframePatterns = (*sib1)->tdd_Config->specialSubframePatterns =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->tdd_config_s; configuration->tdd_config_s[0];
#else #else
frame_parms->tdd_config_S; frame_parms->tdd_config_S;
#endif #endif
...@@ -584,206 +584,6 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -584,206 +584,6 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
uint8_t do_SIB2_AT4(uint8_t Mod_id,
uint8_t *buffer,
BCCH_DL_SCH_Message_t *bcch_message,
SystemInformationBlockType2_t **sib2
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
) {
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part;
asn_enc_rval_t enc_rval;
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation;
bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.present = SystemInformation__criticalExtensions_PR_systemInformation_r8;
bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
sib2_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
memset(sib2_part,0,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,
sib2_part);
sib2_part->present = SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2;
*sib2 = &sib2_part->choice.sib2;
// sib2
(*sib2)->ac_BarringInfo = NULL;
#ifdef Rel10
(*sib2)->ssac_BarringForMMTEL_Voice_r9 = NULL;
(*sib2)->ssac_BarringForMMTEL_Video_r9 = NULL;
(*sib2)->ac_BarringForCSFB_r10 = NULL;
#endif
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n52;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep=RACH_ConfigCommon__powerRampingParameters__powerRampingStep_dB2;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower=RACH_ConfigCommon__powerRampingParameters__preambleInitialReceivedTargetPower_dBm_104;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf10;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer=RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = 4;
// BCCH-Config
(*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff=BCCH_Config__modificationPeriodCoeff_n4;
// PCCH-Config
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle =
#if defined(ENABLE_ITTI)
configuration->default_drx;
#else
PCCH_Config__defaultPagingCycle_rf128;
#endif
(*sib2)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT;
// PRACH-Config
(*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex=22;//0;//384;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex = 3;//3;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag = 0;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig = 0;//12;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset = 0;
// PDSCH-Config
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=-24;
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0;
// PUSCH-Config
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB=1;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode=PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset=4;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift=1;
// PUCCH-Config
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift=PUCCH_ConfigCommon__deltaPUCCH_Shift_ds2;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI = 2;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN = 0;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN = 0;
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=SoundingRS_UL_ConfigCommon_PR_release;
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0;
// uplinkPowerControlCommon
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -95;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha=UplinkPowerControlCommon__alpha_al08;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -117;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1=DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b=DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2=DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a=DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b=DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 = 4;
(*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength=UL_CyclicPrefixLength_len1;
(*sib2)->ue_TimersAndConstants.t300=UE_TimersAndConstants__t300_ms1000;
(*sib2)->ue_TimersAndConstants.t301=UE_TimersAndConstants__t301_ms1000;
(*sib2)->ue_TimersAndConstants.t310=UE_TimersAndConstants__t310_ms1000;
(*sib2)->ue_TimersAndConstants.n310=UE_TimersAndConstants__n310_n1;
(*sib2)->ue_TimersAndConstants.t311=UE_TimersAndConstants__t311_ms10000;
(*sib2)->ue_TimersAndConstants.n311=UE_TimersAndConstants__n311_n1;
(*sib2)->freqInfo.additionalSpectrumEmission = 1;
(*sib2)->freqInfo.ul_Bandwidth = CALLOC(1,sizeof(long));
(*sib2)->freqInfo.ul_CarrierFreq = CALLOC(1,sizeof(ARFCN_ValueEUTRA_t));
*((*sib2)->freqInfo.ul_CarrierFreq) = 38050;
*((*sib2)->freqInfo.ul_Bandwidth) = SystemInformationBlockType2__freqInfo__ul_Bandwidth_n50;
(*sib2)->mbsfn_SubframeConfigList = NULL;
(*sib2)->timeAlignmentTimerCommon= TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf10240;
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
(void*)bcch_message,
buffer,
100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[10000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_BCCH_DL_SCH_Message, (void *)bcch_message)) > 0)
{
MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_BCCH, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rrc_dl_bcch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_dl_bcch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, msg_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"[eNB] SystemInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
if (enc_rval.encoded==-1) {
msg("[RRC] ASN1 : SI encoding failed for SIB2\n");
return(-1);
}
return((enc_rval.encoded+7)/8);
}
uint8_t do_SIB23(uint8_t Mod_id, uint8_t do_SIB23(uint8_t Mod_id,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint8_t *buffer, uint8_t *buffer,
...@@ -883,7 +683,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -883,7 +683,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle = (*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->default_drx; configuration->pcch_defaultPagingCycle[0];
#else #else
PCCH_Config__defaultPagingCycle_rf128; PCCH_Config__defaultPagingCycle_rf128;
#endif #endif
...@@ -902,7 +702,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -902,7 +702,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
#ifdef EXMIMO // This corresponds to raw output of ExpressMIMO2 v2 #ifdef EXMIMO // This corresponds to raw output of ExpressMIMO2 v2
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=-24; (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=-24;
#else #else
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=15; (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=0; // corresponds to 24.7 dBm 5 MHz/ 27.7 10 MHz/ 30.7 20 MHz
#endif #endif
if (frame_parms->mode1_flag==1) if (frame_parms->mode1_flag==1)
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0; (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0;
......
...@@ -732,13 +732,13 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need ...@@ -732,13 +732,13 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
// phy related params // phy related params
unsigned int n_frames; unsigned int n_frames;
unsigned int n_frames_flag; // if set, then let the emulation goes to infinity unsigned int n_frames_flag; // if set, then let the emulation goes to infinity
unsigned char frame_type; unsigned char frame_type[MAX_NUM_CCs];
char * frame_type_name; char * frame_type_name[MAX_NUM_CCs];
unsigned char tdd_config; unsigned char tdd_config[MAX_NUM_CCs];
unsigned char tdd_config_S; unsigned char tdd_config_S[MAX_NUM_CCs];
unsigned char extended_prefix_flag; unsigned char extended_prefix_flag[MAX_NUM_CCs];
unsigned char N_RB_DL; unsigned char N_RB_DL[MAX_NUM_CCs];
unsigned char transmission_mode; unsigned char transmission_mode[MAX_NUM_CCs];
int max_predefined_traffic_config_index; int max_predefined_traffic_config_index;
int max_customized_traffic_config_index; int max_customized_traffic_config_index;
......
...@@ -947,19 +947,19 @@ void characters(void *user_data, const xmlChar *xmlch, int xmllen) { // called o ...@@ -947,19 +947,19 @@ void characters(void *user_data, const xmlChar *xmlch, int xmllen) { // called o
} else if (system_frequency_GHz_) { } else if (system_frequency_GHz_) {
oai_emulation.environment_system_config.system_frequency_GHz = atof(ch); oai_emulation.environment_system_config.system_frequency_GHz = atof(ch);
} else if (number_of_rbs_dl_) { } else if (number_of_rbs_dl_) {
oai_emulation.info.N_RB_DL = atoi(ch); oai_emulation.info.N_RB_DL[0] = atoi(ch);
} else if (transmission_mode_) { } else if (transmission_mode_) {
oai_emulation.info.transmission_mode = atoi(ch); oai_emulation.info.transmission_mode[0] = atoi(ch);
} else if (frame_config_) { } else if (frame_config_) {
if (frame_type_) { if (frame_type_) {
oai_emulation.info.frame_type = atoi(ch); oai_emulation.info.frame_type[0] = atoi(ch);
if (oai_emulation.info.frame_type) { if (oai_emulation.info.frame_type[0]) {
oai_emulation.info.frame_type_name = "TDD"; oai_emulation.info.frame_type_name[0] = "TDD";
} else { } else {
oai_emulation.info.frame_type_name = "FDD"; oai_emulation.info.frame_type_name[0] = "FDD";
} }
} else if (tdd_config_) { } else if (tdd_config_) {
oai_emulation.info.tdd_config = atoi(ch); oai_emulation.info.tdd_config[0] = atoi(ch);
} }
} else if (antenna_) { } else if (antenna_) {
if (eNB_antenna_) { if (eNB_antenna_) {
......
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