add the relay node for a dual stack operation for eMBMS (experimental)
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4146 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -559,7 +559,7 @@ static void *eNB_thread(void *arg)
|
||||
|
||||
if (fs4_test==0)
|
||||
{
|
||||
phy_procedures_eNB_lte (last_slot, next_slot, PHY_vars_eNB_g[0], 0);
|
||||
phy_procedures_eNB_lte (last_slot, next_slot, PHY_vars_eNB_g[0], 0, 0);
|
||||
#ifndef IFFT_FPGA
|
||||
slot_offset_F = (next_slot)*
|
||||
(PHY_vars_eNB_g[0]->lte_frame_parms.ofdm_symbol_size)*
|
||||
@@ -781,7 +781,7 @@ static void *UE_thread(void *arg)
|
||||
*/
|
||||
|
||||
in = rt_get_time_ns();
|
||||
phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[0], 0, 0,mode);
|
||||
phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[0], 0, 0,mode,0);
|
||||
out = rt_get_time_ns();
|
||||
diff = out-in;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<OWD_RADIO_ACCESS>enable</OWD_RADIO_ACCESS> <!-- option: enable, disable. If enable owd curve shows the one way radio access delay, else it shows end to end owd -->
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>trace</LEVEL>
|
||||
<LEVEL>debug</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
@@ -38,19 +38,19 @@
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>80</SIZE_MIN_byte> <!--Minimum PAYLOAD size in bytes-->
|
||||
<SIZE_MAX_byte>150</SIZE_MAX_byte> <!--Maximum PAYLOAD size in bytes-->
|
||||
<PU_SIZE_PKTS>60</PU_SIZE_PKTS> <!-- PU state packet size in bytes-->
|
||||
<ED_SIZE_PKTS>70</ED_SIZE_PKTS> <!-- ED state packet size in bytes-->
|
||||
<PROB_OFF_PU>0.2</PROB_OFF_PU> <!-- Probability threshold to move from OFF to PU state. -->
|
||||
<PROB_OFF_ED>0.1</PROB_OFF_ED> <!-- Probability threshold to move from OFF to ED state. -->
|
||||
<PROB_OFF_PE>0.2</PROB_OFF_PE> <!-- Probability threshold to move from OFF to PE state. -->
|
||||
<PROB_PU_ED>0.1</PROB_PU_ED> <!-- Probability threshold to move from PU to ED state. -->
|
||||
<PROB_PU_PE>0.3</PROB_PU_PE> <!-- Probability threshold to move from PU to PE state. -->
|
||||
<PROB_ED_PE>0.1</PROB_ED_PE> <!-- Probability threshold to move from ED to PE state. -->
|
||||
<PROB_ED_PU>0.2</PROB_ED_PU> <!-- Probability threshold to move from ED to PU state. -->
|
||||
<HOLDING_TIME_OFF_ED>100</HOLDING_TIME_OFF_ED> <!--Holding time in OFF state before moving to ED -->
|
||||
<HOLDING_TIME_OFF_PU>120</HOLDING_TIME_OFF_PU> <!--Holding time in OFF state before moving to PU -->
|
||||
<HOLDING_TIME_OFF_PE>150</HOLDING_TIME_OFF_PE> <!--Holding time in OFF state before moving to PE -->
|
||||
<HOLDING_TIME_PE_OFF>500</HOLDING_TIME_PE_OFF> <!--Holding time in PE state before moving to OFF -->
|
||||
<PU_SIZE_PKTS>60</PU_SIZE_PKTS> <!-- PU state packet size in bytes-->
|
||||
<ED_SIZE_PKTS>70</ED_SIZE_PKTS> <!-- ED state packet size in bytes-->
|
||||
<PROB_OFF_PU>0.2</PROB_OFF_PU> <!-- Probability threshold to move from OFF to PU state. -->
|
||||
<PROB_OFF_ED>0.1</PROB_OFF_ED> <!-- Probability threshold to move from OFF to ED state. -->
|
||||
<PROB_OFF_PE>0.2</PROB_OFF_PE> <!-- Probability threshold to move from OFF to PE state. -->
|
||||
<PROB_PU_ED>0.1</PROB_PU_ED> <!-- Probability threshold to move from PU to ED state. -->
|
||||
<PROB_PU_PE>0.3</PROB_PU_PE> <!-- Probability threshold to move from PU to PE state. -->
|
||||
<PROB_ED_PE>0.1</PROB_ED_PE> <!-- Probability threshold to move from ED to PE state. -->
|
||||
<PROB_ED_PU>0.2</PROB_ED_PU> <!-- Probability threshold to move from ED to PU state. -->
|
||||
<HOLDING_TIME_OFF_ED>100</HOLDING_TIME_OFF_ED> <!--Holding time in OFF state before moving to ED -->
|
||||
<HOLDING_TIME_OFF_PU>120</HOLDING_TIME_OFF_PU> <!--Holding time in OFF state before moving to PU -->
|
||||
<HOLDING_TIME_OFF_PE>150</HOLDING_TIME_OFF_PE> <!--Holding time in OFF state before moving to PE -->
|
||||
<HOLDING_TIME_PE_OFF>500</HOLDING_TIME_PE_OFF> <!--Holding time in PE state before moving to OFF -->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
@@ -46,7 +46,7 @@
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>5000</EMULATION_TIME_ms>
|
||||
<EMULATION_TIME_ms>0</EMULATION_TIME_ms>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
</LOG>
|
||||
|
||||
@@ -50,17 +50,18 @@
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- DL -->
|
||||
<!-- DL
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID> <!-- valid formats are "n:m" and "n,m" and "n" -->
|
||||
<DURATION_ms>5000</DURATION_ms> <!-- start at -->
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1:9</DESTINATION_ID> <!-- valid formats are "n:m" and "n,m" and "n" -->
|
||||
<DESTINATION_ID>1:9</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<!-- UL -->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1:9</SOURCE_ID> <!-- valid formats are "n:m" and "n,m" and "n" -->
|
||||
<DURATION_ms>5000</DURATION_ms> <!-- start at -->
|
||||
<DURATION_ms>5000</DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID> <!-- valid formats are "n:m" and "n,m" and "n" -->
|
||||
</PREDEFINED_TRAFFIC>
|
||||
@@ -68,6 +69,7 @@
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>1</THROUGHPUT>
|
||||
<LATENCY>1</LATENCY>
|
||||
@@ -76,7 +78,7 @@
|
||||
<LEVEL>debug</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>0</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES> <!-- num UE -->
|
||||
<NUMBER_OF_NODES>2</NUMBER_OF_NODES> <!-- num UE -->
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
<!-- <UE_MOVING_DYNAMICS>
|
||||
@@ -52,7 +52,7 @@
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS> <!-- num eNB -->
|
||||
<NUMBER_OF_CELLS>2</NUMBER_OF_CELLS> <!-- num eNB -->
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
@@ -64,7 +64,7 @@
|
||||
<!-- DL -->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<DESTINATION_ID>2</DESTINATION_ID>
|
||||
<IDT_DIST>fixed</IDT_DIST> <!-- option: no_customized_traffic, uniform, gaussian, exponential, poisson, fixed, weibull, pareto, gamma, cauchy, log_normal -->
|
||||
<IDT_MIN_ms>10</IDT_MIN_ms>
|
||||
<SIZE_DIST>fixed</SIZE_DIST> <!-- option: no_customized_traffic, uniform, gaussian, exponential, poisson, fixed, weibull, pareto, gamma, cauchy, log_normal -->
|
||||
@@ -72,7 +72,7 @@
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
<!-- UL -->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<SOURCE_ID>2</SOURCE_ID>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>fixed</IDT_DIST> <!-- option: no_customized_traffic, uniform, gaussian, exponential, poisson, fixed, weibull, pareto, gamma, cauchy, log_normal -->
|
||||
<IDT_MIN_ms>10</IDT_MIN_ms>
|
||||
|
||||
@@ -523,7 +523,7 @@ else
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 > /tmp/lte_log.txt
|
||||
chmod 777 /tmp/lte_log.txt
|
||||
else
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 -F > /tmp/lte_log.txt
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 -F -P wireshark > /tmp/lte_log.txt
|
||||
fi
|
||||
echo "End of emulation"
|
||||
fi
|
||||
|
||||
+128
-72
@@ -102,7 +102,7 @@ char smbv_ip[16];
|
||||
//u8 NB_INST = 2;
|
||||
//#endif //OPENAIR2
|
||||
u32 frame=0;
|
||||
int eMBMS_active = 0;
|
||||
//int eMBMS_active = 0;
|
||||
char stats_buffer[16384];
|
||||
channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
|
||||
@@ -201,7 +201,7 @@ help (void) {
|
||||
printf (" - wireshark: Enable tracing of layers above PHY using an UDP socket\n");
|
||||
printf (" - pcap: Enable tracing of layers above PHY to a pcap file\n");
|
||||
printf (" - tshark: Not implemented yet\n");
|
||||
printf ("-Q Activate the MBMS service\n");
|
||||
printf ("-Q Activate and set the MBMS service: 0 : not used (default eMBMS disabled), 1: eMBMS and RRC enabled, 2: eMBMS relaying and RRC enabled, 3: eMBMS enabled, RRC disabled, 4: eMBMS relaying enabled, RRC disabled\n");
|
||||
printf ("-R [6,15,25,50,75,100] Sets N_RB_DL\n");
|
||||
printf ("-r Activates rate adaptation (DL for now)\n");
|
||||
printf ("-s snr_dB set a fixed (average) SNR, this deactivates the openair channel model generator (OCM)\n");
|
||||
@@ -366,8 +366,9 @@ int
|
||||
strcpy(smbv_ip,DEFAULT_SMBV_IP);
|
||||
#endif
|
||||
|
||||
s32 UE_id, eNB_id;
|
||||
|
||||
s32 UE_id=0, eNB_id=0, RN_id=0;
|
||||
|
||||
relaying_mode_t r_mode=no_relay; // no relaying
|
||||
// time calibration for soft realtime mode
|
||||
|
||||
lte_subframe_t direction;
|
||||
@@ -450,8 +451,8 @@ int
|
||||
#ifdef OPENAIR2
|
||||
init_omv();
|
||||
#endif
|
||||
|
||||
check_and_adjust_params(); //Before this call, NB_UE_INST and NB_eNB_INST are not set correctly
|
||||
//Before this call, NB_UE_INST and NB_eNB_INST are not set correctly
|
||||
check_and_adjust_params();
|
||||
|
||||
init_otg_pdcp_buffer();
|
||||
|
||||
@@ -486,9 +487,26 @@ int
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
LOG_I(EMU,"total number of UE %d (local %d, remote %d) mobility %s \n", NB_UE_INST,oai_emulation.info.nb_ue_local,oai_emulation.info.nb_ue_remote, oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
|
||||
LOG_I(EMU,"Total number of eNB %d (local %d, remote %d) mobility %s \n", NB_eNB_INST,oai_emulation.info.nb_enb_local,oai_emulation.info.nb_enb_remote, oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option);
|
||||
|
||||
if (NB_RN_INST > 0 ) {
|
||||
LOG_N(EMU,"Total number of RN %d (local %d, remote %d) mobility (the same as eNB) %s \n", NB_RN_INST,oai_emulation.info.nb_rn_local,oai_emulation.info.nb_rn_remote, oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
|
||||
|
||||
LOG_N(EMU,"Adjust the number of eNB inst (%d->%d) and UE inst (%d->%d)\n ",
|
||||
NB_eNB_INST, NB_eNB_INST+NB_RN_INST,
|
||||
NB_UE_INST, NB_UE_INST+NB_RN_INST);
|
||||
NB_eNB_INST+=NB_RN_INST;
|
||||
NB_UE_INST+=NB_RN_INST;
|
||||
}
|
||||
LOG_I(EMU,"Total number of UE %d (local %d, remote %d, relay %d) mobility %s \n",
|
||||
NB_UE_INST,oai_emulation.info.nb_ue_local,oai_emulation.info.nb_ue_remote,
|
||||
NB_RN_INST,
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
|
||||
|
||||
LOG_I(EMU,"Total number of eNB %d (local %d, remote %d, relay %d) mobility %s \n",
|
||||
NB_eNB_INST,oai_emulation.info.nb_enb_local,oai_emulation.info.nb_enb_remote,
|
||||
NB_RN_INST,
|
||||
oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option);
|
||||
|
||||
LOG_I(OCM,"Running with frame_type %d, Nid_cell %d, N_RB_DL %d, EP %d, mode %d, target dl_mcs %d, rate adaptation %d, nframes %d, abstraction %d, channel %s\n",
|
||||
oai_emulation.info.frame_type, Nid_cell, oai_emulation.info.N_RB_DL, oai_emulation.info.extended_prefix_flag, oai_emulation.info.transmission_mode,target_dl_mcs,rate_adaptation_flag,oai_emulation.info.n_frames,abstraction_flag,oai_emulation.environment_system_config.fading.small_scale.selected_option);
|
||||
|
||||
@@ -531,17 +549,11 @@ int
|
||||
smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0]->lte_frame_parms);
|
||||
#endif
|
||||
|
||||
|
||||
printf ("before L2 init: Nid_cell %d\n", PHY_vars_eNB_g[0]->lte_frame_parms.Nid_cell);
|
||||
printf ("before L2 init: frame_type %d,tdd_config %d\n",
|
||||
PHY_vars_eNB_g[0]->lte_frame_parms.frame_type,
|
||||
PHY_vars_eNB_g[0]->lte_frame_parms.tdd_config);
|
||||
|
||||
init_time();
|
||||
|
||||
LOG_I(EMU,">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU initialization done <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
|
||||
printf ("after init: Nid_cell %d\n", PHY_vars_eNB_g[0]->lte_frame_parms.Nid_cell);
|
||||
printf ("after init: frame_type %d,tdd_config %d\n",
|
||||
LOG_I (EMU,"after init: Nid_cell %d\n", PHY_vars_eNB_g[0]->lte_frame_parms.Nid_cell);
|
||||
LOG_I(EMU,"after init: frame_type %d,tdd_config %d\n",
|
||||
PHY_vars_eNB_g[0]->lte_frame_parms.frame_type,
|
||||
PHY_vars_eNB_g[0]->lte_frame_parms.tdd_config);
|
||||
|
||||
@@ -618,6 +630,8 @@ int
|
||||
oai_emulation.info.time_ms = frame * 10 + (slot>>1) ;
|
||||
|
||||
direction = subframe_select(frame_parms,next_slot>>1);
|
||||
|
||||
r_mode = no_relay;
|
||||
#ifdef PROC
|
||||
if(Channel_Flag==1)
|
||||
Channel_Func(s_re2,s_im2,r_re2,r_im2,r_re02,r_im02,r_re0_d,r_im0_d,r_re0_u,r_im0_u,eNB2UE,UE2eNB,enb_data,ue_data,abstraction_flag,frame_parms,slot);
|
||||
@@ -633,8 +647,8 @@ int
|
||||
eNB_id++) {
|
||||
//printf ("debug: Nid_cell %d\n", PHY_vars_eNB_g[eNB_id]->lte_frame_parms.Nid_cell);
|
||||
//printf ("debug: frame_type %d,tdd_config %d\n", PHY_vars_eNB_g[eNB_id]->lte_frame_parms.frame_type,PHY_vars_eNB_g[eNB_id]->lte_frame_parms.tdd_config);
|
||||
LOG_D(EMU,"PHY procedures eNB %d for frame %d, slot %d (subframe TX %d, RX %d) TDD %d/%d Nid_cell %d\n",
|
||||
eNB_id, frame, slot, next_slot >> 1,last_slot>>1,
|
||||
LOG_D(EMU,"PHY procedures eNB %d mode %s for frame %d, slot %d (subframe TX %d, RX %d) TDD %d/%d Nid_cell %d\n",
|
||||
eNB_id, (r_mode == 0)?"Normal":"Relaying", frame, slot, next_slot >> 1,last_slot>>1,
|
||||
PHY_vars_eNB_g[eNB_id]->lte_frame_parms.frame_type,
|
||||
PHY_vars_eNB_g[eNB_id]->lte_frame_parms.tdd_config,PHY_vars_eNB_g[eNB_id]->lte_frame_parms.Nid_cell);
|
||||
|
||||
@@ -643,9 +657,9 @@ int
|
||||
|
||||
//IP/OTG to PDCP and PDCP to IP operation
|
||||
pdcp_run(frame, 1, 0, eNB_id);//PHY_vars_eNB_g[eNB_id]->Mod_id
|
||||
|
||||
//PHY_vars_eNB_g[eNB_id]->frame = frame;
|
||||
phy_procedures_eNB_lte (last_slot, next_slot, PHY_vars_eNB_g[eNB_id], abstraction_flag);
|
||||
|
||||
// PHY_vars_eNB_g[eNB_id]->frame = frame;
|
||||
phy_procedures_eNB_lte (last_slot, next_slot, PHY_vars_eNB_g[eNB_id], abstraction_flag, r_mode);
|
||||
|
||||
#ifdef PRINT_STATS
|
||||
if(last_slot==9 && frame%10==0)
|
||||
@@ -675,61 +689,103 @@ int
|
||||
|
||||
for (UE_id = oai_emulation.info.first_ue_local;
|
||||
(UE_id < (oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local)) && (oai_emulation.info.cli_start_ue[UE_id]==1);
|
||||
UE_id++)
|
||||
UE_id++){
|
||||
if (frame >= (UE_id * 20)) { // activate UE only after 20*UE_id frames so that different UEs turn on separately
|
||||
|
||||
LOG_D(EMU,"PHY procedures UE %d mode %s for frame %d, slot %d (subframe TX %d, RX %d)\n",
|
||||
UE_id, (r_mode == 0)?"Normal":"Relaying", frame, slot, next_slot >> 1,last_slot>>1);
|
||||
|
||||
LOG_D(EMU,"PHY procedures UE %d for frame %d, slot %d (subframe TX %d, RX %d)\n",
|
||||
UE_id, frame, slot, next_slot >> 1,last_slot>>1);
|
||||
|
||||
if (PHY_vars_UE_g[UE_id]->UE_mode[0] != NOT_SYNCHED) {
|
||||
if (frame>0) {
|
||||
PHY_vars_UE_g[UE_id]->frame = frame;
|
||||
|
||||
//Application
|
||||
update_otg_UE(UE_id, oai_emulation.info.time_ms);
|
||||
|
||||
//Access layer
|
||||
pdcp_run(frame, 0, UE_id, 0);
|
||||
|
||||
phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[UE_id], 0, abstraction_flag,normal_txrx);
|
||||
ue_data[UE_id]->tx_power_dBm = PHY_vars_UE_g[UE_id]->tx_power_dBm;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (abstraction_flag==1){
|
||||
LOG_E(EMU, "sync not supported in abstraction mode (UE%d,mode%d)\n", UE_id, PHY_vars_UE_g[UE_id]->UE_mode[0]);
|
||||
exit(-1);
|
||||
}
|
||||
if ((frame>0) && (last_slot == (LTE_SLOTS_PER_FRAME-2))) {
|
||||
initial_sync(PHY_vars_UE_g[UE_id],normal_txrx);
|
||||
|
||||
/*
|
||||
write_output("dlchan00.m","dlch00",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][0][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
if (PHY_vars_UE_g[0]->lte_frame_parms.nb_antennas_rx>1)
|
||||
write_output("dlchan01.m","dlch01",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][1][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
write_output("dlchan10.m","dlch10",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][2][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
if (PHY_vars_UE_g[0]->lte_frame_parms.nb_antennas_rx>1)
|
||||
write_output("dlchan11.m","dlch11",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][3][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
write_output("rxsig.m","rxs",PHY_vars_UE_g[0]->lte_ue_common_vars.rxdata[0],PHY_vars_UE_g[0]->lte_frame_parms.samples_per_tti*10,1,1);
|
||||
write_output("rxsigF.m","rxsF",PHY_vars_UE_g[0]->lte_ue_common_vars.rxdataF[0],2*PHY_vars_UE_g[0]->lte_frame_parms.symbols_per_tti*PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size,2,1);
|
||||
write_output("pbch_rxF_ext0.m","pbch_ext0",PHY_vars_UE_g[0]->lte_ue_pbch_vars[0]->rxdataF_ext[0],6*12*4,1,1);
|
||||
write_output("pbch_rxF_comp0.m","pbch_comp0",PHY_vars_UE_g[0]->lte_ue_pbch_vars[0]->rxdataF_comp[0],6*12*4,1,1);
|
||||
write_output("pbch_rxF_llr.m","pbch_llr",PHY_vars_UE_g[0]->lte_ue_pbch_vars[0]->llr,(frame_parms->Ncp==0) ? 1920 : 1728,1,4);
|
||||
*/
|
||||
}
|
||||
}
|
||||
if (PHY_vars_UE_g[UE_id]->UE_mode[0] != NOT_SYNCHED) {
|
||||
if (frame>0) {
|
||||
PHY_vars_UE_g[UE_id]->frame = frame;
|
||||
|
||||
//Application
|
||||
update_otg_UE(UE_id, oai_emulation.info.time_ms);
|
||||
|
||||
//Access layer
|
||||
pdcp_run(frame, 0, UE_id, 0);
|
||||
|
||||
phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[UE_id], 0, abstraction_flag,normal_txrx, r_mode);
|
||||
ue_data[UE_id]->tx_power_dBm = PHY_vars_UE_g[UE_id]->tx_power_dBm;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (abstraction_flag==1){
|
||||
LOG_E(EMU, "sync not supported in abstraction mode (UE%d,mode%d)\n", UE_id, PHY_vars_UE_g[UE_id]->UE_mode[0]);
|
||||
exit(-1);
|
||||
}
|
||||
if ((frame>0) && (last_slot == (LTE_SLOTS_PER_FRAME-2))) {
|
||||
initial_sync(PHY_vars_UE_g[UE_id],normal_txrx);
|
||||
|
||||
/*
|
||||
write_output("dlchan00.m","dlch00",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][0][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
if (PHY_vars_UE_g[0]->lte_frame_parms.nb_antennas_rx>1)
|
||||
write_output("dlchan01.m","dlch01",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][1][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
write_output("dlchan10.m","dlch10",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][2][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
if (PHY_vars_UE_g[0]->lte_frame_parms.nb_antennas_rx>1)
|
||||
write_output("dlchan11.m","dlch11",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][3][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
|
||||
write_output("rxsig.m","rxs",PHY_vars_UE_g[0]->lte_ue_common_vars.rxdata[0],PHY_vars_UE_g[0]->lte_frame_parms.samples_per_tti*10,1,1);
|
||||
write_output("rxsigF.m","rxsF",PHY_vars_UE_g[0]->lte_ue_common_vars.rxdataF[0],2*PHY_vars_UE_g[0]->lte_frame_parms.symbols_per_tti*PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size,2,1);
|
||||
write_output("pbch_rxF_ext0.m","pbch_ext0",PHY_vars_UE_g[0]->lte_ue_pbch_vars[0]->rxdataF_ext[0],6*12*4,1,1);
|
||||
write_output("pbch_rxF_comp0.m","pbch_comp0",PHY_vars_UE_g[0]->lte_ue_pbch_vars[0]->rxdataF_comp[0],6*12*4,1,1);
|
||||
write_output("pbch_rxF_llr.m","pbch_llr",PHY_vars_UE_g[0]->lte_ue_pbch_vars[0]->llr,(frame_parms->Ncp==0) ? 1920 : 1728,1,4);
|
||||
*/
|
||||
}
|
||||
}
|
||||
#ifdef PRINT_STATS
|
||||
if(last_slot==2 && frame%10==0)
|
||||
if (UE_stats_th[UE_id])
|
||||
fprintf(UE_stats_th[UE_id],"%d %d\n",frame, PHY_vars_UE_g[UE_id]->bitrate[0]/1000);
|
||||
if (UE_stats[UE_id]) {
|
||||
len = dump_ue_stats (PHY_vars_UE_g[UE_id], stats_buffer, 0, normal_txrx, 0);
|
||||
rewind (UE_stats[UE_id]);
|
||||
fwrite (stats_buffer, 1, len, UE_stats[UE_id]);
|
||||
fflush(UE_stats[UE_id]);
|
||||
if(last_slot==2 && frame%10==0)
|
||||
if (UE_stats_th[UE_id])
|
||||
fprintf(UE_stats_th[UE_id],"%d %d\n",frame, PHY_vars_UE_g[UE_id]->bitrate[0]/1000);
|
||||
if (UE_stats[UE_id]) {
|
||||
len = dump_ue_stats (PHY_vars_UE_g[UE_id], stats_buffer, 0, normal_txrx, 0);
|
||||
rewind (UE_stats[UE_id]);
|
||||
fwrite (stats_buffer, 1, len, UE_stats[UE_id]);
|
||||
fflush(UE_stats[UE_id]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef Rel10
|
||||
for (RN_id=oai_emulation.info.first_rn_local;
|
||||
RN_id<oai_emulation.info.first_rn_local+oai_emulation.info.nb_rn_local;
|
||||
RN_id++) {
|
||||
// UE id and eNB id of the RN
|
||||
UE_id= oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local + RN_id; // NB_UE_INST + RN_id
|
||||
eNB_id= oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local + RN_id; // NB_eNB_INST + RN_id
|
||||
// currently only works in FDD
|
||||
if (oai_emulation.info.eMBMS_active_state == 3){
|
||||
r_mode = multicast_relay;
|
||||
LOG_I(EMU,"Activating the multicast relaying\n");
|
||||
}else {
|
||||
LOG_E(EMU,"Not supported option when relaying is enabled %d\n", r_mode);
|
||||
exit(-1);
|
||||
}
|
||||
if ( oai_emulation.info.frame_type == 0) {
|
||||
// RN == UE, do RX as in UE for SF0-SF5
|
||||
// we could add another arg, such as operation, to call the top func phy_procedures_UE_lte
|
||||
if (frame>0) {
|
||||
if (PHY_vars_UE_g[UE_id]->UE_mode[0] != NOT_SYNCHED) {
|
||||
LOG_D(EMU,"PHY procedures UE %d mode %d for frame %d, slot %d (subframe TX %d, RX %d)\n",
|
||||
UE_id, (r_mode == 0)?"Normal":"Relaying", frame, slot, next_slot >> 1,last_slot>>1);
|
||||
PHY_vars_UE_g[UE_id]->frame = frame;
|
||||
phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[UE_id], 0, abstraction_flag,normal_txrx, r_mode);
|
||||
} else if (last_slot == (LTE_SLOTS_PER_FRAME-2)) {
|
||||
initial_sync(PHY_vars_UE_g[UE_id],normal_txrx);
|
||||
}
|
||||
}
|
||||
|
||||
// RN == eNB, do Tx as in eNB for SF6-SF9
|
||||
LOG_D(EMU,"PHY procedures eNB %d mode %s for frame %d, slot %d (subframe TX %d, RX %d)\n",
|
||||
eNB_id, (r_mode == 0)?"Normal":"Relaying", frame, slot, next_slot >> 1,last_slot>>1);
|
||||
phy_procedures_eNB_lte (last_slot, next_slot, PHY_vars_eNB_g[eNB_id], abstraction_flag, r_mode);
|
||||
|
||||
}
|
||||
else{
|
||||
LOG_E(EMU,"TDD is not supported for multicast relaying %d\n", r_mode);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
emu_transport (frame, last_slot, next_slot,direction, oai_emulation.info.frame_type, ethernet_flag);
|
||||
if ((direction == SF_DL)|| (frame_parms->frame_type==0)){
|
||||
// consider only sec id 0
|
||||
|
||||
@@ -300,11 +300,14 @@ void init_oai_emulation() {
|
||||
oai_emulation.info.master_list=0;
|
||||
oai_emulation.info.nb_ue_remote=0;
|
||||
oai_emulation.info.nb_enb_remote=0;
|
||||
oai_emulation.info.nb_rn_remote=0;
|
||||
oai_emulation.info.first_ue_local=0;
|
||||
oai_emulation.info.first_enb_local=0;
|
||||
oai_emulation.info.first_rn_local=0;
|
||||
oai_emulation.info.master_id=0;
|
||||
oai_emulation.info.nb_ue_local= 1;//default 1 UE
|
||||
oai_emulation.info.nb_enb_local= 1;//default 1 eNB
|
||||
oai_emulation.info.nb_rn_local= 0;//default 0 RN : currently only applicable for eMBMS
|
||||
oai_emulation.info.ethernet_flag=0;
|
||||
oai_emulation.info.ocm_enabled=1;// flag ?
|
||||
oai_emulation.info.ocg_enabled=0;// flag c
|
||||
@@ -315,6 +318,7 @@ void init_oai_emulation() {
|
||||
oai_emulation.info.omv_enabled =0; // v flag
|
||||
oai_emulation.info.vcd_enabled=0;
|
||||
oai_emulation.info.cba_group_active=0;
|
||||
oai_emulation.info.eMBMS_active_state=0;
|
||||
oai_emulation.info.omg_model_enb=STATIC; //default to static mobility model
|
||||
oai_emulation.info.omg_model_ue=STATIC; //default to static mobility model
|
||||
oai_emulation.info.omg_model_ue_current=STATIC; //default to static mobility model
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "UTIL/OCG/OCG_extern.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "UTIL/OTG/otg_config.h"
|
||||
|
||||
#include "cor_SF_sim.h"
|
||||
|
||||
@@ -96,7 +97,7 @@ extern channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
|
||||
|
||||
extern mapping small_scale_names[];
|
||||
extern pdcp_mbms_t pdcp_mbms_array[MAX_MODULES][16*29];
|
||||
extern int eMBMS_active;
|
||||
//extern int eMBMS_active;
|
||||
|
||||
extern void help (void);
|
||||
|
||||
@@ -109,7 +110,7 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
while ((c = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hi:IJ:k:l:m:M:n:N:oO:p:P:rR:s:S:t:T:u:U:vVx:y:w:W:X:z:Z:", long_options, &option_index)) != -1) {
|
||||
while ((c = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hi:j:IJ:k:l:m:M:n:N:oO:p:P:rR:s:S:Q:t:T:u:U:vVx:y:w:W:X:z:Z:", long_options, &option_index)) != -1) {
|
||||
|
||||
switch (c) {
|
||||
case 0:
|
||||
@@ -140,7 +141,9 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
}
|
||||
break;
|
||||
case 'Q':
|
||||
eMBMS_active=1;
|
||||
//eMBMS_active=1;
|
||||
// 0 : not used (default), 1: eMBMS and RRC enabled, 2: eMBMS relaying and RRC enabled, 3: eMBMS enabled, RRC disabled, 3: eMBMS relaying enabled, RRC disabled
|
||||
oai_emulation.info.eMBMS_active_state = atoi (optarg);
|
||||
break;
|
||||
case 'R':
|
||||
oai_emulation.info.N_RB_DL = atoi (optarg);
|
||||
@@ -194,6 +197,10 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
set_sinr = 1;
|
||||
oai_emulation.info.ocm_enabled=0;
|
||||
break;
|
||||
case 'j' :
|
||||
// number of relay nodes: currently only applicable to eMBMS
|
||||
oai_emulation.info.nb_rn_local = atoi (optarg);
|
||||
break;
|
||||
case 'J':
|
||||
ue_connection_test=1;
|
||||
oai_emulation.info.ocm_enabled=0;
|
||||
@@ -379,7 +386,11 @@ void check_and_adjust_params() {
|
||||
LOG_E(EMU,"Enter fewer than %d eNBs for the moment or change the NUMBER_OF_UE_MAX\n", NUMBER_OF_eNB_MAX);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
if (oai_emulation.info.nb_rn_local > NUMBER_OF_RN_MAX) {
|
||||
LOG_E(EMU,"Enter fewer than %d RNs for the moment or change the NUMBER_OF_RN_MAX\n", NUMBER_OF_RN_MAX);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// fix ethernet and abstraction with RRC_CELLULAR Flag
|
||||
#ifdef RRC_CELLULAR
|
||||
abstraction_flag = 1;
|
||||
@@ -421,6 +432,8 @@ void check_and_adjust_params() {
|
||||
|
||||
NB_UE_INST = oai_emulation.info.nb_ue_local + oai_emulation.info.nb_ue_remote;
|
||||
NB_eNB_INST = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_enb_remote;
|
||||
NB_RN_INST = oai_emulation.info.nb_rn_local + oai_emulation.info.nb_rn_remote;
|
||||
|
||||
}
|
||||
|
||||
void init_omv() {
|
||||
@@ -533,7 +546,7 @@ void init_openair2() {
|
||||
#ifdef OPENAIR2
|
||||
s32 i;
|
||||
s32 UE_id;
|
||||
l2_init (&PHY_vars_eNB_g[0]->lte_frame_parms,eMBMS_active, oai_emulation.info.cba_group_active);
|
||||
l2_init (&PHY_vars_eNB_g[0]->lte_frame_parms,oai_emulation.info.eMBMS_active_state, oai_emulation.info.cba_group_active);
|
||||
printf ("after L2 init: Nid_cell %d\n", PHY_vars_eNB_g[0]->lte_frame_parms.Nid_cell);
|
||||
printf ("after L2 init: frame_type %d,tdd_config %d\n",
|
||||
PHY_vars_eNB_g[0]->lte_frame_parms.frame_type,
|
||||
@@ -736,7 +749,7 @@ void update_otg_eNB(int module_id, unsigned int ctime) {
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
if (oai_emulation.info.otg_enabled ==1 ) {
|
||||
|
||||
int dst_id;
|
||||
int dst_id, app_id;
|
||||
Packet_otg_elt *otg_pkt;
|
||||
|
||||
|
||||
@@ -744,28 +757,33 @@ void update_otg_eNB(int module_id, unsigned int ctime) {
|
||||
for_times += 1;
|
||||
// generate traffic if the ue is rrc reconfigured state
|
||||
if (mac_get_rrc_status(module_id, 1/*eNB_flag*/, dst_id) > 2 /*RRC_CONNECTED*/ ) {
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt));
|
||||
if_times += 1;
|
||||
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (u8*) packet_gen(module_id, dst_id + NB_eNB_INST, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
otg_times += 1;
|
||||
(otg_pkt->otg_pkt).rb_id = dst_id * NB_RB_MAX + DTCH;
|
||||
(otg_pkt->otg_pkt).module_id = module_id;
|
||||
(otg_pkt->otg_pkt).dst_id = dst_id;
|
||||
(otg_pkt->otg_pkt).mode = PDCP_DATA_PDU;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id]));
|
||||
LOG_I(EMU, "[eNB %d] ADD pkt to OTG buffer for dst %d on rb_id %d\n", (otg_pkt->otg_pkt).module_id, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id);
|
||||
} else {
|
||||
//LOG_I(EMU, "OTG returns null \n");
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
|
||||
for (app_id=0; app_id<MAX_NUM_APPLICATION; app_id++){
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt));
|
||||
if_times += 1;
|
||||
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (u8*) packet_gen(module_id, dst_id + NB_eNB_INST, app_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
otg_times += 1;
|
||||
(otg_pkt->otg_pkt).rb_id = dst_id * NB_RB_MAX + DTCH; // app could be binded to a given DRB
|
||||
(otg_pkt->otg_pkt).module_id = module_id;
|
||||
(otg_pkt->otg_pkt).dst_id = dst_id;
|
||||
(otg_pkt->otg_pkt).mode = PDCP_DATA_PDU;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id]));
|
||||
LOG_I(EMU, "[eNB %d] ADD pkt to OTG buffer with size %d for dst %d on rb_id %d for app id %d \n",
|
||||
(otg_pkt->otg_pkt).module_id, otg_pkt->otg_pkt.sdu_buffer_size, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id, app_id);
|
||||
} else {
|
||||
//LOG_I(EMU, "OTG returns null \n");
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
}
|
||||
//LOG_T(EMU,"[eNB %d] UE mod id %d is not connected\n", module_id, dst_id);
|
||||
//LOG_I(EMU,"HEAD of otg_pdcp_buffer[%d] is %p\n", module_id, pkt_list_get_head(&(otg_pdcp_buffer[module_id])));
|
||||
|
||||
}
|
||||
LOG_T(EMU,"[eNB %d] UE mod id %d is not connected\n", module_id, dst_id);
|
||||
//LOG_I(EMU,"HEAD of otg_pdcp_buffer[%d] is %p\n", module_id, pkt_list_get_head(&(otg_pdcp_buffer[module_id])));
|
||||
}
|
||||
|
||||
#ifdef Rel10
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#*****************************************************************************
|
||||
|
||||
# \file case01.py
|
||||
# \brief test case 01 for OAI
|
||||
# \brief test case 01 for OAI: compilations
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#*****************************************************************************
|
||||
|
||||
# \file case02.py
|
||||
# \brief test case 02 for OAI
|
||||
# \brief test case 02 for OAI: executions
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
|
||||
Reference in New Issue
Block a user