Commit 365276dc authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge branch 'enhancement-16-tm_rrc_reconfig' into 'develop'

Enhancement 16 tm rrc reconfig

This branch contains enhancements regarding signalling of the transmission mode
It also contains fixes for TM2, which now works with commercial phones
TM3 also works, but only with single layer
TM4 needs further improvements in uplink signalling (will be done in another branch)
All tests that pass for develop also pass for this branch (see https://gitlab.eurecom.fr/oai-internal/openairinterface5g/builds/560)

See merge request !41
parents ac1c41f0 f8804fcb
This diff is collapsed.
......@@ -313,6 +313,18 @@ void phy_init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms);
//void copy_lte_parms_to_phy_framing(LTE_DL_FRAME_PARMS *frame_parm, PHY_FRAMING *phy_framing);
void lte_param_init(unsigned char N_tx,
unsigned char N_rx,
unsigned char transmission_mode,
uint8_t extended_prefix_flag,
frame_t frame_type,
uint16_t Nid_cell,
uint8_t tdd_config,
uint8_t N_RB_DL,
uint8_t threequarter_fs,
uint8_t osf,
uint32_t perfect_ce);
#ifdef Rel10
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
......
......@@ -473,7 +473,7 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *phy_vars_eNB)
if (physicalConfigDedicated->antennaInfo) {
phy_vars_eNB->transmission_mode[UE_id] = 1+(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode);
LOG_D(PHY,"Transmission Mode %d\n",phy_vars_eNB->transmission_mode[UE_id]);
LOG_I(PHY,"Transmission Mode (phy_config_dedicated_eNB_step2) %d\n",phy_vars_eNB->transmission_mode[UE_id]);
LOG_D(PHY,"\n");
}
......@@ -651,7 +651,41 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
if (physicalConfigDedicated) {
phy_vars_eNB->physicalConfigDedicated[UE_id] = physicalConfigDedicated;
LOG_I(PHY,"phy_config_dedicated_eNB: physicalConfigDedicated=%p\n",physicalConfigDedicated);
LOG_D(PHY,"phy_config_dedicated_eNB: physicalConfigDedicated=%p\n",physicalConfigDedicated);
if (physicalConfigDedicated->antennaInfo) {
switch(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode) {
case AntennaInfoDedicated__transmissionMode_tm1:
phy_vars_eNB->transmission_mode[UE_id] = 1;
break;
case AntennaInfoDedicated__transmissionMode_tm2:
phy_vars_eNB->transmission_mode[UE_id] = 2;
break;
case AntennaInfoDedicated__transmissionMode_tm3:
phy_vars_eNB->transmission_mode[UE_id] = 3;
break;
case AntennaInfoDedicated__transmissionMode_tm4:
phy_vars_eNB->transmission_mode[UE_id] = 4;
break;
case AntennaInfoDedicated__transmissionMode_tm5:
phy_vars_eNB->transmission_mode[UE_id] = 5;
break;
case AntennaInfoDedicated__transmissionMode_tm6:
phy_vars_eNB->transmission_mode[UE_id] = 6;
break;
case AntennaInfoDedicated__transmissionMode_tm7:
phy_vars_eNB->transmission_mode[UE_id] = 7;
break;
default:
LOG_E(PHY,"Unknown transmission mode!\n");
break;
}
LOG_I(PHY,"Transmission Mode (phy_config_dedicated_eNB) %d\n",phy_vars_eNB->transmission_mode[UE_id]);
} else {
LOG_D(PHY,"[eNB %d] Frame %d: Received NULL radioResourceConfigDedicated->antennaInfo from eNB %d\n",Mod_id, phy_vars_eNB->proc[8].frame_tx,UE_id);
}
} else {
LOG_E(PHY,"[eNB %d] Frame %d: Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id, phy_vars_eNB->proc[8].frame_tx,UE_id);
return;
......@@ -814,6 +848,34 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t CH_index,
phy_vars_ue->transmission_mode[CH_index] = 1+(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode);
LOG_D(PHY,"Transmission Mode %d\n",phy_vars_ue->transmission_mode[CH_index]);
LOG_D(PHY,"\n");
switch(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode) {
case AntennaInfoDedicated__transmissionMode_tm1:
phy_vars_ue->transmission_mode[CH_index] = 1;
break;
case AntennaInfoDedicated__transmissionMode_tm2:
phy_vars_ue->transmission_mode[CH_index] = 2;
break;
case AntennaInfoDedicated__transmissionMode_tm3:
phy_vars_ue->transmission_mode[CH_index] = 3;
break;
case AntennaInfoDedicated__transmissionMode_tm4:
phy_vars_ue->transmission_mode[CH_index] = 4;
break;
case AntennaInfoDedicated__transmissionMode_tm5:
phy_vars_ue->transmission_mode[CH_index] = 5;
break;
case AntennaInfoDedicated__transmissionMode_tm6:
phy_vars_ue->transmission_mode[CH_index] = 6;
break;
case AntennaInfoDedicated__transmissionMode_tm7:
phy_vars_ue->transmission_mode[CH_index] = 7;
break;
default:
LOG_E(PHY,"Unknown transmission mode!\n");
break;
}
} else {
LOG_D(PHY,"[UE %d] Frame %d: Received NULL physicalConfigDedicated->antennaInfo from eNB %d\n",Mod_id, phy_vars_ue->frame_rx,CH_index);
}
if (physicalConfigDedicated->schedulingRequestConfig) {
......
......@@ -50,8 +50,10 @@ void lte_param_init(unsigned char N_tx,
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->nb_antennas_tx_eNB = N_tx;
lte_frame_parms->phich_config_common.phich_resource = one;
lte_frame_parms->nb_antennas_tx_eNB = (transmission_mode == 1)? 1 : 2;
lte_frame_parms->phich_config_common.phich_resource = oneSixth;
lte_frame_parms->phich_config_common.phich_duration = normal;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
......
......@@ -191,6 +191,7 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
printf("frame_parms->tdd_config=%d\n",frame_parms->tdd_config);
printf("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S);
printf("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag);
printf("frame_parms->nb_antennas_tx_eNB(nb_antenna_ports)=%d\n",frame_parms->nb_antennas_tx_eNB);
printf("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx);
printf("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx);
printf("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size);
......
......@@ -1754,7 +1754,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
avgs = cmax(avgs,avgP[(aarx<<1)+aatx]);
log2_maxh = (log2_approx(avgs)/2) + 6 + frame_parms->nb_antennas_rx - 1;
log2_maxh = (log2_approx(avgs)/2) + 5; //+frame_parms->nb_antennas_rx;
#ifdef DEBUG_PHY
LOG_I(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs);
#endif
......@@ -2086,17 +2086,16 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
frame_parms,
txdataF,
subframe);
wbar[0] = &wbar0[0];
wbar[1] = &wbar1[0];
y[0] = &yseq0[0];
y[1] = &yseq1[0];
// reset all bits to <NIL>, here we set <NIL> elements as 2
memset(e, 2, DCI_BITS_MAX);
// // here we interpret NIL as a random QPSK sequence. That makes power estimation easier.
// for (i=0; i<DCI_BITS_MAX; i++)
// e[i]=2;//taus()&1;
// memset(e, 2, DCI_BITS_MAX);
// here we interpret NIL as a random QPSK sequence. That makes power estimation easier.
for (i=0; i<DCI_BITS_MAX; i++)
e[i]=taus()&1;
e_ptr = e;
......@@ -2190,15 +2189,15 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
LOG_I(PHY," PDCCH Modulation (TX diversity): REG %d\n",i>>2);
#endif
// first antenna position n -> x0
((int16_t*)&y[0][i])[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
((int16_t*)&y[0][i])[0] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
e_ptr++;
((int16_t*)&y[0][i])[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
((int16_t*)&y[0][i])[1] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
e_ptr++;
// second antenna position n -> -x1*
((int16_t*)&y[1][i])[0] = (*e_ptr == 1) ? gain_lin_QPSK : -gain_lin_QPSK;
((int16_t*)&y[1][i])[0] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? gain_lin_QPSK : -gain_lin_QPSK;
e_ptr++;
((int16_t*)&y[1][i])[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
((int16_t*)&y[1][i])[1] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
e_ptr++;
// fill in the rest of the ALAMOUTI precoding
......
......@@ -361,8 +361,6 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
else if (mimo_mode == ALAMOUTI) {
*re_allocated = *re_allocated + 1;
// normalization for 2 tx antennas
amp = (int16_t)(((int32_t)tmp_amp*ONE_OVER_SQRT2_Q15)>>15);
switch (mod_order0) {
case 2: //QPSK
......@@ -417,8 +415,10 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
*jj=*jj+1;
((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
//((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
//((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
// Antenna 1 position n Real part -> -x1*
......@@ -446,8 +446,10 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
*jj=*jj+1;
((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
//((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
//((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
((int16_t *)&txdataF[1][tti_offset])[0]+=-(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
((int16_t *)&txdataF[1][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
break;
......@@ -488,8 +490,10 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
*jj=*jj+1;
((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
//((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
//((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam64_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam64_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
// Antenna 1 => -x1*
......@@ -526,8 +530,11 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
*jj=*jj+1;
((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
//((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
//((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
((int16_t *)&txdataF[1][tti_offset])[0]+=-(qam_table_s0[qam64_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
((int16_t *)&txdataF[1][tti_offset])[1]+=(qam_table_s0[qam64_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
break;
}
......
......@@ -56,69 +56,7 @@
PHY_VARS_eNB *PHY_vars_eNB;
PHY_VARS_UE *PHY_vars_UE;
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,lte_frame_type_t frame_type, uint16_t Nid_cell,uint8_t tdd_config,
uint8_t N_RB_DL,uint8_t osf,uint32_t perfect_ce)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
srand(1);
randominit(1);
set_taus_seed(1);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->Nid_cell_mbsfn = 1;
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->phich_config_common.phich_resource = oneSixth;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;44
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
PHY_vars_UE->is_secondary_ue = 0;
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
phy_init_lte_top(lte_frame_parms);
dump_frame_parms(lte_frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=2;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
lte_gold_mbsfn(lte_frame_parms,PHY_vars_UE->lte_gold_mbsfn_table,Nid_cell);
lte_gold_mbsfn(lte_frame_parms,PHY_vars_eNB->lte_gold_mbsfn_table,Nid_cell);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
PHY_vars_UE->perfect_ce = perfect_ce;
printf("Done lte_param_init\n");
}
DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2_1E[2];
#define UL_RB_ALLOC 0x1ff;
#define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
......@@ -315,7 +253,7 @@ int main(int argc, char **argv)
if (transmission_mode==2)
n_tx=2;
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,osf,perfect_ce);
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,0,osf,perfect_ce);
......
......@@ -340,7 +340,7 @@ int main(int argc, char **argv)
if (transmission_mode>=2)
n_tx=2;
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,N_RB_DL,osf);
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,3,N_RB_DL,0,osf,0);
PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB));
......
This diff is collapsed.
......@@ -311,10 +311,11 @@ int main(int argc, char **argv)
n_rx,
transmission_mode,
extended_prefix_flag,
Nid_cell,
FDD,
Nid_cell,
3,
N_RB_DL,
0,
osf,
0);
......
......@@ -179,7 +179,7 @@ typedef struct RrcConfigurationReq_s {
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
} RrcConfigurationReq;
// UE: NAS -> RRC messages
......
......@@ -187,6 +187,9 @@ static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_pro
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_n310[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_t311[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_n311[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[CC_id] = enb_properties->properties[enb_id]->ue_TransmissionMode[CC_id];
}
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
......
......@@ -84,6 +84,7 @@
#define ENB_CONFIG_STRING_NID_CELL "Nid_cell"
#define ENB_CONFIG_STRING_N_RB_DL "N_RB_DL"
#define ENB_CONFIG_STRING_CELL_MBSFN "Nid_cell_mbsfn"
#define ENB_CONFIG_STRING_NB_ANT_PORTS "nb_antenna_ports"
#define ENB_CONFIG_STRING_NB_ANT_TX "nb_antennas_tx"
#define ENB_CONFIG_STRING_NB_ANT_RX "nb_antennas_rx"
#define ENB_CONFIG_STRING_TX_GAIN "tx_gain"
......@@ -145,6 +146,7 @@
#define ENB_CONFIG_STRING_UETIMERS_T311 "ue_TimersAndConstants_t311"
#define ENB_CONFIG_STRING_UETIMERS_N310 "ue_TimersAndConstants_n310"
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
#define ENB_CONFIG_STRING_SRB1 "srb1_parameters"
#define ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT "timer_poll_retransmit"
......@@ -322,6 +324,7 @@ void enb_config_display(void)
printf( "\n\tCell ID for CC %d:\t%"PRId16":\n",j,enb_properties.properties[i]->Nid_cell[j]);
printf( "\tN_RB_DL for CC %d:\t%"PRId16":\n",j,enb_properties.properties[i]->N_RB_DL[j]);
printf( "\tnb_antenna_ports for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antenna_ports[j]);
printf( "\tnb_antennas_tx for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antennas_tx[j]);
printf( "\tnb_antennas_rx for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antennas_rx[j]);
......@@ -411,6 +414,8 @@ void enb_config_display(void)
printf( "\tue_TimersAndConstants_t311 for CC %d:\t%ld:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_t311[j]);
printf( "\tue_TimersAndConstants_n311 for CC %d:\t%ld:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_n311[j]);
printf( "\tue_TransmissionMode for CC %d:\t%ld:\n",j,enb_properties.properties[i]->ue_TransmissionMode[j]);
}
for (j=0; j < enb_properties.properties[i]->num_otg_elements; j++) {
......@@ -526,6 +531,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int Nid_cell = 0;
libconfig_int Nid_cell_mbsfn = 0;
libconfig_int N_RB_DL = 0;
libconfig_int nb_antenna_ports = 0;
libconfig_int nb_antennas_tx = 0;
libconfig_int nb_antennas_rx = 0;
libconfig_int tx_gain = 0;
......@@ -589,7 +595,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int ue_TimersAndConstants_t311 = 0;
libconfig_int ue_TimersAndConstants_n310 = 0;
libconfig_int ue_TimersAndConstants_n311 = 0;
libconfig_int ue_TransmissionMode = 0;
libconfig_int srb1_timer_poll_retransmit = 0;
......@@ -797,6 +803,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NID_CELL, &Nid_cell)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_N_RB_DL, &N_RB_DL)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_CELL_MBSFN, &Nid_cell_mbsfn)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_PORTS, &nb_antenna_ports)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_TX, &nb_antennas_tx)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_RX, &nb_antennas_rx)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_TX_GAIN, &tx_gain)
......@@ -852,6 +859,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T311, &ue_TimersAndConstants_t311)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N310, &ue_TimersAndConstants_n310)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N311, &ue_TimersAndConstants_n311)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, &ue_TransmissionMode)
#ifdef Rel10
......@@ -968,7 +976,14 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->nb_antennas_tx[j] = nb_antennas_tx;
if ((nb_antennas_tx <1) || (nb_antennas_tx > 4))
if ((nb_antenna_ports <1) || (nb_antenna_ports > 2))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n",
lib_config_file_name_pP, i, nb_antenna_ports);
enb_properties.properties[enb_properties_index]->nb_antenna_ports[j] = nb_antenna_ports;
if ((nb_antennas_tx <1) || (nb_antennas_tx > 64))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_tx choice: 1..4 !\n",
lib_config_file_name_pP, i, nb_antennas_tx);
......@@ -1832,6 +1847,35 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
break;
}
switch (ue_TransmissionMode) {
case 1:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm1;
break;
case 2:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm2;
break;
case 3:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm3;
break;
case 4:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm4;
break;
case 5:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm5;
break;
case 6:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm6;
break;
case 7:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7",
lib_config_file_name_pP, i, ue_TransmissionMode);
break;
}
}
}
......
......@@ -136,6 +136,7 @@ typedef struct Enb_properties_s {
int16_t Nid_cell[1+MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[1+MAX_NUM_CCs];// for testing, change later
int nb_antenna_ports[1+MAX_NUM_CCs];
int nb_antennas_tx[1+MAX_NUM_CCs];
int nb_antennas_rx[1+MAX_NUM_CCs];
int tx_gain[1+MAX_NUM_CCs];
......@@ -198,7 +199,7 @@ typedef struct Enb_properties_s {
long ue_TimersAndConstants_t311[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n310[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n311[1+MAX_NUM_CCs];
long ue_TransmissionMode[1+MAX_NUM_CCs];
long srb1_timer_poll_retransmit;
long srb1_timer_reordering;
......
......@@ -1566,9 +1566,11 @@ do_RRCConnectionSetup(
*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CQI_ReportConfig__cqi_ReportModeAperiodic_rm30; // HLC CQI, no PMI
#endif
physicalConfigDedicated2->cqi_ReportConfig->nomPDSCH_RS_EPRE_Offset = 0; // 0 dB
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic=NULL;
/*
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic=NULL;
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic=CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic));
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_release;
/*
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_setup;
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex = 0; // n2_pucch
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_pmi_ConfigIndex = 0; // Icqi/pmi
......@@ -1602,6 +1604,8 @@ do_RRCConnectionSetup(
// AntennaInfoDedicated__transmissionMode_tm2);
switch (transmission_mode) {
default:
LOG_W(RRC,"At RRCConnectionSetup Transmission mode can only take values 1 or 2! Defaulting to 1!\n");
case 1:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm1;
break;
......@@ -1609,7 +1613,7 @@ do_RRCConnectionSetup(
case 2:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm2;
break;
/*
case 3:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm3;
physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1,
......@@ -1634,6 +1638,11 @@ do_RRCConnectionSetup(
case 6:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6;
break;
case 7:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7;
break;
*/
}
......
......@@ -440,6 +440,11 @@ typedef struct eNB_RRC_INST_s {
/// localization list for aggregated measurements from PHY
struct list loc_list;
#endif
//RRC configuration
#if defined(ENABLE_ITTI)
RrcConfigurationReq configuration;
#endif
} eNB_RRC_INST;
#define MAX_UE_CAPABILITY_SIZE 255
......
......@@ -101,7 +101,7 @@
#include "SIMULATION/TOOLS/defs.h" // for taus
//#define XER_PRINT
#define XER_PRINT
#ifdef PHY_EMUL
extern EMULATION_VARS *Emul_vars;
......@@ -1440,9 +1440,9 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
uint16_t size;
int i;
// configure SRB1/SRB2, PhysicalConfiDedgicated, MAC_MainConfig for UE
//eNB_RRC_INST* rrc_inst = &eNB_rrc_inst[ctxt_pP->module_id];
//struct PhysicalConfigDedicated** physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
// configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
eNB_RRC_INST* rrc_inst = &eNB_rrc_inst[ctxt_pP->module_id];
struct PhysicalConfigDedicated** physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
struct SRB_ToAddMod *SRB2_config = NULL;
struct SRB_ToAddMod__rlc_Config *SRB2_rlc_config = NULL;
......@@ -1698,6 +1698,80 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
//sps_RA_ConfigList_rlola = NULL;
#endif
//change the transmission mode for the primary component carrier
//TODO: add codebook subset restriction here
//TODO: change TM for secondary CC in SCelltoaddmodlist
if (*physicalConfigDedicated) {
if ((*physicalConfigDedicated)->antennaInfo) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.transmissionMode = rrc_inst->configuration.ue_TransmissionMode[0];
LOG_D(RRC,"Setting transmission mode to %d+1\n",rrc_inst->configuration.ue_TransmissionMode[0]);
if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm3) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR));
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
}
else if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm4) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR));
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm4;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf= MALLOC(1);
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf[0] = 0xfc;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.size=1;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.bits_unused=2;
}
else if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm5) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR));
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm5;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf= MALLOC(1);
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf[0] = 0xf0;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.size=1;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.bits_unused=4;
}
else if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm6) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR));
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm6;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf= MALLOC(1);
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf[0] = 0xf0;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4;
}
}
else {
LOG_E(RRC,"antenna_info not present in physical_config_dedicated. Not reconfiguring!\n");
}
if ((*physicalConfigDedicated)->cqi_ReportConfig) {
if ((rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm4) ||
(rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm5) ||
(rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm6)) {
//feedback mode needs to be set as well
//TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
printf("setting cqi reporting mode to rm31\n");
#ifdef Rel10
*((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportModeAperiodic_rm31;
#else
*((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportConfig__cqi_ReportModeAperiodic_rm31; // HLC CQI, no PMI
#endif
}
}
else {
LOG_E(RRC,"cqi_ReportConfig not present in physical_config_dedicated. Not reconfiguring!\n");
}
}
else {
LOG_E(RRC,"physical_config_dedicated not present in RRCConnectionReconfiguration. Not reconfiguring!\n");
}
// Measurement ID list
MeasId_list = CALLOC(1, sizeof(*MeasId_list));
memset((void *)MeasId_list, 0, sizeof(*MeasId_list));
......@@ -2013,10 +2087,10 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
(DRB_ToAddModList_t*)*DRB_configList,
(DRB_ToReleaseList_t*)NULL, // DRB2_list,
(struct SPS_Config*)NULL, // *sps_Config,
(struct PhysicalConfigDedicated*)*physicalConfigDedicated,
#ifdef EXMIMO_IOT
NULL, NULL, NULL, NULL,NULL,
NULL, NULL, NULL,NULL,
#else
(struct PhysicalConfigDedicated*)*physicalConfigDedicated,
(MeasObjectToAddModList_t*)MeasObj_list,
(ReportConfigToAddModList_t*)ReportConfig_list,
(QuantityConfig_t*)quantityConfig,
......@@ -3670,7 +3744,7 @@ rrc_eNB_generate_RRCConnectionSetup(
do_RRCConnectionSetup(ctxt_pP,
ue_context_pP,
(uint8_t*) eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload,
(mac_xface->lte_frame_parms->nb_antennas_tx==2)?2:1,
(mac_xface->lte_frame_parms->nb_antennas_tx_eNB==2)?2:1, //at this point we do not have the UE capability information, so it can only be TM1 or TM2
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
mac_xface->lte_frame_parms,
SRB_configList,
......@@ -3829,6 +3903,7 @@ openair_rrc_eNB_init(
eNB_rrc_inst[ctxt.module_id].initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
eNB_rrc_inst[ctxt.module_id].s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
memcpy(&eNB_rrc_inst[ctxt.module_id].configuration,configuration,sizeof(RrcConfigurationReq));
/// System Information INIT
......
......@@ -33,8 +33,9 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 25;
rx_gain = 20;
prach_root = 0;
......@@ -97,6 +98,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
......
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "10";
////////// Physical parameters:
component_carriers = (
{
frame_type = "TDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 38;
downlink_frequency = 2580000000L;
uplink_frequency_offset = 0;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 25;
rx_gain = 20;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = 0;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 0;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -108;
pusch_alpha = "AL1";
pucch_p0_Nominal = -108;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 2;
rach_preambleInitialReceivedTargetPower = -100;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
////////// MME parameters:
mme_ip_address = ( { ipv4 = "0.0.0.0";
ipv6 = "0::0";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "none";
ENB_IPV4_ADDRESS_FOR_S1_MME = "0.0.0.0/24";
ENB_INTERFACE_NAME_FOR_S1U = "none";
ENB_IPV4_ADDRESS_FOR_S1U = "0.0.0.0/24";
ENB_PORT_FOR_S1U = 2153; # Spec 2152
};
log_config :
{
global_log_level ="trace";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="trace";
phy_log_verbosity ="medium";
mac_log_level ="trace";
mac_log_verbosity ="medium";
rlc_log_level ="trace";
rlc_log_verbosity ="medium";
pdcp_log_level ="trace";
pdcp_log_verbosity ="medium";
rrc_log_level ="trace";
rrc_log_verbosity ="medium";
gtpu_log_level ="debug";
gtpu_log_verbosity ="medium";
udp_log_level ="debug";
udp_log_verbosity ="medium";
osa_log_level ="debug";
osa_log_verbosity ="low";
};
}
);
......@@ -17,7 +17,7 @@ eNBs =
mobile_country_code = "208";
mobile_network_code = "92";
mobile_network_code = "94";
////////// Physical parameters:
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 25;
......@@ -98,6 +99,8 @@ eNBs =
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
......@@ -132,7 +135,7 @@ eNBs =
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.13.11";
mme_ip_address = ( { ipv4 = "192.168.12.70";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -141,11 +144,11 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.150/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......@@ -165,13 +168,13 @@ eNBs =
*/
log_config :
{
global_log_level ="info";
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="debug";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_level ="debug";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_level ="debug";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
......
......@@ -33,8 +33,9 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 25;
rx_gain = 20;
prach_root = 0;
......@@ -97,6 +98,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
......
......@@ -33,8 +33,9 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 25;
rx_gain = 20;
prach_root = 0;
......@@ -97,6 +98,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
......
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 60;
......@@ -98,6 +99,7 @@ eNBs =
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 25;
......@@ -97,6 +98,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "10";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 25;
rx_gain = 20;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = 0;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 0;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -108;
pusch_alpha = "AL1";
pucch_p0_Nominal = -108;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 2;
rach_preambleInitialReceivedTargetPower = -100;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.188.2.2";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "tun2";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.188.2.2/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.1/8";
ENB_PORT_FOR_S1U = 2153; # Spec 2152
};
log_config :
{
global_log_level ="trace";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="trace";
phy_log_verbosity ="medium";
mac_log_level ="trace";
mac_log_verbosity ="medium";
rlc_log_level ="trace";
rlc_log_verbosity ="medium";
pdcp_log_level ="trace";
pdcp_log_verbosity ="medium";
rrc_log_level ="trace";
rrc_log_verbosity ="medium";
gtpu_log_level ="debug";
gtpu_log_verbosity ="medium";
udp_log_level ="debug";
udp_log_verbosity ="medium";
osa_log_level ="debug";
osa_log_verbosity ="low";
};
}
);
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "10";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 25;
rx_gain = 20;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = 0;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 0;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -108;
pusch_alpha = "AL1";
pucch_p0_Nominal = -108;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 2;
rach_preambleInitialReceivedTargetPower = -100;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
////////// MME parameters:
mme_ip_address = ( { ipv4 = "0.0.0.0";
ipv6 = "0::0";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "none";
ENB_IPV4_ADDRESS_FOR_S1_MME = "0.0.0.0/24";
ENB_INTERFACE_NAME_FOR_S1U = "none";
ENB_IPV4_ADDRESS_FOR_S1U = "0.0.0.0/24";
ENB_PORT_FOR_S1U = 2153; # Spec 2152
};
log_config :
{
global_log_level ="trace";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="trace";
phy_log_verbosity ="medium";
mac_log_level ="trace";
mac_log_verbosity ="medium";
rlc_log_level ="trace";
rlc_log_verbosity ="medium";
pdcp_log_level ="trace";
pdcp_log_verbosity ="medium";
rrc_log_level ="trace";
rrc_log_verbosity ="medium";
gtpu_log_level ="debug";
gtpu_log_verbosity ="medium";
udp_log_level ="debug";
udp_log_verbosity ="medium";
osa_log_level ="debug";
osa_log_verbosity ="low";
};
}
);
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 60;
......@@ -98,6 +99,7 @@ eNBs =
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
......@@ -98,6 +99,7 @@ eNBs =
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......
......@@ -17,7 +17,7 @@ eNBs =
mobile_country_code = "208";
mobile_network_code = "93";
mobile_network_code = "94";
////////// Physical parameters:
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
......@@ -97,6 +98,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......@@ -130,7 +133,7 @@ eNBs =
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.170";
mme_ip_address = ( { ipv4 = "192.168.12.70";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -140,10 +143,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.241/24";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.241/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......
......@@ -32,6 +32,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 32;
......@@ -96,6 +97,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......
......@@ -17,7 +17,7 @@ eNBs =
mobile_country_code = "208";
mobile_network_code = "92";
mobile_network_code = "94";
////////// Physical parameters:
......@@ -33,10 +33,11 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 90;
rx_gain = 132;
rx_gain = 125;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
......@@ -64,9 +65,9 @@ eNBs =
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -85;
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -108;
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
......@@ -98,6 +99,8 @@ eNBs =
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
......@@ -132,7 +135,7 @@ eNBs =
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.11";
mme_ip_address = ( { ipv4 = "192.168.12.171";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -142,10 +145,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......
......@@ -331,7 +331,7 @@ time_stats_t softmodem_stats_tx_sf[10]; // total tx time
time_stats_t softmodem_stats_rx_sf[10]; // total rx time
void reset_opp_meas(void);
void print_opp_meas(void);
int transmission_mode=1;
//int transmission_mode=1;
int16_t glog_level = LOG_INFO;
int16_t glog_verbosity = LOG_MED;
......@@ -1272,6 +1272,28 @@ static void* eNB_thread_tx( void* param )
do_OFDM_mod_rt( proc->subframe_tx, PHY_vars_eNB_g[0][proc->CC_id] );
/*
if ((proc->frame_tx==100) && (proc->subframe_tx==9)) {
write_output("/tmp/eNBtxsig0.m","txs0",
PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.txdata[0][0],
PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.samples_per_tti*10,
1,1);
write_output("/tmp/eNBtxsig1.m","txs1",
PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.txdata[0][1],
PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.samples_per_tti*10,
1,1);
write_output("/tmp/eNBtxsigF0.m","txsF0",
PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.txdataF[0][0],
PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.symbols_per_tti*PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.ofdm_symbol_size*10,
1,1);
write_output("/tmp/eNBtxsigF1.m","txsF1",
PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.txdataF[0][1],
PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.symbols_per_tti*PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.ofdm_symbol_size*10,
1,1);
exit_fun("DEBUG: Exiting after writing files");
}
*/
/*
short *txdata = (short*)&PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.txdata[0][0][proc->subframe_tx*PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.samples_per_tti];
int i;
for (i=0;i<PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.samples_per_tti*2;i+=8) {
......@@ -2662,12 +2684,16 @@ static void get_options (int argc, char **argv)
break;
case 'x':
printf("Transmission mode should be set in config file now\n");
exit(-1);
/*
transmission_mode = atoi(optarg);
if (transmission_mode > 7) {
printf("Transmission mode %d not supported for the moment\n",transmission_mode);
exit(-1);
}
*/
break;
case 'T':
......@@ -2754,7 +2780,7 @@ static void get_options (int argc, char **argv)
frame_parms[CC_id]->N_RB_DL = enb_properties->properties[i]->N_RB_DL[CC_id];
frame_parms[CC_id]->N_RB_UL = enb_properties->properties[i]->N_RB_DL[CC_id];
frame_parms[CC_id]->nb_antennas_tx = enb_properties->properties[i]->nb_antennas_tx[CC_id];
frame_parms[CC_id]->nb_antennas_tx_eNB = enb_properties->properties[i]->nb_antennas_tx[CC_id];
frame_parms[CC_id]->nb_antennas_tx_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];
//} // j
}
......@@ -3030,10 +3056,10 @@ int main( int argc, char **argv )
//UE_flag==1
frame_parms[CC_id]->nb_antennas_tx = 1;
frame_parms[CC_id]->nb_antennas_rx = 1;
frame_parms[CC_id]->nb_antennas_tx_eNB = (transmission_mode == 1) ? 1 : 2; //initial value overwritten by initial sync later
frame_parms[CC_id]->nb_antennas_tx_eNB = 1; //initial value overwritten by initial sync later
}
frame_parms[CC_id]->mode1_flag = (transmission_mode == 1) ? 1 : 0;
frame_parms[CC_id]->mode1_flag = (frame_parms[CC_id]->nb_antennas_tx_eNB == 1) ? 1 : 0;
frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth;
frame_parms[CC_id]->phich_config_common.phich_duration = normal;
// UL RS Config
......@@ -3069,7 +3095,7 @@ int main( int argc, char **argv )
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_UE_g[0][CC_id] = init_lte_UE(frame_parms[CC_id], 0,abstraction_flag,transmission_mode);
PHY_vars_UE_g[0][CC_id] = init_lte_UE(frame_parms[CC_id], 0,abstraction_flag);
UE[CC_id] = PHY_vars_UE_g[0][CC_id];
printf("PHY_vars_UE_g[0][%d] = %p\n",CC_id,UE[CC_id]);
......@@ -3169,7 +3195,7 @@ int main( int argc, char **argv )
PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*));
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,cooperation_flag,transmission_mode,abstraction_flag);
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,cooperation_flag,abstraction_flag);
PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id;
if (phy_test==1)
......
......@@ -50,7 +50,6 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
uint8_t Nid_cell,
uint8_t cooperation_flag,
uint8_t transmission_mode,
uint8_t abstraction_flag)
{
......@@ -69,7 +68,6 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
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: Transmission mode %d\n", transmission_mode);
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
for (j=0; j<2; j++) {
......@@ -93,7 +91,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
// 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[i] = transmission_mode;
PHY_vars_eNB->transmission_mode[i] = frame_parms->nb_antennas_tx_eNB==1 ? 1 : 2;
#ifdef LOCALIZATION
PHY_vars_eNB->ulsch_eNB[1+i]->aggregation_period_ms = 5000; // 5000 milliseconds // could be given as an argument (TBD))
struct timeval ts;
......@@ -153,8 +151,8 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag,
uint8_t transmission_mode)
uint8_t abstraction_flag)
{
int i,j;
......@@ -187,7 +185,7 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
PHY_vars_UE->dlsch_ue_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->dlsch_ue_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->transmission_mode[i] = transmission_mode;
PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antennas_tx_eNB==1 ? 1 : 2;
}
PHY_vars_UE->lte_frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
......@@ -225,8 +223,13 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t extended_prefix_flag,
uint8_t N_RB_DL,
uint16_t Nid_cell,
uint8_t cooperation_flag,uint8_t transmission_mode,uint8_t abstraction_flag,
int nb_antennas_rx, uint8_t eMBMS_active_state)
uint8_t cooperation_flag,
uint8_t nb_antenna_ports,
uint8_t abstraction_flag,
int nb_antennas_rx,
int nb_antennas_tx,
int nb_antennas_rx_ue,
uint8_t eMBMS_active_state)
{
uint8_t eNB_id,UE_id,RN_id,CC_id;
......@@ -250,10 +253,10 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
(frame_parms[CC_id])->Ncp_UL = extended_prefix_flag;
(frame_parms[CC_id])->Nid_cell = Nid_cell;
(frame_parms[CC_id])->nushift = (Nid_cell%6);
(frame_parms[CC_id])->nb_antennas_tx = (transmission_mode == 1) ? 1 : 2;
(frame_parms[CC_id])->nb_antennas_tx_eNB = (transmission_mode == 1) ? 1 : 2;
(frame_parms[CC_id])->nb_antennas_rx = (transmission_mode == 1) ? 1 : 2;
(frame_parms[CC_id])->mode1_flag = (transmission_mode == 1) ? 1 : 0;
(frame_parms[CC_id])->nb_antennas_tx = nb_antennas_tx;
(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx;
(frame_parms[CC_id])->nb_antennas_tx_eNB = nb_antenna_ports;
(frame_parms[CC_id])->mode1_flag = (frame_parms[CC_id])->nb_antennas_tx_eNB==1 ? 1 : 0;
init_frame_parms(frame_parms[CC_id],1);
......@@ -275,7 +278,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
PHY_vars_eNB_g[eNB_id] = (PHY_VARS_eNB**) malloc(MAX_NUM_CCs*sizeof(PHY_VARS_eNB*));
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_eNB_g[eNB_id][CC_id] = init_lte_eNB(frame_parms[CC_id],eNB_id,Nid_cell,cooperation_flag,transmission_mode,abstraction_flag);
PHY_vars_eNB_g[eNB_id][CC_id] = init_lte_eNB(frame_parms[CC_id],eNB_id,Nid_cell,cooperation_flag,abstraction_flag);
PHY_vars_eNB_g[eNB_id][CC_id]->Mod_id=eNB_id;
PHY_vars_eNB_g[eNB_id][CC_id]->CC_id=CC_id;
}
......@@ -289,10 +292,10 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
(frame_parms[CC_id])->nb_antennas_tx = 1;
(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx;
(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx_ue;
PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag,transmission_mode);
PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag);
PHY_vars_UE_g[UE_id][CC_id]->Mod_id=UE_id;
PHY_vars_UE_g[UE_id][CC_id]->CC_id=CC_id;
}
......
......@@ -34,13 +34,11 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
uint8_t Nid_cell,
uint8_t cooperation_flag,
uint8_t transmission_mode,
uint8_t abstraction_flag);
PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag,
uint8_t transmission_mode);
uint8_t abstraction_flag);
PHY_VARS_RN* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t RN_id,
......@@ -54,7 +52,9 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t N_RB_DL,
uint16_t Nid_cell,
uint8_t cooperation_flag,
uint8_t transmission_mode,
uint8_t nb_antenna_ports,
uint8_t abstraction_flag,
int nb_antennas_rx,
int nb_antennas_tx,
int nb_antennas_rx_ue,
uint8_t eMBMS_active_state);
......@@ -243,10 +243,13 @@ help (void)
#else
printf ("-W [Rohde&Schwarz SMBV100A functions disabled. Recompile with SMBV=1]\n");
#endif
printf ("-x Set the transmission mode (1,2,5,6 supported for now)\n");
printf ("-x deprecated. Set the transmission mode in config file!\n");
printf ("-y Set the number of receive antennas at the UE (1 or 2)\n");
printf ("-Y Set the global log verbosity (none, low, medium, high, full) \n");
printf ("-z Set the cooperation flag (0 for no cooperation, 1 for delay diversity and 2 for distributed alamouti\n");
printf ("-Z Reserved\n");
printf ("--xforms Activate the grapical scope\n");
#if T_TRACER
printf ("--T_port [port] use given port\n");
printf ("--T_nowait don't wait for tracer, start immediately\n");
......@@ -1150,7 +1153,7 @@ l2l1_task (void *args_p)
stop_meas (&oaisim_stats_f);
} //end of slot
if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0)
if ((frame >= 12) && (frame <= 12) && (abstraction_flag == 0)
#ifdef PROC
&&(Channel_Flag==0)
#endif
......@@ -1163,22 +1166,42 @@ l2l1_task (void *args_p)
PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti
* 10,
1, 1);
sprintf (fname, "eNBtxsig%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txs%d", frame % MAX_FRAME_NUMBER);
sprintf (fname, "eNBtxsig0_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txs0_%d", frame % MAX_FRAME_NUMBER);
write_output (fname,
vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdata[0][0],
PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti
* 10,
1, 1);
if (PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx>1) {
sprintf (fname, "eNBtxsig1_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txs1_%d", frame % MAX_FRAME_NUMBER);
write_output (fname,
vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdata[0][0],
PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti
* 10,
1, 1);
sprintf (fname, "eNBtxsigF%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txsF%d", frame % MAX_FRAME_NUMBER);
}
sprintf (fname, "eNBtxsigF0_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txsF0_%d", frame % MAX_FRAME_NUMBER);
write_output (fname,
vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdataF[0][0],
PHY_vars_eNB_g[0][0]->lte_frame_parms.symbols_per_tti
* PHY_vars_eNB_g[0][0]->lte_frame_parms.ofdm_symbol_size,
* PHY_vars_eNB_g[0][0]->lte_frame_parms.ofdm_symbol_size*10,
1, 1);
if (PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx>1) {
sprintf (fname, "eNBtxsigF1_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txsF1_%d", frame % MAX_FRAME_NUMBER);
write_output (fname,
vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdataF[0][1],
PHY_vars_eNB_g[0][0]->lte_frame_parms.symbols_per_tti
* PHY_vars_eNB_g[0][0]->lte_frame_parms.ofdm_symbol_size *10,
1, 1);
}
sprintf (fname, "UErxsig%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "rxs%d", frame % MAX_FRAME_NUMBER);
write_output (fname,
......
......@@ -100,7 +100,7 @@ int if_times = 0;
int for_times = 0;
uint16_t Nid_cell = 0; //needed by init_lte_vars
int nb_antennas_rx = 2; // //
int nb_antennas_rx_ue = 1; // //
uint8_t target_dl_mcs = 16; // max mcs used by MAC scheduler
uint8_t rate_adaptation_flag = 0;
uint8_t set_snr = 0;
......@@ -173,10 +173,11 @@ extern time_stats_t ul_chan_stats;
extern int xforms;
const Enb_properties_array_t *enb_properties;
void get_simulation_options(int argc, char *argv[])
{
int option;
const Enb_properties_array_t *enb_properties;
char *conf_config_file_name = NULL;
enum long_option_e {
......@@ -714,6 +715,7 @@ void get_simulation_options(int argc, char *argv[])
break;
case 'x':
/*
oai_emulation.info.transmission_mode[0] = atoi (optarg);
if ((oai_emulation.info.transmission_mode[0] != 1) && (oai_emulation.info.transmission_mode[0] != 2) && (oai_emulation.info.transmission_mode[0] != 3)
......@@ -721,6 +723,9 @@ void get_simulation_options(int argc, char *argv[])
printf("Unsupported transmission mode %d\n",oai_emulation.info.transmission_mode[0]);
exit(-1);
}
*/
printf("Option -x deprecated. Please set transmission mode in eNB config file\n");
exit(-1);
break;
......@@ -745,9 +750,9 @@ void get_simulation_options(int argc, char *argv[])
break;
case 'y':
nb_antennas_rx=atoi(optarg);
nb_antennas_rx_ue=atoi(optarg);
if (nb_antennas_rx>4) {
if (nb_antennas_rx_ue>4) {
printf("Cannot have more than 4 antennas\n");
exit(-1);
}
......@@ -956,8 +961,20 @@ void init_openair1(void)
// change the nb_connected_eNB
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
init_lte_vars (&frame_parms[CC_id], oai_emulation.info.frame_type[CC_id], oai_emulation.info.tdd_config[CC_id], oai_emulation.info.tdd_config_S[CC_id],oai_emulation.info.extended_prefix_flag[CC_id],
oai_emulation.info.N_RB_DL[CC_id], Nid_cell, cooperation_flag, oai_emulation.info.transmission_mode[CC_id], abstraction_flag,nb_antennas_rx, oai_emulation.info.eMBMS_active_state);
init_lte_vars (&frame_parms[CC_id],
oai_emulation.info.frame_type[CC_id],
oai_emulation.info.tdd_config[CC_id],
oai_emulation.info.tdd_config_S[CC_id],
oai_emulation.info.extended_prefix_flag[CC_id],
oai_emulation.info.N_RB_DL[CC_id],
Nid_cell,
cooperation_flag,
enb_properties->properties[0]->nb_antenna_ports[CC_id],
abstraction_flag,
enb_properties->properties[0]->nb_antennas_rx[CC_id],
enb_properties->properties[0]->nb_antennas_tx[CC_id],
nb_antennas_rx_ue,
oai_emulation.info.eMBMS_active_state);
}
for (eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) {
......
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