Commit 564268d0 authored by Vincent Savaux's avatar Vincent Savaux

Merge branch 'develop-nb-iot' of...

Merge branch 'develop-nb-iot' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-nb-iot
parents 73bfe44f 3ed2490e
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h"
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h" //#include "RadioResourceConfigCommonSIB.h"
...@@ -338,6 +339,9 @@ void phy_cleanup(void); ...@@ -338,6 +339,9 @@ void phy_cleanup(void);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
void lte_param_init(unsigned char N_tx_port_eNB, void lte_param_init(unsigned char N_tx_port_eNB,
...@@ -353,5 +357,30 @@ void lte_param_init(unsigned char N_tx_port_eNB, ...@@ -353,5 +357,30 @@ void lte_param_init(unsigned char N_tx_port_eNB,
uint8_t osf, uint8_t osf,
uint32_t perfect_ce); uint32_t perfect_ce);
/** @} */ /** @} */
// for NB-IoT
int init_frame_parms_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *lte_frame_parms);
/*!
\brief Allocate and initialize the PHY variables relevant to the LTE implementation (eNB).
\details Only a subset of phy_vars_eNb is initialized.
@param[out] phy_vars_eNb Pointer to eNB Variables
@param is_secondary_eNb Flag to indicate this eNB gets synch from another
@param abstraction_flag 1 indicates memory should be allocated for abstracted MODEM
@returns 0 on success
@returns -1 if any memory allocation failed
@note The current implementation will never return -1, but segfault.
*/
int phy_init_lte_eNB_NB_IoT(PHY_VARS_eNB_NB_IoT *phy_vars_eNb,
unsigned char is_secondary_eNb,
unsigned char abstraction_flag);
#endif #endif
...@@ -76,5 +76,6 @@ void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id, ...@@ -76,5 +76,6 @@ void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id,
#endif #endif
...@@ -1642,3 +1642,332 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1642,3 +1642,332 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
return (0); return (0);
} }
void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms)
{
crcTableInit_NB_IoT();
//ccodedot11_init();
//ccodedot11_init_inv();
//ccodelte_init();
//ccodelte_init_inv();
//treillis_table_init();
//phy_generate_viterbi_tables();
//phy_generate_viterbi_tables_lte();
//init_td8();
// init_td16();
#ifdef __AVX2__
// init_td16avx2();
#endif
//lte_sync_time_init_NB_IoT(frame_parms);
//generate_ul_ref_sigs();
//generate_ul_ref_sigs_rx();
// generate_64qam_table();
//generate_16qam_table();
// generate_RIV_tables();
// init_unscrambling_lut();
// init_scrambling_lut();
//set_taus_seed(1328);
}
int phy_init_lte_eNB_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
unsigned char is_secondary_eNB,
unsigned char abstraction_flag)
{
// shortcuts
NB_IoT_DL_FRAME_PARMS* const fp = &eNB->frame_parms;
NB_IoT_eNB_COMMON* const common_vars = &eNB->common_vars;
NB_IoT_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
NB_IoT_eNB_SRS* const srs_vars = eNB->srs_vars;
NB_IoT_eNB_PRACH* const prach_vars = &eNB->prach_vars;
int i, j, eNB_id, UE_id;
int re;
eNB->total_dlsch_bitrate = 0;
eNB->total_transmitted_bits = 0;
eNB->total_system_throughput = 0;
eNB->check_for_MUMIMO_transmissions=0;
if (eNB->node_function != NGFI_RRU_IF4p5_NB_IoT) {
lte_gold_NB_IoT(fp,eNB->lte_gold_table_NB_IoT,fp->Nid_cell);
// generate_pcfich_reg_mapping(fp);
// generate_phich_reg_mapping(fp);
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX_NB_IoT; UE_id++) {
eNB->first_run_timing_advance[UE_id] =
1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
// clear whole structure
bzero( &eNB->UE_stats[UE_id], sizeof(NB_IoT_eNB_UE_stats) );
eNB->physicalConfigDedicated[UE_id] = NULL;
}
eNB->first_run_I0_measurements = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
}
// for (eNB_id=0; eNB_id<3; eNB_id++) {
{
eNB_id=0;
if (abstraction_flag==0) {
// TX vars
if (eNB->node_function != NGFI_RCC_IF4p5_NB_IoT)
common_vars->txdata[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_tx*sizeof(int32_t*));
common_vars->txdataF[eNB_id] = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t*));
common_vars->txdataF_BF[eNB_id] = (int32_t **)malloc16(fp->nb_antennas_tx*sizeof(int32_t*));
if (eNB->node_function != NGFI_RRU_IF5_NB_IoT) {
for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
if (i<fp->nb_antenna_ports_eNB || i==5) {
common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
#ifdef DEBUG_PHY
printf("[openair][LTE_PHY][INIT] common_vars->txdataF[%d][%d] = %p (%lu bytes)\n",
eNB_id,i,common_vars->txdataF[eNB_id][i],
fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
#endif
}
}
}
for (i=0; i<fp->nb_antennas_tx; i++) {
common_vars->txdataF_BF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t) );
if (eNB->node_function != NGFI_RCC_IF4p5_NB_IoT)
// Allocate 10 subframes of I/Q TX signal data (time) if not
common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
#ifdef DEBUG_PHY
printf("[openair][LTE_PHY][INIT] common_vars->txdata[%d][%d] = %p (%lu bytes)\n",eNB_id,i,common_vars->txdata[eNB_id][i],
fp->samples_per_tti*10*sizeof(int32_t));
#endif
}
for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
if (i<fp->nb_antenna_ports_eNB || i==5) {
common_vars->beam_weights[eNB_id][i] = (int32_t **)malloc16_clear(fp->nb_antennas_tx*sizeof(int32_t*));
for (j=0; j<fp->nb_antennas_tx; j++) {
common_vars->beam_weights[eNB_id][i][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
// antenna ports 0-3 are mapped on antennas 0-3
// antenna port 4 is mapped on antenna 0
// antenna ports 5-14 are mapped on all antennas
if (((i<4) && (i==j)) || ((i==4) && (j==0))) {
for (re=0; re<fp->ofdm_symbol_size; re++)
common_vars->beam_weights[eNB_id][i][j][re] = 0x00007fff;
}
else if (i>4) {
for (re=0; re<fp->ofdm_symbol_size; re++)
common_vars->beam_weights[eNB_id][i][j][re] = 0x00007fff/fp->nb_antennas_tx;
}
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] lte_common_vars->beam_weights[%d][%d][%d] = %p (%zu bytes)\n",
eNB_id,i,j,common_vars->beam_weights[eNB_id][i][j],
fp->ofdm_symbol_size*sizeof(int32_t));
#endif
}
}
}
// RX vars
if (eNB->node_function != NGFI_RCC_IF4p5_NB_IoT) {
common_vars->rxdata[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) );
common_vars->rxdata_7_5kHz[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) );
}
common_vars->rxdataF[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) );
for (i=0; i<fp->nb_antennas_rx; i++) {
if (eNB->node_function != NGFI_RCC_IF4p5_NB_IoT) {
// allocate 2 subframes of I/Q signal data (time) if not an RCC (no time-domain signals)
common_vars->rxdata[eNB_id][i] = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
if (eNB->node_function != NGFI_RRU_IF5_NB_IoT)
// allocate 2 subframes of I/Q signal data (time, 7.5 kHz offset)
common_vars->rxdata_7_5kHz[eNB_id][i] = (int32_t*)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) );
}
if (eNB->node_function != NGFI_RRU_IF5_NB_IoT)
// allocate 2 subframes of I/Q signal data (frequency)
common_vars->rxdataF[eNB_id][i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) );
#ifdef DEBUG_PHY
printf("[openair][LTE_PHY][INIT] common_vars->rxdata[%d][%d] = %p (%lu bytes)\n",eNB_id,i,common_vars->rxdata[eNB_id][i],fp->samples_per_tti*10*sizeof(int32_t));
if (eNB->node_function != NGFI_RRU_IF5_NB_IoT)
printf("[openair][LTE_PHY][INIT] common_vars->rxdata_7_5kHz[%d][%d] = %p (%lu bytes)\n",eNB_id,i,common_vars->rxdata_7_5kHz[eNB_id][i],fp->samples_per_tti*2*sizeof(int32_t));
#endif
common_vars->rxdataF[eNB_id][i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(fp->ofdm_symbol_size*fp->symbols_per_tti) );
}
if ((eNB->node_function != NGFI_RRU_IF4p5_NB_IoT)&&(eNB->node_function != NGFI_RRU_IF5_NB_IoT)) {
// Channel estimates for SRS
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
srs_vars[UE_id].srs_ch_estimates[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
srs_vars[UE_id].srs_ch_estimates_time[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
for (i=0; i<fp->nb_antennas_rx; i++) {
srs_vars[UE_id].srs_ch_estimates[eNB_id][i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size );
srs_vars[UE_id].srs_ch_estimates_time[eNB_id][i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
}
} //UE_id
common_vars->sync_corr[eNB_id] = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_tti );
}
} // abstraction_flag = 0
else { //UPLINK abstraction = 1
eNB->sinr_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
}
} //eNB_id
if (abstraction_flag==0) {
if ((eNB->node_function != NGFI_RRU_IF4p5_NB_IoT)&&(eNB->node_function != NGFI_RRU_IF5_NB_IoT)) {
generate_ul_ref_sigs_rx();
// SRS
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
srs_vars[UE_id].srs = (int32_t*)malloc16_clear(2*fp->ofdm_symbol_size*sizeof(int32_t));
}
}
}
// ULSCH VARS, skip if NFGI_RRU_IF4
if ((eNB->node_function!=NGFI_RRU_IF4p5_NB_IoT)&&(eNB->node_function != NGFI_RRU_IF5_NB_IoT))
prach_vars->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int16_t) );
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
"nb_antennas_rx too large");
for (i=0; i<fp->nb_antennas_rx; i++) {
prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
#ifdef DEBUG_PHY
printf("[openair][LTE_PHY][INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
#endif
}
if ((eNB->node_function != NGFI_RRU_IF4p5_NB_IoT)&&(eNB->node_function != NGFI_RRU_IF5_NB_IoT)) {
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->prach_ifft) / sizeof(prach_vars->prach_ifft[0]),
"nb_antennas_rx too large");
for (i=0; i<fp->nb_antennas_rx; i++) {
prach_vars->prach_ifft[i] = (int16_t*)malloc16_clear(1024*2*sizeof(int16_t));
#ifdef DEBUG_PHY
printf("[openair][LTE_PHY][INIT] prach_vars->prach_ifft[%d] = %p\n",i,prach_vars->prach_ifft[i]);
#endif
}
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
//FIXME
pusch_vars[UE_id] = (NB_IoT_eNB_PUSCH*)malloc16_clear( NUMBER_OF_UE_MAX*sizeof(NB_IoT_eNB_PUSCH) );
if (abstraction_flag==0) {
for (eNB_id=0; eNB_id<3; eNB_id++) {
pusch_vars[UE_id]->rxdataF_ext[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
pusch_vars[UE_id]->rxdataF_ext2[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
pusch_vars[UE_id]->drs_ch_estimates[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
pusch_vars[UE_id]->rxdataF_comp[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
pusch_vars[UE_id]->ul_ch_mag[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
pusch_vars[UE_id]->ul_ch_magb[eNB_id] = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
for (i=0; i<fp->nb_antennas_rx; i++) {
// RK 2 times because of output format of FFT!
// FIXME We should get rid of this
pusch_vars[UE_id]->rxdataF_ext[eNB_id][i] = (int32_t*)malloc16_clear( 2*sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->rxdataF_ext2[eNB_id][i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->drs_ch_estimates[eNB_id][i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id][i] = (int32_t*)malloc16_clear( 2*2*sizeof(int32_t)*fp->ofdm_symbol_size );
pusch_vars[UE_id]->rxdataF_comp[eNB_id][i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->ul_ch_mag[eNB_id][i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
pusch_vars[UE_id]->ul_ch_magb[eNB_id][i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
}
} //eNB_id
pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
} // abstraction_flag
} //UE_id
if (abstraction_flag==0) {
if (is_secondary_eNB) {
for (eNB_id=0; eNB_id<3; eNB_id++) {
eNB->dl_precoder_SeNB[eNB_id] = (int **)malloc16(4*sizeof(int*));
if (eNB->dl_precoder_SeNB[eNB_id]) {
#ifdef DEBUG_PHY
printf("[openair][SECSYS_PHY][INIT] eNB->dl_precoder_SeNB[%d] allocated at %p\n",eNB_id,
eNB->dl_precoder_SeNB[eNB_id]);
#endif
} else {
printf("[openair][SECSYS_PHY][INIT] eNB->dl_precoder_SeNB[%d] not allocated\n",eNB_id);
return(-1);
}
for (j=0; j<fp->nb_antennas_tx; j++) {
eNB->dl_precoder_SeNB[eNB_id][j] = (int *)malloc16(2*sizeof(int)*(fp->ofdm_symbol_size)); // repeated format (hence the '2*')
if (eNB->dl_precoder_SeNB[eNB_id][j]) {
#ifdef DEBUG_PHY
printf("[openair][LTE_PHY][INIT] eNB->dl_precoder_SeNB[%d][%d] allocated at %p\n",eNB_id,j,
eNB->dl_precoder_SeNB[eNB_id][j]);
#endif
memset(eNB->dl_precoder_SeNB[eNB_id][j],0,2*sizeof(int)*(fp->ofdm_symbol_size));
} else {
printf("[openair][LTE_PHY][INIT] eNB->dl_precoder_SeNB[%d][%d] not allocated\n",eNB_id,j);
return(-1);
}
} //for(j=...nb_antennas_tx
} //for(eNB_id...
}
}
/*
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++)
eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
//defaul value until overwritten by RRCConnectionReconfiguration
if (fp->nb_antenna_ports_eNB==2)
eNB->pdsch_config_dedicated->p_a = dBm3;
else
eNB->pdsch_config_dedicated->p_a = dB0;
init_prach_tables(839);
*/
} // node_function != NGFI_RRU_IF4p5
return (0);
}
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "defs.h" #include "defs.h"
#include "log.h" #include "log.h"
#include "PHY/impl_defs_lte_NB_IoT.h"
uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6}; uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6};
uint16_t dl_S_table_extended[10]={3,8,9,10,3,8,9,5,0,0}; uint16_t dl_S_table_extended[10]={3,8,9,10,3,8,9,5,0,0};
...@@ -219,3 +220,154 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms) ...@@ -219,3 +220,154 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
printf("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti); printf("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti);
printf("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti); printf("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti);
} }
// NB-IoT
int init_frame_parms_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,uint8_t osf)
{
uint8_t log2_osf;
#if DISABLE_LOG_X
printf("Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
#else
LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
#endif
frame_parms->nb_prefix_samples0 = 160;
frame_parms->nb_prefix_samples = 144;
frame_parms->symbols_per_tti = 14;
switch(osf) {
case 1:
log2_osf = 0;
break;
case 2:
log2_osf = 1;
break;
case 4:
log2_osf = 2;
break;
case 8:
log2_osf = 3;
break;
case 16:
log2_osf = 4;
break;
default:
printf("Illegal oversampling %d\n",osf);
return(-1);
}
switch (frame_parms->N_RB_DL) {
case 100:
if (osf>1) {
printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1);
}
if (frame_parms->threequarter_fs) {
frame_parms->ofdm_symbol_size = 1536;
frame_parms->samples_per_tti = 23040;
frame_parms->first_carrier_offset = 1536-600;
frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2;
frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2;
}
else {
frame_parms->ofdm_symbol_size = 2048;
frame_parms->samples_per_tti = 30720;
frame_parms->first_carrier_offset = 2048-600;
}
break;
case 75:
if (osf>1) {
printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1);
}
frame_parms->ofdm_symbol_size = 1536;
frame_parms->samples_per_tti = 23040;
frame_parms->first_carrier_offset = 1536-450;
frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2;
frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2;
break;
case 50:
if (osf>1) {
printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1);
}
frame_parms->ofdm_symbol_size = 1024*osf;
frame_parms->samples_per_tti = 15360*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 300;
frame_parms->nb_prefix_samples>>=(1-log2_osf);
frame_parms->nb_prefix_samples0>>=(1-log2_osf);
break;
case 25:
if (osf>2) {
printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1);
}
frame_parms->ofdm_symbol_size = 512*osf;
frame_parms->samples_per_tti = 7680*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 150;
frame_parms->nb_prefix_samples>>=(2-log2_osf);
frame_parms->nb_prefix_samples0>>=(2-log2_osf);
break;
case 15:
frame_parms->ofdm_symbol_size = 256*osf;
frame_parms->samples_per_tti = 3840*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 90;
frame_parms->nb_prefix_samples>>=(3-log2_osf);
frame_parms->nb_prefix_samples0>>=(3-log2_osf);
break;
case 6:
frame_parms->ofdm_symbol_size = 128*osf;
frame_parms->samples_per_tti = 1920*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 36;
frame_parms->nb_prefix_samples>>=(4-log2_osf);
frame_parms->nb_prefix_samples0>>=(4-log2_osf);
break;
default:
printf("init_frame_parms: Error: Number of resource blocks (N_RB_DL %d) undefined, frame_parms = %p \n",frame_parms->N_RB_DL, frame_parms);
return(-1);
break;
}
printf("lte_parms.c: Setting N_RB_DL to %d, ofdm_symbol_size %d\n",frame_parms->N_RB_DL, frame_parms->ofdm_symbol_size);
// frame_parms->tdd_config=3;
return(0);
}
...@@ -217,7 +217,7 @@ typedef enum { ...@@ -217,7 +217,7 @@ typedef enum {
eNodeB_3GPP_BBU_NB_IoT, // eNodeB with NGFI IF5 eNodeB_3GPP_BBU_NB_IoT, // eNodeB with NGFI IF5
NGFI_RCC_IF4p5_NB_IoT, // NGFI_RCC (NGFI radio cloud center) NGFI_RCC_IF4p5_NB_IoT, // NGFI_RCC (NGFI radio cloud center)
NGFI_RAU_IF4p5_NB_IoT, NGFI_RAU_IF4p5_NB_IoT,
NGFI_RRU_IF5_Nb_IoT, // NGFI_RRU (NGFI remote radio-unit,IF5) NGFI_RRU_IF5_NB_IoT, // NGFI_RRU (NGFI remote radio-unit,IF5)
NGFI_RRU_IF4p5_NB_IoT // NGFI_RRU (NGFI remote radio-unit,IF4p5) NGFI_RRU_IF4p5_NB_IoT // NGFI_RRU (NGFI remote radio-unit,IF4p5)
} eNB_func_NB_IoT_t; } eNB_func_NB_IoT_t;
......
...@@ -533,7 +533,7 @@ typedef struct { ...@@ -533,7 +533,7 @@ typedef struct {
/// flag to indicate SISO transmission /// flag to indicate SISO transmission
uint8_t mode1_flag; uint8_t mode1_flag;
/// Indicator that 20 MHz channel uses 3/4 sampling frequency /// Indicator that 20 MHz channel uses 3/4 sampling frequency
//uint8_t threequarter_fs; uint8_t threequarter_fs;
/// Size of FFT /// Size of FFT
uint16_t ofdm_symbol_size; uint16_t ofdm_symbol_size;
/// Number of prefix samples in all but first symbol of slot /// Number of prefix samples in all but first symbol of slot
......
...@@ -283,7 +283,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP); ...@@ -283,7 +283,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP);
const Enb_properties_array_t *enb_config_get(void); const Enb_properties_array_t *enb_config_get(void);
// *** NB-IoT *** // // ******************************************************** NB-IoT ********************************************************** //
typedef struct Enb_properties_NB_IoT_s { typedef struct Enb_properties_NB_IoT_s {
/* Unique eNB_id to identify the eNB within EPC. /* Unique eNB_id to identify the eNB within EPC.
...@@ -409,18 +409,18 @@ typedef struct Enb_properties_NB_IoT_s { ...@@ -409,18 +409,18 @@ typedef struct Enb_properties_NB_IoT_s {
long pcch_defaultPagingCycle_NB[1+MAX_NUM_CCs]; long pcch_defaultPagingCycle_NB[1+MAX_NUM_CCs];
long nprach_CP_Length[1+MAX_NUM_CCs]; long nprach_CP_Length[1+MAX_NUM_CCs];
long nprach_rsrp_range[1+MAX_NUM_CCs]; long nprach_rsrp_range[1+MAX_NUM_CCs];
const char* nprach_SubcarrierMSG3_RangeStart; char* nprach_SubcarrierMSG3_RangeStart;
long maxNumPreambleAttemptCE_NB[1+MAX_NUM_CCs]; long maxNumPreambleAttemptCE_NB[1+MAX_NUM_CCs];
long npdsch_nrs_Power[1+MAX_NUM_CCs]; long npdsch_nrs_Power[1+MAX_NUM_CCs];
long npusch_ack_nack_numRepetitions_NB[1+MAX_NUM_CCs]; long npusch_ack_nack_numRepetitions_NB[1+MAX_NUM_CCs];
long npusch_srs_SubframeConfig_NB[1+MAX_NUM_CCs]; long npusch_srs_SubframeConfig_NB[1+MAX_NUM_CCs];
long npusch_threeTone_CyclicShift_r13[1+MAX_NUM_CCs]; long npusch_threeTone_CyclicShift_r13[1+MAX_NUM_CCs];
long npusch_sixTone_CyclicShift_r13[1+MAX_NUM_CCs]; long npusch_sixTone_CyclicShift_r13[1+MAX_NUM_CCs];
long npusch_groupHoppingEnabled[1+MAX_NUM_CCs]; BOOLEAN_t npusch_groupHoppingEnabled[1+MAX_NUM_CCs];
long npusch_groupAssignmentNPUSCH_r13[1+MAX_NUM_CCs]; long npusch_groupAssignmentNPUSCH_r13[1+MAX_NUM_CCs];
long dl_GapThreshold_NB[1+MAX_NUM_CCs]; long dl_GapThreshold_NB[1+MAX_NUM_CCs];
long dl_GapPeriodicity_NB[1+MAX_NUM_CCs]; long dl_GapPeriodicity_NB[1+MAX_NUM_CCs];
const char* dl_GapDurationCoeff_NB; char* dl_GapDurationCoeff_NB;
long npusch_p0_NominalNPUSCH[1+MAX_NUM_CCs]; long npusch_p0_NominalNPUSCH[1+MAX_NUM_CCs];
long npusch_alpha[1+MAX_NUM_CCs]; long npusch_alpha[1+MAX_NUM_CCs];
long deltaPreambleMsg3[1+MAX_NUM_CCs]; long deltaPreambleMsg3[1+MAX_NUM_CCs];
...@@ -439,7 +439,7 @@ typedef struct Enb_properties_NB_IoT_s { ...@@ -439,7 +439,7 @@ typedef struct Enb_properties_NB_IoT_s {
long numRepetitionsPerPreambleAttempt[1+MAX_NUM_CCs]; long numRepetitionsPerPreambleAttempt[1+MAX_NUM_CCs];
long npdcch_NumRepetitions_RA[1+MAX_NUM_CCs]; long npdcch_NumRepetitions_RA[1+MAX_NUM_CCs];
long npdcch_StartSF_CSS_RA[1+MAX_NUM_CCs]; long npdcch_StartSF_CSS_RA[1+MAX_NUM_CCs];
const char* npdcch_Offset_RA; char* npdcch_Offset_RA;
//**************************************** //****************************************
long srb1_timer_poll_retransmit; long srb1_timer_poll_retransmit;
...@@ -506,9 +506,16 @@ typedef struct Enb_properties_NB_IoT_s { ...@@ -506,9 +506,16 @@ typedef struct Enb_properties_NB_IoT_s {
#endif #endif
} Enb_properties_NB_IoT_t; } Enb_properties_NB_IoT_t;
const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_pP); typedef struct Enb_properties_array_NB_IoT_s {
int number;
Enb_properties_NB_IoT_t *properties[MAX_ENB];
} Enb_properties_array_NB_IoT_t;
void enb_config_display_NB_IoT(void);
const Enb_properties_array_NB_IoT_t *enb_config_init_NB_IoT(char* lib_config_file_name_pP);
const Enb_properties_array_NB_IoT_t *enb_config_get_NB_IoT(void);
#endif /* ENB_CONFIG_H_ */ #endif /* ENB_CONFIG_H_ */
/** @} */ /** @} */
...@@ -53,6 +53,10 @@ ...@@ -53,6 +53,10 @@
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SystemInformationBlockType2-NB-r13.h"
//#include "RACH-ConfigCommon-NB-r13.h"
//#include "DL-GapConfig-NB-r13"
/* those macros are here to help diagnose problems in configuration files /* those macros are here to help diagnose problems in configuration files
* if the lookup fails, a warning is printed * if the lookup fails, a warning is printed
* (yes we can use the function name for the macro itself, the C preprocessor * (yes we can use the function name for the macro itself, the C preprocessor
...@@ -244,7 +248,7 @@ ...@@ -244,7 +248,7 @@
#define ENB_CONFIG_STRING_OSA_LOG_LEVEL "osa_log_level" #define ENB_CONFIG_STRING_OSA_LOG_LEVEL "osa_log_level"
#define ENB_CONFIG_STRING_OSA_LOG_VERBOSITY "osa_log_verbosity" #define ENB_CONFIG_STRING_OSA_LOG_VERBOSITY "osa_log_verbosity"
// //
//******************************** NB-IoT parameters ************************************************************** //************************************* NB-IoT parameters **************************************************************
// //
//************* RRC parameters in the config file of merge branch //************* RRC parameters in the config file of merge branch
...@@ -258,20 +262,18 @@ ...@@ -258,20 +262,18 @@
#define ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT "pcch_defaultPagingCycle_NB" #define ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT "pcch_defaultPagingCycle_NB"
#define ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT "nprach_CP_Length" #define ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT "nprach_CP_Length"
#define ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT "nprach_rsrp_range" #define ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT "nprach_rsrp_range"
#define ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT "nprach_SubcarrierMSG3_RangeStart"
#define ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT "maxNumPreambleAttemptCE_NB"
#define ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT "npdsch_nrs_Power" #define ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT "npdsch_nrs_Power"
#define ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT "npusch_ack_nack_numRepetitions_NB" #define ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT "npusch_ack_nack_numRepetitions_NB"
#define ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT "npusch_srs_SubframeConfig_NB" #define ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT "npusch_srs_SubframeConfig_NB"
#define ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT "npusch_threeTone_CyclicShift_r13" #define ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT "npusch_threeTone_CyclicShift_r13"
#define ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT "npusch_sixTone_CyclicShift_r13" #define ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT "npusch_sixTone_CyclicShift_r13"
#define ENB_CONFIG_STRING_NPUSCH_GROUPHOPPINGENABLED_NB_IOT "npusch_groupHoppingEnabled" #define ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT "npusch_groupHoppingEnabled"
#define ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT "npusch_groupAssignmentNPUSCH_r13" #define ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT "npusch_groupAssignmentNPUSCH_r13"
#define ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT "dl_GapThreshold_NB" #define ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT "dl_GapThreshold_NB"
#define ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT "dl_GapPeriodicity_NB" #define ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT "dl_GapPeriodicity_NB"
#define ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT "dl_GapDurationCoeff_NB" #define ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT "dl_GapDurationCoeff_NB"
#define ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT "npusch_p0_NominalNPUSCH" #define ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT "npusch_p0_NominalNPUSCH"
#define ENB_CONFIG_STRING_NPUSCH_ALFA_NB_IOT "npusch_alpha" #define ENB_CONFIG_STRING_NPUSCH_ALPHA_NB_IOT "npusch_alpha"
#define ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT "deltaPreambleMsg3" #define ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT "deltaPreambleMsg3"
#define ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT "ue_TimersAndConstants_t300_NB" #define ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT "ue_TimersAndConstants_t300_NB"
...@@ -288,10 +290,13 @@ ...@@ -288,10 +290,13 @@
#define ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT "nprach_StartTime" #define ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT "nprach_StartTime"
#define ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT "nprach_SubcarrierOffset" #define ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT "nprach_SubcarrierOffset"
#define ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT "nprach_NumSubcarriers" #define ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT "nprach_NumSubcarriers"
#define ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT "nprach_SubcarrierMSG3_RangeStart"
#define ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT "maxNumPreambleAttemptCE_NB"
#define ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT "numRepetitionsPerPreambleAttempt" #define ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT "numRepetitionsPerPreambleAttempt"
#define ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT "npdcch_NumRepetitions_RA" #define ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT "npdcch_NumRepetitions_RA"
#define ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT "npdcch_StartSF_CSS_RA" #define ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT "npdcch_StartSF_CSS_RA"
#define ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT "npdcch_Offset_RA" #define ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT "npdcch_Offset_RA"
//********************************************************************************************************************* //*********************************************************************************************************************
#define KHz (1000UL) #define KHz (1000UL)
...@@ -339,9 +344,9 @@ static const eutra_band_t eutra_bands[] = { ...@@ -339,9 +344,9 @@ static const eutra_band_t eutra_bands[] = {
{44, 703 * MHz, 803 * MHz, 703 * MHz, 803 * MHz, TDD}, {44, 703 * MHz, 803 * MHz, 703 * MHz, 803 * MHz, TDD},
}; };
Enb_properties_array_t enb_properties; Enb_properties_array_NB_IoT_t enb_properties;
void enb_config_display(void) void enb_config_display_NB_IoT(void)
{ {
int i,j; int i,j;
...@@ -579,7 +584,7 @@ extern int asn1_xer_print; ...@@ -579,7 +584,7 @@ extern int asn1_xer_print;
#else #else
#define libconfig_int int #define libconfig_int int
#endif #endif
const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_pP) const Enb_properties_array_NB_IoT_t *enb_config_init_NB_IoT(char* lib_config_file_name_pP)
{ {
config_t cfg; config_t cfg;
config_setting_t *setting = NULL; config_setting_t *setting = NULL;
...@@ -766,20 +771,18 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_ ...@@ -766,20 +771,18 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_
libconfig_int pcch_defaultPagingCycle_NB = 0; libconfig_int pcch_defaultPagingCycle_NB = 0;
libconfig_int nprach_CP_Length = 0; libconfig_int nprach_CP_Length = 0;
libconfig_int nprach_rsrp_range = 0; libconfig_int nprach_rsrp_range = 0;
const char* nprach_SubcarrierMSG3_RangeStart = NULL;
libconfig_int maxNumPreambleAttemptCE_NB = 0;
libconfig_int npdsch_nrs_Power = 0; libconfig_int npdsch_nrs_Power = 0;
libconfig_int npusch_ack_nack_numRepetitions_NB = 0; libconfig_int npusch_ack_nack_numRepetitions_NB = 0;
libconfig_int npusch_srs_SubframeConfig_NB = 0; libconfig_int npusch_srs_SubframeConfig_NB = 0;
libconfig_int npusch_threeTone_CyclicShift_r13 = 0; libconfig_int npusch_threeTone_CyclicShift_r13 = 0;
libconfig_int npusch_sixTone_CyclicShift_r13 = 0; libconfig_int npusch_sixTone_CyclicShift_r13 = 0;
libconfig_int npusch_groupHoppingEnabled = 0; const char* npusch_groupHoppingEnabled = NULL;
libconfig_int npusch_groupAssignmentNPUSCH_r13 = 0; libconfig_int npusch_groupAssignmentNPUSCH_r13 = 0;
libconfig_int dl_GapThreshold_NB = 0; libconfig_int dl_GapThreshold_NB = 0;
libconfig_int dl_GapPeriodicity_NB = 0; libconfig_int dl_GapPeriodicity_NB = 0;
const char* dl_GapDurationCoeff_NB = NULL; const char* dl_GapDurationCoeff_NB = NULL;
libconfig_int npusch_p0_NominalNPUSCH = 0; libconfig_int npusch_p0_NominalNPUSCH = 0;
libconfig_int npusch_alpha = 0; const char* npusch_alpha = NULL;
libconfig_int deltaPreambleMsg3 = 0; libconfig_int deltaPreambleMsg3 = 0;
libconfig_int ue_TimersAndConstants_t300_NB = 0; libconfig_int ue_TimersAndConstants_t300_NB = 0;
...@@ -793,6 +796,8 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_ ...@@ -793,6 +796,8 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_
libconfig_int nprach_StartTime = 0; libconfig_int nprach_StartTime = 0;
libconfig_int nprach_SubcarrierOffset = 0; libconfig_int nprach_SubcarrierOffset = 0;
libconfig_int nprach_NumSubcarriers = 0; libconfig_int nprach_NumSubcarriers = 0;
const char* nprach_SubcarrierMSG3_RangeStart = NULL;
libconfig_int maxNumPreambleAttemptCE_NB = 0;
libconfig_int numRepetitionsPerPreambleAttempt = 0; libconfig_int numRepetitionsPerPreambleAttempt = 0;
libconfig_int npdcch_NumRepetitions_RA = 0; libconfig_int npdcch_NumRepetitions_RA = 0;
libconfig_int npdcch_StartSF_CSS_RA = 0; libconfig_int npdcch_StartSF_CSS_RA = 0;
...@@ -1013,29 +1018,27 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_ ...@@ -1013,29 +1018,27 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N311, &ue_TimersAndConstants_n311) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N311, &ue_TimersAndConstants_n311)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, &ue_TransmissionMode) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, &ue_TransmissionMode)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT, &rach_raResponseWindowSize_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT, &rach_macContentionResolutionTimer_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT, &rach_powerRampingStep_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT, &rach_powerRampingStep_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT, &rach_preambleInitialReceivedTargetPower_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT, &rach_preambleInitialReceivedTargetPower_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX_CE_NB_IOT, &rach_preambleTransMax_CE_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX_CE_NB_IOT, &rach_preambleTransMax_CE_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT, &rach_raResponseWindowSize_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT, &rach_macContentionResolutionTimer_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF_NB_IOT, &bcch_modificationPeriodCoeff_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF_NB_IOT, &bcch_modificationPeriodCoeff_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT, &pcch_defaultPagingCycle_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT, &pcch_defaultPagingCycle_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT, &nprach_CP_Length) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT, &nprach_CP_Length)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT, &nprach_rsrp_range) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT, &nprach_rsrp_range)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT, &nprach_SubcarrierMSG3_RangeStart)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT, &maxNumPreambleAttemptCE_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT, &npdsch_nrs_Power) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT, &npdsch_nrs_Power)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT, &npusch_ack_nack_numRepetitions_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT, &npusch_ack_nack_numRepetitions_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT, &npusch_srs_SubframeConfig_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT, &npusch_srs_SubframeConfig_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT, &npusch_threeTone_CyclicShift_r13) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT, &npusch_threeTone_CyclicShift_r13)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT, &npusch_sixTone_CyclicShift_r13) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT, &npusch_sixTone_CyclicShift_r13)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_GROUPHOPPINGENABLED_NB_IOT, &npusch_groupHoppingEnabled) && config_setting_lookup_string(component_carrier,ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT, &npusch_groupHoppingEnabled)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT, &npusch_groupAssignmentNPUSCH_r13) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT, &npusch_groupAssignmentNPUSCH_r13)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT, &dl_GapThreshold_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT, &dl_GapThreshold_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT, &dl_GapPeriodicity_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT, &dl_GapPeriodicity_NB)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT, &dl_GapDurationCoeff_NB) && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT, &dl_GapDurationCoeff_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT, &npusch_p0_NominalNPUSCH) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT, &npusch_p0_NominalNPUSCH)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPUSCH_ALFA_NB_IOT, &npusch_alpha) && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_NPUSCH_ALPHA_NB_IOT, &npusch_alpha)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT, &deltaPreambleMsg3) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT, &deltaPreambleMsg3)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT, &ue_TimersAndConstants_t300_NB) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT, &ue_TimersAndConstants_t300_NB)
...@@ -1049,6 +1052,8 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_ ...@@ -1049,6 +1052,8 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT, &nprach_StartTime) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT, &nprach_StartTime)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT, &nprach_SubcarrierOffset) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT, &nprach_SubcarrierOffset)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT, &nprach_NumSubcarriers) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT, &nprach_NumSubcarriers)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT, &nprach_SubcarrierMSG3_RangeStart)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT, &maxNumPreambleAttemptCE_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT, &numRepetitionsPerPreambleAttempt) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT, &numRepetitionsPerPreambleAttempt)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT, &npdcch_NumRepetitions_RA) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT, &npdcch_NumRepetitions_RA)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT, &npdcch_StartSF_CSS_RA) && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT, &npdcch_StartSF_CSS_RA)
...@@ -2107,22 +2112,1168 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_ ...@@ -2107,22 +2112,1168 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_
lib_config_file_name_pP, i, ue_TransmissionMode); lib_config_file_name_pP, i, ue_TransmissionMode);
break; break;
} }
//****************************************************************************************************************
//************************************ NB-IoT part ***************************************************************
//****************************************************************************************************************
switch (rach_raResponseWindowSize_NB) {
case 2:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp2;
break;
case 3:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp3;
break;
case 4:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp4;
break;
case 5:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp5;
break;
case 6:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp6;
break;
case 7:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp7;
break;
case 8:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp8;
break;
case 10:
enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] = RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp10;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize_NB choice: 2,3,4,5,6,7,8,10 ",
lib_config_file_name_pP, i, rach_raResponseWindowSize_NB);
break;
}
switch (rach_macContentionResolutionTimer_NB) {
case 1:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp1;
break;
case 2:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp2;
break;
case 3:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp3;
break;
case 4:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp4;
break;
case 8:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp8;
break;
case 16:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp16;
break;
case 32:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp32;
break;
case 64:
enb_properties.properties[enb_properties_index]->rach_macContentionResolutionTimer_NB[j] = RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp64;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer_NB choice: 1,2,3,4,8,16,32,64 ",
lib_config_file_name_pP, i, rach_macContentionResolutionTimer_NB);
break;
}
switch (rach_powerRampingStep_NB) {
case 0:
enb_properties.properties[enb_properties_index]->rach_powerRampingStep_NB[j] = PowerRampingParameters__powerRampingStep_dB0;
break;
case 2:
enb_properties.properties[enb_properties_index]->rach_powerRampingStep_NB[j] = PowerRampingParameters__powerRampingStep_dB2;
break;
case 4:
enb_properties.properties[enb_properties_index]->rach_powerRampingStep_NB[j] = PowerRampingParameters__powerRampingStep_dB4;
break;
case 6:
enb_properties.properties[enb_properties_index]->rach_powerRampingStep_NB[j] = PowerRampingParameters__powerRampingStep_dB6;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep_NB choice: 0,2,4,6 ",
lib_config_file_name_pP, i, rach_powerRampingStep_NB);
break;
}
switch (rach_preambleInitialReceivedTargetPower_NB) {
case -120:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_120;
break;
case -118:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_118;
break;
case -116:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_116;
break;
case -114:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_114;
break;
case -112:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_112;
break;
case -110:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_110;
break;
case -108:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_108;
break;
case -106:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_106;
break;
case -104:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_104;
break;
case -102:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_102;
break;
case -100:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_100;
break;
case -98:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_98;
break;
case -96:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_96;
break;
case -94:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_94;
break;
case -92:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_92;
break;
case -90:
enb_properties.properties[enb_properties_index]->rach_preambleInitialReceivedTargetPower_NB[j] = PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_90;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower_NB choice: -120,-118,-116,-114,-112,-110,-108,-106,-104,-102,-100,-98,-96,-94,-92,-90 ",
lib_config_file_name_pP, i, rach_preambleInitialReceivedTargetPower_NB);
break;
}
switch (rach_preambleTransMax_CE_NB) {
case 3:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n4;
break;
case 5:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n5;
break;
case 6:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n6;
break;
case 7:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n7;
break;
case 8:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n10;
break;
case 20:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n20;
break;
case 50:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n50;
break;
case 100:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n100;
break;
case 200:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax_CE_NB[j] = PreambleTransMax_n200;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax_CE_NB choice: 3,4,5,6,7,8,10,20,50,100,200 ",
lib_config_file_name_pP, i, rach_preambleTransMax_CE_NB);
break;
}
switch (bcch_modificationPeriodCoeff_NB) {
case 16:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16;
break;
case 32:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16;
break;
case 64:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16;
break;
case 128:
enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff_NB choice: 16,32,64,128 ",
lib_config_file_name_pP, i, bcch_modificationPeriodCoeff_NB);
break;
}
switch (pcch_defaultPagingCycle_NB) {
case 128:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle_NB[j] = PCCH_Config_NB_r13__defaultPagingCycle_r13_rf128;
break;
case 256:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle_NB[j] = PCCH_Config_NB_r13__defaultPagingCycle_r13_rf256;
break;
case 512:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle_NB[j] = PCCH_Config_NB_r13__defaultPagingCycle_r13_rf512;
break;
case 1024:
enb_properties.properties[enb_properties_index]->pcch_defaultPagingCycle_NB[j] = PCCH_Config_NB_r13__defaultPagingCycle_r13_rf1024;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle_NB choice: 128,256,512,1024 ",
lib_config_file_name_pP, i, pcch_defaultPagingCycle_NB);
break;
}
switch (nprach_CP_Length) {
case 0:
enb_properties.properties[enb_properties_index]->nprach_CP_Length[j] = NPRACH_ConfigSIB_NB_r13__nprach_CP_Length_r13_us66dot7;
break;
case 1:
enb_properties.properties[enb_properties_index]->nprach_CP_Length[j] = NPRACH_ConfigSIB_NB_r13__nprach_CP_Length_r13_us266dot7;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nprach_CP_Length choice: 0,1 ",
lib_config_file_name_pP, i, nprach_CP_Length);
break;
}
enb_properties.properties[enb_properties_index]->nprach_rsrp_range[j] = nprach_rsrp_range;
if ((nprach_rsrp_range<0)||(nprach_rsrp_range>96))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nprach_rsrp_range choice: 0..96 !\n",
lib_config_file_name_pP, i, nprach_rsrp_range);
enb_properties.properties[enb_properties_index]->npdsch_nrs_Power[j] = npdsch_nrs_Power;
//************************************ NB-IoT part ***************************** if ((npdsch_nrs_Power<-60)||(npdsch_nrs_Power>50))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npdsch_nrs_Power choice: -60..50 !\n",
lib_config_file_name_pP, i, npdsch_nrs_Power);
switch (npusch_ack_nack_numRepetitions_NB) {
case 1:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r1;
break;
case 2:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r2;
break;
case 4:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r4;
break;
case 8:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r8;
break;
case 16:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r16;
break;
case 32:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r32;
break;
case 64:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r64;
break;
case 128:
enb_properties.properties[enb_properties_index]->npusch_ack_nack_numRepetitions_NB[j] = ACK_NACK_NumRepetitions_NB_r13_r128;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npusch_ack_nack_numRepetitions_NB choice: 1,2,4,8,16,32,64,128 ",
lib_config_file_name_pP, i, npusch_ack_nack_numRepetitions_NB);
break;
}
switch (npusch_srs_SubframeConfig_NB) {
case 0:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc0;
break;
case 1:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc1;
break;
case 2:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc2;
break;
case 3:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc3;
break;
case 4:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc4;
break;
case 5:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc5;
break;
case 6:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc6;
break;
case 7:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc7;
break;
case 8:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc8;
break;
case 9:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc9;
break;
case 10:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc10;
break;
case 11:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc11;
break;
case 12:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc12;
break;
case 13:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc13;
break;
case 14:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc14;
break;
case 15:
enb_properties.properties[enb_properties_index]->npusch_srs_SubframeConfig_NB[j] = NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc15;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npusch_srs_SubframeConfig_NB choice: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 ",
lib_config_file_name_pP, i, npusch_srs_SubframeConfig_NB);
break;
}
enb_properties.properties[enb_properties_index]->npusch_threeTone_CyclicShift_r13[j] = npusch_threeTone_CyclicShift_r13;
if ((npusch_threeTone_CyclicShift_r13<0)||(npusch_threeTone_CyclicShift_r13>2))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npusch_threeTone_CyclicShift_r13 choice: 0..2 !\n",
lib_config_file_name_pP, i, npusch_threeTone_CyclicShift_r13);
enb_properties.properties[enb_properties_index]->npusch_sixTone_CyclicShift_r13[j] = npusch_sixTone_CyclicShift_r13;
if ((npusch_sixTone_CyclicShift_r13<0)||(npusch_sixTone_CyclicShift_r13>3))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npusch_sixTone_CyclicShift_r13 choice: 0..3 !\n",
lib_config_file_name_pP, i, npusch_sixTone_CyclicShift_r13);
if (!npusch_groupHoppingEnabled)
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT);
else if (strcmp(npusch_groupHoppingEnabled, "ENABLE") == 0) {
enb_properties.properties[enb_properties_index]->npusch_groupHoppingEnabled[j] = TRUE;
} else if (strcmp(npusch_groupHoppingEnabled, "DISABLE") == 0) {
enb_properties.properties[enb_properties_index]->npusch_groupHoppingEnabled[j] = FALSE;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for npusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, npusch_groupHoppingEnabled);
enb_properties.properties[enb_properties_index]->npusch_groupAssignmentNPUSCH_r13[j] = npusch_groupAssignmentNPUSCH_r13;
if ((npusch_groupAssignmentNPUSCH_r13<0)||(npusch_groupAssignmentNPUSCH_r13>29))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npusch_groupAssignmentNPUSCH_r13 choice: 0..29!\n",
lib_config_file_name_pP, i, npusch_groupAssignmentNPUSCH_r13);
switch (dl_GapThreshold_NB) {
case 32:
enb_properties.properties[enb_properties_index]->dl_GapThreshold_NB[j] = DL_GapConfig_NB_r13__dl_GapThreshold_r13_n32;
break;
case 64:
enb_properties.properties[enb_properties_index]->dl_GapThreshold_NB[j] = DL_GapConfig_NB_r13__dl_GapThreshold_r13_n64;
break;
case 128:
enb_properties.properties[enb_properties_index]->dl_GapThreshold_NB[j] = DL_GapConfig_NB_r13__dl_GapThreshold_r13_n128;
break;
case 256:
enb_properties.properties[enb_properties_index]->dl_GapThreshold_NB[j] = DL_GapConfig_NB_r13__dl_GapThreshold_r13_n256;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for dl_GapThreshold_NB choice: 32,64,128,256 ",
lib_config_file_name_pP, i, dl_GapThreshold_NB);
break;
}
switch (dl_GapPeriodicity_NB) {
case 64:
enb_properties.properties[enb_properties_index]->dl_GapPeriodicity_NB[j] = DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf64;
break;
case 128:
enb_properties.properties[enb_properties_index]->dl_GapPeriodicity_NB[j] = DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf128;
break;
case 256:
enb_properties.properties[enb_properties_index]->dl_GapPeriodicity_NB[j] = DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf256;
break;
case 512:
enb_properties.properties[enb_properties_index]->dl_GapPeriodicity_NB[j] = DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf512;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for dl_GapPeriodicity_NB choice: 64,128,256,512 ",
lib_config_file_name_pP, i, dl_GapPeriodicity_NB);
break;
}
if (strcmp(dl_GapDurationCoeff_NB, "oneEighth") == 0) {
enb_properties.properties[enb_properties_index]->dl_GapDurationCoeff_NB[j] = DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneEighth;
} else if (strcmp(dl_GapDurationCoeff_NB, "oneFourth") == 0) {
enb_properties.properties[enb_properties_index]->dl_GapDurationCoeff_NB[j] = DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneFourth;
} else if (strcmp(dl_GapDurationCoeff_NB, "threeEighth") == 0) {
enb_properties.properties[enb_properties_index]->dl_GapDurationCoeff_NB[j] = DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_threeEighth;
} else if (strcmp(dl_GapDurationCoeff_NB, "oneHalf") == 0) {
enb_properties.properties[enb_properties_index]->dl_GapDurationCoeff_NB[j] = DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneHalf;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for dl_GapDurationCoeff_NB choice: oneEighth,oneFourth,threeEighth,oneHalf !\n",
lib_config_file_name_pP, i, dl_GapDurationCoeff_NB);
enb_properties.properties[enb_properties_index]->npusch_p0_NominalNPUSCH[j] = npusch_p0_NominalNPUSCH;
if ((npusch_p0_NominalNPUSCH < -126)||(npusch_p0_NominalNPUSCH> 24))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npusch_p0_NominalNPUSCH choice: -126..24 !\n",
lib_config_file_name_pP, i, npusch_p0_NominalNPUSCH);
if (strcmp(npusch_alpha,"AL0")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al0;
} else if (strcmp(npusch_alpha,"AL04")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al04;
} else if (strcmp(npusch_alpha,"AL05")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al05;
} else if (strcmp(npusch_alpha,"AL06")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al06;
} else if (strcmp(npusch_alpha,"AL07")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al07;
} else if (strcmp(npusch_alpha,"AL08")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al08;
} else if (strcmp(npusch_alpha,"AL09")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al09;
} else if (strcmp(npusch_alpha,"AL1")==0) {
enb_properties.properties[enb_properties_index]->npusch_alpha[j] = UplinkPowerControlCommon_NB_r13__alpha_r13_al1;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for npusch_alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
lib_config_file_name_pP, i, npusch_alpha);
enb_properties.properties[enb_properties_index]->deltaPreambleMsg3[j] = deltaPreambleMsg3;
if ((deltaPreambleMsg3 < -1)||(deltaPreambleMsg3> 6))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for deltaPreambleMsg3 choice: -1..6 !\n",
lib_config_file_name_pP, i, deltaPreambleMsg3);
//************************************************************************* NB-IoT Timer ************************************************************
switch (ue_TimersAndConstants_t300_NB) {
case 2500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms2500;
break;
case 4000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms4000;
break;
case 6000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms6000;
break;
case 10000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms10000;
break;
case 15000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms15000;
break;
case 25000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms25000;
break;
case 40000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms40000;
break;
case 60000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms60000;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t300_NB choice: 2500,4000,6000,10000,15000,25000,40000,60000 ",
lib_config_file_name_pP, i, ue_TimersAndConstants_t300_NB);
break;
}
switch (ue_TimersAndConstants_t301_NB) {
case 2500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms2500;
break;
case 4000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms4000;
break;
case 6000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms6000;
break;
case 10000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms10000;
break;
case 15000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms15000;
break;
case 25000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms25000;
break;
case 40000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms40000;
break;
case 60000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t301_NB[j] = UE_TimersAndConstants_NB_r13__t301_r13_ms60000;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t301_NB choice: 2500,4000,6000,10000,15000,25000,40000,60000 ",
lib_config_file_name_pP, i, ue_TimersAndConstants_t301_NB);
break;
}
switch (ue_TimersAndConstants_t310_NB) {
case 0:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310_NB[j] = UE_TimersAndConstants_NB_r13__t310_r13_ms0;
break;
case 200:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310_NB[j] = UE_TimersAndConstants_NB_r13__t310_r13_ms200;
break;
case 500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310_NB[j] = UE_TimersAndConstants_NB_r13__t310_r13_ms500;
break;
case 1000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310_NB[j] = UE_TimersAndConstants_NB_r13__t310_r13_ms1000;
break;
case 2000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310_NB[j] = UE_TimersAndConstants_NB_r13__t310_r13_ms2000;
break;
case 4000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310_NB[j] = UE_TimersAndConstants_NB_r13__t310_r13_ms4000;
break;
case 8000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t310_NB[j] = UE_TimersAndConstants_NB_r13__t310_r13_ms8000;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t310_NB choice: 0,200,500,1000,2000,4000,8000 ",
lib_config_file_name_pP, i, ue_TimersAndConstants_t310_NB);
break;
}
switch (ue_TimersAndConstants_t311_NB) {
case 1000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311_NB[j] = UE_TimersAndConstants_NB_r13__t311_r13_ms1000;
break;
case 3000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311_NB[j] = UE_TimersAndConstants_NB_r13__t311_r13_ms3000;
break;
case 5000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311_NB[j] = UE_TimersAndConstants_NB_r13__t311_r13_ms5000;
break;
case 10000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311_NB[j] = UE_TimersAndConstants_NB_r13__t311_r13_ms10000;
break;
case 15000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311_NB[j] = UE_TimersAndConstants_NB_r13__t311_r13_ms15000;
break;
case 20000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311_NB[j] = UE_TimersAndConstants_NB_r13__t311_r13_ms20000;
break;
case 30000:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t311_NB[j] = UE_TimersAndConstants_NB_r13__t311_r13_ms30000;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t311_NB choice: 1000,3000,5000,10000,150000,20000,30000",
lib_config_file_name_pP, i, ue_TimersAndConstants_t311_NB);
break;
}
switch (ue_TimersAndConstants_n310_NB) {
case 1:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n1;
break;
case 2:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n2;
break;
case 3:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n4;
break;
case 6:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n6;
break;
case 8:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n10;
break;
case 20:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n310_NB[j] = UE_TimersAndConstants_NB_r13__n310_r13_n20;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_n310_NB choice: 1,2,3,4,6,8,10,20",
lib_config_file_name_pP, i, ue_TimersAndConstants_n310_NB);
break;
}
switch (ue_TimersAndConstants_n311_NB) {
case 1:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n1;
break;
case 2:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n2;
break;
case 3:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n4;
break;
case 5:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n5;
break;
case 6:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n6;
break;
case 8:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_n311_NB[j] = UE_TimersAndConstants_NB_r13__n311_r13_n10;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_n311_NB choice: 1,2,3,4,5,6,8,10",
lib_config_file_name_pP, i, ue_TimersAndConstants_n311_NB);
break;
}
//************************************************************************** NBPRACH NB-IoT *****************************************************
switch (nprach_Periodicity) {
case 40:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms40;
break;
case 80:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms80;
break;
case 160:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms160;
break;
case 240:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms240;
break;
case 320:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms320;
break;
case 640:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms640;
break;
case 1280:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms1280;
break;
case 2560:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms2560;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nprach_Periodicity choice: 40,80,160,240,320,640,1280,2560",
lib_config_file_name_pP, i, nprach_Periodicity);
break;
}
switch (nprach_StartTime) {
case 8:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms8;
break;
case 16:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms16;
break;
case 32:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms32;
break;
case 64:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms64;
break;
case 128:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms128;
break;
case 256:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms256;
break;
case 512:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms512;
break;
case 1024:
enb_properties.properties[enb_properties_index]->nprach_StartTime[j] = NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms1024;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nprach_StartTime choice: 8,16,32,64,128,256,512,1024",
lib_config_file_name_pP, i, nprach_StartTime);
break;
}
switch (nprach_SubcarrierOffset) {
case 40:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n0;
break;
case 80:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n12;
break;
case 160:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n24;
break;
case 240:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n36;
break;
case 32:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n2;
break;
case 18:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n18;
break;
case 34:
enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n34;
break;
//case 1:
// enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_spare1;
// break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nprach_SubcarrierOffset choice: 0,12,24,36,2,18,34",
lib_config_file_name_pP, i, nprach_SubcarrierOffset);
break;
}
switch (nprach_NumSubcarriers) {
case 12:
enb_properties.properties[enb_properties_index]->nprach_NumSubcarriers[j] = NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n12;
break;
case 24:
enb_properties.properties[enb_properties_index]->nprach_NumSubcarriers[j] = NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n24;
break;
case 36:
enb_properties.properties[enb_properties_index]->nprach_NumSubcarriers[j] = NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n36;
break;
case 48:
enb_properties.properties[enb_properties_index]->nprach_NumSubcarriers[j] = NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n48;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nprach_NumSubcarriers choice: 12,24,36,48",
lib_config_file_name_pP, i, nprach_NumSubcarriers);
break;
}
if (strcmp(nprach_SubcarrierMSG3_RangeStart, "zero") == 0) {
enb_properties.properties[enb_properties_index]->nprach_SubcarrierMSG3_RangeStart[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_zero;
} else if (strcmp(nprach_SubcarrierMSG3_RangeStart, "oneThird") == 0) {
enb_properties.properties[enb_properties_index]->nprach_SubcarrierMSG3_RangeStart[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_oneThird;
} else if (strcmp(nprach_SubcarrierMSG3_RangeStart, "twoThird") == 0) {
enb_properties.properties[enb_properties_index]->nprach_SubcarrierMSG3_RangeStart[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_twoThird;
} else if (strcmp(nprach_SubcarrierMSG3_RangeStart, "one") == 0) {
enb_properties.properties[enb_properties_index]->nprach_SubcarrierMSG3_RangeStart[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_one;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for nprach_SubcarrierMSG3_RangeStart choice: zero,oneThird,twoThird,one !\n",
lib_config_file_name_pP, i, nprach_SubcarrierMSG3_RangeStart);
switch (maxNumPreambleAttemptCE_NB) {
case 3:
enb_properties.properties[enb_properties_index]->maxNumPreambleAttemptCE_NB[j] = NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->maxNumPreambleAttemptCE_NB[j] = NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n4;
break;
case 5:
enb_properties.properties[enb_properties_index]->maxNumPreambleAttemptCE_NB[j] = NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n5;
break;
case 6:
enb_properties.properties[enb_properties_index]->maxNumPreambleAttemptCE_NB[j] = NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n6;
break;
case 7:
enb_properties.properties[enb_properties_index]->maxNumPreambleAttemptCE_NB[j] = NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n7;
break;
case 8:
enb_properties.properties[enb_properties_index]->maxNumPreambleAttemptCE_NB[j] = NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->maxNumPreambleAttemptCE_NB[j] = NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n10;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for maxNumPreambleAttemptCE_NB choice: 3,4,5,6,7,8,10",
lib_config_file_name_pP, i, maxNumPreambleAttemptCE_NB);
break;
}
switch (numRepetitionsPerPreambleAttempt) {
case 1:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n1;
break;
case 2:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n2;
break;
case 4:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n4;
break;
case 8:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n8;
break;
case 16:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n16;
break;
case 32:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n32;
break;
case 64:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n64;
break;
case 128:
enb_properties.properties[enb_properties_index]->numRepetitionsPerPreambleAttempt[j] = NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n128;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for numRepetitionsPerPreambleAttempt choice: 1,2,4,8,16,32,64,128",
lib_config_file_name_pP, i, numRepetitionsPerPreambleAttempt);
break;
}
switch (npdcch_NumRepetitions_RA) {
case 1:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r1;
break;
case 2:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r2;
break;
case 4:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r4;
break;
case 8:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r8;
break;
case 16:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r16;
break;
case 32:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r32;
break;
case 64:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r64;
break;
case 128:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r128;
break;
case 256:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r256;
break;
case 512:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r512;
break;
case 1024:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r1024;
break;
case 2048:
enb_properties.properties[enb_properties_index]->npdcch_NumRepetitions_RA[j] = NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r2048;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npdcch_NumRepetitions_RA choice: 1,2,4,8,16,32,64,128,512,1024,2048",
lib_config_file_name_pP, i, npdcch_NumRepetitions_RA);
break;
}
switch (npdcch_StartSF_CSS_RA) {
case 1:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v1dot5;
break;
case 2:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v2;
break;
case 4:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v4;
break;
case 8:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v8;
break;
case 16:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v16;
break;
case 32:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v32;
break;
case 64:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v48;
break;
case 128:
enb_properties.properties[enb_properties_index]->npdcch_StartSF_CSS_RA[j] = NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v64;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for npdcch_StartSF_CSS_RA choice: 1.5,2,4,8,16,32,48,64",
lib_config_file_name_pP, i, npdcch_StartSF_CSS_RA);
break;
}
if (strcmp(npdcch_Offset_RA, "zero") == 0) {
enb_properties.properties[enb_properties_index]->npdcch_Offset_RA[j] = NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_zero;
} else if (strcmp(npdcch_Offset_RA, "oneEighth") == 0) {
enb_properties.properties[enb_properties_index]->npdcch_Offset_RA[j] = NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_oneEighth;
} else if (strcmp(npdcch_Offset_RA, "oneFourth") == 0) {
enb_properties.properties[enb_properties_index]->npdcch_Offset_RA[j] = NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_oneFourth;
} else if (strcmp(npdcch_Offset_RA, "threeEighth") == 0) {
enb_properties.properties[enb_properties_index]->npdcch_Offset_RA[j] = NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_threeEighth;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for npdcch_Offset_RA choice: zero,oneEighth,oneFourth,threeEighth !\n",
lib_config_file_name_pP, i, npdcch_Offset_RA);
//****************************************************************************************************************
//****************************************************************************************************************
//****************************************************************************************************************
//*******************************************************************************
} }
} }
...@@ -2961,12 +4112,12 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_ ...@@ -2961,12 +4112,12 @@ const Enb_properties_array_t *enb_config_init_NB_IoT(char* lib_config_file_name_
"Failed to parse eNB configuration file %s, mismatch between %u active eNBs and %u corresponding defined eNBs !\n", "Failed to parse eNB configuration file %s, mismatch between %u active eNBs and %u corresponding defined eNBs !\n",
lib_config_file_name_pP, num_enb_properties, enb_properties_index); lib_config_file_name_pP, num_enb_properties, enb_properties_index);
enb_config_display(); enb_config_display_NB_IoT();
return &enb_properties; return &enb_properties;
} }
const Enb_properties_array_t *enb_config_get(void) const Enb_properties_array_NB_IoT_t *enb_config_get_NB_IoT(void)
{ {
return &enb_properties; return &enb_properties;
} }
......
...@@ -105,44 +105,44 @@ eNBs = ...@@ -105,44 +105,44 @@ eNBs =
ue_TransmissionMode = 1; ue_TransmissionMode = 1;
rach_raResponseWindowSize_NB = 20 ; # 20,50,80,120,180,240,320,400 rach_raResponseWindowSize_NB = 2 ; # 2,3,4,5,6,7,8,10
rach_macContentionResolutionTimer_NB = 80 ; # 80,100,120,160,200,240,480,960 rach_macContentionResolutionTimer_NB = 1 ; # 1,2,3,4,8,16,32,64
rach_powerRampingStep_NB = 0 ; # 2,4,6 rach_powerRampingStep_NB = 0 ; # 0,2,4,6
rach_preambleInitialReceivedTargetPower_NB = -112 ; # >= -120 && <= -90 rach_preambleInitialReceivedTargetPower_NB = -112; # -120,-118,-116,-114,-112,-110,-108,-106,-104,-102,-100,-98,-96,-94,-92,-90
rach_preambleTransMax_CE_NB = 3 ; # 3,4,5,6,7,8,10,20,50,100,200 rach_preambleTransMax_CE_NB = 3; # 3,4,5,6,7,8,10,20,50,100,200
bcch_modificationPeriodCoeff_NB = 0 ; # bcch_modificationPeriodCoeff_NB = 16 ; # 16,32,64,128
pcch_defaultPagingCycle_NB = 0 ; # pcch_defaultPagingCycle_NB = 256 ; # 128,256,512,1024
nprach_CP_Length = 0 ; # 0,1 nprach_CP_Length = 0 ; # 0,1
nprach_rsrp_range = 0 ; # ? nprach_rsrp_range = 0 ; # >=0 && <=96
nprach_SubcarrierMSG3_RangeStart = "one" ;# "zero","oneThird","twoThird","one"
maxNumPreambleAttemptCE_NB = 10 ; # 3,4,5,6,7,8,10
npdsch_nrs_Power = 0 ; # >= -60 && <= 50 npdsch_nrs_Power = 0 ; # >= -60 && <= 50
npusch_ack_nack_numRepetitions_NB = 0 ; # npusch_ack_nack_numRepetitions_NB = 1 ; # 1,2,4,8,16,32,64,128
npusch_srs_SubframeConfig_NB = 0 ; # >= 0 && <= 15 npusch_srs_SubframeConfig_NB = 0 ; # 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
npusch_threeTone_CyclicShift_r13 = 0 ; # >= 0 && <= 2 npusch_threeTone_CyclicShift_r13 = 0 ; # >= 0 && <= 2
npusch_sixTone_CyclicShift_r13 = 0 ; # >= 0 && <= 3 npusch_sixTone_CyclicShift_r13 = 0 ; # >= 0 && <= 3
npusch_groupHoppingEnabled = 0 ; # 0,1 npusch_groupHoppingEnabled = "DISABLE"; # ENABLE,DISABLE
npusch_groupAssignmentNPUSCH_r13 = 0 ; # >= 0 && <= 29 npusch_groupAssignmentNPUSCH_r13 = 0 ; # >= 0 && <= 29
dl_GapThreshold_NB = 32; # 32,64,128,256 dl_GapThreshold_NB = 32; # 32,64,128,256
dl_GapPeriodicity_NB = 64; # 64,128,256,512 dl_GapPeriodicity_NB = 64; # 64,128,256,512
dl_GapDurationCoeff_NB = "oneEighth";# "oneEighth","oneFourth","threeEighth","oneHalf" dl_GapDurationCoeff_NB = "oneEighth"; # "oneEighth","oneFourth","threeEighth","oneHalf"
npusch_p0_NominalNPUSCH = 0 ; # >= -128 && <= 24 npusch_p0_NominalNPUSCH = 0 ; # >= -126 && <= 24
npusch_alpha = 10; #0,4,5,10 npusch_alpha = "AL0"; #AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1
deltaPreambleMsg3 = 0 ; # >= -1 && <= 6 deltaPreambleMsg3 = 0 ; # >= -1 && <= 6
ue_TimersAndConstants_t300_NB = 1000; ue_TimersAndConstants_t300_NB = 2500; # 2500,4000,6000,10000,15000,25000,40000,60000
ue_TimersAndConstants_t301_NB = 1000; ue_TimersAndConstants_t301_NB = 2500; # 2500,4000,6000,10000,15000,25000,40000,60000
ue_TimersAndConstants_t310_NB = 1000; ue_TimersAndConstants_t310_NB = 1000; # 0,200,500,1000,2000,4000,8000
ue_TimersAndConstants_t311_NB = 10000; ue_TimersAndConstants_t311_NB = 10000; # 1000,3000,5000,10000,150000,20000,30000
ue_TimersAndConstants_n310_NB = 20; ue_TimersAndConstants_n310_NB = 20; # 1,2,3,4,6,8,10,20
ue_TimersAndConstants_n311_NB = 1; ue_TimersAndConstants_n311_NB = 1; # 1,2,3,4,5,6,8,10
nprach_Periodicity = 320; # 40,80,160,240,320,640,1280,2560 nprach_Periodicity = 320; # 40,80,160,240,320,640,1280,2560
nprach_StartTime = 8; # 8,16,32,64,128,256,512,1024 nprach_StartTime = 8; # 8,16,32,64,128,256,512,1024
nprach_SubcarrierOffset = 0; # 0,12,24,36,2,18,34 nprach_SubcarrierOffset = 0; # 0,12,24,36,2,18,34
nprach_NumSubcarriers = 12; # 12,24,36,48 nprach_NumSubcarriers = 12; # 12,24,36,48
nprach_SubcarrierMSG3_RangeStart = "one"; # "zero","oneThird","twoThird","one"
maxNumPreambleAttemptCE_NB = 10 ; # 3,4,5,6,7,8,10
numRepetitionsPerPreambleAttempt = 2; # 1,2,4,8,16,32,64,128 numRepetitionsPerPreambleAttempt = 2; # 1,2,4,8,16,32,64,128
npdcch_NumRepetitions_RA = 16 ; # 1,2,4,8,16,32,64,128 npdcch_NumRepetitions_RA = 16 ; # 1,2,4,8,16,32,64,128,512,1024,2048
npdcch_StartSF_CSS_RA = 16 ; # 1.5,2,4,8,16,32,48,64 npdcch_StartSF_CSS_RA = 16 ; # 1,2,4,8,16,32,48,64
npdcch_Offset_RA = "zero";# "zero","oneEighth","oneFourth","threeEighth" npdcch_Offset_RA = "zero";# "zero","oneEighth","oneFourth","threeEighth"
} }
); );
......
...@@ -180,6 +180,10 @@ static NB_IoT_DL_FRAME_PARMS *frame_parms_NB_IoT[MAX_NUM_CCs]; // this will be s ...@@ -180,6 +180,10 @@ static NB_IoT_DL_FRAME_PARMS *frame_parms_NB_IoT[MAX_NUM_CCs]; // this will be s
eNB_func_t node_function[MAX_NUM_CCs]; eNB_func_t node_function[MAX_NUM_CCs];
eNB_timing_t node_timing[MAX_NUM_CCs]; eNB_timing_t node_timing[MAX_NUM_CCs];
eNB_func_NB_IoT_t node_function_NB_IoT[MAX_NUM_CCs];
eNB_timing_NB_IoT_t node_timing_NB_IoT[MAX_NUM_CCs];
int16_t node_synch_ref[MAX_NUM_CCs]; int16_t node_synch_ref[MAX_NUM_CCs];
uint32_t target_dl_mcs = 28; //maximum allowed mcs uint32_t target_dl_mcs = 28; //maximum allowed mcs
...@@ -620,7 +624,9 @@ static void get_options (int argc, char **argv) { ...@@ -620,7 +624,9 @@ static void get_options (int argc, char **argv) {
int CC_id; int CC_id;
const Enb_properties_array_t *enb_properties; // const Enb_properties_array_t *enb_properties; // temporarily replaced for NB_IoT testing
const Enb_properties_array_NB_IoT_t *enb_properties;
enum long_option_e { enum long_option_e {
LONG_OPTION_START = 0x100, /* Start after regular single char options */ LONG_OPTION_START = 0x100, /* Start after regular single char options */
...@@ -953,21 +959,29 @@ static void get_options (int argc, char **argv) { ...@@ -953,21 +959,29 @@ static void get_options (int argc, char **argv) {
case 6: case 6:
frame_parms[CC_id]->N_RB_DL=6; frame_parms[CC_id]->N_RB_DL=6;
frame_parms[CC_id]->N_RB_UL=6; frame_parms[CC_id]->N_RB_UL=6;
frame_parms_NB_IoT[CC_id]->N_RB_DL=6;
frame_parms_NB_IoT[CC_id]->N_RB_UL=6;
break; break;
case 25: case 25:
frame_parms[CC_id]->N_RB_DL=25; frame_parms[CC_id]->N_RB_DL=25;
frame_parms[CC_id]->N_RB_UL=25; frame_parms[CC_id]->N_RB_UL=25;
frame_parms_NB_IoT[CC_id]->N_RB_DL=25;
frame_parms_NB_IoT[CC_id]->N_RB_UL=25;
break; break;
case 50: case 50:
frame_parms[CC_id]->N_RB_DL=50; frame_parms[CC_id]->N_RB_DL=50;
frame_parms[CC_id]->N_RB_UL=50; frame_parms[CC_id]->N_RB_UL=50;
frame_parms_NB_IoT[CC_id]->N_RB_DL=50;
frame_parms_NB_IoT[CC_id]->N_RB_UL=50;
break; break;
case 100: case 100:
frame_parms[CC_id]->N_RB_DL=100; frame_parms[CC_id]->N_RB_DL=100;
frame_parms[CC_id]->N_RB_UL=100; frame_parms[CC_id]->N_RB_UL=100;
frame_parms_NB_IoT[CC_id]->N_RB_DL=100;
frame_parms_NB_IoT[CC_id]->N_RB_UL=100;
break; break;
default: default:
...@@ -1050,7 +1064,9 @@ static void get_options (int argc, char **argv) { ...@@ -1050,7 +1064,9 @@ static void get_options (int argc, char **argv) {
NB_eNB_INST = 1; NB_eNB_INST = 1;
/* Read eNB configuration file */ /* Read eNB configuration file */
enb_properties = enb_config_init(conf_config_file_name); // enb_properties = enb_config_init(conf_config_file_name);
enb_properties = enb_config_init_NB_IoT(conf_config_file_name);
AssertFatal (NB_eNB_INST <= enb_properties->number, AssertFatal (NB_eNB_INST <= enb_properties->number,
"Number of eNB is greater than eNB defined in configuration file %s (%d/%d)!", "Number of eNB is greater than eNB defined in configuration file %s (%d/%d)!",
...@@ -1114,6 +1130,10 @@ static void get_options (int argc, char **argv) { ...@@ -1114,6 +1130,10 @@ static void get_options (int argc, char **argv) {
node_function[CC_id] = enb_properties->properties[i]->cc_node_function[CC_id]; node_function[CC_id] = enb_properties->properties[i]->cc_node_function[CC_id];
node_timing[CC_id] = enb_properties->properties[i]->cc_node_timing[CC_id]; node_timing[CC_id] = enb_properties->properties[i]->cc_node_timing[CC_id];
node_function_NB_IoT[CC_id] = enb_properties->properties[i]->cc_node_function[CC_id];
node_timing_NB_IoT[CC_id] = enb_properties->properties[i]->cc_node_timing[CC_id];
node_synch_ref[CC_id] = enb_properties->properties[i]->cc_node_synch_ref[CC_id]; node_synch_ref[CC_id] = enb_properties->properties[i]->cc_node_synch_ref[CC_id];
frame_parms[CC_id]->frame_type = enb_properties->properties[i]->frame_type[CC_id]; frame_parms[CC_id]->frame_type = enb_properties->properties[i]->frame_type[CC_id];
...@@ -1121,6 +1141,10 @@ static void get_options (int argc, char **argv) { ...@@ -1121,6 +1141,10 @@ static void get_options (int argc, char **argv) {
frame_parms[CC_id]->tdd_config_S = enb_properties->properties[i]->tdd_config_s[CC_id]; frame_parms[CC_id]->tdd_config_S = enb_properties->properties[i]->tdd_config_s[CC_id];
frame_parms[CC_id]->Ncp = enb_properties->properties[i]->prefix_type[CC_id]; frame_parms[CC_id]->Ncp = enb_properties->properties[i]->prefix_type[CC_id];
frame_parms_NB_IoT[CC_id]->frame_type = enb_properties->properties[i]->frame_type[CC_id];
frame_parms_NB_IoT[CC_id]->tdd_config = enb_properties->properties[i]->tdd_config[CC_id];
frame_parms_NB_IoT[CC_id]->Ncp = enb_properties->properties[i]->prefix_type[CC_id];
//for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){ //for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){
frame_parms[CC_id]->Nid_cell = enb_properties->properties[i]->Nid_cell[CC_id]; frame_parms[CC_id]->Nid_cell = enb_properties->properties[i]->Nid_cell[CC_id];
frame_parms[CC_id]->N_RB_DL = enb_properties->properties[i]->N_RB_DL[CC_id]; frame_parms[CC_id]->N_RB_DL = enb_properties->properties[i]->N_RB_DL[CC_id];
...@@ -1129,12 +1153,23 @@ static void get_options (int argc, char **argv) { ...@@ -1129,12 +1153,23 @@ static void get_options (int argc, char **argv) {
frame_parms[CC_id]->nb_antenna_ports_eNB = enb_properties->properties[i]->nb_antenna_ports[CC_id]; frame_parms[CC_id]->nb_antenna_ports_eNB = enb_properties->properties[i]->nb_antenna_ports[CC_id];
frame_parms[CC_id]->nb_antennas_rx = enb_properties->properties[i]->nb_antennas_rx[CC_id]; frame_parms[CC_id]->nb_antennas_rx = enb_properties->properties[i]->nb_antennas_rx[CC_id];
frame_parms_NB_IoT[CC_id]->Nid_cell = enb_properties->properties[i]->Nid_cell[CC_id];
frame_parms_NB_IoT[CC_id]->N_RB_DL = enb_properties->properties[i]->N_RB_DL[CC_id];
frame_parms_NB_IoT[CC_id]->N_RB_UL = enb_properties->properties[i]->N_RB_DL[CC_id];
frame_parms_NB_IoT[CC_id]->nb_antennas_tx = enb_properties->properties[i]->nb_antennas_tx[CC_id];
frame_parms_NB_IoT[CC_id]->nb_antenna_ports_eNB = enb_properties->properties[i]->nb_antenna_ports[CC_id];
frame_parms_NB_IoT[CC_id]->nb_antennas_rx = enb_properties->properties[i]->nb_antennas_rx[CC_id];
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex = enb_properties->properties[i]->prach_config_index[CC_id]; frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex = enb_properties->properties[i]->prach_config_index[CC_id];
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset = enb_properties->properties[i]->prach_freq_offset[CC_id]; frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset = enb_properties->properties[i]->prach_freq_offset[CC_id];
frame_parms[CC_id]->mode1_flag = (frame_parms[CC_id]->nb_antenna_ports_eNB == 1) ? 1 : 0; frame_parms[CC_id]->mode1_flag = (frame_parms[CC_id]->nb_antenna_ports_eNB == 1) ? 1 : 0;
frame_parms[CC_id]->threequarter_fs = threequarter_fs; frame_parms[CC_id]->threequarter_fs = threequarter_fs;
frame_parms_NB_IoT[CC_id]->threequarter_fs = threequarter_fs;
//} // j //} // j
} }
...@@ -1274,18 +1309,18 @@ void set_default_frame_parms_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms[MAX_NUM_C ...@@ -1274,18 +1309,18 @@ void set_default_frame_parms_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms[MAX_NUM_C
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
frame_parms[CC_id] = (NB_IoT_DL_FRAME_PARMS*) malloc(sizeof(NB_IoT_DL_FRAME_PARMS)); frame_parms[CC_id] = (NB_IoT_DL_FRAME_PARMS*) malloc(sizeof(NB_IoT_DL_FRAME_PARMS));
/* Set some default values that may be overwritten while reading options */ /* Set some default values that may be overwritten while reading options */
frame_parms[CC_id]->frame_type = FDD;
frame_parms[CC_id]->tdd_config = 3;
frame_parms[CC_id]->N_RB_DL = 100;
frame_parms[CC_id]->N_RB_UL = 100;
//XXX check if there are other parameters to be set //XXX check if there are other parameters to be set
frame_parms[CC_id]->Ncp = NORMAL; frame_parms[CC_id]->Ncp = NORMAL;
frame_parms[CC_id]->Ncp_UL = NORMAL; frame_parms[CC_id]->Ncp_UL = NORMAL;
frame_parms[CC_id]->Nid_cell = 0; frame_parms[CC_id]->Nid_cell = 0;
frame_parms[CC_id]->nb_antenna_ports_eNB = 1; frame_parms[CC_id]->nb_antenna_ports_eNB = 1;
frame_parms[CC_id]->nb_antennas_tx = 1; frame_parms[CC_id]->nb_antennas_tx = 1;
frame_parms[CC_id]->nb_antennas_rx = 1; frame_parms[CC_id]->nb_antennas_rx = 1;
frame_parms[CC_id]->nushift = 0; frame_parms[CC_id]->nushift = 0;
// UL RS Config // UL RS Config
frame_parms[CC_id]->npusch_config_common.ul_ReferenceSignalsNPUSCH.groupHoppingEnabled = 0; frame_parms[CC_id]->npusch_config_common.ul_ReferenceSignalsNPUSCH.groupHoppingEnabled = 0;
frame_parms[CC_id]->npusch_config_common.ul_ReferenceSignalsNPUSCH.groupAssignmentNPUSCH = 0; frame_parms[CC_id]->npusch_config_common.ul_ReferenceSignalsNPUSCH.groupAssignmentNPUSCH = 0;
...@@ -1294,7 +1329,10 @@ void set_default_frame_parms_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms[MAX_NUM_C ...@@ -1294,7 +1329,10 @@ void set_default_frame_parms_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms[MAX_NUM_C
//frame_parms[CC_id]->nprach_config_common.nprach_CP_Length //frame_parms[CC_id]->nprach_config_common.nprach_CP_Length
//frame_parms[CC_id]->nprach_config_common.nprach_ParametersList.list.array[CC_id] //frame_parms[CC_id]->nprach_config_common.nprach_ParametersList.list.array[CC_id]
//frame_parms[CC_id]->nprach_config_common.rsrp_ThresholdsPrachInfoList //frame_parms[CC_id]->nprach_config_common.rsrp_ThresholdsPrachInfoList
downlink_frequency[CC_id][0] = 2680000000; // Use float to avoid issue with frequency over 2^31.
downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
//already initialized in the set_default_frame_parms function for LTE //already initialized in the set_default_frame_parms function for LTE
...@@ -1596,14 +1634,14 @@ int main( int argc, char **argv ) { ...@@ -1596,14 +1634,14 @@ int main( int argc, char **argv ) {
LOG_I(PHY,"Set nb_rx_antenna %d , nb_tx_antenna %d \n",frame_parms[CC_id]->nb_antennas_rx, frame_parms[CC_id]->nb_antennas_tx); LOG_I(PHY,"Set nb_rx_antenna %d , nb_tx_antenna %d \n",frame_parms[CC_id]->nb_antennas_rx, frame_parms[CC_id]->nb_antennas_tx);
#ifdef NB_IOT //#ifdef NB_IOT // for NB-IoT testing
frame_parms_NB_IoT[CC_id]->nb_antennas_tx = nb_antenna_tx; frame_parms_NB_IoT[CC_id]->nb_antennas_tx = nb_antenna_tx;
frame_parms_NB_IoT[CC_id]->nb_antennas_rx = nb_antenna_rx; frame_parms_NB_IoT[CC_id]->nb_antennas_rx = nb_antenna_rx;
frame_parms_NB_IoT[CC_id]->nb_antenna_ports_eNB = 1; //initial value overwritten by initial sync later frame_parms_NB_IoT[CC_id]->nb_antenna_ports_eNB = 1; //initial value overwritten by initial sync later
LOG_I(PHY,"[NB-IoT] Set nb_rx_antenna %d , nb_tx_antenna %d \n",frame_parms_NB_IoT[CC_id]->nb_antennas_rx, frame_parms_NB_IoT[CC_id]->nb_antennas_tx); LOG_I(PHY,"[NB-IoT] Set nb_rx_antenna %d , nb_tx_antenna %d \n",frame_parms_NB_IoT[CC_id]->nb_antennas_rx, frame_parms_NB_IoT[CC_id]->nb_antennas_tx);
#endif //#endif
} }
...@@ -1612,6 +1650,13 @@ int main( int argc, char **argv ) { ...@@ -1612,6 +1650,13 @@ int main( int argc, char **argv ) {
init_frame_parms(frame_parms[CC_id],1); init_frame_parms(frame_parms[CC_id],1);
// phy_init_top(frame_parms[CC_id]); // phy_init_top(frame_parms[CC_id]);
phy_init_lte_top(frame_parms[CC_id]); phy_init_lte_top(frame_parms[CC_id]);
// for testing
//XXXX we need to modify it for NB-IoT????
//init_ul_hopping(frame_parms[CC_id]);
init_frame_parms_NB_IoT(frame_parms_NB_IoT[CC_id],1);
// phy_init_top(frame_parms[CC_id]);
phy_init_lte_top_NB_IoT(frame_parms_NB_IoT[CC_id]);
} }
...@@ -1695,10 +1740,19 @@ int main( int argc, char **argv ) { ...@@ -1695,10 +1740,19 @@ int main( int argc, char **argv ) {
PHY_vars_eNB_g = malloc(sizeof(PHY_VARS_eNB**)); //global PHY_vars --> is a matrix PHY_vars_eNB_g = malloc(sizeof(PHY_VARS_eNB**)); //global PHY_vars --> is a matrix
PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*)); PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*));
// for NB-IoT testing
PHY_vars_eNB_NB_IoT_g = malloc(sizeof(PHY_VARS_eNB_NB_IoT**)); //global PHY_vars --> is a matrix
PHY_vars_eNB_NB_IoT_g[0] = malloc(sizeof(PHY_VARS_eNB_NB_IoT*));
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
//we initialiaze DL/UL buffer and HARQ (inside the LTE_eNB_DLSCH) //we initialiaze DL/UL buffer and HARQ (inside the LTE_eNB_DLSCH)
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,node_function[CC_id],abstraction_flag); PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,node_function[CC_id],abstraction_flag);
// for NB-IoT testing
PHY_vars_eNB_NB_IoT_g[0][CC_id] = init_lte_eNB_NB_IoT(frame_parms_NB_IoT[CC_id],0,frame_parms_NB_IoT[CC_id]->Nid_cell,node_function_NB_IoT[CC_id],abstraction_flag);
//this is a complementary function for just initialize manage NB_ioT stuff inside the PHY_Vars //this is a complementary function for just initialize manage NB_ioT stuff inside the PHY_Vars
#ifdef NB_IOT #ifdef NB_IOT
//init_lte_eNB_NB(PHY_vars_eNB_g[0][CC_id],frame_parms_NB_IoT[CC_id], 0, frame_parms_NB_IoT[CC_id]->Nid_cell,node_function[CC_id],abstraction_flag); //init_lte_eNB_NB(PHY_vars_eNB_g[0][CC_id],frame_parms_NB_IoT[CC_id], 0, frame_parms_NB_IoT[CC_id]->Nid_cell,node_function[CC_id],abstraction_flag);
...@@ -1735,7 +1789,24 @@ int main( int argc, char **argv ) { ...@@ -1735,7 +1789,24 @@ int main( int argc, char **argv ) {
} }
} }
//TODO: this is different for NB-IoT // for NB-IoT testing
if (phy_test==1) PHY_vars_eNB_NB_IoT_g[0][CC_id]->mac_enabled = 0;
else PHY_vars_eNB_NB_IoT_g[0][CC_id]->mac_enabled = 1;
if (PHY_vars_eNB_NB_IoT_g[0][CC_id]->mac_enabled == 0) { //set default parameters for testing mode
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
PHY_vars_eNB_NB_IoT_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK;
PHY_vars_eNB_NB_IoT_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index = beta_RI;
PHY_vars_eNB_NB_IoT_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI;
PHY_vars_eNB_NB_IoT_g[0][CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = i;
PHY_vars_eNB_NB_IoT_g[0][CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(i%3);
PHY_vars_eNB_NB_IoT_g[0][CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;
}
}
// No need to do for NB-IoT
compute_prach_seq(&PHY_vars_eNB_g[0][CC_id]->frame_parms.prach_config_common, compute_prach_seq(&PHY_vars_eNB_g[0][CC_id]->frame_parms.prach_config_common,
PHY_vars_eNB_g[0][CC_id]->frame_parms.frame_type, PHY_vars_eNB_g[0][CC_id]->frame_parms.frame_type,
PHY_vars_eNB_g[0][CC_id]->X_u); PHY_vars_eNB_g[0][CC_id]->X_u);
...@@ -1754,6 +1825,21 @@ int main( int argc, char **argv ) { ...@@ -1754,6 +1825,21 @@ int main( int argc, char **argv ) {
PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 624/4; PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 624/4;
} }
// for NB-IoT testing
PHY_vars_eNB__NB_IoT_g[0][CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0];
if (frame_parms_NB_IoT[CC_id]->frame_type==FDD) {
PHY_vars_eNB_NB_IoT_g[0][CC_id]->N_TA_offset = 0;
} else {
if (frame_parms_NB_IoT[CC_id]->N_RB_DL == 100)
PHY_vars_eNB_NB_IoT_g[0][CC_id]->N_TA_offset = 624;
else if (frame_parms_NB_IoT[CC_id]->N_RB_DL == 50)
PHY_vars_eNB_NB_IoT_g[0][CC_id]->N_TA_offset = 624/2;
else if (frame_parms_NB_IoT[CC_id]->N_RB_DL == 25)
PHY_vars_eNB_NB_IoT_g[0][CC_id]->N_TA_offset = 624/4;
}
} }
......
...@@ -150,6 +150,123 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -150,6 +150,123 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_eNB_NB_IoT* init_lte_eNB_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
uint8_t Nid_cell,
eNB_func_NB_IoT_t node_function,
uint8_t abstraction_flag)
{
int i;
PHY_VARS_eNB_NB_IoT* PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB_NB_IoT));
memset(PHY_vars_eNB,0,sizeof(PHY_VARS_eNB_NB_IoT));
PHY_vars_eNB->Mod_id=eNB_id;
PHY_vars_eNB->cooperation_flag=0;//cooperation_flag;
memcpy(&(PHY_vars_eNB->frame_parms), frame_parms, sizeof(NB_IoT_DL_FRAME_PARMS));
PHY_vars_eNB->frame_parms.Nid_cell = ((Nid_cell/3)*3)+((eNB_id+Nid_cell)%3);
PHY_vars_eNB->frame_parms.nushift = PHY_vars_eNB->frame_parms.Nid_cell%6;
phy_init_lte_eNB_NB_IoT(PHY_vars_eNB,0,abstraction_flag);
/*LOG_I(PHY,"init eNB: Node Function %d\n",node_function);
LOG_I(PHY,"init eNB: Nid_cell %d\n", frame_parms->Nid_cell);
LOG_I(PHY,"init eNB: frame_type %d,tdd_config %d\n", frame_parms->frame_type,frame_parms->tdd_config);
LOG_I(PHY,"init eNB: number of ue max %d number of enb max %d number of harq pid max %d\n",
NUMBER_OF_UE_MAX, NUMBER_OF_eNB_MAX, NUMBER_OF_HARQ_PID_MAX);
LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL);
LOG_I(PHY,"init eNB: prach_config_index %d\n", frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex);
*/
/*
if (node_function >= NGFI_RRU_IF5)
// For RRU, don't allocate DLSCH/ULSCH Transport channel buffers
return (PHY_vars_eNB);
*/
/*
for (i=0; i<NUMBER_OF_UE_MAX_NB_IoT; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH, UE %d\n",i);
for (j=0; j<2; j++) {
PHY_vars_eNB->dlsch[i][j] = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL,abstraction_flag,frame_parms);
if (!PHY_vars_eNB->dlsch[i][j]) {
LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
exit(-1);
} else {
LOG_D(PHY,"dlsch[%d][%d] => %p\n",i,j,PHY_vars_eNB->dlsch[i][j]);
PHY_vars_eNB->dlsch[i][j]->rnti=0;
}
}
LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH, UE %d\n", i);
PHY_vars_eNB->ulsch[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,frame_parms->N_RB_UL, abstraction_flag);
if (!PHY_vars_eNB->ulsch[1+i]) {
LOG_E(PHY,"Can't get eNB ulsch structures\n");
exit(-1);
}
*/
// this is the transmission mode for the signalling channels
// this will be overwritten with the real transmission mode by the RRC once the UE is connected
PHY_vars_eNB->transmission_mode[0] = 1 ;
/*#ifdef LOCALIZATION
PHY_vars_eNB->ulsch[1+i]->aggregation_period_ms = 5000; // 5000 milliseconds // could be given as an argument (TBD))
struct timeval ts;
gettimeofday(&ts, NULL);
PHY_vars_eNB->ulsch[1+i]->reference_timestamp_ms = ts.tv_sec * 1000 + ts.tv_usec / 1000;
int j;
for (j=0; j<10; j++) {
initialize(&PHY_vars_eNB->ulsch[1+i]->loc_rss_list[j]);
initialize(&PHY_vars_eNB->ulsch[1+i]->loc_rssi_list[j]);
initialize(&PHY_vars_eNB->ulsch[1+i]->loc_subcarrier_rss_list[j]);
initialize(&PHY_vars_eNB->ulsch[1+i]->loc_timing_advance_list[j]);
initialize(&PHY_vars_eNB->ulsch[1+i]->loc_timing_update_list[j]);
}
initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_rss_list);
initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_rssi_list);
initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_subcarrier_rss_list);
initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_timing_advance_list);
initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_timing_update_list);
#endif*/
// }
/*
// ULSCH for RA
PHY_vars_eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS, frame_parms->N_RB_UL, abstraction_flag);
if (!PHY_vars_eNB->ulsch[0]) {
LOG_E(PHY,"Can't get eNB ulsch structures\n");
exit(-1);
}
PHY_vars_eNB->dlsch_SI = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag, frame_parms);
LOG_D(PHY,"eNB %d : SI %p\n",eNB_id,PHY_vars_eNB->dlsch_SI);
PHY_vars_eNB->dlsch_ra = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag, frame_parms);
LOG_D(PHY,"eNB %d : RA %p\n",eNB_id,PHY_vars_eNB->dlsch_ra);
PHY_vars_eNB->dlsch_MCH = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, 0, frame_parms);
LOG_D(PHY,"eNB %d : MCH %p\n",eNB_id,PHY_vars_eNB->dlsch_MCH);
*/
PHY_vars_eNB->rx_total_gain_dB=130;
/* for(i=0; i<NUMBER_OF_UE_MAX; i++)
PHY_vars_eNB->mu_mimo_mode[i].dl_pow_off = 2;
PHY_vars_eNB->check_for_total_transmissions = 0;
PHY_vars_eNB->check_for_MUMIMO_transmissions = 0;
PHY_vars_eNB->FULL_MUMIMO_transmissions = 0;
PHY_vars_eNB->check_for_SUMIMO_transmissions = 0;
PHY_vars_eNB->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
*/
return (PHY_vars_eNB);
}
/*this is a function just for initialization of NB-IoT stuff*/ /*this is a function just for initialization of NB-IoT stuff*/
/* /*
......
...@@ -50,3 +50,12 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs], ...@@ -50,3 +50,12 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
int nb_antennas_tx, int nb_antennas_tx,
int nb_antennas_rx_ue, int nb_antennas_rx_ue,
uint8_t eMBMS_active_state); uint8_t eMBMS_active_state);
// for NB-IoT testing
PHY_VARS_eNB_NB_IoT* init_lte_eNB_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
uint8_t Nid_cell,
eNB_func_NB_IoT_t node_function,
uint8_t abstraction_flag);
\ No newline at end of file
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