reset for remerging
This commit is contained in:
@@ -929,7 +929,7 @@ void calibrate_rf(openair0_device *device) {
|
||||
bladerf_set_loopback(brf->dev,BLADERF_LB_NONE);
|
||||
bladerf_set_gain(brf->dev, BLADERF_MODULE_RX, (unsigned int) device->openair0_cfg->rx_gain[0]-device->openair0_cfg[0].rx_gain_offset[0]);
|
||||
bladerf_set_gain(brf->dev, BLADERF_MODULE_TX, (unsigned int) device->openair0_cfg->tx_gain[0]);
|
||||
// write_output("blade_rf_test.m","rxs",calib_buff,RXDCLENGTH,1,1);
|
||||
// LOG_M("blade_rf_test.m","rxs",calib_buff,RXDCLENGTH,1,1);
|
||||
}
|
||||
|
||||
/*! \brief Initialize Openair BLADERF target. It returns 0 if OK
|
||||
|
||||
@@ -135,12 +135,6 @@ struct em1_private_s {
|
||||
extern struct em1_private_s *em1_devices[MAX_EM1_DEVICES];
|
||||
|
||||
/* em1_drv.c */
|
||||
#if 0
|
||||
static int em1_open(struct inode *inode, struct file *file);
|
||||
static int em1_release(struct inode *inode, struct file *file);
|
||||
static int __init em1_init(void);
|
||||
static void __exit em1_cleanup(void);
|
||||
#endif
|
||||
int em1_user_op_enter(struct em1_private_s *pv, wait_queue_t *wait,
|
||||
wait_queue_head_t *wh, int busy_flag, int new_state);
|
||||
void em1_user_op_leave(struct em1_private_s *pv, wait_queue_t *wait,
|
||||
@@ -153,9 +147,6 @@ ssize_t em1_write(struct file *file, const char __user *buf, size_t size, loff_t
|
||||
ssize_t em1_read(struct file *file, char __user *buf, size_t size, loff_t *ppos);
|
||||
|
||||
/* em1_dev.c */
|
||||
#if 0
|
||||
static irqreturn_t irq_handler(int irq, void *dev_id);
|
||||
#endif
|
||||
int __devinit em1_probe(struct pci_dev *dev, const struct pci_device_id *id);
|
||||
void __devexit em1_remove(struct pci_dev *dev);
|
||||
|
||||
@@ -184,14 +175,6 @@ struct em1_ioctl_fifo_params {
|
||||
size_t count;
|
||||
};
|
||||
|
||||
#if 0
|
||||
static int em1_ioctl_fifo_write(struct em1_private_s *pv,
|
||||
struct em1_ioctl_fifo_params *p);
|
||||
static int em1_ioctl_fifo_read(struct em1_private_s *pv,
|
||||
struct em1_ioctl_fifo_params *p);
|
||||
static int em1_ioctl_alloc(struct em1_private_s *pv, void **buf);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* c-file-style: "linux"
|
||||
|
||||
@@ -376,6 +376,7 @@ static void trx_usrp_end(openair0_device *device) {
|
||||
s->tx_md.end_of_burst = true;
|
||||
s->tx_stream->send("", 0, s->tx_md);
|
||||
s->tx_md.end_of_burst = false;
|
||||
sleep(1);
|
||||
#if defined(USRP_REC_PLAY)
|
||||
}
|
||||
#endif
|
||||
@@ -483,7 +484,11 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
|
||||
s->tx_md.start_of_burst = false;
|
||||
s->tx_md.end_of_burst = false;
|
||||
}
|
||||
|
||||
if(flags==10){ // fail safe mode
|
||||
s->tx_md.has_time_spec = false;
|
||||
s->tx_md.start_of_burst = false;
|
||||
s->tx_md.end_of_burst = true;
|
||||
}
|
||||
if (cc>1) {
|
||||
std::vector<void *> buff_ptrs;
|
||||
for (int i=0; i<cc; i++)
|
||||
|
||||
@@ -47,7 +47,7 @@ typedef struct {
|
||||
} iqrec_t;
|
||||
#define DEF_NB_SF 120000 // default nb of sf or ms to capture (2 minutes at 5MHz)
|
||||
#define DEF_SF_FILE "/home/nokia/iqfile" // default subframes file name
|
||||
#define DEF_SF_DELAY_READ 400 // default read delay µs (860=real)
|
||||
#define DEF_SF_DELAY_READ 700 // default read delay µs (860=real)
|
||||
#define DEF_SF_DELAY_WRITE 15 // default write delay µs (15=real)
|
||||
#define DEF_SF_NB_LOOP 5 // default nb loops
|
||||
|
||||
|
||||
@@ -182,16 +182,6 @@ static void get_sample_from_mobipass(queue_state_t *qstate, char *I, char *Q, ui
|
||||
struct mobipass_header *mh = NULL;
|
||||
uint32_t packet_timestamp = 0;
|
||||
|
||||
#if 0
|
||||
uint32_t old_start = qstate->from_mobipass.start;
|
||||
uint32_t old_len = qstate->from_mobipass.len;
|
||||
b = qstate->from_mobipass.buf[qstate->from_mobipass.start];
|
||||
mh = (struct mobipass_header *)(b+14);
|
||||
uint32_t old_pts = qstate->from_mobipass.len ? ntohl(mh->timestamp) : -1;
|
||||
b=NULL;
|
||||
mh=NULL;
|
||||
#endif
|
||||
|
||||
while (qstate->from_mobipass.len) {
|
||||
b = qstate->from_mobipass.buf[qstate->from_mobipass.start];
|
||||
mh = (struct mobipass_header *)(b+14);
|
||||
@@ -222,10 +212,6 @@ nodata:
|
||||
*Q = 0;
|
||||
|
||||
log_missed_sample(qstate, timestamp);
|
||||
|
||||
#if 0
|
||||
printf("no sample timestamp %u pt %u start %d old_start %d old_pt %u len %d old len %d\n", timestamp, packet_timestamp, qstate->from_mobipass.start, old_start, old_pts, qstate->from_mobipass.len, old_len);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* doesn't work with delay more than 1s */
|
||||
|
||||
@@ -4,6 +4,7 @@ To build the basic simulator:
|
||||
cd [openair top directory]
|
||||
. oaienv
|
||||
cd cmake_targets
|
||||
./build_oai -I -w USRP
|
||||
./build_oai --basic-simulator
|
||||
cd ../common/utils/T/tracer
|
||||
make
|
||||
@@ -20,14 +21,14 @@ In the other terminal, run:
|
||||
cd [openair top directory]
|
||||
cd cmake_targets/basic_simulator/enb
|
||||
export ENODEB=1
|
||||
sudo -E ./lte-softmodem -O [configuration file]
|
||||
sudo -E ./lte-softmodem -O [configuration file] --T_stdout 0
|
||||
[configuration file] is just a regular configuration file.
|
||||
The eNB needs an EPC.
|
||||
|
||||
To run the UE, open a terminal and run:
|
||||
cd [openair top directory]
|
||||
cd cmake_targets/basic_simulator/ue
|
||||
sudo ./lte-uesoftmodem -C 2680000000 -r 25
|
||||
sudo ./lte-uesoftmodem -C 2680000000 -r 25 --ue-rxgain 140
|
||||
Adapt the value of -r, it has to match the value N_RB_DL in the configuration
|
||||
file of the eNB. (Same for -C which should match the value downlink_frequency
|
||||
in the configuration file.)
|
||||
|
||||
@@ -225,14 +225,6 @@ int tcp_bridge_read(openair0_device *device, openair0_timestamp *timestamp, void
|
||||
|
||||
b = &t->b[t->bstart];
|
||||
|
||||
#if 0
|
||||
typedef struct {
|
||||
int32_t data[30720]; /* max 20MHz */
|
||||
unsigned long timestamp;
|
||||
int size;
|
||||
} input_buffer;
|
||||
#endif
|
||||
|
||||
if (b->timestamp != t->read_timestamp) abort();
|
||||
if (b->size != nsamps * 4) abort();
|
||||
|
||||
|
||||
@@ -4,13 +4,23 @@
|
||||
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR)
|
||||
# define NUMBER_OF_eNB_MAX 1
|
||||
# define NUMBER_OF_RU_MAX 2
|
||||
# define NUMBER_OF_UE_MAX 16
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
# ifndef UE_EXPANSION
|
||||
# define NUMBER_OF_UE_MAX 16
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
# else
|
||||
# define NUMBER_OF_UE_MAX 256
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 1
|
||||
# endif
|
||||
#else
|
||||
# define NUMBER_OF_eNB_MAX 7
|
||||
# define NUMBER_OF_RU_MAX 32
|
||||
# define NUMBER_OF_UE_MAX 20
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
# ifndef UE_EXPANSION
|
||||
# define NUMBER_OF_UE_MAX 20
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
# else
|
||||
# define NUMBER_OF_UE_MAX 256
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 1
|
||||
# endif
|
||||
# if defined(STANDALONE) && STANDALONE==1
|
||||
# undef NUMBER_OF_eNB_MAX
|
||||
# undef NUMBER_OF_UE_MAX
|
||||
@@ -19,7 +29,6 @@
|
||||
# define NUMBER_OF_UE_MAX 3
|
||||
# define NUMBER_OF_RU_MAX 3
|
||||
# endif
|
||||
|
||||
# if defined(LARGE_SCALE) && LARGE_SCALE
|
||||
# undef NUMBER_OF_eNB_MAX
|
||||
# undef NUMBER_OF_UE_MAX
|
||||
|
||||
@@ -48,7 +48,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -16;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -48,7 +48,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -16;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -52,7 +52,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
@@ -164,6 +164,8 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -52,7 +52,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
@@ -198,7 +198,9 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 1;
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
#pdsch_referenceSignalPower = -27;
|
||||
pdsch_referenceSignalPower = -30;
|
||||
pdsch_p_b = 0;
|
||||
|
||||
@@ -52,7 +52,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -39,7 +39,7 @@ eNBs =
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
@@ -55,7 +55,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -55,7 +55,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -11,14 +11,14 @@ RUs = (
|
||||
tr_preference = "udp_if4p5";
|
||||
nb_tx = 1;
|
||||
nb_rx = 1;
|
||||
max_pdschReferenceSignalPower = -15;
|
||||
max_rxgain = 120;
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 125;
|
||||
bands = [7,13];
|
||||
}
|
||||
);
|
||||
|
||||
log_config = {
|
||||
global_log_level ="debug";
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
|
||||
+1
-2
@@ -19,7 +19,7 @@ First, you must have all four openair SW directories, openair1, openair2, openai
|
||||
- libconfig++8-dev
|
||||
- libgtk-3-dev
|
||||
- libpgm-5.1 and libpgm-5.1-dev for distributed simulation with reliable multicast transmport
|
||||
- libxml2 and libxml2-dev and gccxml
|
||||
- libxml2 and libxml2-dev
|
||||
- libforms-bin libforms-dev
|
||||
- nettle-dev nettle-bin openssl libssl-dev
|
||||
- libatlas-base-dev and libatlas-headers (for Ubuntu 11.04, libatlas-dev instead of libatlas-headers)
|
||||
@@ -113,4 +113,3 @@ Please choose the web server that should be automatically configured to run phpM
|
||||
Web server to reconfigure automatically:
|
||||
[*] apache2
|
||||
[ ] lighttpd
|
||||
|
||||
+23
-39
@@ -216,7 +216,9 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx);
|
||||
#endif
|
||||
}
|
||||
//LOG_I(PHY,"eNB_uespec_RX proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);/////////////*********added
|
||||
|
||||
release_UE_in_freeList(eNB->Mod_id);
|
||||
|
||||
// UE-specific RX processing for subframe n
|
||||
if (nfapi_mode == 0 || nfapi_mode == 1) {
|
||||
phy_procedures_eNB_uespec_RX(eNB, proc);
|
||||
@@ -237,31 +239,35 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
eNB->UL_INFO.subframe = proc->subframe_rx;
|
||||
eNB->UL_INFO.module_id = eNB->Mod_id;
|
||||
eNB->UL_INFO.CC_id = eNB->CC_id;
|
||||
//LOG_I(PHY,"UL_INFO %d.%d \n", eNB->UL_INFO.frame, eNB->UL_INFO.subframe);/////////////*********added
|
||||
|
||||
eNB->if_inst->UL_indication(&eNB->UL_INFO);
|
||||
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
|
||||
/* this conflict resolution may be totally wrong, to be tested */
|
||||
/* CONFLICT RESOLUTION: BEGIN */
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 );
|
||||
if(oai_exit) return(-1);
|
||||
if(eNB->single_thread_flag || get_nprocs() <= 4){
|
||||
#ifndef PHY_TX_THREAD
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
#endif
|
||||
}
|
||||
/* CONFLICT RESOLUTION: what about this release_thread call, has it to be done? if yes, where? */
|
||||
//if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) return(-1);
|
||||
/* CONFLICT RESOLUTION: END */
|
||||
|
||||
stop_meas( &softmodem_stats_rxtx_sf );
|
||||
|
||||
LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d]\n", __FUNCTION__, proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);
|
||||
|
||||
#if 0
|
||||
LOG_D(PHY, "rxtx:%lld nfapi:%lld phy:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ",
|
||||
softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now,
|
||||
TICK_TO_US(eNB->phy_proc),
|
||||
TICK_TO_US(eNB->phy_proc_tx),
|
||||
TICK_TO_US(eNB->phy_proc_rx),
|
||||
TICK_TO_US(eNB->rx_prach),
|
||||
TICK_TO_US(eNB->ofdm_mod_stats),
|
||||
softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now);
|
||||
TICK_TO_US(eNB->ofdm_mod_stats)
|
||||
);
|
||||
LOG_D(PHY,
|
||||
"dlsch[enc:%lld mod:%lld scr:%lld rm:%lld t:%lld i:%lld] rx_dft:%lld ",
|
||||
TICK_TO_US(eNB->dlsch_encoding_stats),
|
||||
@@ -293,7 +299,6 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
TICK_TO_US(eNB->ulsch_tc_intl1_stats),
|
||||
TICK_TO_US(eNB->ulsch_tc_intl2_stats)
|
||||
);
|
||||
#endif
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -417,11 +422,13 @@ static void* eNB_thread_rxtx( void* param ) {
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
}
|
||||
pthread_mutex_unlock( &proc->mutex_rxtx );
|
||||
if(get_nprocs() >= 8) wakeup_tx(eNB,eNB->proc.ru_proc);
|
||||
else if(get_nprocs() > 4)
|
||||
{
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
wakeup_txfh(proc,eNB->proc.ru_proc);
|
||||
if (nfapi_mode!=2){
|
||||
if(get_nprocs() >= 8) wakeup_tx(eNB,eNB->proc.ru_proc);
|
||||
else
|
||||
{
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
wakeup_txfh(proc,eNB->proc.ru_proc);
|
||||
}
|
||||
}
|
||||
|
||||
} // while !oai_exit
|
||||
@@ -434,30 +441,6 @@ static void* eNB_thread_rxtx( void* param ) {
|
||||
return &eNB_thread_rxtx_status;
|
||||
}
|
||||
|
||||
|
||||
#if 0 //defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
// Wait for eNB application initialization to be complete (eNB registration to MME)
|
||||
static void wait_system_ready (char *message, volatile int *start_flag) {
|
||||
|
||||
static char *indicator[] = {". ", ".. ", "... ", ".... ", ".....",
|
||||
" ....", " ...", " ..", " .", " "};
|
||||
int i = 0;
|
||||
|
||||
while ((!oai_exit) && (*start_flag == 0)) {
|
||||
LOG_N(EMU, message, indicator[i]);
|
||||
fflush(stdout);
|
||||
i = (i + 1) % (sizeof(indicator) / sizeof(indicator[0]));
|
||||
usleep(200000);
|
||||
}
|
||||
|
||||
LOG_D(EMU,"\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string,RU_t *ru)
|
||||
{
|
||||
eNB_proc_t *proc = &eNB->proc;
|
||||
@@ -778,6 +761,7 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*!
|
||||
* \brief The prach receive thread of eNB.
|
||||
* \param param is a \ref eNB_proc_t structure which contains the info what to process.
|
||||
@@ -1075,7 +1059,7 @@ void kill_eNB_proc(int inst) {
|
||||
pthread_join( proc->pthread_prach_br, (void**)&status );
|
||||
pthread_mutex_destroy( &proc->mutex_prach_br );
|
||||
pthread_cond_destroy( &proc->cond_prach_br );
|
||||
#endif
|
||||
#endif
|
||||
LOG_I(PHY, "Destroying UL_INFO mutex\n");
|
||||
pthread_mutex_destroy(&eNB->UL_INFO_mutex);
|
||||
for (i=0;i<2;i++) {
|
||||
@@ -1140,7 +1124,7 @@ void init_transport(PHY_VARS_eNB *eNB) {
|
||||
LOG_I(PHY, "Initialise transport\n");
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH, UE %d\n",i);
|
||||
LOG_D(PHY,"Allocating Transport Channel Buffers for DLSCH, UE %d\n",i);
|
||||
for (j=0; j<2; j++) {
|
||||
eNB->dlsch[i][j] = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL,0,fp);
|
||||
if (!eNB->dlsch[i][j]) {
|
||||
@@ -1152,7 +1136,7 @@ void init_transport(PHY_VARS_eNB *eNB) {
|
||||
}
|
||||
}
|
||||
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH, UE %d\n",i);
|
||||
LOG_D(PHY,"Allocating Transport Channel Buffer for ULSCH, UE %d\n",i);
|
||||
eNB->ulsch[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,fp->N_RB_UL, 0);
|
||||
|
||||
if (!eNB->ulsch[1+i]) {
|
||||
|
||||
+394
-38
@@ -114,6 +114,7 @@ static int DEFENBS[] = {0};
|
||||
|
||||
#include "T.h"
|
||||
|
||||
#include "pdcp.h"
|
||||
|
||||
extern volatile int oai_exit;
|
||||
extern int emulate_rf;
|
||||
@@ -681,6 +682,19 @@ void fh_if4p5_north_out(RU_t *ru) {
|
||||
|
||||
}
|
||||
|
||||
/* add fail safe for late command */
|
||||
typedef enum {
|
||||
STATE_BURST_NORMAL = 0,
|
||||
STATE_BURST_TERMINATE = 1,
|
||||
STATE_BURST_STOP_1 = 2,
|
||||
STATE_BURST_STOP_2 = 3,
|
||||
STATE_BURST_RESTART = 4,
|
||||
} late_control_e;
|
||||
|
||||
volatile late_control_e late_control=STATE_BURST_NORMAL;
|
||||
|
||||
/* add fail safe for late command end */
|
||||
|
||||
static void* emulatedRF_thread(void* param) {
|
||||
RU_proc_t *proc = (RU_proc_t *) param;
|
||||
int microsec = 500; // length of time to sleep, in miliseconds
|
||||
@@ -746,9 +760,12 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
|
||||
|
||||
proc->timestamp_rx = ts-ru->ts_offset;
|
||||
|
||||
//AssertFatal(rxs == fp->samples_per_tti,
|
||||
//"rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs);
|
||||
if (rxs != fp->samples_per_tti) LOG_E(PHY, "rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs);
|
||||
// AssertFatal(rxs == fp->samples_per_tti,
|
||||
// "rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs);
|
||||
if(rxs != fp->samples_per_tti){
|
||||
LOG_E(PHY,"rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs);
|
||||
late_control=STATE_BURST_TERMINATE;
|
||||
}
|
||||
|
||||
if (proc->first_rx == 1) {
|
||||
ru->ts_offset = proc->timestamp_rx;
|
||||
@@ -766,6 +783,16 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
|
||||
proc->subframe_rx = (proc->timestamp_rx / fp->samples_per_tti)%10;
|
||||
// synchronize first reception to frame 0 subframe 0
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
proc->timestamp_phy_tx = proc->timestamp_rx+((sf_ahead-1)*fp->samples_per_tti);
|
||||
proc->subframe_phy_tx = (proc->subframe_rx+(sf_ahead-1))%10;
|
||||
proc->frame_phy_tx = (proc->subframe_rx>(9-(sf_ahead-1))) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
|
||||
#else
|
||||
proc->timestamp_tx = proc->timestamp_rx+(sf_ahead*fp->samples_per_tti);
|
||||
proc->subframe_tx = (proc->subframe_rx+sf_ahead)%10;
|
||||
proc->frame_tx = (proc->subframe_rx>(9-sf_ahead)) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
|
||||
#endif
|
||||
|
||||
//proc->timestamp_tx = proc->timestamp_rx+(sf_ahead*fp->samples_per_tti);
|
||||
//proc->subframe_tx = (proc->subframe_rx+sf_ahead)%10;
|
||||
//proc->frame_tx = (proc->subframe_rx>(9-sf_ahead)) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
|
||||
@@ -804,8 +831,12 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
|
||||
|
||||
if (rxs != fp->samples_per_tti)
|
||||
{
|
||||
#if defined(USRP_REC_PLAY)
|
||||
exit_fun("Exiting IQ record/playback");
|
||||
#else
|
||||
//exit_fun( "problem receiving samples" );
|
||||
LOG_E(PHY, "problem receiving samples");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -840,7 +871,7 @@ void tx_rf(RU_t *ru) {
|
||||
(prevSF_type == SF_UL) &&
|
||||
(nextSF_type == SF_DL)) {
|
||||
flags = 2; // start of burst
|
||||
sf_extension = ru->N_TA_offset<<1;
|
||||
sf_extension = ru->N_TA_offset;
|
||||
}
|
||||
|
||||
if ((fp->frame_type == TDD) &&
|
||||
@@ -848,15 +879,55 @@ void tx_rf(RU_t *ru) {
|
||||
(prevSF_type == SF_UL) &&
|
||||
(nextSF_type == SF_UL)) {
|
||||
flags = 4; // start of burst and end of burst (only one DL SF between two UL)
|
||||
sf_extension = ru->N_TA_offset<<1;
|
||||
sf_extension = ru->N_TA_offset;
|
||||
}
|
||||
|
||||
#if defined(__x86_64) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
sf_extension = (sf_extension)&0xfffffff8;
|
||||
#else
|
||||
sf_extension = (sf_extension)&0xfffffffc;
|
||||
#endif
|
||||
#elif defined(__arm__)
|
||||
sf_extension = (sf_extension)&0xfffffffc;
|
||||
#endif
|
||||
|
||||
for (i=0; i<ru->nb_tx; i++)
|
||||
txp[i] = (void*)&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_tti)-sf_extension];
|
||||
|
||||
/* add fail safe for late command */
|
||||
if(late_control!=STATE_BURST_NORMAL){//stop burst
|
||||
switch (late_control) {
|
||||
case STATE_BURST_TERMINATE:
|
||||
flags=10; // end of burst and no time spec
|
||||
late_control=STATE_BURST_STOP_1;
|
||||
break;
|
||||
|
||||
case STATE_BURST_STOP_1:
|
||||
flags=0; // no send
|
||||
late_control=STATE_BURST_STOP_2;
|
||||
return;//no send
|
||||
break;
|
||||
|
||||
case STATE_BURST_STOP_2:
|
||||
flags=0; // no send
|
||||
late_control=STATE_BURST_RESTART;
|
||||
return;//no send
|
||||
break;
|
||||
|
||||
case STATE_BURST_RESTART:
|
||||
flags=2; // start burst
|
||||
late_control=STATE_BURST_NORMAL;
|
||||
break;
|
||||
default:
|
||||
LOG_D(PHY,"[TXPATH] RU %d late_control %d not implemented\n",ru->idx, late_control);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* add fail safe for late command end */
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_RU, proc->subframe_tx );
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-ru->openair0_cfg.tx_sample_advance)&0xffffffff );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
||||
// prepare tx buffer pointers
|
||||
@@ -873,8 +944,11 @@ void tx_rf(RU_t *ru) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
|
||||
|
||||
AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
|
||||
|
||||
// AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
|
||||
if( (txs != siglen+sf_extension) && (late_control==STATE_BURST_NORMAL) ){ /* add fail safe for late command */
|
||||
late_control=STATE_BURST_TERMINATE;
|
||||
LOG_E(PHY,"TX : Timeout (sent %d/%d) state =%d\n",txs, siglen,late_control);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1183,13 +1257,14 @@ void wakeup_eNBs(RU_t *ru) {
|
||||
LOG_D(PHY,"wakeup_eNBs (num %d) for RU %d ru->eNB_top:%p\n",ru->num_eNB,ru->idx, ru->eNB_top);
|
||||
|
||||
|
||||
if (ru->num_eNB==1 && ru->eNB_top!=0 && get_nprocs() <= 4) {
|
||||
if ((ru->num_eNB==1 && ru->eNB_top!=0 && get_nprocs() <= 4) || single_thread_flag) {
|
||||
// call eNB function directly
|
||||
|
||||
char string[20];
|
||||
sprintf(string,"Incoming RU %d",ru->idx);
|
||||
LOG_D(PHY,"RU %d Call eNB_top\n",ru->idx);
|
||||
ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string,ru);
|
||||
ru->proc.emulate_rf_busy = 0;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1203,9 +1278,7 @@ void wakeup_eNBs(RU_t *ru) {
|
||||
{
|
||||
LOG_E(PHY,"could not wakeup eNB rxtx process for subframe %d\n", ru->proc.subframe_rx);
|
||||
}
|
||||
if(!eNB_list[i]->single_thread_flag){
|
||||
ru->proc.emulate_rf_busy = 0;
|
||||
}
|
||||
ru->proc.emulate_rf_busy = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1344,8 +1417,8 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
|
||||
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
||||
|
||||
cfg->tx_gain[i] = ru->att_tx;
|
||||
cfg->rx_gain[i] = ru->max_rxgain-ru->att_rx;
|
||||
cfg->tx_gain[i] = (double)ru->att_tx;
|
||||
cfg->rx_gain[i] = ru->max_rxgain-(double)ru->att_rx;
|
||||
|
||||
cfg->configFilename = rf_config_file;
|
||||
printf("channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f\n",
|
||||
@@ -1442,6 +1515,12 @@ static void* ru_stats_thread(void* param) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
int first_phy_tx = 1;
|
||||
volatile int16_t phy_tx_txdataF_end;
|
||||
volatile int16_t phy_tx_end;
|
||||
#endif
|
||||
|
||||
static void* ru_thread_tx( void* param ) {
|
||||
RU_t *ru = (RU_t*)param;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
@@ -1456,6 +1535,7 @@ static void* ru_thread_tx( void* param ) {
|
||||
//wait_sync("ru_thread_tx");
|
||||
|
||||
wait_on_condition(&proc->mutex_FH1,&proc->cond_FH1,&proc->instance_cnt_FH1,"ru_thread_tx");
|
||||
|
||||
|
||||
printf( "ru_thread_tx ready\n");
|
||||
while (!oai_exit) {
|
||||
@@ -1511,6 +1591,9 @@ static void* ru_thread( void* param ) {
|
||||
|
||||
// set default return value
|
||||
ru_thread_status = 0;
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
dlsch_ue_select_tbl_in_use = 1;
|
||||
#endif
|
||||
|
||||
|
||||
// set default return value
|
||||
@@ -1615,20 +1698,38 @@ static void* ru_thread( void* param ) {
|
||||
if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&subframe);
|
||||
else AssertFatal(1==0, "No fronthaul interface at south port");
|
||||
|
||||
/*
|
||||
LOG_D(PHY,"AFTER fh_south_in - SFN/SF:%d%d RU->proc[RX:%d%d TX:%d%d] RC.eNB[0][0]:[RX:%d%d TX(SFN):%d]\n",
|
||||
frame,subframe,
|
||||
proc->frame_rx,proc->subframe_rx,
|
||||
proc->frame_tx,proc->subframe_tx,
|
||||
RC.eNB[0][0]->proc.frame_rx,RC.eNB[0][0]->proc.subframe_rx,
|
||||
RC.eNB[0][0]->proc.frame_tx);
|
||||
#ifdef PHY_TX_THREAD
|
||||
if(first_phy_tx == 0)
|
||||
{
|
||||
phy_tx_end = 0;
|
||||
phy_tx_txdataF_end = 0;
|
||||
if(pthread_mutex_lock(&ru->proc.mutex_phy_tx) != 0){
|
||||
LOG_E( PHY, "[RU] ERROR pthread_mutex_lock for phy tx thread (IC %d)\n", ru->proc.instance_cnt_phy_tx);
|
||||
exit_fun( "error locking mutex_rxtx" );
|
||||
}
|
||||
if (ru->proc.instance_cnt_phy_tx==-1) {
|
||||
++ru->proc.instance_cnt_phy_tx;
|
||||
|
||||
// the thread can now be woken up
|
||||
AssertFatal(pthread_cond_signal(&ru->proc.cond_phy_tx) == 0, "ERROR pthread_cond_signal for phy_tx thread\n");
|
||||
}else{
|
||||
LOG_E(PHY,"phy tx thread busy, skipping\n");
|
||||
++ru->proc.instance_cnt_phy_tx;
|
||||
}
|
||||
pthread_mutex_unlock( &ru->proc.mutex_phy_tx );
|
||||
} else {
|
||||
phy_tx_end = 1;
|
||||
phy_tx_txdataF_end = 1;
|
||||
}
|
||||
first_phy_tx = 0;
|
||||
#endif
|
||||
|
||||
|
||||
LOG_D(PHY,"RU thread (do_prach %d, is_prach_subframe %d), received frame %d, subframe %d\n",
|
||||
ru->do_prach,
|
||||
is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx),
|
||||
proc->frame_rx,proc->subframe_rx);
|
||||
*/
|
||||
if (oai_exit) break;
|
||||
|
||||
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
||||
wakeup_prach_ru(ru);
|
||||
}
|
||||
@@ -1649,10 +1750,39 @@ static void* ru_thread( void* param ) {
|
||||
// If this proc is to provide synchronization, do so
|
||||
wakeup_slaves(proc);
|
||||
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use;
|
||||
dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
|
||||
memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
|
||||
memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
|
||||
if (pthread_mutex_lock(&ru->proc.mutex_pre_scd)!= 0) {
|
||||
LOG_E( PHY, "[eNB] error locking proc mutex for eNB pre scd\n");
|
||||
exit_fun("error locking mutex_time");
|
||||
}
|
||||
|
||||
ru->proc.instance_pre_scd++;
|
||||
|
||||
if (ru->proc.instance_pre_scd == 0) {
|
||||
if (pthread_cond_signal(&ru->proc.cond_pre_scd) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB pre scd\n" );
|
||||
exit_fun( "ERROR pthread_cond_signal cond_pre_scd" );
|
||||
}
|
||||
}else{
|
||||
LOG_E( PHY, "[eNB] frame %d subframe %d rxtx busy instance_pre_scd %d\n",
|
||||
frame,subframe,ru->proc.instance_pre_scd );
|
||||
}
|
||||
|
||||
if (pthread_mutex_unlock(&ru->proc.mutex_pre_scd)!= 0) {
|
||||
LOG_E( PHY, "[eNB] error unlocking mutex_pre_scd mutex for eNB pre scd\n");
|
||||
exit_fun("error unlocking mutex_pre_scd");
|
||||
}
|
||||
#endif
|
||||
|
||||
// wakeup all eNB processes waiting for this RU
|
||||
if (ru->num_eNB>0) wakeup_eNBs(ru);
|
||||
|
||||
if(get_nprocs() <= 4 || single_thread_flag){
|
||||
#ifndef PHY_TX_THREAD
|
||||
if(get_nprocs() <= 4 || ru->num_eNB==0 || single_thread_flag){
|
||||
// do TX front-end processing if needed (precoding and/or IDFTs)
|
||||
if (ru->feptx_prec) ru->feptx_prec(ru);
|
||||
|
||||
@@ -1666,7 +1796,16 @@ static void* ru_thread( void* param ) {
|
||||
}
|
||||
proc->emulate_rf_busy = 0;
|
||||
}
|
||||
#else
|
||||
struct timespec time_req, time_rem;
|
||||
time_req.tv_sec = 0;
|
||||
time_req.tv_nsec = 10000;
|
||||
|
||||
while((!oai_exit)&&(phy_tx_end == 0)){
|
||||
nanosleep(&time_req,&time_rem);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1746,8 +1885,8 @@ void *ru_thread_synch(void *arg) {
|
||||
/*
|
||||
if ((peak_val > 300000) && (sync_pos > 0)) {
|
||||
// if (sync_pos++ > 3) {
|
||||
write_output("ru_sync.m","sync",(void*)&sync_corr[0],fp->samples_per_tti*5,1,2);
|
||||
write_output("ru_rx.m","rxs",(void*)ru->ru_time.rxdata[0][0],fp->samples_per_tti*10,1,1);
|
||||
LOG_M("ru_sync.m","sync",(void*)&sync_corr[0],fp->samples_per_tti*5,1,2);
|
||||
LOG_M("ru_rx.m","rxs",(void*)ru->ru_time.rxdata[0][0],fp->samples_per_tti*10,1,1);
|
||||
exit(-1);
|
||||
}
|
||||
*/
|
||||
@@ -1763,6 +1902,168 @@ void *ru_thread_synch(void *arg) {
|
||||
|
||||
}
|
||||
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
void* pre_scd_thread( void* param ){
|
||||
static int eNB_pre_scd_status;
|
||||
protocol_ctxt_t ctxt;
|
||||
int frame;
|
||||
int subframe;
|
||||
int min_rb_unit[MAX_NUM_CCs];
|
||||
int CC_id;
|
||||
int Mod_id;
|
||||
RU_t *ru = (RU_t*)param;
|
||||
Mod_id = ru->eNB_list[0]->Mod_id;
|
||||
|
||||
frame = 0;
|
||||
subframe = 4;
|
||||
thread_top_init("pre_scd_thread",0,870000,1000000,1000000);
|
||||
|
||||
while (!oai_exit) {
|
||||
if(oai_exit){
|
||||
break;
|
||||
}
|
||||
pthread_mutex_lock(&ru->proc.mutex_pre_scd );
|
||||
if (ru->proc.instance_pre_scd < 0) {
|
||||
pthread_cond_wait(&ru->proc.cond_pre_scd, &ru->proc.mutex_pre_scd);
|
||||
}
|
||||
pthread_mutex_unlock(&ru->proc.mutex_pre_scd);
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, Mod_id, ENB_FLAG_YES,
|
||||
NOT_A_RNTI, frame, subframe,Mod_id);
|
||||
pdcp_run(&ctxt);
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
rrc_rx_tx(&ctxt, CC_id);
|
||||
min_rb_unit[CC_id] = get_min_rb_unit(Mod_id, CC_id);
|
||||
}
|
||||
|
||||
pre_scd_nb_rbs_required(Mod_id, frame, subframe,min_rb_unit,pre_nb_rbs_required[new_dlsch_ue_select_tbl_in_use]);
|
||||
|
||||
if (subframe==9) {
|
||||
subframe=0;
|
||||
frame++;
|
||||
frame&=1023;
|
||||
} else {
|
||||
subframe++;
|
||||
}
|
||||
pthread_mutex_lock(&ru->proc.mutex_pre_scd );
|
||||
ru->proc.instance_pre_scd--;
|
||||
pthread_mutex_unlock(&ru->proc.mutex_pre_scd);
|
||||
}
|
||||
eNB_pre_scd_status = 0;
|
||||
return &eNB_pre_scd_status;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
/*!
|
||||
* \brief The phy tx thread of eNB.
|
||||
* \param param is a \ref eNB_proc_t structure which contains the info what to process.
|
||||
* \returns a pointer to an int. The storage is not on the heap and must not be freed.
|
||||
*/
|
||||
static void* eNB_thread_phy_tx( void* param ) {
|
||||
static int eNB_thread_phy_tx_status;
|
||||
|
||||
|
||||
RU_t *ru = (RU_t*)param;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
PHY_VARS_eNB **eNB_list = ru->eNB_list;
|
||||
|
||||
eNB_rxtx_proc_t proc_rxtx;
|
||||
|
||||
// set default return value
|
||||
eNB_thread_phy_tx_status = 0;
|
||||
|
||||
thread_top_init("eNB_thread_phy_tx",1,500000L,1000000L,20000000L);
|
||||
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
if (oai_exit) break;
|
||||
|
||||
|
||||
if (wait_on_condition(&proc->mutex_phy_tx,&proc->cond_phy_tx,&proc->instance_cnt_phy_tx,"eNB_phy_tx_thread") < 0) break;
|
||||
|
||||
LOG_D(PHY,"Running eNB phy tx procedures\n");
|
||||
if(ru->num_eNB == 1){
|
||||
proc_rxtx.subframe_tx = proc->subframe_phy_tx;
|
||||
proc_rxtx.frame_tx = proc->frame_phy_tx;
|
||||
phy_procedures_eNB_TX(eNB_list[0], &proc_rxtx, 1);
|
||||
phy_tx_txdataF_end = 1;
|
||||
if(pthread_mutex_lock(&ru->proc.mutex_rf_tx) != 0){
|
||||
LOG_E( PHY, "[RU] ERROR pthread_mutex_lock for rf tx thread (IC %d)\n", ru->proc.instance_cnt_rf_tx);
|
||||
exit_fun( "error locking mutex_rf_tx" );
|
||||
}
|
||||
if (ru->proc.instance_cnt_rf_tx==-1) {
|
||||
++ru->proc.instance_cnt_rf_tx;
|
||||
ru->proc.frame_tx = proc->frame_phy_tx;
|
||||
ru->proc.subframe_tx = proc->subframe_phy_tx;
|
||||
ru->proc.timestamp_tx = proc->timestamp_phy_tx;
|
||||
|
||||
// the thread can now be woken up
|
||||
AssertFatal(pthread_cond_signal(&ru->proc.cond_rf_tx) == 0, "ERROR pthread_cond_signal for rf_tx thread\n");
|
||||
}else{
|
||||
LOG_E(PHY,"rf tx thread busy, skipping\n");
|
||||
late_control=STATE_BURST_TERMINATE;
|
||||
}
|
||||
pthread_mutex_unlock( &ru->proc.mutex_rf_tx );
|
||||
}
|
||||
if (release_thread(&proc->mutex_phy_tx,&proc->instance_cnt_phy_tx,"eNB_thread_phy_tx") < 0) break;
|
||||
phy_tx_end = 1;
|
||||
}
|
||||
|
||||
LOG_I(PHY, "Exiting eNB thread PHY TX\n");
|
||||
|
||||
eNB_thread_phy_tx_status = 0;
|
||||
return &eNB_thread_phy_tx_status;
|
||||
}
|
||||
|
||||
|
||||
static void* rf_tx( void* param ) {
|
||||
static int rf_tx_status;
|
||||
|
||||
RU_t *ru = (RU_t*)param;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
|
||||
// set default return value
|
||||
rf_tx_status = 0;
|
||||
|
||||
thread_top_init("rf_tx",1,500000L,1000000L,20000000L);
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
if (oai_exit) break;
|
||||
|
||||
|
||||
if (wait_on_condition(&proc->mutex_rf_tx,&proc->cond_rf_tx,&proc->instance_cnt_rf_tx,"rf_tx_thread") < 0) break;
|
||||
|
||||
LOG_D(PHY,"Running eNB rf tx procedures\n");
|
||||
if(ru->num_eNB == 1){
|
||||
// do TX front-end processing if needed (precoding and/or IDFTs)
|
||||
if (ru->feptx_prec) ru->feptx_prec(ru);
|
||||
// do OFDM if needed
|
||||
if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru);
|
||||
if(!emulate_rf){
|
||||
// do outgoing fronthaul (south) if needed
|
||||
if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru);
|
||||
|
||||
if (ru->fh_north_out) ru->fh_north_out(ru);
|
||||
}
|
||||
}
|
||||
if (release_thread(&proc->mutex_rf_tx,&proc->instance_cnt_rf_tx,"rf_tx") < 0) break;
|
||||
if(proc->instance_cnt_rf_tx >= 0){
|
||||
late_control=STATE_BURST_TERMINATE;
|
||||
LOG_E(PHY,"detect rf tx busy change mode TX failsafe\n");
|
||||
}
|
||||
}
|
||||
|
||||
LOG_I(PHY, "Exiting rf TX\n");
|
||||
|
||||
rf_tx_status = 0;
|
||||
return &rf_tx_status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int start_if(struct RU_t_s *ru,struct PHY_VARS_eNB_s *eNB) {
|
||||
@@ -1854,6 +2155,15 @@ void init_RU_proc(RU_t *ru) {
|
||||
pthread_cond_init( &proc->cond_prach_br, NULL);
|
||||
pthread_attr_init( &proc->attr_prach_br);
|
||||
#endif
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
proc->instance_cnt_phy_tx = -1;
|
||||
pthread_mutex_init( &proc->mutex_phy_tx, NULL);
|
||||
pthread_cond_init( &proc->cond_phy_tx, NULL);
|
||||
proc->instance_cnt_rf_tx = -1;
|
||||
pthread_mutex_init( &proc->mutex_rf_tx, NULL);
|
||||
pthread_cond_init( &proc->cond_rf_tx, NULL);
|
||||
#endif
|
||||
|
||||
#ifndef DEADLINE_SCHEDULER
|
||||
attr_FH = &proc->attr_FH;
|
||||
@@ -1868,6 +2178,21 @@ void init_RU_proc(RU_t *ru) {
|
||||
#endif
|
||||
|
||||
pthread_create( &proc->pthread_FH, attr_FH, ru_thread, (void*)ru );
|
||||
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
proc->instance_pre_scd = -1;
|
||||
pthread_mutex_init( &proc->mutex_pre_scd, NULL);
|
||||
pthread_cond_init( &proc->cond_pre_scd, NULL);
|
||||
pthread_create(&proc->pthread_pre_scd, NULL, pre_scd_thread, (void*)ru);
|
||||
pthread_setname_np(proc->pthread_pre_scd, "pre_scd_thread");
|
||||
#endif
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
pthread_create( &proc->pthread_phy_tx, NULL, eNB_thread_phy_tx, (void*)ru );
|
||||
pthread_setname_np( proc->pthread_phy_tx, "phy_tx_thread" );
|
||||
pthread_create( &proc->pthread_rf_tx, NULL, rf_tx, (void*)ru );
|
||||
#endif
|
||||
|
||||
if(emulate_rf)
|
||||
pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void*)proc );
|
||||
|
||||
@@ -1956,10 +2281,10 @@ void kill_RU_proc(int inst)
|
||||
pthread_cond_signal(&proc->cond_asynch_rxtx);
|
||||
pthread_mutex_unlock(&proc->mutex_asynch_rxtx);
|
||||
|
||||
LOG_D(PHY, "Joining pthread_FH\n");
|
||||
/*LOG_D(PHY, "Joining pthread_FH\n");
|
||||
pthread_join(proc->pthread_FH, NULL);
|
||||
LOG_D(PHY, "Joining pthread_FHTX\n");
|
||||
pthread_join(proc->pthread_FH1, NULL);
|
||||
pthread_join(proc->pthread_FH1, NULL);*/
|
||||
if (ru->function == NGFI_RRU_IF4p5) {
|
||||
LOG_D(PHY, "Joining pthread_prach\n");
|
||||
pthread_join(proc->pthread_prach, NULL);
|
||||
@@ -2125,12 +2450,12 @@ void configure_rru(int idx,
|
||||
ru->frame_parms.dl_CarrierFreq = config->tx_freq[0];
|
||||
ru->frame_parms.ul_CarrierFreq = config->rx_freq[0];
|
||||
if (ru->frame_parms.dl_CarrierFreq == ru->frame_parms.ul_CarrierFreq) {
|
||||
ru->frame_parms.frame_type = TDD;
|
||||
ru->frame_parms.tdd_config = config->tdd_config[0];
|
||||
ru->frame_parms.tdd_config_S = config->tdd_config_S[0];
|
||||
LOG_I(PHY,"Setting RRU to TDD frame type\n");
|
||||
ru->frame_parms.frame_type = TDD;
|
||||
ru->frame_parms.tdd_config = config->tdd_config[0];
|
||||
ru->frame_parms.tdd_config_S = config->tdd_config_S[0];
|
||||
}
|
||||
else
|
||||
ru->frame_parms.frame_type = FDD;
|
||||
else ru->frame_parms.frame_type = FDD;
|
||||
ru->att_tx = config->att_tx[0];
|
||||
ru->att_rx = config->att_rx[0];
|
||||
ru->frame_parms.N_RB_DL = config->N_RB_DL[0];
|
||||
@@ -2138,9 +2463,9 @@ void configure_rru(int idx,
|
||||
ru->frame_parms.threequarter_fs = config->threequarter_fs[0];
|
||||
ru->frame_parms.pdsch_config_common.referenceSignalPower = ru->max_pdschReferenceSignalPower-config->att_tx[0];
|
||||
if (ru->function==NGFI_RRU_IF4p5) {
|
||||
ru->frame_parms.att_rx = ru->att_rx;
|
||||
ru->frame_parms.att_tx = ru->att_tx;
|
||||
|
||||
ru->frame_parms.att_rx = ru->att_rx;
|
||||
ru->frame_parms.att_tx = ru->att_tx;
|
||||
|
||||
LOG_I(PHY,"Setting ru->function to NGFI_RRU_IF4p5, prach_FrequOffset %d, prach_ConfigIndex %d, att (%d,%d)\n",
|
||||
config->prach_FreqOffset[0],config->prach_ConfigIndex[0],ru->att_tx,ru->att_rx);
|
||||
ru->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset = config->prach_FreqOffset[0];
|
||||
@@ -2434,6 +2759,37 @@ void init_RU(char *rf_config_file) {
|
||||
|
||||
|
||||
|
||||
void stop_ru(RU_t *ru) {
|
||||
|
||||
#if defined(PRE_SCD_THREAD) || defined(PHY_TX_THREAD)
|
||||
int *status;
|
||||
#endif
|
||||
printf("Stopping RU %p processing threads\n",(void*)ru);
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
if(ru){
|
||||
ru->proc.instance_pre_scd = 0;
|
||||
pthread_cond_signal( &ru->proc.cond_pre_scd );
|
||||
pthread_join(ru->proc.pthread_pre_scd, (void**)&status );
|
||||
pthread_mutex_destroy(&ru->proc.mutex_pre_scd );
|
||||
pthread_cond_destroy(&ru->proc.cond_pre_scd );
|
||||
}
|
||||
#endif
|
||||
#ifdef PHY_TX_THREAD
|
||||
if(ru){
|
||||
ru->proc.instance_cnt_phy_tx = 0;
|
||||
pthread_cond_signal(&ru->proc.cond_phy_tx);
|
||||
pthread_join( ru->proc.pthread_phy_tx, (void**)&status );
|
||||
pthread_mutex_destroy( &ru->proc.mutex_phy_tx );
|
||||
pthread_cond_destroy( &ru->proc.cond_phy_tx );
|
||||
ru->proc.instance_cnt_rf_tx = 0;
|
||||
pthread_cond_signal(&ru->proc.cond_rf_tx);
|
||||
pthread_join( ru->proc.pthread_rf_tx, (void**)&status );
|
||||
pthread_mutex_destroy( &ru->proc.mutex_rf_tx );
|
||||
pthread_cond_destroy( &ru->proc.cond_rf_tx );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void stop_RU(int nb_ru)
|
||||
{
|
||||
for (int inst = 0; inst < nb_ru; inst++) {
|
||||
@@ -2465,7 +2821,7 @@ void RCconfig_RU(void) {
|
||||
|
||||
|
||||
|
||||
RC.ru_mask=(1<<NB_RU) - 1;
|
||||
RC.ru_mask=(1<<RC.nb_RU) - 1;
|
||||
printf("Set RU mask to %lx\n",RC.ru_mask);
|
||||
|
||||
for (j = 0; j < RC.nb_RU; j++) {
|
||||
|
||||
@@ -144,17 +144,16 @@ static int8_t threequarter_fs=0;
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
char logmem_filename[1024] = {0};
|
||||
|
||||
// This is a dummy declaration (dlsch_demodulation.c is no longer compiled for eNodeB)
|
||||
int16_t dlsch_demod_shift = 0;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
static char *itti_dump_file = NULL;
|
||||
#endif
|
||||
|
||||
int UE_scan = 1;
|
||||
int UE_scan_carrier = 0;
|
||||
runmode_t mode = normal_txrx;
|
||||
|
||||
int simL1flag;
|
||||
int snr_dB;
|
||||
FILE *input_fd=NULL;
|
||||
|
||||
|
||||
@@ -340,10 +339,14 @@ void exit_fun(const char* s)
|
||||
if (RC.ru == NULL)
|
||||
exit(-1); // likely init not completed, prevent crash or hang, exit now...
|
||||
for (ru_id=0; ru_id<RC.nb_RU;ru_id++) {
|
||||
if (RC.ru[ru_id] && RC.ru[ru_id]->rfdevice.trx_end_func)
|
||||
if (RC.ru[ru_id] && RC.ru[ru_id]->rfdevice.trx_end_func) {
|
||||
RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice);
|
||||
if (RC.ru[ru_id] && RC.ru[ru_id]->ifdevice.trx_end_func)
|
||||
RC.ru[ru_id]->rfdevice.trx_end_func = NULL;
|
||||
}
|
||||
if (RC.ru[ru_id] && RC.ru[ru_id]->ifdevice.trx_end_func) {
|
||||
RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
|
||||
RC.ru[ru_id]->ifdevice.trx_end_func = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -459,7 +462,7 @@ void *l2l1_task(void *arg) {
|
||||
switch (ITTI_MSG_ID(message_p)) {
|
||||
case INITIALIZE_MESSAGE:
|
||||
/* Start eNB thread */
|
||||
LOG_D(EMU, "L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p));
|
||||
printf("L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p));
|
||||
start_eNB = 1;
|
||||
break;
|
||||
|
||||
@@ -471,7 +474,7 @@ void *l2l1_task(void *arg) {
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
printf("Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
}
|
||||
} while (ITTI_MSG_ID(message_p) != INITIALIZE_MESSAGE);
|
||||
@@ -498,11 +501,11 @@ void *l2l1_task(void *arg) {
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
|
||||
printf("Received %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
printf("Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -553,19 +556,21 @@ static void get_options(void) {
|
||||
if (start_telnetsrv) {
|
||||
load_module_shlib("telnetsrv",NULL,0);
|
||||
}
|
||||
if (strlen(logmem_filename) > 0) {
|
||||
log_mem_filename = &logmem_filename[0];
|
||||
log_mem_flag = 1;
|
||||
printf("Enabling OPT for log save at memory %s\n",log_mem_filename);
|
||||
logInit_log_mem();
|
||||
}
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
paramdef_t cmdline_ttraceparams[] =CMDLINE_TTRACEPARAMS_DESC ;
|
||||
config_process_cmdline( cmdline_ttraceparams,sizeof(cmdline_ttraceparams)/sizeof(paramdef_t),NULL);
|
||||
#endif
|
||||
|
||||
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) {
|
||||
memset((void*)&RC,0,sizeof(RC));
|
||||
/* Read RC configuration file */
|
||||
RCConfig();
|
||||
NB_eNB_INST = RC.nb_inst;
|
||||
NB_RU = RC.nb_RU;
|
||||
printf("Configuration: nb_rrc_inst %d, nb_L1_inst %d, nb_ru %d\n",NB_eNB_INST,RC.nb_L1_inst,NB_RU);
|
||||
printf("Configuration: nb_rrc_inst %d, nb_L1_inst %d, nb_ru %d\n",NB_eNB_INST,RC.nb_L1_inst,RC.nb_RU);
|
||||
if (nonbiotflag <= 0) {
|
||||
load_NB_IoT();
|
||||
printf(" nb_nbiot_rrc_inst %d, nb_nbiot_L1_inst %d, nb_nbiot_macrlc_inst %d\n",
|
||||
@@ -578,11 +583,6 @@ static void get_options(void) {
|
||||
}
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
int T_nowait = 0; /* by default we wait for the tracer */
|
||||
int T_port = 2021; /* default port to listen to to wait for the tracer */
|
||||
int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -933,10 +933,6 @@ int main( int argc, char **argv )
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CONSOLE
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
setvbuf(stderr, NULL, _IONBF, 0);
|
||||
#endif
|
||||
|
||||
mode = normal_txrx;
|
||||
memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS);
|
||||
@@ -957,7 +953,7 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
T_init(T_port, 1-T_nowait, T_dont_fork);
|
||||
T_Config_Init();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -967,11 +963,6 @@ int main( int argc, char **argv )
|
||||
|
||||
printf("configuring for RAU/RRU\n");
|
||||
|
||||
|
||||
if (ouput_vcd) {
|
||||
VCD_SIGNAL_DUMPER_INIT("/tmp/openair_dump_eNB.vcd");
|
||||
}
|
||||
|
||||
if (opp_enabled ==1) {
|
||||
reset_opp_meas();
|
||||
}
|
||||
@@ -981,7 +972,7 @@ int main( int argc, char **argv )
|
||||
log_set_instance_type (LOG_INSTANCE_ENB);
|
||||
|
||||
printf("ITTI init\n");
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, itti_dump_file);
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
|
||||
// initialize mscgen log after ITTI
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
@@ -1233,6 +1224,7 @@ int main( int argc, char **argv )
|
||||
|
||||
// connect the TX/RX buffers
|
||||
|
||||
sleep(1); /* wait for thread activation */
|
||||
|
||||
printf("Sending sync to all threads\n");
|
||||
|
||||
@@ -1284,8 +1276,12 @@ int main( int argc, char **argv )
|
||||
printf("stopping MODEM threads\n");
|
||||
|
||||
// cleanup
|
||||
for (ru_id=0;ru_id<RC.nb_RU;ru_id++) {
|
||||
stop_ru(RC.ru[ru_id]);
|
||||
}
|
||||
|
||||
stop_eNB(NB_eNB_INST);
|
||||
stop_RU(NB_RU);
|
||||
stop_RU(RC.nb_RU);
|
||||
/* release memory used by the RU/eNB threads (incomplete), after all
|
||||
* threads have been stopped (they partially use the same memory) */
|
||||
for (int inst = 0; inst < NB_eNB_INST; inst++) {
|
||||
@@ -1294,7 +1290,7 @@ int main( int argc, char **argv )
|
||||
phy_free_lte_eNB(RC.eNB[inst][cc_id]);
|
||||
}
|
||||
}
|
||||
for (int inst = 0; inst < NB_RU; inst++) {
|
||||
for (int inst = 0; inst < RC.nb_RU; inst++) {
|
||||
phy_free_RU(RC.ru[inst]);
|
||||
}
|
||||
free_lte_top();
|
||||
@@ -1313,15 +1309,17 @@ int main( int argc, char **argv )
|
||||
|
||||
// *** Handle per CC_id openair0
|
||||
|
||||
for(ru_id=0; ru_id<NB_RU; ru_id++) {
|
||||
if (RC.ru[ru_id]->rfdevice.trx_end_func)
|
||||
RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice);
|
||||
if (RC.ru[ru_id]->ifdevice.trx_end_func)
|
||||
RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
|
||||
|
||||
for(ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
if (RC.ru[ru_id]->rfdevice.trx_end_func) {
|
||||
RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice);
|
||||
RC.ru[ru_id]->rfdevice.trx_end_func = NULL;
|
||||
}
|
||||
if (RC.ru[ru_id]->ifdevice.trx_end_func) {
|
||||
RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
|
||||
RC.ru[ru_id]->ifdevice.trx_end_func = NULL;
|
||||
}
|
||||
}
|
||||
if (ouput_vcd)
|
||||
VCD_SIGNAL_DUMPER_CLOSE();
|
||||
|
||||
if (opt_enabled == 1)
|
||||
terminate_opt();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <sys/sysinfo.h>
|
||||
#include "rt_wrapper.h"
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#undef MALLOC
|
||||
//#undef MALLOC
|
||||
#include "assertions.h"
|
||||
#include "msc.h"
|
||||
#include "PHY/types.h"
|
||||
@@ -52,6 +52,8 @@
|
||||
#define CONFIG_HLP_DBGUEPR "UE run normal prach power ramping, but don't continue random-access\n"
|
||||
#define CONFIG_HLP_CALPRACH "UE run normal prach with maximum power, but don't continue random-access\n"
|
||||
#define CONFIG_HLP_NOL2CN "bypass L2 and upper layers\n"
|
||||
#define CONFIG_HLP_SIML1 "activate RF simulator instead of HW\n"
|
||||
#define CONFIG_HLP_NUMUE "number of UE instances\n"
|
||||
#define CONFIG_HLP_UERXG "set UE RX gain\n"
|
||||
#define CONFIG_HLP_UERXGOFF "external UE amplifier offset\n"
|
||||
#define CONFIG_HLP_UETXG "set UE TX gain\n"
|
||||
@@ -80,10 +82,10 @@
|
||||
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
|
||||
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
|
||||
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
|
||||
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
|
||||
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
|
||||
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
|
||||
#define CONFIG_HLP_L2MONP "Enable L2 pcap messages on localhost \n"
|
||||
#define CONFIG_HLP_VCD "Enable VCD (generated file will is named openair_dump_eNB.vcd, read it with target/RT/USER/eNB.gtkw\n"
|
||||
#define CONFIG_HLP_TQFS "Apply three-quarter of sampling frequency, 23.04 Msps to reduce the data rate on USB/PCIe transfers (only valid for 20 MHz)\n"
|
||||
#define CONFIG_HLP_TPORT "tracer port\n"
|
||||
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
|
||||
@@ -131,15 +133,17 @@
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CMDLINE_UEPARAMS_DESC { \
|
||||
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"siml1", CONFIG_HLP_SIML1, PARAMFLAG_BOOL, iptr:&simL1flag, defintval:0, TYPE_INT, 0}, \
|
||||
{"U", CONFIG_HLP_NUMUE, 0, u8ptr:&NB_UE_INST, defuintval:1, TYPE_UINT, 0}, \
|
||||
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:130, TYPE_DOUBLE, 0}, \
|
||||
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&nb_antenna_rx, defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
|
||||
{"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \
|
||||
{"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
|
||||
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:23, TYPE_INT, 0}, \
|
||||
{"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \
|
||||
{"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
|
||||
{"num-ues", NULL, 0, u8ptr:&(NB_UE_INST), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -172,15 +176,14 @@
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
|
||||
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
|
||||
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
|
||||
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&ouput_vcd, defintval:0, TYPE_INT, 0}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"s" , CONFIG_HLP_SNR, 0, iptr:&snr_dB, defintval:25, TYPE_INT, 0}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
|
||||
{"codingw" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -201,6 +204,7 @@
|
||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||
{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:"./logmem.log", TYPE_STRING, sizeof(logmem_filename)}, \
|
||||
}
|
||||
#define CMDLINE_ONLINELOG_IDX 0
|
||||
#define CMDLINE_GLOGLEVEL_IDX 1
|
||||
@@ -208,21 +212,6 @@
|
||||
#define CMDLINE_STARTTELN_IDX 3
|
||||
|
||||
|
||||
extern int T_port;
|
||||
extern int T_nowait;
|
||||
extern int T_dont_fork;
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters for TTRACE utility */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CMDLINE_TTRACEPARAMS_DESC { \
|
||||
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:0, TYPE_INT, 0}, \
|
||||
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0}, \
|
||||
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:1, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
/* */
|
||||
extern pthread_cond_t sync_cond;
|
||||
@@ -263,6 +252,7 @@ extern void kill_eNB_proc(int inst);
|
||||
|
||||
// In lte-ru.c
|
||||
extern void init_RU(const char*);
|
||||
extern void stop_ru(RU_t *ru);
|
||||
extern void init_RU_proc(RU_t *ru);
|
||||
extern void stop_RU(int nb_ru);
|
||||
extern void kill_RU_proc(int inst);
|
||||
@@ -272,7 +262,7 @@ extern void set_function_spec_param(RU_t *ru);
|
||||
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||
extern void fill_ue_band_info(void);
|
||||
|
||||
extern void init_UE(int,int,int,int);
|
||||
extern void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax, LTE_DL_FRAME_PARMS *fp);
|
||||
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char * name);
|
||||
|
||||
extern void reset_opp_meas(void);
|
||||
@@ -284,6 +274,10 @@ extern void init_te_thread(PHY_VARS_eNB *);
|
||||
extern void kill_td_thread(PHY_VARS_eNB *);
|
||||
extern void kill_te_thread(PHY_VARS_eNB *);
|
||||
|
||||
extern void RCConfig_sim(void);
|
||||
extern void init_ocm(double,double);
|
||||
extern void init_ue_devices(PHY_VARS_UE *);
|
||||
|
||||
PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t UE_id,
|
||||
uint8_t abstraction_flag);
|
||||
@@ -292,4 +286,11 @@ void init_eNB_afterRU(void);
|
||||
extern int stop_L1L2(module_id_t enb_id);
|
||||
extern int restart_L1L2(module_id_t enb_id);
|
||||
|
||||
|
||||
extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
|
||||
|
||||
extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t UE_id,
|
||||
uint8_t abstraction_flag);
|
||||
|
||||
#endif
|
||||
|
||||
+112
-345
@@ -79,7 +79,7 @@ void init_UE_threads(int);
|
||||
void init_UE_threads_stub(int);
|
||||
void init_UE_single_thread_stub(int);
|
||||
void *UE_thread(void *arg);
|
||||
void init_UE(int nb_inst,int,int,int);
|
||||
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,LTE_DL_FRAME_PARMS *fp);
|
||||
void init_UE_stub(int nb_inst,int,int,char*);
|
||||
void init_UE_stub_single_thread(int nb_inst,int,int,char*);
|
||||
int init_timer_thread(void);
|
||||
@@ -93,6 +93,8 @@ extern int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind);
|
||||
extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
|
||||
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
|
||||
|
||||
extern int simL1flag;
|
||||
|
||||
//extern int tx_req_UE_MAC1();
|
||||
|
||||
void ue_stub_rx_handler(unsigned int, char *);
|
||||
@@ -170,20 +172,18 @@ PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
{
|
||||
|
||||
PHY_VARS_UE* ue;
|
||||
PHY_VARS_UE* ue = (PHY_VARS_UE *)malloc(sizeof(PHY_VARS_UE));
|
||||
memset(ue,0,sizeof(PHY_VARS_UE));
|
||||
|
||||
if (frame_parms!=(LTE_DL_FRAME_PARMS *)NULL) { // if we want to give initial frame parms, allocate the PHY_VARS_UE structure and put them in
|
||||
ue = (PHY_VARS_UE *)malloc(sizeof(PHY_VARS_UE));
|
||||
memset(ue,0,sizeof(PHY_VARS_UE));
|
||||
memcpy(&(ue->frame_parms), frame_parms, sizeof(LTE_DL_FRAME_PARMS));
|
||||
}
|
||||
else ue = PHY_vars_UE_g[UE_id][0];
|
||||
|
||||
|
||||
ue->Mod_id = UE_id;
|
||||
ue->mac_enabled = 1;
|
||||
|
||||
// Panos: In phy_stub_UE (MAC-to-MAC) mode these init functions don't need to get called. Is this correct?
|
||||
// In phy_stub_UE (MAC-to-MAC) mode these init functions don't need to get called. Is this correct?
|
||||
if (nfapi_mode!=3)
|
||||
{
|
||||
// initialize all signal buffers
|
||||
@@ -236,11 +236,12 @@ void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_
|
||||
|
||||
}
|
||||
|
||||
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction) {
|
||||
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,LTE_DL_FRAME_PARMS *fp0) {
|
||||
|
||||
PHY_VARS_UE *UE;
|
||||
int inst;
|
||||
int ret;
|
||||
LTE_DL_FRAME_PARMS *fp;
|
||||
|
||||
LOG_I(PHY,"UE : Calling Layer 2 for initialization\n");
|
||||
|
||||
@@ -248,18 +249,95 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
|
||||
0,// cba_group_active
|
||||
0); // HO flag
|
||||
|
||||
if (PHY_vars_UE_g==NULL) PHY_vars_UE_g = (PHY_VARS_UE***)calloc(1+nb_inst,sizeof(PHY_VARS_UE**));
|
||||
|
||||
for (inst=0;inst<nb_inst;inst++) {
|
||||
if (PHY_vars_UE_g[inst]==NULL) PHY_vars_UE_g[inst] = (PHY_VARS_UE**)calloc(1+MAX_NUM_CCs,sizeof(PHY_VARS_UE*));
|
||||
LOG_I(PHY,"Allocating UE context %d\n",inst);
|
||||
|
||||
LOG_I(PHY,"Initializing memory for UE instance %d (%p)\n",inst,PHY_vars_UE_g[inst]);
|
||||
PHY_vars_UE_g[inst][0] = init_ue_vars(NULL,inst,0);
|
||||
if (simL1flag == 0) PHY_vars_UE_g[inst][0] = init_ue_vars(fp0,inst,0);
|
||||
else {
|
||||
// needed for memcopy below. these are not used in the RU, but needed for UE
|
||||
RC.ru[0]->frame_parms.nb_antennas_rx = fp0->nb_antennas_rx;
|
||||
RC.ru[0]->frame_parms.nb_antennas_tx = fp0->nb_antennas_tx;
|
||||
PHY_vars_UE_g[inst][0] = init_ue_vars(&RC.ru[0]->frame_parms,inst,0);
|
||||
}
|
||||
// turn off timing control loop in UE
|
||||
PHY_vars_UE_g[inst][0]->no_timing_correction = timing_correction;
|
||||
|
||||
UE = PHY_vars_UE_g[inst][0];
|
||||
fp = &UE->frame_parms;
|
||||
printf("PHY_vars_UE_g[0][0] = %p\n",UE);
|
||||
|
||||
if (phy_test==1)
|
||||
UE->mac_enabled = 0;
|
||||
else
|
||||
UE->mac_enabled = 1;
|
||||
|
||||
if (UE->mac_enabled == 0) { //set default UL parameters for testing mode
|
||||
for (int i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
|
||||
UE->pusch_config_dedicated[i].betaOffset_ACK_Index = 0;
|
||||
UE->pusch_config_dedicated[i].betaOffset_RI_Index = 0;
|
||||
UE->pusch_config_dedicated[i].betaOffset_CQI_Index = 2;
|
||||
|
||||
UE->scheduling_request_config[i].sr_PUCCH_ResourceIndex = 0;
|
||||
UE->scheduling_request_config[i].sr_ConfigIndex = 7+(0%3);
|
||||
UE->scheduling_request_config[i].dsr_TransMax = sr_n4;
|
||||
}
|
||||
}
|
||||
|
||||
UE->UE_scan = UE_scan;
|
||||
UE->UE_scan_carrier = UE_scan_carrier;
|
||||
UE->mode = mode;
|
||||
printf("UE->mode = %d\n",mode);
|
||||
|
||||
if (UE->mac_enabled == 1) {
|
||||
UE->pdcch_vars[0][0]->crnti = 0x1234;
|
||||
UE->pdcch_vars[1][0]->crnti = 0x1234;
|
||||
}else {
|
||||
UE->pdcch_vars[0][0]->crnti = 0x1235;
|
||||
UE->pdcch_vars[1][0]->crnti = 0x1235;
|
||||
}
|
||||
UE->rx_total_gain_dB = rxgain;
|
||||
UE->tx_power_max_dBm = txpowermax;
|
||||
|
||||
UE->frame_parms.nb_antennas_tx = fp0->nb_antennas_tx;
|
||||
UE->frame_parms.nb_antennas_rx = fp0->nb_antennas_rx;
|
||||
|
||||
if (fp->frame_type == TDD) {
|
||||
switch (fp->N_RB_DL) {
|
||||
|
||||
case 100:
|
||||
if (fp->threequarter_fs) UE->N_TA_offset = (624*3)/4;
|
||||
else UE->N_TA_offset = 624;
|
||||
break;
|
||||
case 75:
|
||||
UE->N_TA_offset = (624*3)/4;
|
||||
break;
|
||||
case 50:
|
||||
UE->N_TA_offset = 624/2;
|
||||
break;
|
||||
case 25:
|
||||
UE->N_TA_offset = 624/4;
|
||||
break;
|
||||
case 15:
|
||||
UE->N_TA_offset = 624/8;
|
||||
break;
|
||||
case 6:
|
||||
UE->N_TA_offset = 624/16;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"illegal N_RB_DL %d\n",fp->N_RB_DL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else UE->N_TA_offset = 0;
|
||||
|
||||
if (simL1flag == 1) init_ue_devices(UE);
|
||||
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
|
||||
init_UE_threads(inst);
|
||||
UE = PHY_vars_UE_g[inst][0];
|
||||
|
||||
if (oaisim_flag == 0) {
|
||||
if (simL1flag == 0) {
|
||||
ret = openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]);
|
||||
if (ret !=0){
|
||||
exit_fun("Error loading device library");
|
||||
@@ -267,7 +345,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
|
||||
}
|
||||
UE->rfdevice.host_type = RAU_HOST;
|
||||
// UE->rfdevice.type = NONE_DEV;
|
||||
PHY_VARS_UE *UE = PHY_vars_UE_g[inst][0];
|
||||
|
||||
AssertFatal(0 == pthread_create(&UE->proc.pthread_ue,
|
||||
&UE->proc.attr_ue,
|
||||
UE_thread,
|
||||
@@ -275,17 +353,9 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
|
||||
}
|
||||
|
||||
printf("UE threads created by %ld\n", gettid());
|
||||
#if 0
|
||||
#if defined(ENABLE_USE_MME)
|
||||
extern volatile int start_UE;
|
||||
while (start_UE == 0) {
|
||||
sleep(1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
// Panos: Initiating all UEs within a single set of threads for PHY_STUB. Future extensions -> multiple
|
||||
// Initiating all UEs within a single set of threads for PHY_STUB. Future extensions -> multiple
|
||||
// set of threads for multiple UEs.
|
||||
void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface) {
|
||||
|
||||
@@ -443,9 +513,12 @@ static void *UE_thread_synch(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
while (sync_var<0)
|
||||
pthread_cond_wait(&sync_cond, &sync_mutex);
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
*/
|
||||
wait_sync("UE_thread_sync");
|
||||
|
||||
printf("Started device, unlocked sync_mutex (UE_sync_thread)\n");
|
||||
|
||||
@@ -931,8 +1004,6 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
|
||||
LOG_E( MAC, "[SCHED][UE] error unlocking mutex for UE RXn_TXnp4\n" );
|
||||
exit_fun("nothing to add");
|
||||
}
|
||||
LOG_D(MAC," Panos-D [UE_phy_stub_thread_rxn_txnp4 1] Frame: %d, Subframe: %d \n" "\n" "\n", timer_frame, timer_subframe);
|
||||
|
||||
|
||||
proc->subframe_rx=timer_subframe;
|
||||
proc->frame_rx = timer_frame;
|
||||
@@ -943,14 +1014,14 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
|
||||
|
||||
oai_subframe_ind(timer_frame, timer_subframe);
|
||||
|
||||
// Panos: Guessing that the next 4 lines are not needed for the phy_stub mode.
|
||||
//Guessing that the next 4 lines are not needed for the phy_stub mode.
|
||||
/*initRefTimes(t2);
|
||||
initRefTimes(t3);
|
||||
pickTime(current);
|
||||
updateTimes(proc->gotIQs, &t2, 10000, "Delay to wake up UE_Thread_Rx (case 2)");*/
|
||||
|
||||
|
||||
//Panos: Not sure whether we should put the memory allocation here and not sure how much memory
|
||||
// Not sure whether we should put the memory allocation here and not sure how much memory
|
||||
//we should allocate for each subframe cycle.
|
||||
UL_INFO = (UL_IND_t*)malloc(sizeof(UL_IND_t));
|
||||
|
||||
@@ -1082,7 +1153,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
|
||||
//ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode);
|
||||
}
|
||||
} // mode is PRACH
|
||||
// Panos: Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
|
||||
// Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
|
||||
// UE Tx procedures directly at the MAC layer, based on the received ul_config requests from the vnf (eNB).
|
||||
// Generate UL_indications which correspond to UL traffic.
|
||||
if(ul_config_req!=NULL){ //&& UE_mac_inst[Mod_id].ul_config_req->ul_config_request_body.ul_config_pdu_list != NULL){
|
||||
@@ -1222,7 +1293,7 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
|
||||
phy_stub_ticking->ticking_var = -1;
|
||||
proc->subframe_rx=proc->sub_frame_start;
|
||||
|
||||
//PANOS: CAREFUL HERE!
|
||||
// CAREFUL HERE!
|
||||
wait_sync("UE_phy_stub_thread_rxn_txnp4");
|
||||
|
||||
while (!oai_exit) {
|
||||
@@ -1242,8 +1313,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
|
||||
LOG_E( MAC, "[SCHED][UE] error unlocking mutex for UE RXn_TXnp4\n" );
|
||||
exit_fun("nothing to add");
|
||||
}
|
||||
LOG_D(MAC," Panos-D [UE_phy_stub_thread_rxn_txnp4 1] Frame: %d, Subframe: %d \n" "\n" "\n", timer_frame, timer_subframe);
|
||||
|
||||
|
||||
proc->subframe_rx=timer_subframe;
|
||||
proc->frame_rx = timer_frame;
|
||||
@@ -1286,7 +1355,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
|
||||
}
|
||||
//if(UE_mac_inst[Mod_id].hi_dci0_req!= NULL){
|
||||
if (hi_dci0_req!=NULL && hi_dci0_req->hi_dci0_request_body.hi_dci0_pdu_list!=NULL){
|
||||
LOG_I( MAC, "Panos-D: UE_phy_stub_thread_rxn_txnp4 after oai_subframe_ind 4 \n");
|
||||
hi_dci0_req_UE_MAC(hi_dci0_req, Mod_id);
|
||||
//if(UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.hi_dci0_pdu_list!=NULL){
|
||||
free(hi_dci0_req->hi_dci0_request_body.hi_dci0_pdu_list);
|
||||
@@ -1350,7 +1418,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
|
||||
if (UE->mode != loop_through_memory){
|
||||
|
||||
if ((UE_mac_inst[Mod_id].UE_mode[0] == PRACH) ) {
|
||||
//LOG_D(MAC, "Panos-D: UE_phy_stub_thread_rxn_txnp4 before RACH \n");
|
||||
|
||||
// check if we have PRACH opportunity
|
||||
|
||||
@@ -1365,7 +1432,7 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
|
||||
//ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode);
|
||||
}
|
||||
} // mode is PRACH
|
||||
// Panos: Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
|
||||
// Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
|
||||
// UE Tx procedures directly at the MAC layer, based on the received ul_config requests from the vnf (eNB).
|
||||
// Generate UL_indications which correspond to UL traffic.
|
||||
if(ul_config_req!= NULL && ul_config_req->ul_config_request_body.ul_config_pdu_list != NULL){
|
||||
@@ -1425,6 +1492,13 @@ void *UE_thread(void *arg) {
|
||||
init_thread(100000, 500000, FIFO_PRIORITY, &cpuset,
|
||||
"UHD Threads");
|
||||
|
||||
/*
|
||||
while (sync_var<0)
|
||||
pthread_cond_wait(&sync_cond, &sync_mutex);
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
*/
|
||||
|
||||
wait_sync("UE thread");
|
||||
#ifdef NAS_UE
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_NAS_UE, INITIALIZE_MESSAGE);
|
||||
@@ -1751,12 +1825,12 @@ void init_UE_single_thread_stub(int nb_inst) {
|
||||
pthread_attr_init (&UE->proc.attr_ue);
|
||||
pthread_attr_setstacksize(&UE->proc.attr_ue,8192);//5*PTHREAD_STACK_MIN);
|
||||
|
||||
// Panos: Don't need synch for phy_stub mode
|
||||
// Don't need synch for phy_stub mode
|
||||
//pthread_mutex_init(&UE->proc.mutex_synch,NULL);
|
||||
//pthread_cond_init(&UE->proc.cond_synch,NULL);
|
||||
|
||||
// the threads are not yet active, therefore access is allowed without locking
|
||||
// Panos: In phy_stub_UE mode due to less heavy processing operations we don't need two threads
|
||||
// In phy_stub_UE mode due to less heavy processing operations we don't need two threads
|
||||
//int nb_threads=RX_NB_TH;
|
||||
int nb_threads=1;
|
||||
for (int i=0; i<nb_threads; i++) {
|
||||
@@ -1773,7 +1847,7 @@ void init_UE_single_thread_stub(int nb_inst) {
|
||||
pthread_create(&UE->proc.proc_rxtx[i].pthread_rxtx, NULL, UE_phy_stub_single_thread_rxn_txnp4, rtd);
|
||||
|
||||
}
|
||||
// Panos: Remove thread for UE_sync in phy_stub_UE mode.
|
||||
// Remove thread for UE_sync in phy_stub_UE mode.
|
||||
//pthread_create(&UE->proc.pthread_synch,NULL,UE_thread_synch,(void*)UE);
|
||||
}
|
||||
|
||||
@@ -1803,12 +1877,12 @@ void init_UE_threads_stub(int inst) {
|
||||
pthread_attr_init (&UE->proc.attr_ue);
|
||||
pthread_attr_setstacksize(&UE->proc.attr_ue,8192);//5*PTHREAD_STACK_MIN);
|
||||
|
||||
// Panos: Don't need synch for phy_stub mode
|
||||
// Don't need synch for phy_stub mode
|
||||
//pthread_mutex_init(&UE->proc.mutex_synch,NULL);
|
||||
//pthread_cond_init(&UE->proc.cond_synch,NULL);
|
||||
|
||||
// the threads are not yet active, therefore access is allowed without locking
|
||||
// Panos: In phy_stub_UE mode due to less heavy processing operations we don't need two threads
|
||||
// In phy_stub_UE mode due to less heavy processing operations we don't need two threads
|
||||
//int nb_threads=RX_NB_TH;
|
||||
int nb_threads=1;
|
||||
for (int i=0; i<nb_threads; i++) {
|
||||
@@ -1826,7 +1900,7 @@ void init_UE_threads_stub(int inst) {
|
||||
|
||||
|
||||
}
|
||||
// Panos: Remove thread for UE_sync in phy_stub_UE mode.
|
||||
// Remove thread for UE_sync in phy_stub_UE mode.
|
||||
//pthread_create(&UE->proc.pthread_synch,NULL,UE_thread_synch,(void*)UE);
|
||||
}
|
||||
|
||||
@@ -1906,168 +1980,6 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
|
||||
|
||||
|
||||
|
||||
/*static void* timer_thread( void* param ) {
|
||||
thread_top_init("timer_thread",1,870000L,1000000L,1000000L);
|
||||
timer_subframe =9;
|
||||
timer_frame =1023;
|
||||
//phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking));
|
||||
phy_stub_ticking->ticking_var = -1;
|
||||
PHY_VARS_UE *UE;
|
||||
UE = PHY_vars_UE_g[0][0];
|
||||
double t_diff;
|
||||
int external_timer = 0;
|
||||
|
||||
|
||||
//struct timespec pselect_start;
|
||||
|
||||
|
||||
//struct timespec sf_duration;
|
||||
//sf_duration.tv_sec = 0;
|
||||
//sf_duration.tv_nsec = 1e6;
|
||||
|
||||
|
||||
wait_sync("timer_thread");
|
||||
|
||||
//pthread_mutex_init(&phy_stub_ticking->mutex_ticking,NULL);
|
||||
//pthread_cond_init(&phy_stub_ticking->cond_ticking,NULL);
|
||||
|
||||
// struct timespec start = {0};
|
||||
// struct timespec end = {0};
|
||||
//sleepValue.tv_nsec = 1000000;
|
||||
opp_enabled = 1;
|
||||
|
||||
// first check if we are receiving timing indications
|
||||
if(nfapi_mode==4) {
|
||||
usleep(10000);
|
||||
if (UE->instance_cnt_timer > 0) {
|
||||
external_timer = 1;
|
||||
int absSFm1 = ((emulator_absSF+10239)%10240);
|
||||
timer_frame = absSFm1/10;
|
||||
timer_subframe = absSFm1%10;
|
||||
pthread_mutex_lock(&UE->timer_mutex);
|
||||
UE->instance_cnt_timer = -1;
|
||||
pthread_mutex_unlock(&UE->timer_mutex);
|
||||
LOG_I(PHY,"Running with external timer\n");
|
||||
}
|
||||
else LOG_I(PHY,"Running with internal timer\n");
|
||||
}
|
||||
|
||||
struct timespec t_start;
|
||||
struct timespec t_now;
|
||||
struct timespec t_sleep;
|
||||
uint64_t T_0;
|
||||
uint64_t T_now;
|
||||
uint64_t T_next_SF;
|
||||
uint64_t T_sleep;
|
||||
uint64_t sf_cnt = 0; //Total Subframe counter
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &t_start);
|
||||
T_0 = (uint64_t) t_start.tv_sec*1000000000 + t_start.tv_nsec;
|
||||
LOG_I(MAC, "Panos-D: timer_thread(), T_0 value: %" PRId64 "\n", T_0);
|
||||
//printf("%" PRId64 "\n", t);
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
// these are local subframe/frame counters to check that we are in synch with the fronthaul timing.
|
||||
// They are set on the first rx/tx in the underly FH routines.
|
||||
if (timer_subframe==9) {
|
||||
timer_subframe=0;
|
||||
timer_frame++;
|
||||
timer_frame&=1023;
|
||||
} else {
|
||||
timer_subframe++;
|
||||
}
|
||||
//printf("[timer_thread] Frame: %d, Subframe: %d \n", timer_frame, timer_subframe);
|
||||
//LOG_I(MAC," Panos-D [timer_thread] Frame: %d, Subframe: %d \n", timer_frame, timer_subframe);
|
||||
//AssertFatal( 0 == pthread_cond_signal(&phy_stub_ticking->cond_ticking), "");
|
||||
AssertFatal(pthread_mutex_lock(&phy_stub_ticking->mutex_ticking) ==0,"");
|
||||
phy_stub_ticking->ticking_var++;
|
||||
// This should probably be a call to pthread_cond_broadcast when we introduce support for multiple UEs (threads)
|
||||
if(phy_stub_ticking->ticking_var == 0){
|
||||
//AssertFatal(phy_stub_ticking->ticking_var == 0,"phy_stub_ticking->ticking_var = %d",
|
||||
//phy_stub_ticking->ticking_var);
|
||||
if (pthread_cond_signal(&phy_stub_ticking->cond_ticking) != 0) {
|
||||
//LOG_E( PHY, "[SCHED][UE %d] ERROR pthread_cond_signal for UE RX thread\n", UE->Mod_id);
|
||||
LOG_E( PHY, "timer_thread ERROR pthread_cond_signal for UE_thread\n");
|
||||
exit_fun("nothing to add");
|
||||
}
|
||||
}
|
||||
else
|
||||
LOG_I(MAC, "Panos-D: timer_thread() Timing problem! \n");
|
||||
|
||||
AssertFatal(pthread_mutex_unlock(&phy_stub_ticking->mutex_ticking) ==0,"");
|
||||
start_meas(&UE->timer_stats);
|
||||
|
||||
|
||||
//clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &start); // get initial time-stamp
|
||||
if (external_timer == 0) {
|
||||
sf_cnt++;
|
||||
T_next_SF = T_0 + sf_cnt*1000000;
|
||||
do{
|
||||
clock_gettime(CLOCK_MONOTONIC, &t_now);
|
||||
T_now =(uint64_t) t_now.tv_sec*1000000000 + t_now.tv_nsec;
|
||||
}while(T_now < T_next_SF);
|
||||
//usleep(1000);
|
||||
UE_tport_t pdu;
|
||||
pdu.header.packet_type = TTI_SYNC;
|
||||
pdu.header.absSF = (timer_frame*10)+timer_subframe;
|
||||
if (nfapi_mode!=3){
|
||||
multicast_link_write_sock(0,
|
||||
&pdu,
|
||||
sizeof(UE_tport_header_t));
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
wait_on_condition(&UE->timer_mutex,&UE->timer_cond,&UE->instance_cnt_timer,"timer_thread");
|
||||
release_thread(&UE->timer_mutex,&UE->instance_cnt_timer,"timer_thread");
|
||||
}
|
||||
//clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &end); // get final time-stamp
|
||||
|
||||
//double t_ns = (double)(end.tv_sec - start.tv_sec) * 1.0e9 +
|
||||
// (double)(end.tv_nsec - start.tv_nsec);
|
||||
//printf("Panos-D: [timer_thread] REAL TIME difference: %f", t_ns);
|
||||
|
||||
|
||||
stop_meas(&UE->timer_stats);
|
||||
t_diff = get_time_meas_us(&UE->timer_stats);
|
||||
|
||||
//printf("Panos-D: Absolute time: %lld, diff: %lld, diff_now: %lld \n",UE->timer_stats.p_time, UE->timer_stats.diff, UE->timer_stats.diff_now);
|
||||
//LOG_I(MAC,"[UE%d] Applying default macMainConfig\n",module_idP);
|
||||
//if (t_diff > 1100)
|
||||
|
||||
|
||||
// LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
|
||||
//LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
|
||||
|
||||
//printf("Panos-D: Absolute time: %f", t_diff);
|
||||
|
||||
|
||||
stop_meas(&UE->timer_stats);
|
||||
t_diff = get_time_meas_us(&UE->timer_stats);
|
||||
//printf("Panos-D: Absolute time: %lld, diff: %lld, diff_now: %lld \n",UE->timer_stats.p_time, UE->timer_stats.diff, UE->timer_stats.diff_now);
|
||||
//LOG_I(MAC,"[UE%d] Applying default macMainConfig\n",module_idP);
|
||||
//if (t_diff > 1100) LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
|
||||
//printf("Panos-D: Absolute time: %f", t_diff);
|
||||
|
||||
//UE->proc.ticking_var++;
|
||||
// pthread_cond_signal() //Send signal to ue_thread()?
|
||||
// We also need to somehow pass the information of SFN/SF
|
||||
}
|
||||
free(phy_stub_ticking);
|
||||
pthread_cond_destroy(&phy_stub_ticking->cond_ticking);
|
||||
pthread_mutex_destroy(&phy_stub_ticking->mutex_ticking);
|
||||
return 0;
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Panos: This timer thread is used only in the phy_stub mode as an independent timer
|
||||
// which will be ticking and provide the SFN/SF values that will be used from the UE threads
|
||||
@@ -2198,151 +2110,6 @@ static void* timer_thread( void* param ) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*static void* timer_thread( void* param ) {
|
||||
thread_top_init("timer_thread",1,870000L,1000000L,1000000L);
|
||||
timer_subframe =9;
|
||||
timer_frame =1023;
|
||||
//phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking));
|
||||
phy_stub_ticking->ticking_var = -1;
|
||||
PHY_VARS_UE *UE;
|
||||
UE = PHY_vars_UE_g[0][0];
|
||||
double t_diff;
|
||||
int external_timer = 0;
|
||||
|
||||
wait_sync("timer_thread");
|
||||
|
||||
//pthread_mutex_init(&phy_stub_ticking->mutex_ticking,NULL);
|
||||
//pthread_cond_init(&phy_stub_ticking->cond_ticking,NULL);
|
||||
|
||||
// struct timespec start = {0};
|
||||
// struct timespec end = {0};
|
||||
//sleepValue.tv_nsec = 1000000;
|
||||
opp_enabled = 1;
|
||||
|
||||
// first check if we are receiving timing indications
|
||||
if(nfapi_mode==4) {
|
||||
usleep(10000);
|
||||
if (UE->instance_cnt_timer > 0) {
|
||||
external_timer = 1;
|
||||
int absSFm1 = ((emulator_absSF+10239)%10240);
|
||||
timer_frame = absSFm1/10;
|
||||
timer_subframe = absSFm1%10;
|
||||
pthread_mutex_lock(&UE->timer_mutex);
|
||||
UE->instance_cnt_timer = -1;
|
||||
pthread_mutex_unlock(&UE->timer_mutex);
|
||||
LOG_I(PHY,"Running with external timer\n");
|
||||
}
|
||||
else LOG_I(PHY,"Running with internal timer\n");
|
||||
}
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
// these are local subframe/frame counters to check that we are in synch with the fronthaul timing.
|
||||
// They are set on the first rx/tx in the underly FH routines.
|
||||
if (timer_subframe==9) {
|
||||
timer_subframe=0;
|
||||
timer_frame++;
|
||||
timer_frame&=1023;
|
||||
} else {
|
||||
timer_subframe++;
|
||||
}
|
||||
//printf("[timer_thread] Frame: %d, Subframe: %d \n", timer_frame, timer_subframe);
|
||||
//LOG_I(MAC," Panos-D [timer_thread] Frame: %d, Subframe: %d \n", timer_frame, timer_subframe);
|
||||
//AssertFatal( 0 == pthread_cond_signal(&phy_stub_ticking->cond_ticking), "");
|
||||
AssertFatal(pthread_mutex_lock(&phy_stub_ticking->mutex_ticking) ==0,"");
|
||||
phy_stub_ticking->ticking_var++;
|
||||
// This should probably be a call to pthread_cond_broadcast when we introduce support for multiple UEs (threads)
|
||||
if(phy_stub_ticking->ticking_var == 0){
|
||||
//AssertFatal(phy_stub_ticking->ticking_var == 0,"phy_stub_ticking->ticking_var = %d",
|
||||
// phy_stub_ticking->ticking_var);
|
||||
if (pthread_cond_signal(&phy_stub_ticking->cond_ticking) != 0) {
|
||||
//LOG_E( PHY, "[SCHED][UE %d] ERROR pthread_cond_signal for UE RX thread\n", UE->Mod_id);
|
||||
LOG_E( PHY, "timer_thread ERROR pthread_cond_signal for UE_thread\n");
|
||||
exit_fun("nothing to add");
|
||||
}
|
||||
}
|
||||
|
||||
AssertFatal(pthread_mutex_unlock(&phy_stub_ticking->mutex_ticking) ==0,"");
|
||||
start_meas(&UE->timer_stats);
|
||||
|
||||
|
||||
//clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &start); // get initial time-stamp
|
||||
if (external_timer == 0) {
|
||||
usleep(1000);
|
||||
UE_tport_t pdu;
|
||||
pdu.header.packet_type = TTI_SYNC;
|
||||
pdu.header.absSF = (timer_frame*10)+timer_subframe;
|
||||
multicast_link_write_sock(0,
|
||||
&pdu,
|
||||
sizeof(UE_tport_header_t));
|
||||
|
||||
}
|
||||
else {
|
||||
wait_on_condition(&UE->timer_mutex,&UE->timer_cond,&UE->instance_cnt_timer,"timer_thread");
|
||||
release_thread(&UE->timer_mutex,&UE->instance_cnt_timer,"timer_thread");
|
||||
}
|
||||
//clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &end); // get final time-stamp
|
||||
|
||||
//double t_ns = (double)(end.tv_sec - start.tv_sec) * 1.0e9 +
|
||||
// (double)(end.tv_nsec - start.tv_nsec);
|
||||
//printf("Panos-D: [timer_thread] REAL TIME difference: %f", t_ns);
|
||||
|
||||
|
||||
stop_meas(&UE->timer_stats);
|
||||
t_diff = get_time_meas_us(&UE->timer_stats);
|
||||
|
||||
//printf("Panos-D: Absolute time: %lld, diff: %lld, diff_now: %lld \n",UE->timer_stats.p_time, UE->timer_stats.diff, UE->timer_stats.diff_now);
|
||||
//LOG_I(MAC,"[UE%d] Applying default macMainConfig\n",module_idP);
|
||||
//if (t_diff > 1100)
|
||||
|
||||
|
||||
// LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
|
||||
//LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
|
||||
|
||||
//printf("Panos-D: Absolute time: %f", t_diff);
|
||||
|
||||
|
||||
stop_meas(&UE->timer_stats);
|
||||
t_diff = get_time_meas_us(&UE->timer_stats);
|
||||
//printf("Panos-D: Absolute time: %lld, diff: %lld, diff_now: %lld \n",UE->timer_stats.p_time, UE->timer_stats.diff, UE->timer_stats.diff_now);
|
||||
//LOG_I(MAC,"[UE%d] Applying default macMainConfig\n",module_idP);
|
||||
//if (t_diff > 1100) LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
|
||||
//printf("Panos-D: Absolute time: %f", t_diff);
|
||||
|
||||
//UE->proc.ticking_var++;
|
||||
// pthread_cond_signal() //Send signal to ue_thread()?
|
||||
// We also need to somehow pass the information of SFN/SF
|
||||
}
|
||||
free(phy_stub_ticking);
|
||||
pthread_cond_destroy(&phy_stub_ticking->cond_ticking);
|
||||
pthread_mutex_destroy(&phy_stub_ticking->mutex_ticking);
|
||||
return 0;
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int init_timer_thread(void) {
|
||||
//PHY_VARS_UE *UE=PHY_vars_UE_g[0];
|
||||
PHY_VARS_UE *UE=PHY_vars_UE_g[0][0];
|
||||
|
||||
+147
-251
@@ -63,7 +63,6 @@
|
||||
#include "PHY/LTE_TRANSPORT/transport_vars.h"
|
||||
#include "SCHED/sched_common_vars.h"
|
||||
#include "PHY/MODULATION/modulation_vars.h"
|
||||
#include "../../SIMU/USER/init_lte.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_vars.h"
|
||||
@@ -150,12 +149,11 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
static char *itti_dump_file = NULL;
|
||||
#endif
|
||||
|
||||
int UE_scan = 1;
|
||||
int UE_scan_carrier = 0;
|
||||
int simL1flag = 0;
|
||||
int snr_dB=25;
|
||||
|
||||
runmode_t mode = normal_txrx;
|
||||
|
||||
FILE *input_fd=NULL;
|
||||
@@ -164,11 +162,11 @@ FILE *input_fd=NULL;
|
||||
#if MAX_NUM_CCs == 1
|
||||
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
|
||||
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0}};
|
||||
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0}};
|
||||
double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0}};
|
||||
#else
|
||||
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain},{max_gain,max_gain,max_gain,max_gain}};
|
||||
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0},{20,0,0,0}};
|
||||
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
|
||||
double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0},{20,0,0,0}};
|
||||
#endif
|
||||
|
||||
double rx_gain_off = 0.0;
|
||||
@@ -212,8 +210,6 @@ uint8_t exit_missed_slots=1;
|
||||
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||
|
||||
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
|
||||
|
||||
extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
@@ -452,11 +448,11 @@ void *l2l1_task(void *arg) {
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
|
||||
LOG_I(SIM, "Received %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
LOG_E(SIM, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -471,6 +467,7 @@ void *l2l1_task(void *arg) {
|
||||
extern int16_t dlsch_demod_shift;
|
||||
|
||||
static void get_options(void) {
|
||||
char logmem_filename[1024] = {0};
|
||||
int CC_id;
|
||||
int tddflag, nonbiotflag;
|
||||
char *loopfile=NULL;
|
||||
@@ -539,8 +536,7 @@ static void get_options(void) {
|
||||
}
|
||||
UE_scan=0;
|
||||
|
||||
|
||||
if (tddflag > 0) {
|
||||
if (tddflag > 0) {
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++)
|
||||
frame_parms[CC_id]->frame_type = TDD;
|
||||
}
|
||||
@@ -572,16 +568,11 @@ static void get_options(void) {
|
||||
|
||||
|
||||
for (CC_id=1;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
tx_max_power[CC_id]=tx_max_power[0];
|
||||
rx_gain[0][CC_id] = rx_gain[0][0];
|
||||
tx_gain[0][CC_id] = tx_gain[0][0];
|
||||
}
|
||||
|
||||
#if T_TRACER
|
||||
paramdef_t cmdline_ttraceparams[] =CMDLINE_TTRACEPARAMS_DESC ;
|
||||
config_process_cmdline( cmdline_ttraceparams,sizeof(cmdline_ttraceparams)/sizeof(paramdef_t),NULL);
|
||||
#endif
|
||||
|
||||
/*
|
||||
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) && (!(CONFIG_ISFLAGSET(CONFIG_NOOOPT))) ) {
|
||||
// Here the configuration file is the XER encoded UE capabilities
|
||||
// Read it in and store in asn1c data structures
|
||||
@@ -589,18 +580,10 @@ static void get_options(void) {
|
||||
printf("%s\n",uecap_xer);
|
||||
if(nfapi_mode!=3)
|
||||
uecap_xer_in=1;
|
||||
} /* UE with config file */
|
||||
} *//* UE with config file */
|
||||
}
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
int T_nowait = 0; /* by default we wait for the tracer */
|
||||
int T_port = 2021; /* default port to listen to to wait for the tracer */
|
||||
int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
|
||||
|
||||
int CC_id;
|
||||
@@ -648,7 +631,7 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
|
||||
|
||||
}
|
||||
|
||||
void init_openair0(void) {
|
||||
void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) {
|
||||
|
||||
int card;
|
||||
int i;
|
||||
@@ -658,8 +641,8 @@ void init_openair0(void) {
|
||||
openair0_cfg[card].mmapped_dma=mmapped_dma;
|
||||
openair0_cfg[card].configFilename = NULL;
|
||||
|
||||
if(frame_parms[0]->N_RB_DL == 100) {
|
||||
if (frame_parms[0]->threequarter_fs) {
|
||||
if(frame_parms->N_RB_DL == 100) {
|
||||
if (frame_parms->threequarter_fs) {
|
||||
openair0_cfg[card].sample_rate=23.04e6;
|
||||
openair0_cfg[card].samples_per_frame = 230400;
|
||||
openair0_cfg[card].tx_bw = 10e6;
|
||||
@@ -670,17 +653,17 @@ void init_openair0(void) {
|
||||
openair0_cfg[card].tx_bw = 10e6;
|
||||
openair0_cfg[card].rx_bw = 10e6;
|
||||
}
|
||||
} else if(frame_parms[0]->N_RB_DL == 50) {
|
||||
} else if(frame_parms->N_RB_DL == 50) {
|
||||
openair0_cfg[card].sample_rate=15.36e6;
|
||||
openair0_cfg[card].samples_per_frame = 153600;
|
||||
openair0_cfg[card].tx_bw = 5e6;
|
||||
openair0_cfg[card].rx_bw = 5e6;
|
||||
} else if (frame_parms[0]->N_RB_DL == 25) {
|
||||
} else if (frame_parms->N_RB_DL == 25) {
|
||||
openair0_cfg[card].sample_rate=7.68e6;
|
||||
openair0_cfg[card].samples_per_frame = 76800;
|
||||
openair0_cfg[card].tx_bw = 2.5e6;
|
||||
openair0_cfg[card].rx_bw = 2.5e6;
|
||||
} else if (frame_parms[0]->N_RB_DL == 6) {
|
||||
} else if (frame_parms->N_RB_DL == 6) {
|
||||
openair0_cfg[card].sample_rate=1.92e6;
|
||||
openair0_cfg[card].samples_per_frame = 19200;
|
||||
openair0_cfg[card].tx_bw = 1.5e6;
|
||||
@@ -690,23 +673,20 @@ void init_openair0(void) {
|
||||
|
||||
|
||||
|
||||
if (frame_parms[0]->frame_type==TDD)
|
||||
if (frame_parms->frame_type==TDD)
|
||||
openair0_cfg[card].duplex_mode = duplex_mode_TDD;
|
||||
else //FDD
|
||||
openair0_cfg[card].duplex_mode = duplex_mode_FDD;
|
||||
|
||||
printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
|
||||
PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx,
|
||||
PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
|
||||
openair0_cfg[card].Mod_id = 0;
|
||||
|
||||
openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
|
||||
openair0_cfg[card].num_rb_dl=frame_parms->N_RB_DL;
|
||||
|
||||
openair0_cfg[card].clock_source = clock_source;
|
||||
|
||||
|
||||
openair0_cfg[card].tx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx);
|
||||
openair0_cfg[card].rx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
|
||||
openair0_cfg[card].tx_num_channels=min(2,frame_parms->nb_antennas_tx);
|
||||
openair0_cfg[card].rx_num_channels=min(2,frame_parms->nb_antennas_rx);
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
|
||||
@@ -722,7 +702,7 @@ void init_openair0(void) {
|
||||
|
||||
openair0_cfg[card].autocal[i] = 1;
|
||||
openair0_cfg[card].tx_gain[i] = tx_gain[0][i];
|
||||
openair0_cfg[card].rx_gain[i] = PHY_vars_UE_g[0][0]->rx_total_gain_dB - rx_gain_off;
|
||||
openair0_cfg[card].rx_gain[i] = rxgain - rx_gain_off;
|
||||
|
||||
|
||||
openair0_cfg[card].configFilename = rf_config_file;
|
||||
@@ -782,14 +762,12 @@ int restart_L1L2(module_id_t enb_id)
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
int i;
|
||||
#if defined (XFORMS)
|
||||
void *status;
|
||||
#endif
|
||||
|
||||
int CC_id;
|
||||
uint8_t abstraction_flag=0;
|
||||
uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
|
||||
|
||||
// Default value for the number of UEs. It will hold,
|
||||
// if not changed from the command line option --num-ues
|
||||
@@ -804,17 +782,11 @@ int main( int argc, char **argv )
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CONSOLE
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
setvbuf(stderr, NULL, _IONBF, 0);
|
||||
#endif
|
||||
|
||||
PHY_VARS_UE *UE[MAX_NUM_CCs];
|
||||
|
||||
mode = normal_txrx;
|
||||
memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS);
|
||||
|
||||
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
|
||||
|
||||
set_latency_target();
|
||||
|
||||
@@ -822,11 +794,19 @@ int main( int argc, char **argv )
|
||||
|
||||
printf("Reading in command-line options\n");
|
||||
|
||||
for (int i=0;i<MAX_NUM_CCs;i++) tx_max_power[i]=23;
|
||||
get_options ();
|
||||
|
||||
|
||||
printf("Running with %d UE instances\n",NB_UE_INST);
|
||||
if (NB_UE_INST > 1 && simL1flag != 1) {
|
||||
printf("Running with more than 1 UE instance and simL1 is not active, this will result in undefined behaviour for now, exiting.\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
printf("NFAPI_MODE value: %d \n", nfapi_mode);
|
||||
|
||||
// Panos: Not sure if the following is needed here
|
||||
// Not sure if the following is needed here
|
||||
/*if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
if (UE_flag == 0) {
|
||||
fprintf(stderr,"Getting configuration failed\n");
|
||||
@@ -840,7 +820,7 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
T_init(T_port, 1-T_nowait, T_dont_fork);
|
||||
T_Config_Init();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -857,26 +837,25 @@ int main( int argc, char **argv )
|
||||
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1);
|
||||
set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1);
|
||||
#if defined(ENABLE_ITTI)
|
||||
set_comp_log(EMU, LOG_INFO, LOG_MED, 1);
|
||||
set_comp_log(SIM, LOG_INFO, LOG_MED, 1);
|
||||
# if defined(ENABLE_USE_MME)
|
||||
set_comp_log(NAS, LOG_INFO, LOG_HIGH, 1);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
if (ouput_vcd) {
|
||||
VCD_SIGNAL_DUMPER_INIT("/tmp/openair_dump_UE.vcd");
|
||||
}
|
||||
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
log_set_instance_type (LOG_INSTANCE_UE);
|
||||
|
||||
|
||||
|
||||
printf("ITTI init\n");
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, itti_dump_file);
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
|
||||
// initialize mscgen log after ITTI
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
@@ -903,7 +882,7 @@ int main( int argc, char **argv )
|
||||
#endif
|
||||
|
||||
//TTN for D2D
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
printf ("RRC control socket\n");
|
||||
rrc_control_socket_init();
|
||||
printf ("PDCP PC5S socket\n");
|
||||
@@ -934,33 +913,6 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
|
||||
printf("Before CC \n");
|
||||
|
||||
|
||||
|
||||
// Panos: From old version
|
||||
/*if (UE_flag==1) {
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**)*NB_UE_INST);
|
||||
for (int i=0; i<NB_UE_INST; i++) {
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
PHY_vars_UE_g[i] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
PHY_vars_UE_g[i][CC_id] = init_ue_vars(frame_parms[CC_id], i,abstraction_flag);
|
||||
|
||||
UE[CC_id] = PHY_vars_UE_g[i][CC_id];
|
||||
printf("PHY_vars_UE_g[inst][%d] = %p\n",CC_id,UE[CC_id]);
|
||||
|
||||
if (phy_test==1)
|
||||
UE[CC_id]->mac_enabled = 0;
|
||||
else
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
//NB_UE_INST=1;
|
||||
NB_INST=1;
|
||||
if(nfapi_mode == 3){
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**)*NB_UE_INST);
|
||||
@@ -969,80 +921,57 @@ int main( int argc, char **argv )
|
||||
PHY_vars_UE_g[i] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
PHY_vars_UE_g[i][CC_id] = init_ue_vars(frame_parms[CC_id], i,abstraction_flag);
|
||||
|
||||
UE[CC_id] = PHY_vars_UE_g[i][CC_id];
|
||||
printf("PHY_vars_UE_g[inst][%d] = %p\n",CC_id,UE[CC_id]);
|
||||
|
||||
if (phy_test==1)
|
||||
UE[CC_id]->mac_enabled = 0;
|
||||
PHY_vars_UE_g[i][CC_id]->mac_enabled = 0;
|
||||
else
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
PHY_vars_UE_g[i][CC_id]->mac_enabled = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
else init_openair0(frame_parms[0],(int)rx_gain[0][0]);
|
||||
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
//NB_UE_INST=1;
|
||||
NB_INST=1;
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**));
|
||||
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
PHY_vars_UE_g[0][CC_id] = init_ue_vars(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]);
|
||||
if (simL1flag==1) {
|
||||
AssertFatal(NULL!=load_configmodule(argc,argv),
|
||||
"[SOFTMODEM] Error, configuration module init failed\n");
|
||||
|
||||
if (phy_test==1)
|
||||
UE[CC_id]->mac_enabled = 0;
|
||||
else
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
RCConfig_sim();
|
||||
}
|
||||
|
||||
if (UE[CC_id]->mac_enabled == 0) { //set default UL parameters for testing mode
|
||||
for (i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
|
||||
UE[CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK;
|
||||
UE[CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index = beta_RI;
|
||||
UE[CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI;
|
||||
|
||||
UE[CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = 0;
|
||||
UE[CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(0%3);
|
||||
UE[CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;
|
||||
}
|
||||
}
|
||||
// start the main UE threads
|
||||
int eMBMS_active = 0;
|
||||
|
||||
UE[CC_id]->UE_scan = UE_scan;
|
||||
UE[CC_id]->UE_scan_carrier = UE_scan_carrier;
|
||||
UE[CC_id]->mode = mode;
|
||||
printf("UE[%d]->mode = %d\n",CC_id,mode);
|
||||
|
||||
if (UE[CC_id]->mac_enabled == 1) {
|
||||
UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1234;
|
||||
UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1234;
|
||||
}else {
|
||||
UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1235;
|
||||
UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235;
|
||||
}
|
||||
UE[CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off;
|
||||
UE[CC_id]->tx_power_max_dBm = tx_max_power[CC_id];
|
||||
|
||||
if (frame_parms[CC_id]->frame_type==FDD) {
|
||||
UE[CC_id]->N_TA_offset = 0;
|
||||
}
|
||||
else {
|
||||
if (frame_parms[CC_id]->N_RB_DL == 100)
|
||||
UE[CC_id]->N_TA_offset = 624;
|
||||
else if (frame_parms[CC_id]->N_RB_DL == 50)
|
||||
UE[CC_id]->N_TA_offset = 624/2;
|
||||
else if (frame_parms[CC_id]->N_RB_DL == 25)
|
||||
UE[CC_id]->N_TA_offset = 624/4;
|
||||
|
||||
}
|
||||
init_openair0();
|
||||
if (nfapi_mode==3) // UE-STUB-PNF
|
||||
{
|
||||
config_sync_var=0;
|
||||
wait_nfapi_init("main?");
|
||||
//Panos: Temporarily we will be using single set of threads for multiple UEs.
|
||||
//init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
|
||||
init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface);
|
||||
}
|
||||
else {
|
||||
init_UE(NB_UE_INST,eMBMS_active,uecap_xer_in,0,phy_test,UE_scan,UE_scan_carrier,mode,(int)rx_gain[0][0],tx_max_power[0],
|
||||
frame_parms[0]);
|
||||
}
|
||||
|
||||
|
||||
printf("Runtime table\n");
|
||||
fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
|
||||
if (phy_test==0) {
|
||||
printf("Filling UE band info\n");
|
||||
fill_ue_band_info();
|
||||
dl_phy_sync_success (0, 0, 0, 1);
|
||||
}
|
||||
|
||||
if (nfapi_mode!=3){
|
||||
number_of_cards = 1;
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.card=0;
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1092,21 +1021,76 @@ int main( int argc, char **argv )
|
||||
printf("cannot create ITTI tasks\n");
|
||||
exit(-1); // need a softer mode
|
||||
}
|
||||
if(nfapi_mode==3){ //Panos: Here we should add another nfapi_mode for the case of Supervised LTE-D2D
|
||||
if(nfapi_mode==3){ // Here we should add another nfapi_mode for the case of Supervised LTE-D2D
|
||||
UE_config_stub_pnf();
|
||||
}
|
||||
printf("ITTI tasks created\n");
|
||||
#endif
|
||||
|
||||
// init UE_PF_PO and mutex lock
|
||||
pthread_mutex_init(&ue_pf_po_mutex, NULL);
|
||||
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs);
|
||||
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
|
||||
|
||||
rt_sleep_ns(10*100000000ULL);
|
||||
|
||||
const char *nfapi_mode_str = "<UNKNOWN>";
|
||||
|
||||
switch(nfapi_mode)
|
||||
{
|
||||
case 0:
|
||||
nfapi_mode_str = "MONOLITHIC";
|
||||
break;
|
||||
case 1:
|
||||
nfapi_mode_str = "PNF";
|
||||
break;
|
||||
case 2:
|
||||
nfapi_mode_str = "VNF";
|
||||
break;
|
||||
case 3:
|
||||
nfapi_mode_str = "UE_STUB_PNF";
|
||||
break;
|
||||
case 4:
|
||||
nfapi_mode_str = "UE_STUB_OFFNET";
|
||||
break;
|
||||
default:
|
||||
nfapi_mode_str = "<UNKNOWN NFAPI MODE>";
|
||||
break;
|
||||
}
|
||||
printf("NFAPI MODE:%s\n", nfapi_mode_str);
|
||||
|
||||
|
||||
// connect the TX/RX buffers
|
||||
|
||||
|
||||
/*
|
||||
if(nfapi_mode!=3) {
|
||||
if (setup_ue_buffers(PHY_vars_UE_g[0],&openair0_cfg[0])!=0) {
|
||||
printf("Error setting up eNB buffer\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if (input_fd) {
|
||||
printf("Reading in from file to antenna buffer %d\n",0);
|
||||
if (fread(PHY_vars_UE_g[0][0]->common_vars.rxdata[0],
|
||||
sizeof(int32_t),
|
||||
frame_parms[0]->samples_per_tti*10,
|
||||
input_fd) != frame_parms[0]->samples_per_tti*10)
|
||||
printf("error reading from file\n");
|
||||
}
|
||||
//p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX;
|
||||
|
||||
|
||||
if (simL1flag==1) {
|
||||
init_ocm((double)snr_dB,0);
|
||||
PHY_vars_UE_g[0][0]->no_timing_correction = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef XFORMS
|
||||
int UE_id;
|
||||
|
||||
@@ -1142,110 +1126,25 @@ int main( int argc, char **argv )
|
||||
|
||||
#endif
|
||||
|
||||
rt_sleep_ns(10*100000000ULL);
|
||||
printf("Sending sync to all threads (%p,%p,%p)\n",&sync_var,&sync_cond,&sync_mutex);
|
||||
|
||||
const char *nfapi_mode_str = "<UNKNOWN>";
|
||||
|
||||
switch(nfapi_mode)
|
||||
{
|
||||
case 0:
|
||||
nfapi_mode_str = "MONOLITHIC";
|
||||
break;
|
||||
case 1:
|
||||
nfapi_mode_str = "PNF";
|
||||
break;
|
||||
case 2:
|
||||
nfapi_mode_str = "VNF";
|
||||
break;
|
||||
case 3:
|
||||
nfapi_mode_str = "UE_STUB_PNF";
|
||||
break;
|
||||
case 4:
|
||||
nfapi_mode_str = "UE_STUB_OFFNET";
|
||||
break;
|
||||
default:
|
||||
nfapi_mode_str = "<UNKNOWN NFAPI MODE>";
|
||||
break;
|
||||
}
|
||||
printf("NFAPI MODE:%s\n", nfapi_mode_str);
|
||||
|
||||
|
||||
// start the main threads
|
||||
int eMBMS_active = 0;
|
||||
|
||||
if (nfapi_mode==3) // UE-STUB-PNF
|
||||
{
|
||||
config_sync_var=0;
|
||||
wait_nfapi_init("main?");
|
||||
//Panos: Temporarily we will be using single set of threads for multiple UEs.
|
||||
//init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
|
||||
init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface);
|
||||
}
|
||||
else {
|
||||
init_UE(1,eMBMS_active,uecap_xer_in,0);
|
||||
}
|
||||
|
||||
if (phy_test==0) {
|
||||
printf("Filling UE band info\n");
|
||||
fill_ue_band_info();
|
||||
dl_phy_sync_success (0, 0, 0, 1);
|
||||
}
|
||||
|
||||
if (nfapi_mode!=3){
|
||||
number_of_cards = 1;
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.card=0;
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// connect the TX/RX buffers
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
|
||||
#ifdef OAI_USRP
|
||||
UE[CC_id]->hw_timing_advance = timing_advance;
|
||||
#else
|
||||
UE[CC_id]->hw_timing_advance = 160;
|
||||
#endif
|
||||
}
|
||||
if(nfapi_mode!=3) {
|
||||
if (setup_ue_buffers(UE,&openair0_cfg[0])!=0) {
|
||||
printf("Error setting up eNB buffer\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (input_fd) {
|
||||
printf("Reading in from file to antenna buffer %d\n",0);
|
||||
if (fread(UE[0]->common_vars.rxdata[0],
|
||||
sizeof(int32_t),
|
||||
frame_parms[0]->samples_per_tti*10,
|
||||
input_fd) != frame_parms[0]->samples_per_tti*10)
|
||||
printf("error reading from file\n");
|
||||
}
|
||||
//p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX;
|
||||
|
||||
printf("Sending sync to all threads\n");
|
||||
|
||||
pthread_mutex_lock(&sync_mutex);
|
||||
sync_var=0;
|
||||
pthread_cond_broadcast(&sync_cond);
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
|
||||
printf("sync sent\n");
|
||||
/*
|
||||
printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
|
||||
end_configmodule();
|
||||
printf("Called end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
|
||||
|
||||
*/
|
||||
// wait for end of program
|
||||
printf("TYPE <CTRL-C> TO TERMINATE\n");
|
||||
//getchar();
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
printf("Entering ITTI signals handler\n");
|
||||
itti_wait_tasks_end();
|
||||
@@ -1254,9 +1153,9 @@ int main( int argc, char **argv )
|
||||
printf("oai_exit=%d\n",oai_exit);
|
||||
#else
|
||||
|
||||
while (oai_exit==0)
|
||||
rt_sleep_ns(100000000ULL);
|
||||
printf("Terminating application - oai_exit=%d\n",oai_exit);
|
||||
while (oai_exit==0)
|
||||
rt_sleep_ns(100000000ULL);
|
||||
printf("Terminating application - oai_exit=%d\n",oai_exit);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1279,15 +1178,12 @@ int main( int argc, char **argv )
|
||||
pthread_cond_destroy(&sync_cond);
|
||||
pthread_mutex_destroy(&sync_mutex);
|
||||
|
||||
pthread_mutex_destroy(&ue_pf_po_mutex);
|
||||
// pthread_mutex_destroy(&ue_pf_po_mutex);
|
||||
|
||||
// *** Handle per CC_id openair0
|
||||
if (PHY_vars_UE_g[0][0]->rfdevice.trx_end_func)
|
||||
PHY_vars_UE_g[0][0]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][0]->rfdevice);
|
||||
|
||||
if (ouput_vcd)
|
||||
VCD_SIGNAL_DUMPER_CLOSE();
|
||||
|
||||
if (opt_enabled == 1)
|
||||
terminate_opt();
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
[*]
|
||||
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
|
||||
[*] Sun Jan 15 07:26:50 2017
|
||||
[*] Tue Jun 5 09:36:17 2018
|
||||
[*]
|
||||
[dumpfile] "/tmp/openair_dump_eNB.vcd"
|
||||
[dumpfile_mtime] "Sun Jan 15 07:04:19 2017"
|
||||
[dumpfile_size] 18140627
|
||||
[savefile] "/home/uprru1/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
|
||||
[timestart] 29977510000
|
||||
[dumpfile] "/tmp/openair_dump_UE.vcd"
|
||||
[dumpfile_mtime] "Tue Jun 5 09:22:52 2018"
|
||||
[dumpfile_size] 23057775
|
||||
[savefile] "/home/knopp/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
|
||||
[timestart] 25050480000
|
||||
[size] 1301 716
|
||||
[pos] 309 0
|
||||
*-21.793451 29983948856 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[sst_width] 284
|
||||
[sst_width] 312
|
||||
[signals_width] 262
|
||||
[sst_expanded] 1
|
||||
[sst_vpaned_height] 294
|
||||
@28
|
||||
functions.trx_read
|
||||
functions.trx_write
|
||||
@25
|
||||
@24
|
||||
variables.trx_write_flags[63:0]
|
||||
@28
|
||||
functions.trx_write_if
|
||||
@@ -27,23 +27,10 @@ functions.recv_if4
|
||||
@24
|
||||
variables.trx_ts[63:0]
|
||||
variables.trx_tst[63:0]
|
||||
@28
|
||||
functions.eNB_thread_rxtx0
|
||||
@24
|
||||
variables.frame_number_RX0_eNB[63:0]
|
||||
variables.subframe_number_RX0_eNB[63:0]
|
||||
variables.frame_number_TX0_eNB[63:0]
|
||||
variables.subframe_number_TX0_eNB[63:0]
|
||||
@28
|
||||
functions.eNB_thread_rxtx1
|
||||
@24
|
||||
variables.frame_number_RX1_eNB[63:0]
|
||||
variables.subframe_number_RX1_eNB[63:0]
|
||||
variables.frame_number_TX1_eNB[63:0]
|
||||
variables.subframe_number_TX1_eNB[63:0]
|
||||
@28
|
||||
functions.phy_eNB_ofdm_mod_l
|
||||
functions.phy_eNB_slot_fep
|
||||
functions.phy_enb_prach_rx
|
||||
variables.frame_number_RX0_RU[63:0]
|
||||
variables.subframe_number_RX0_RU[63:0]
|
||||
variables.frame_number_TX0_RU[63:0]
|
||||
@25
|
||||
variables.subframe_number_TX0_RU[63:0]
|
||||
[pattern_trace] 1
|
||||
[pattern_trace] 0
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
all: oaisim nasmesh
|
||||
|
||||
oaisim:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && make LINK_ENB_PDCP_TO_IP_DRIVER=1 -j2 )
|
||||
nasmesh:
|
||||
(cd $(OPENAIR2_DIR) && make nasmesh_netlink.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL/ && make)
|
||||
|
||||
one_eNB_one_UE: oaisim nasmesh
|
||||
|
||||
userclean: clean oaisim nasmesh
|
||||
|
||||
clean:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && make cleanall)
|
||||
@@ -1,71 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo kill -9 `ps -ef | grep oaisim | awk '{print $2}'`
|
||||
sudo pkill oaisim
|
||||
|
||||
# set params
|
||||
EMULATION_DEV_INTERFACE="eth0"
|
||||
EMULATION_MULTICAST_GROUP=1
|
||||
EMULATION_LOG_LEVEL=7 # 3 = error, 5 info, 7 debug, trace= 9
|
||||
#OAI_LOCAL_ADDRESS="10.0.1.1"
|
||||
#OAI_REMOTE_ADDRESS="10.0.1.2"
|
||||
#EMULATION_DEV_ADDRESS= `hostname -I cut -f1 -d' '`
|
||||
EMULATION_DEV_ADDRESS=`LC_ALL=C ifconfig $EMULATION_DEV_INTERFACE | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`
|
||||
|
||||
echo "Setting Emulation Interface to $EMULATION_DEV_INTERFACE ($EMULATION_DEV_ADDRESS)"
|
||||
|
||||
#funcs
|
||||
test_install_package() {
|
||||
# usage: test_install_package package_name
|
||||
if [ $# -eq 1 ]; then
|
||||
dpkg -s "$1" > /dev/null 2>&1 && {
|
||||
echo "$1 is installed."
|
||||
} || {
|
||||
echo "$1 is not installed."
|
||||
sudo apt-get install --assume-yes $1
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
#PGM provide a reliable mutlicast data transport"
|
||||
test_install_package libpgm-dev
|
||||
test_install_package libpgm-5.1-0
|
||||
|
||||
PGM_FOUND=`dpkg-query -W -f='${Status}' libpgm-dev 2>/dev/null | grep -c "ok installed" `
|
||||
|
||||
if [ $PGM_FOUND = 1 ]; then
|
||||
PGM=-D$EMULATION_DEV_ADDRESS
|
||||
else
|
||||
PGM=" "
|
||||
fi
|
||||
|
||||
# check the compilation
|
||||
echo "Bringup eNB interface"
|
||||
sudo rmmod nasmesh
|
||||
make all
|
||||
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
||||
echo "Make sure that eth0 is the interface between the machines, otherwise change"
|
||||
sudo ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
|
||||
|
||||
# when running as a suduoers, the following lines are not needed
|
||||
#sudo ifconfig oai0 $OAI_LOCAL_ADDRESS netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
#echo "applying DRB classification"
|
||||
#echo "$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s $OAI_LOCAL_ADDRESS -t $OAI_REMOTE_ADDRESS -r 1"
|
||||
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s $OAI_LOCAL_ADDRESS -t $OAI_REMOTE_ADDRESS -r 1
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null"
|
||||
sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null
|
||||
else
|
||||
if [ $1 = "all" ]; then
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM"
|
||||
sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM
|
||||
else
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1"
|
||||
sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1
|
||||
fi
|
||||
fi
|
||||
echo "End"
|
||||
@@ -1,67 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo kill -9 `ps -ef | grep oaisim | awk '{print $2}'`
|
||||
sudo pkill oaisim
|
||||
|
||||
# set params
|
||||
EMULATION_DEV_INTERFACE="eth0"
|
||||
EMULATION_MULTICAST_GROUP=1
|
||||
EMULATION_LOG_LEVEL=7 # 3 = error, 5 info, 7 debug, trace= 9
|
||||
#OAI_LOCAL_ADDRESS="10.0.1.2"
|
||||
#OAI_REMOTE_ADDRESS="10.0.1.1"
|
||||
#EMULATION_DEV_ADDRESS= `hostname -I cut -f1 -d' '`
|
||||
EMULATION_DEV_ADDRESS=`LC_ALL=C ifconfig $EMULATION_DEV_INTERFACE | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`
|
||||
|
||||
echo "Setting Emulation Interface to $EMULATION_DEV_INTERFACE ($EMULATION_DEV_ADDRESS)"
|
||||
|
||||
#funcs
|
||||
test_install_package() {
|
||||
# usage: test_install_package package_name
|
||||
if [ $# -eq 1 ]; then
|
||||
dpkg -s "$1" > /dev/null 2>&1 && {
|
||||
echo "$1 is installed."
|
||||
} || {
|
||||
echo "$1 is not installed."
|
||||
sudo apt-get install --assume-yes $1
|
||||
}
|
||||
fi
|
||||
}
|
||||
#PGM provide a reliable mutlicast data transport"
|
||||
test_install_package libpgm-dev
|
||||
test_install_package libpgm-5.1-0
|
||||
PGM_FOUND=`dpkg-query -W -f='${Status}' libpgm-dev 2>/dev/null | grep -c "ok installed" `
|
||||
if [ $PGM_FOUND = 1 ]; then
|
||||
PGM=-D$EMULATION_DEV_ADDRESS
|
||||
else
|
||||
PGM=" "
|
||||
fi
|
||||
|
||||
echo "Building"
|
||||
sudo rmmod nasmesh
|
||||
make nasmesh all
|
||||
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
|
||||
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
||||
echo "Make sure that eth0 is the interface between the machines, otherwise change"
|
||||
sudo ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
|
||||
|
||||
# when running as a suduoers, the following lines are not needed
|
||||
#sudo ifconfig oai0 $OAI_LOCAL_ADDRES netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s $OAI_LOCAL_ADDRESS -t $OAI_REMOTE_ADDRESS -r 1
|
||||
|
||||
# running oaisim
|
||||
if [ -z $1 ]; then
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null"
|
||||
sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null
|
||||
else
|
||||
if [ $1 = "all" ]; then
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM "
|
||||
sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM
|
||||
else
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1"
|
||||
sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1
|
||||
fi
|
||||
fi
|
||||
echo "End"
|
||||
@@ -1,209 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os, sys, warnings
|
||||
import serial
|
||||
|
||||
def sendToTTY(lineP):
|
||||
sys.stdout.write("\nSend:\n" + lineP+"\n")
|
||||
g_ser.write(lineP)
|
||||
g_ser.flush()
|
||||
|
||||
|
||||
|
||||
g_ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
|
||||
|
||||
buffer = ''
|
||||
while True:
|
||||
buffer += g_ser.read(1)
|
||||
#sys.stdout.write("buffer is now:\n" + buffer+"\n")
|
||||
buffer = buffer.lstrip('\r')
|
||||
if '\r' in buffer:
|
||||
at_received, buffer = buffer.split('\r')[-2:]
|
||||
|
||||
at_received = at_received.strip('\n')
|
||||
at_received = at_received.strip('\r')
|
||||
|
||||
if at_received == '\n' or at_received == '' or at_received == '\r':
|
||||
break
|
||||
else:
|
||||
sys.stdout.write("Receive stripped:\n" + at_received+"\n")
|
||||
# Q0 = enable codes
|
||||
# Q1 = disable codes
|
||||
if at_received == 'ATE0Q0V1':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# ATS0, Automatic Answer
|
||||
# This S-parameter controls the automatic answering feature of the modem
|
||||
# 0 automatic answering is disabled
|
||||
# 1 - 255 enable automatic answering on the ring number specified
|
||||
# here value received is 0
|
||||
elif at_received.startswith('ATS0='):
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# AT+CMEEReport mobile equipment error
|
||||
#0 Disable +CME ERROR result code. Use ERROR instead.
|
||||
#1 Enable +CME ERROR result code and use numeric<err> values
|
||||
#2 Enable +CME ERROR result code and use verbose<err> values
|
||||
# here value received is 1
|
||||
elif at_received.startswith('AT+CMEE='):
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# Network registration events
|
||||
# AT+CREGNetwork registration (ver. 2)
|
||||
# Description:
|
||||
# Controls the presentation of an unsolicited result code +CREG : <stat>
|
||||
# when <n>=1 and there is a change in the ME network registration status or
|
||||
# code +CREG: <stat>[,<lac>,<ci>] when <n>=2 and there is a change of thenetwork cell.
|
||||
# Read command returns the status of result code presentation and an integer <stat>,
|
||||
# which shows whether the network has currently indicated the registration of the ME.
|
||||
# Location information elements <lac> and <ci> are returned only when <n>=2 and ME
|
||||
# is registered in the network.
|
||||
# <n>:
|
||||
# 0 Disable network registration unsolicited result code. Default value
|
||||
# 1 Enable network registration unsolicited result code,+CREG: <stat>
|
||||
# 2 Enable network registration and location information unsolicited result code, +CREG:<stat>[,<lac>,<ci>]
|
||||
# <stat>:
|
||||
# 0 not registered new operator to registered and not searching
|
||||
# 1 registered, home network
|
||||
# 2 not registered, currently searching a new operator to register with
|
||||
# 3 registration denied
|
||||
# 4 unknown
|
||||
# 5 registered, roaming
|
||||
elif at_received == 'AT+CREG=2':
|
||||
sendToTTY('\rOK\r')
|
||||
sendToTTY('+CREG: 1,00C3,01021A02 \r')
|
||||
|
||||
elif at_received == 'AT+CREG=1':
|
||||
sendToTTY('\rOK\r')
|
||||
sendToTTY('+CREG: 1\r')
|
||||
|
||||
elif at_received == 'AT+CREG?':
|
||||
sendToTTY('+CREG: 1,00C3,01021A02\r\nOK\r')
|
||||
|
||||
|
||||
|
||||
# GPRS registration events
|
||||
# +CGREGNetwork registration reporting
|
||||
# Packet domain network registration status AT+CGPADDRShow PDP address
|
||||
# Description:
|
||||
# Controls the presentation of the unsolicited result code +CGREG: <stat>
|
||||
# when <n>='1' and there is a change in the ME GPRS network registration status or
|
||||
# +CGREG: <stat>[,<lac>,<ci>] when <n>='2' and there is achange of the network cell.
|
||||
# ---
|
||||
# Note: If the GPRS MT also supports circuit mode services,
|
||||
# AT+CREG and the +CREG result code apply to the registration status and location
|
||||
# information for those services. The read command returns the status of result
|
||||
# code presentation and an integer <stat> which shows whether the network has
|
||||
# currently indicated the registration of the ME.
|
||||
# Location information elements <lac> and <ci> are returned only when <n>=2
|
||||
# and ME is registered in the network.
|
||||
elif at_received == 'AT+CGREG=1':
|
||||
sendToTTY('\rOK\r')
|
||||
sendToTTY('+CGREG: 1\r')
|
||||
|
||||
elif at_received == 'AT+CGREG?':
|
||||
sendToTTY('+CGREG: 0,1\r\nOK\r')
|
||||
|
||||
|
||||
|
||||
# Call Waiting notifications
|
||||
elif at_received == 'AT+CCWA=1':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# Alternating voice/data off
|
||||
elif at_received == 'AT+CMOD=0':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# +CSSU unsolicited supp service notifications
|
||||
elif at_received == 'AT+CSSN=0,1':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# no connected at_received identification
|
||||
elif at_received == 'AT+COLP=0':
|
||||
sendToTTY('+COLP:0\r\nOK\r')
|
||||
|
||||
# HEX character set
|
||||
# AT+CSCSSelect TE character set (ver. 3)
|
||||
elif at_received == 'AT+CSCS=\"HEX\"':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# USSD unsolicited
|
||||
# AT+CUSD Unstructured supplementary service data (ver. 2)
|
||||
# <n>
|
||||
# 0 Disable result code presentation in the TA.Defaultvalue
|
||||
# 1 Enable result code presentation in the TA
|
||||
# 2 Terminate (abort) USSD dialogue. This value is not applicable to the read command response. Notsupported
|
||||
elif at_received == 'AT+CUSD=1':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# Enable +CGEV GPRS event notifications, but don't buffer
|
||||
# AT+CGEREPPacket domain event reporting (ver. 1)
|
||||
elif at_received == 'AT+CGEREP=1,0':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# SMS PDU mode
|
||||
# AT+CMGF Message format (ver. 1)
|
||||
elif at_received == 'AT+CMGF=0':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
elif at_received == 'AT+CPIN?':
|
||||
sendToTTY('\r+CPIN: READY\r\nOK\r')
|
||||
#sendToTTY('\rOK\r')
|
||||
|
||||
# AT+CFUNSet phone functionality (ver. 2)
|
||||
# 0 Minimum functionality, that is, the phone is turnedoff. Default value
|
||||
# 1 Full functionality, that is, the phone is turned on
|
||||
# 2 Disable phone transmit RF circuits only. Notsupported
|
||||
# 3 Disable phone receive RF circuits only. Notsupported
|
||||
# 4 Disable phone transmit and receive RF circuits.Note: This is often referred to as "flight mode"
|
||||
# 5 GSM only (WCDMA radio off)
|
||||
# 6 WCDMA only (GSM radio off)
|
||||
elif at_received == 'AT+CFUN?':
|
||||
sendToTTY('+CFUN: 1\r\nOK\r')
|
||||
|
||||
elif at_received == 'AT+CFUN=1':
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
# AT+CLCCList current calls
|
||||
# Description:
|
||||
# Returns the list of current calls. If command succeeds but no calls areavailable, no information response is sent to TE
|
||||
elif at_received == 'AT+CLCC':
|
||||
sendToTTY('+CLCC: \r\nOK\r')
|
||||
|
||||
# AT+COPSOperator selection (ver. 2)
|
||||
# AT+COPS=[<mode>[,<format>[,<oper>[,AcT]]]]
|
||||
#
|
||||
# <mode> Description
|
||||
# 0 Automatic (<oper> field is ignored.) Default value
|
||||
# 1 Manual (<oper> field will be present)
|
||||
# 2 Deregister from network. Not supported
|
||||
# 3 Set only <format> (for read command +COPS?), donot attempt registration/deregistration (<oper> field is ignored).
|
||||
# This value is not applicable in readcommand response
|
||||
# 4 Manual/automatic (<oper> field will be present). Ifmanual selection fails, automatic mode (<mode>=0)is entered
|
||||
elif at_received == 'AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?':
|
||||
sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\n+COPS: 0,1, \"Free\"\r\n+COPS: 0,2, \"310170\"\r\nOK\r')
|
||||
|
||||
elif at_received == 'AT+COPS?':
|
||||
#sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\n+COPS: 0,1, \"Free\"\r\n+COPS: 0,2, \"310170\"\r\nOK\r')
|
||||
sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\nOK\r')
|
||||
|
||||
elif at_received == 'AT+COPS=0':
|
||||
#sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\n+COPS: 0,1, \"Free\"\r\n+COPS: 0,2, \"310170\"\r\nOK\r')
|
||||
sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\nOK\r')
|
||||
|
||||
# IMEI
|
||||
elif at_received == 'AT+CGSN':
|
||||
sendToTTY('+CGSN:534500314160207\r\nOK\r')
|
||||
|
||||
# Signal quality (ver.1)
|
||||
# Returns received signal strength indication <rssi> and channel bit errorrate <ber> from the phone.
|
||||
elif at_received == 'AT+CSQ':
|
||||
#31,7
|
||||
sendToTTY('+CSQ:8,7\r\nOK\r')
|
||||
|
||||
|
||||
|
||||
else:
|
||||
sendToTTY('\rOK\r')
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
all: oaisim naslite_netlink_ether
|
||||
|
||||
oaisim:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && make oaisim OAI_NW_DRIVER_TYPE_ETHERNET=1 PDCP_USE_NETLINK=1)
|
||||
naslite_netlink_ether:
|
||||
(cd $(OPENAIR2_DIR) && make naslite_netlink_ether.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE/RB_TOOL/ && make)
|
||||
|
||||
remserial:
|
||||
(cd $(OPENAIR3_DIR)/UTILS/REMSERIAL-1.4.UDP && make all)
|
||||
(cp -upv $(OPENAIR3_DIR)/UTILS/REMSERIAL-1.4.UDP/remserial /usr/bin/remserial.udp)
|
||||
|
||||
one_eNB_one_UE: oaisim naslite_netlink_ether
|
||||
|
||||
userclean: clean oaisim naslite_netlink_ether
|
||||
|
||||
clean:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && make clean)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE && make clean)
|
||||
(cd $(OPENAIR2_DIR) && make clean)
|
||||
@@ -1,86 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "Bringup eNB interface"
|
||||
|
||||
ip link set oai0 down
|
||||
rmmod nasmesh
|
||||
make naslite_netlink_ether oaisim
|
||||
insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/nasmesh.ko nas_IMEI=3,9,1,8,3,6,6,2,0,0,0,0,0,0
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#route add -net 224.0.0.0 netmask 240.0.0.0 dev eth2
|
||||
#ip addr add dev eth1 192.168.14.145/24 broadcast 192.168.14.255
|
||||
ip link set oai0 broadcast ff:ff:ff:ff:ff:ff
|
||||
#ip route add 192.168.14.0/24 dev eth2
|
||||
ip route add 224.0.0.160/28 dev eth1
|
||||
ip link set oai0 up
|
||||
sleep 1
|
||||
|
||||
EXTIF="eth0"
|
||||
INTIF="oai0"
|
||||
IPTABLES=/sbin/iptables
|
||||
#IPTABLES=/usr/local/sbin/iptables
|
||||
DEPMOD=/sbin/depmod
|
||||
MODPROBE=/sbin/modprobe
|
||||
echo " External Interface: $EXTIF"
|
||||
echo " Internal Interface: $INTIF"
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo -en "ip_tables, "
|
||||
$MODPROBE ip_tables
|
||||
echo -en "ip_conntrack, "
|
||||
$MODPROBE ip_conntrack
|
||||
echo -en "ip_conntrack_irc, "
|
||||
$MODPROBE ip_conntrack_irc
|
||||
echo -en "iptable_nat, "
|
||||
$MODPROBE iptable_nat
|
||||
echo -e " Done loading modules.\n"
|
||||
echo " Enabling forwarding.."
|
||||
echo "1" > /proc/sys/net/ipv4/ip_forward
|
||||
echo " Enabling DynamicAddr.."
|
||||
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
|
||||
echo " Clearing any existing rules and setting default policy.."
|
||||
$IPTABLES -P INPUT ACCEPT
|
||||
$IPTABLES -F INPUT
|
||||
$IPTABLES -P OUTPUT ACCEPT
|
||||
$IPTABLES -F OUTPUT
|
||||
$IPTABLES -P FORWARD DROP
|
||||
$IPTABLES -F FORWARD
|
||||
$IPTABLES -t nat -F
|
||||
$IPTABLES -t mangle -F
|
||||
$IPTABLES -t filter -F
|
||||
echo " FWD: Allow all connections OUT and only existing and related ones IN"
|
||||
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
|
||||
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
|
||||
#$IPTABLES -A FORWARD -j LOG
|
||||
echo " Enabling SNAT (MASQUERADE) functionality on $EXTIF"
|
||||
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
|
||||
|
||||
|
||||
|
||||
ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
sleep 1
|
||||
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 3
|
||||
ip addr add dev oai0 2001:1::1/64
|
||||
# -a -> Add RB
|
||||
# -d -> Delete RB
|
||||
# -cxx -> lcr (uid of a cx_entity)
|
||||
# -ixx -> instance
|
||||
# -zxx -> dscp
|
||||
# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
|
||||
# -sxxx -> source ipv4 address
|
||||
# -txxx -> destination ipv4 address
|
||||
# -x -> source ipv6 address
|
||||
# -y -> destination ipv6 address
|
||||
# -r -> radio bearer id
|
||||
echo "rb_tool -a -c0 -i0 -f0 -z0 -x 2001:1::1/128 -y 2001:1::2/128 -r 1"
|
||||
$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -i0 -f0 -z0 -x 2001:1::1/128 -y 2001:1::2/128 -r 1
|
||||
|
||||
echo "rb_tool -a -c0 -i0 -f2 -z63 -s 10.0.1.1/32 -t 10.0.1.2/32 -r 1"
|
||||
$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -i0 -f2 -z64 -s 10.0.1.1/32 -t 10.0.1.2/32 -r 1
|
||||
|
||||
echo "rb_tool -a -c0 -i0 -f2 -z63 -s 10.0.1.1/32 -t 10.0.1.2/32 -r 1"
|
||||
$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -i0 -f4 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 1
|
||||
|
||||
echo "to see eNB stats, please run : watch_enb script"
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 > /dev/null"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 | grep RLC
|
||||
echo "End"
|
||||
@@ -1,320 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#------------------------------------------------
|
||||
MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
|
||||
MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
|
||||
IP_DRIVER_NAME=oai_nw_drv
|
||||
###########################################################
|
||||
# CONFIGURE OPTIONS
|
||||
EMULIF="eth1"
|
||||
LTEIF="oai0"
|
||||
EXTIF="eth0"
|
||||
INTIF=$LTEIF
|
||||
#----------------------------------------------------------
|
||||
LTE_NETWORK_CIDR="10.0.1.0/24"
|
||||
ENB_IPv4="10.0.1.1"
|
||||
ENB_IPv6="2001:1::1"
|
||||
ENB_IPv6_CIDR=$ENB_IPv6"/64"
|
||||
ENB_IPv4_CIDR=$ENB_IPv4"/24"
|
||||
ENB_IF_ID="3,9,1,8,3,6,6,2,0,0,0,0,0,0"
|
||||
#----------------------------------------------------------
|
||||
UE_IPv4="10.0.1.2"
|
||||
UE_IPv6="2001:1::2"
|
||||
UE_IPv6_CIDR=$UE_IPv6"/64"
|
||||
UE_IPv4_CIDR=$UE_IPv4"/24"
|
||||
#----------------------------------------------------------
|
||||
|
||||
# +-------+ +-------+
|
||||
# | eNB | EMULIF | UE |
|
||||
# | +---------------------+ |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | LTEIF | |
|
||||
# | +.................... + |
|
||||
# | |ENB_IPv4 UE_IPv4_CIDR| |
|
||||
# +-------+ LTE link over +-------+
|
||||
# UDP over ethernet
|
||||
###########################################################
|
||||
IPTABLES=/sbin/iptables
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
declare -x OPENAIR_DIR=""
|
||||
declare -x OPENAIR1_DIR=""
|
||||
declare -x OPENAIR2_DIR=""
|
||||
declare -x OPENAIR3_DIR=""
|
||||
declare -x OPENAIR_TARGETS=""
|
||||
###########################################################
|
||||
|
||||
|
||||
black='\E[30m'
|
||||
red='\E[31m'
|
||||
green='\E[32m'
|
||||
yellow='\E[33m'
|
||||
blue='\E[34m'
|
||||
magenta='\E[35m'
|
||||
cyan='\E[36m'
|
||||
white='\E[37m'
|
||||
|
||||
ROOT_UID=0
|
||||
E_NOTROOT=67
|
||||
|
||||
|
||||
cecho() # Color-echo
|
||||
# arg1 = message
|
||||
# arg2 = color
|
||||
{
|
||||
local default_msg="No Message."
|
||||
message=${1:-$default_msg}
|
||||
color=${2:-$black}
|
||||
echo -e "$color"
|
||||
echo -n "$message"
|
||||
tput sgr0
|
||||
echo
|
||||
return
|
||||
}
|
||||
|
||||
echo_error() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $red
|
||||
}
|
||||
|
||||
echo_warning() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $yellow
|
||||
}
|
||||
|
||||
echo_success() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $green
|
||||
}
|
||||
|
||||
set_openair() {
|
||||
path=`pwd`
|
||||
declare -i length_path
|
||||
declare -i index
|
||||
length_path=${#path}
|
||||
|
||||
index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
|
||||
#echo ${path%$token*}
|
||||
if [[ $index -lt $length_path && index -gt 0 ]]
|
||||
then
|
||||
declare -x OPENAIR_DIR
|
||||
index=`expr $index - 1`
|
||||
openair_path=`echo $path | cut -c1-$index`
|
||||
#openair_path=`echo ${path:0:$index}`
|
||||
export OPENAIR_DIR=$openair_path
|
||||
export OPENAIR1_DIR=$openair_path/openair1
|
||||
export OPENAIR2_DIR=$openair_path/openair2
|
||||
export OPENAIR3_DIR=$openair_path/openair3
|
||||
export OPENAIR_TARGETS=$openair_path/targets
|
||||
return 0
|
||||
fi
|
||||
return -1
|
||||
}
|
||||
|
||||
bash_exec() {
|
||||
output=$($1 2>&1)
|
||||
result=$?
|
||||
if [ $result -eq 0 ]
|
||||
then
|
||||
echo_success "$1"
|
||||
else
|
||||
echo_error "$1: $output"
|
||||
fi
|
||||
}
|
||||
|
||||
wait_process_started () {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo_error "WAITING FOR PROCESS START: NO PROCESS"
|
||||
return 1
|
||||
fi
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
while [ $? -ne 0 ]; do
|
||||
echo_warning "WAITING FOR $1 START"
|
||||
sleep 2
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
done
|
||||
echo_success "PROCESS $1 STARTED"
|
||||
return 0
|
||||
}
|
||||
|
||||
assert() {
|
||||
# If condition false
|
||||
# exit from script with error message
|
||||
E_PARAM_ERR=98
|
||||
E_PARAM_FAILED=99
|
||||
|
||||
if [ -z "$2" ] # Not enought parameters passed.
|
||||
then
|
||||
return $E_PARAM_ERR
|
||||
fi
|
||||
|
||||
lineno=$2
|
||||
if [ ! $1 ]
|
||||
then
|
||||
echo "Assertion failed: \"$1\""
|
||||
echo "File \"$0\", line $lineno"
|
||||
exit $E_ASSERT_FAILED
|
||||
fi
|
||||
}
|
||||
|
||||
#bash_exec "set_openair"
|
||||
set_openair
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
|
||||
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
|
||||
cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
|
||||
cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
|
||||
|
||||
|
||||
echo "Bringup UE interface"
|
||||
bash_exec "rmmod $IP_DRIVER_NAME"
|
||||
cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET....." $green
|
||||
bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET"
|
||||
bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=$ENB_IF_ID"
|
||||
|
||||
|
||||
echo " Enabling proxy ARP.."
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.proxy_arp=1"
|
||||
assert "`sysctl -n net.ipv4.conf.all.proxy_arp` -eq 1" $LINENO
|
||||
|
||||
echo " Enabling ipv4 forwarding.."
|
||||
bash_exec "sysctl -w net.ipv4.ip_forward=1"
|
||||
assert "`sysctl -n net.ipv4.ip_forward` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.forwarding=1"
|
||||
assert "`sysctl -n net.ipv4.conf.all.forwarding` -eq 1" $LINENO
|
||||
|
||||
echo " Enabling ipv6 forwarding.."
|
||||
bash_exec "sysctl -w net.ipv6.conf.all.forwarding=1"
|
||||
assert "`sysctl -n net.ipv6.conf.all.forwarding` -eq 1" $LINENO
|
||||
|
||||
echo " Enabling DynamicAddr.."
|
||||
bash_exec "sysctl -w net.ipv4.ip_dynaddr=1"
|
||||
assert " `sysctl -n net.ipv4.ip_dynaddr` -eq 1" $LINENO
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
bash_exec "ip route add 239.0.0.160/28 dev $EMULIF"
|
||||
|
||||
bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
|
||||
bash_exec "ip link set $LTEIF up"
|
||||
sleep 1
|
||||
|
||||
|
||||
assert " -x $IPTABLES " $LINENO
|
||||
|
||||
bash_exec "$IPTABLES -P INPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F INPUT"
|
||||
bash_exec "$IPTABLES -P OUTPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F OUTPUT"
|
||||
bash_exec "$IPTABLES -P FORWARD DROP"
|
||||
bash_exec "$IPTABLES -F FORWARD"
|
||||
bash_exec "$IPTABLES -t nat -F"
|
||||
bash_exec "$IPTABLES -t mangle -F"
|
||||
bash_exec "$IPTABLES -t filter -F"
|
||||
|
||||
|
||||
|
||||
echo " External Interface: $EXTIF"
|
||||
echo " Internal Interface: $INTIF"
|
||||
|
||||
bash_exec "modprobe ip_tables"
|
||||
bash_exec "modprobe ip_conntrack"
|
||||
bash_exec "modprobe ip_conntrack_ftp"
|
||||
bash_exec "modprobe nf_conntrack_h323"
|
||||
bash_exec "modprobe nf_conntrack_irc"
|
||||
bash_exec "modprobe nf_conntrack_pptp"
|
||||
bash_exec "modprobe nf_conntrack_proto_gre"
|
||||
bash_exec "modprobe nf_conntrack_proto_sctp"
|
||||
bash_exec "modprobe nf_conntrack_tftp"
|
||||
bash_exec "modprobe nf_conntrack_sip"
|
||||
bash_exec "modprobe iptable_nat"
|
||||
bash_exec "modprobe x_tables"
|
||||
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$LTEIF.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.$LTEIF.log_martians` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$EXTIF.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.$EXTIF.log_martians` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$INTIF.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.$INTIF.log_martians` -eq 1" $LINENO
|
||||
|
||||
echo " Disabling reverse path filtering"
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$LTEIF.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.$LTEIF.rp_filter` -eq 0" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$EXTIF.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.$EXTIF.rp_filter` -eq 0" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$INTIF.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.$INTIF.rp_filter` -eq 0" $LINENO
|
||||
|
||||
|
||||
bash_exec "$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT"
|
||||
bash_exec "$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT"
|
||||
bash_exec "$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE"
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
|
||||
|
||||
bash_exec "ip addr add dev $LTEIF $ENB_IPv4_CIDR"
|
||||
sleep 1
|
||||
bash_exec "ip addr add dev $LTEIF $ENB_IPv6_CIDR"
|
||||
sleep 1
|
||||
|
||||
# -a -> Add RB
|
||||
# -d -> Delete RB
|
||||
# -cxx -> lcr
|
||||
# -ixx -> instance
|
||||
# -zxx -> dscp
|
||||
# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
|
||||
# -sxxx -> source ipv4 address
|
||||
# -txxx -> destination ipv4 address
|
||||
# -x -> source ipv6 address
|
||||
# -y -> destination ipv6 address
|
||||
# -r -> radio bearer id
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f0 -i0 -z0 -x $ENB_IPv6 -y $UE_IPv6 -r 1"
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f2 -i0 -z64 -s $ENB_IPv4/32 -t $UE_IPv4/32 -r 1"
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f4 -i0 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 1"
|
||||
sleep 1
|
||||
|
||||
echo "#####################################################################"
|
||||
echo "iptables -t nat -nvL"
|
||||
echo "---------------------------------------------------------------------"
|
||||
iptables -t nat -nvL
|
||||
echo "#####################################################################"
|
||||
echo "ip route show table main"
|
||||
echo "---------------------------------------------------------------------"
|
||||
ip route show table main
|
||||
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 > /dev/null"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 > /dev/null
|
||||
|
||||
|
||||
@@ -1,259 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#------------------------------------------------
|
||||
MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
|
||||
MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
|
||||
IP_DRIVER_NAME=oai_nw_drv
|
||||
###########################################################
|
||||
# CONFIGURE OPTIONS
|
||||
EMULIF="eth0"
|
||||
LTEIF="oai0"
|
||||
|
||||
#----------------------------------------------------------
|
||||
LTE_NETWORK_CIDR="10.0.1.0/24"
|
||||
ENB_IPv4="10.0.1.1"
|
||||
ENB_IPv6="2001:1::1"
|
||||
#----------------------------------------------------------
|
||||
UE_IPv4="10.0.1.2"
|
||||
UE_IPv6="2001:1::2"
|
||||
UE_IPv6_CIDR=$UE_IPv6"/64"
|
||||
UE_IPv4_CIDR=$UE_IPv4"/24"
|
||||
UE_IMEI="3,9,1,8,3,6,7,3,0,0,0,0,0,0"
|
||||
#----------------------------------------------------------
|
||||
|
||||
# +-------+ +-------+
|
||||
# | eNB | EMULIF | UE |
|
||||
# | +---------------------+ +
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | +
|
||||
# | | | |
|
||||
# | | LTEIF | |
|
||||
# | +.................... + |
|
||||
# | |ENB_IPv4 UE_IPv4_CIDR| |
|
||||
# +-------+ LTE link over +-------+
|
||||
|
||||
###########################################################
|
||||
IPTABLES=/sbin/iptables
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
declare -x OPENAIR_DIR=""
|
||||
declare -x OPENAIR1_DIR=""
|
||||
declare -x OPENAIR2_DIR=""
|
||||
declare -x OPENAIR3_DIR=""
|
||||
declare -x OPENAIR_TARGETS=""
|
||||
###########################################################
|
||||
|
||||
|
||||
black='\E[30m'
|
||||
red='\E[31m'
|
||||
green='\E[32m'
|
||||
yellow='\E[33m'
|
||||
blue='\E[34m'
|
||||
magenta='\E[35m'
|
||||
cyan='\E[36m'
|
||||
white='\E[37m'
|
||||
|
||||
ROOT_UID=0
|
||||
E_NOTROOT=67
|
||||
|
||||
|
||||
cecho() # Color-echo
|
||||
# arg1 = message
|
||||
# arg2 = color
|
||||
{
|
||||
local default_msg="No Message."
|
||||
message=${1:-$default_msg}
|
||||
color=${2:-$black}
|
||||
echo -e "$color"
|
||||
echo -n "$message"
|
||||
tput sgr0
|
||||
echo
|
||||
return
|
||||
}
|
||||
|
||||
echo_error() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $red
|
||||
}
|
||||
|
||||
echo_warning() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $yellow
|
||||
}
|
||||
|
||||
echo_success() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $green
|
||||
}
|
||||
|
||||
set_openair() {
|
||||
path=`pwd`
|
||||
declare -i length_path
|
||||
declare -i index
|
||||
length_path=${#path}
|
||||
|
||||
index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
|
||||
#echo ${path%$token*}
|
||||
if [[ $index -lt $length_path && index -gt 0 ]]
|
||||
then
|
||||
declare -x OPENAIR_DIR
|
||||
index=`expr $index - 1`
|
||||
openair_path=`echo $path | cut -c1-$index`
|
||||
#openair_path=`echo ${path:0:$index}`
|
||||
export OPENAIR_DIR=$openair_path
|
||||
export OPENAIR1_DIR=$openair_path/openair1
|
||||
export OPENAIR2_DIR=$openair_path/openair2
|
||||
export OPENAIR3_DIR=$openair_path/openair3
|
||||
export OPENAIR_TARGETS=$openair_path/targets
|
||||
return 0
|
||||
fi
|
||||
return -1
|
||||
}
|
||||
|
||||
bash_exec() {
|
||||
output=$($1 2>&1)
|
||||
result=$?
|
||||
if [ $result -eq 0 ]
|
||||
then
|
||||
echo_success "$1"
|
||||
else
|
||||
echo_error "$1: $output"
|
||||
fi
|
||||
}
|
||||
|
||||
wait_process_started () {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo_error "WAITING FOR PROCESS START: NO PROCESS"
|
||||
return 1
|
||||
fi
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
while [ $? -ne 0 ]; do
|
||||
echo_warning "WAITING FOR $1 START"
|
||||
sleep 2
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
done
|
||||
echo_success "PROCESS $1 STARTED"
|
||||
return 0
|
||||
}
|
||||
|
||||
assert() {
|
||||
# If condition false
|
||||
# exit from script with error message
|
||||
E_PARAM_ERR=98
|
||||
E_PARAM_FAILED=99
|
||||
|
||||
if [ -z "$2" ] # Not enought parameters passed.
|
||||
then
|
||||
return $E_PARAM_ERR
|
||||
fi
|
||||
|
||||
lineno=$2
|
||||
if [ ! $1 ]
|
||||
then
|
||||
echo "Assertion failed: \"$1\""
|
||||
echo "File \"$0\", line $lineno"
|
||||
exit $E_ASSERT_FAILED
|
||||
fi
|
||||
}
|
||||
|
||||
ctrl_c() {
|
||||
bash_exec "pkill oaisim"
|
||||
bash_exec "ip link set $LTEIF down"
|
||||
|
||||
bash_exec "rmmod $IP_DRIVER_NAME"
|
||||
|
||||
bash_exec "$IPTABLES -P INPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F INPUT"
|
||||
bash_exec "$IPTABLES -P OUTPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F OUTPUT"
|
||||
bash_exec "$IPTABLES -P FORWARD ACCEPT"
|
||||
bash_exec "$IPTABLES -F FORWARD"
|
||||
bash_exec "$IPTABLES -t nat -F"
|
||||
bash_exec "$IPTABLES -t mangle -F"
|
||||
bash_exec "$IPTABLES -t filter -F"
|
||||
bash_exec "ip route flush cache"
|
||||
}
|
||||
|
||||
#bash_exec "set_openair"
|
||||
set_openair
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
|
||||
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
|
||||
cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
|
||||
cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
|
||||
|
||||
echo "Bringup UE interface"
|
||||
bash_exec "rmmod $IP_DRIVER_NAME"
|
||||
cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET ....." $green
|
||||
bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET "
|
||||
bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=$UE_IMEI"
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
bash_exec "ip route add 239.0.0.160/28 dev $EMULIF"
|
||||
|
||||
bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
|
||||
bash_exec "ip link set $LTEIF up"
|
||||
sleep 1
|
||||
bash_exec "ip addr add dev $LTEIF $UE_IPv4_CIDR"
|
||||
bash_exec "ip addr add dev $LTEIF $UE_IPv6_CIDR"
|
||||
|
||||
# -a -> Add RB
|
||||
# -d -> Delete RB
|
||||
# -cxx -> lcr
|
||||
# -ixx -> instance
|
||||
# -zxx -> dscp
|
||||
# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
|
||||
# -sxxx -> source ipv4 address
|
||||
# -txxx -> destination ipv4 address
|
||||
# -x -> source ipv6 address
|
||||
# -y -> destination ipv6 address
|
||||
# -r -> radio bearer id
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f0 -i0 -z0 -x $UE_IPv6 -y $ENB_IPv6 -r 1"
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f2 -i0 -z64 -s $UE_IPv4/32 -t $ENB_IPv4/32 -r 1"
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f4 -i0 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 1"
|
||||
sleep 1
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
|
||||
|
||||
echo " Disabling reverse path filtering"
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
|
||||
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
|
||||
echo "#####################################################################"
|
||||
echo "ip route show table main"
|
||||
echo "---------------------------------------------------------------------"
|
||||
ip route show table main
|
||||
|
||||
trap ctrl_c INT
|
||||
|
||||
echo "to see UE stats, please run : watch_ue script"
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null
|
||||
#gdb $OPENAIR_TARGETS/SIMU/USER/oaisim
|
||||
echo "End"
|
||||
ctrl_c
|
||||
|
||||
|
||||
|
||||
@@ -1,426 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#------------------------------------------------
|
||||
MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
|
||||
MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
|
||||
MAKE_REMSERIAL_TARGET="remserial"
|
||||
IP_DRIVER_NAME=oai_nw_drv
|
||||
###########################################################
|
||||
# CONFIGURE OPTIONS
|
||||
EMULIF="eth0"
|
||||
LTEIF="oai0"
|
||||
|
||||
INTIF="ppp0"
|
||||
EXTIF=$LTEIF
|
||||
#----------------------------------------------------------
|
||||
LTE_NETWORK_CIDR="10.0.1.0/24"
|
||||
ENB_IPv4="10.0.1.1"
|
||||
ENB_IPv6="2001:1::1"
|
||||
#----------------------------------------------------------
|
||||
UE_IPv4="10.0.1.2"
|
||||
UE_IPv6="2001:1::2"
|
||||
UE_IPv6_CIDR=$UE_IPv6"/64"
|
||||
UE_IPv4_CIDR=$UE_IPv4"/24"
|
||||
UE_IMEI="3,9,1,8,3,6,7,3,0,0,0,0,0,0"
|
||||
#----------------------------------------------------------
|
||||
USE_PPP="yes"
|
||||
PPP_OPTIONS="proxyarp passive nodetach ipcp-accept-remote"
|
||||
PPP_DEVICE="ttyPPP_DROID"
|
||||
PPP_SPEED="460800"
|
||||
UE_PPP_IPv4="192.168.15.1"
|
||||
TERMINAL_PPP_IPv4="192.168.15.175"
|
||||
REMSERIAL_UDP_PORT="23001"
|
||||
#----------------------------------------------------------
|
||||
|
||||
# +-------+ +-------+ +-------+
|
||||
# | eNB | EMULIF | UE |INTIF |ANDROID|
|
||||
# | +---------------------+ +---------------------+ TERMIN|
|
||||
# | | | | ppp link over | AL |
|
||||
# | | | | UDP over ethernet | |
|
||||
# | | | | (remserial) | |
|
||||
# | | | | | |
|
||||
# | | | +---serial link-------+ |
|
||||
# | | | | for AT commands | |
|
||||
# | | LTEIF | | | |
|
||||
# | +.................... + | | |
|
||||
# | |ENB_IPv4 UE_IPv4_CIDR| | | |
|
||||
# +-------+ LTE link over +-------+ +-------+
|
||||
|
||||
###########################################################
|
||||
IPTABLES=/sbin/iptables
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
declare -x OPENAIR_DIR=""
|
||||
declare -x OPENAIR1_DIR=""
|
||||
declare -x OPENAIR2_DIR=""
|
||||
declare -x OPENAIR3_DIR=""
|
||||
declare -x OPENAIR_TARGETS=""
|
||||
###########################################################
|
||||
|
||||
|
||||
black='\E[30m'
|
||||
red='\E[31m'
|
||||
green='\E[32m'
|
||||
yellow='\E[33m'
|
||||
blue='\E[34m'
|
||||
magenta='\E[35m'
|
||||
cyan='\E[36m'
|
||||
white='\E[37m'
|
||||
|
||||
ROOT_UID=0
|
||||
E_NOTROOT=67
|
||||
|
||||
|
||||
cecho() # Color-echo
|
||||
# arg1 = message
|
||||
# arg2 = color
|
||||
{
|
||||
local default_msg="No Message."
|
||||
message=${1:-$default_msg}
|
||||
color=${2:-$black}
|
||||
echo -e "$color"
|
||||
echo -n "$message"
|
||||
tput sgr0
|
||||
echo
|
||||
return
|
||||
}
|
||||
|
||||
echo_error() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $red
|
||||
}
|
||||
|
||||
echo_warning() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $yellow
|
||||
}
|
||||
|
||||
echo_success() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $green
|
||||
}
|
||||
|
||||
set_openair() {
|
||||
path=`pwd`
|
||||
declare -i length_path
|
||||
declare -i index
|
||||
length_path=${#path}
|
||||
|
||||
index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
|
||||
#echo ${path%$token*}
|
||||
if [[ $index -lt $length_path && index -gt 0 ]]
|
||||
then
|
||||
declare -x OPENAIR_DIR
|
||||
index=`expr $index - 1`
|
||||
openair_path=`echo $path | cut -c1-$index`
|
||||
#openair_path=`echo ${path:0:$index}`
|
||||
export OPENAIR_DIR=$openair_path
|
||||
export OPENAIR1_DIR=$openair_path/openair1
|
||||
export OPENAIR2_DIR=$openair_path/openair2
|
||||
export OPENAIR3_DIR=$openair_path/openair3
|
||||
export OPENAIR_TARGETS=$openair_path/targets
|
||||
return 0
|
||||
fi
|
||||
return -1
|
||||
}
|
||||
|
||||
bash_exec() {
|
||||
output=$($1 2>&1)
|
||||
result=$?
|
||||
if [ $result -eq 0 ]
|
||||
then
|
||||
echo_success "$1"
|
||||
else
|
||||
echo_error "$1: $output"
|
||||
fi
|
||||
}
|
||||
|
||||
wait_process_started () {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo_error "WAITING FOR PROCESS START: NO PROCESS"
|
||||
return 1
|
||||
fi
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
while [ $? -ne 0 ]; do
|
||||
echo_warning "WAITING FOR $1 START"
|
||||
sleep 2
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
done
|
||||
echo_success "PROCESS $1 STARTED"
|
||||
return 0
|
||||
}
|
||||
|
||||
assert() {
|
||||
# If condition false
|
||||
# exit from script with error message
|
||||
E_PARAM_ERR=98
|
||||
E_PARAM_FAILED=99
|
||||
|
||||
if [ -z "$2" ] # Not enought parameters passed.
|
||||
then
|
||||
return $E_PARAM_ERR
|
||||
fi
|
||||
|
||||
lineno=$2
|
||||
if [ ! $1 ]
|
||||
then
|
||||
echo "Assertion failed: \"$1\""
|
||||
echo "File \"$0\", line $lineno"
|
||||
exit $E_ASSERT_FAILED
|
||||
fi
|
||||
}
|
||||
|
||||
ctrl_c() {
|
||||
bash_exec "pkill oaisim"
|
||||
if [ "$USE_PPP"x = yesx ]; then
|
||||
bash_exec "pkill remserial.bash"
|
||||
bash_exec "pkill ppp_android.bash"
|
||||
fi
|
||||
bash_exec "pkill AT_serial_bouchon.py"
|
||||
bash_exec "ip link set $LTEIF down"
|
||||
|
||||
bash_exec "ip route del default via $ENB_IPv4 dev $EXTIF table int2lte"
|
||||
bash_exec "ip route flush table int2lte"
|
||||
bash_exec "ip rule del prio 1000"
|
||||
|
||||
bash_exec "rmmod $IP_DRIVER_NAME"
|
||||
|
||||
bash_exec "$IPTABLES -P INPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F INPUT"
|
||||
bash_exec "$IPTABLES -P OUTPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F OUTPUT"
|
||||
bash_exec "$IPTABLES -P FORWARD ACCEPT"
|
||||
bash_exec "$IPTABLES -F FORWARD"
|
||||
bash_exec "$IPTABLES -t nat -F"
|
||||
bash_exec "$IPTABLES -t mangle -F"
|
||||
bash_exec "$IPTABLES -t filter -F"
|
||||
bash_exec "ip route flush cache"
|
||||
}
|
||||
|
||||
#bash_exec "set_openair"
|
||||
set_openair
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
|
||||
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
|
||||
cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
|
||||
cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
|
||||
|
||||
echo "Bringup UE interface"
|
||||
bash_exec "rmmod $IP_DRIVER_NAME"
|
||||
cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET $MAKE_REMSERIAL_TARGET....." $green
|
||||
bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET $MAKE_REMSERIAL_TARGET"
|
||||
bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=$UE_IMEI"
|
||||
|
||||
|
||||
echo " Enabling ipv4 forwarding.."
|
||||
bash_exec "sysctl -w net.ipv4.ip_forward=1"
|
||||
assert "`sysctl -n net.ipv4.ip_forward` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.forwarding=1"
|
||||
assert "`sysctl -n net.ipv4.conf.all.forwarding` -eq 1" $LINENO
|
||||
|
||||
echo " Enabling ipv6 forwarding.."
|
||||
bash_exec "sysctl -w net.ipv6.conf.all.forwarding=1"
|
||||
assert "`sysctl -n net.ipv6.conf.all.forwarding` -eq 1" $LINENO
|
||||
|
||||
|
||||
if [ "$USE_PPP"x = yesx ]; then
|
||||
echo " PPP enabled.."
|
||||
command -v pppd > /dev/null 2>&1 || { echo_error "pppd executable needed - please install it"; exit 1;}
|
||||
command -v remserial.udp > /dev/null 2>&1 || { echo_error "remserial.udp executable needed - please install it"; exit 1;}
|
||||
#generate pppd script
|
||||
rm -f /tmp/ppp_android.bash
|
||||
bash_exec "touch /tmp/ppp_android.bash"
|
||||
if [ ! -f /tmp/ppp_android.bash ]; then
|
||||
echo_error "Cannot generate /tmp/ppp_android.bash file, exiting"
|
||||
exit 1
|
||||
fi
|
||||
echo "#!/bin/bash" >> /tmp/ppp_android.bash
|
||||
echo "pppd $PPP_OPTIONS $UE_PPP_IPv4:$TERMINAL_PPP_IPv4 /dev/$PPP_DEVICE $PPP_SPEED" >> /tmp/ppp_android.bash
|
||||
bash_exec "chmod 777 /tmp/ppp_android.bash"
|
||||
assert " -x /tmp/ppp_android.bash " $LINENO
|
||||
|
||||
#generate remserial script
|
||||
rm -f /tmp/remserial.bash
|
||||
bash_exec "touch /tmp/remserial.bash"
|
||||
if [ ! -f /tmp/remserial.bash ]; then
|
||||
echo_error "Cannot generate /tmp/remserial.bash file, exiting"
|
||||
exit 1
|
||||
fi
|
||||
echo "#!/bin/bash" >> /tmp/remserial.bash
|
||||
echo "remserial.udp -s \"$PPP_SPEED raw\" -p $REMSERIAL_UDP_PORT -l /dev/$PPP_DEVICE /dev/ptmx" >> /tmp/remserial.bash
|
||||
bash_exec "chmod 777 /tmp/remserial.bash"
|
||||
assert " -x /tmp/remserial.bash " $LINENO
|
||||
fi
|
||||
|
||||
xterm -e $THIS_SCRIPT_PATH/AT_serial_bouchon.py &
|
||||
wait_process_started AT_serial_bouchon.py
|
||||
|
||||
if [ "$USE_PPP"x = yesx ]; then
|
||||
xterm -e /tmp/remserial.bash &
|
||||
wait_process_started remserial.bash
|
||||
|
||||
xterm -e /tmp/ppp_android.bash &
|
||||
wait_process_started ppp_android.bash
|
||||
fi
|
||||
|
||||
|
||||
assert " -x $IPTABLES " $LINENO
|
||||
|
||||
bash_exec "ip route del default via $ENB_IPv4 dev $EXTIF table int2lte"
|
||||
bash_exec "ip route flush table int2lte"
|
||||
bash_exec "ip rule del prio 1000"
|
||||
|
||||
bash_exec "$IPTABLES -P INPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F INPUT"
|
||||
bash_exec "$IPTABLES -P OUTPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F OUTPUT"
|
||||
bash_exec "$IPTABLES -P FORWARD DROP"
|
||||
bash_exec "$IPTABLES -F FORWARD"
|
||||
bash_exec "$IPTABLES -t nat -F"
|
||||
bash_exec "$IPTABLES -t mangle -F"
|
||||
bash_exec "$IPTABLES -t filter -F"
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
bash_exec "ip route add 239.0.0.160/28 dev $EMULIF"
|
||||
|
||||
bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
|
||||
bash_exec "ip link set $LTEIF up"
|
||||
sleep 1
|
||||
bash_exec "ip addr add dev $LTEIF $UE_IPv4_CIDR"
|
||||
bash_exec "ip addr add dev $LTEIF $UE_IPv6_CIDR"
|
||||
|
||||
echo " Enabling proxy ARP.."
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.proxy_arp=1"
|
||||
assert "`sysctl -n net.ipv4.conf.all.proxy_arp` -eq 1" $LINENO
|
||||
|
||||
|
||||
# -a -> Add RB
|
||||
# -d -> Delete RB
|
||||
# -cxx -> lcr
|
||||
# -ixx -> instance
|
||||
# -zxx -> dscp
|
||||
# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
|
||||
# -sxxx -> source ipv4 address
|
||||
# -txxx -> destination ipv4 address
|
||||
# -x -> source ipv6 address
|
||||
# -y -> destination ipv6 address
|
||||
# -r -> radio bearer id
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f0 -i0 -z0 -x $UE_IPv6 -y $ENB_IPv6 -r 3"
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f2 -i0 -z64 -s $UE_IPv4/32 -t $ENB_IPv4/32 -r 3"
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f4 -i0 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 3"
|
||||
sleep 1
|
||||
|
||||
echo " External Interface: $EXTIF"
|
||||
echo " Internal Interface: $INTIF"
|
||||
|
||||
bash_exec "modprobe ip_tables"
|
||||
bash_exec "modprobe ip_conntrack"
|
||||
bash_exec "modprobe ip_conntrack_ftp"
|
||||
bash_exec "modprobe nf_conntrack_h323"
|
||||
bash_exec "modprobe nf_conntrack_irc"
|
||||
bash_exec "modprobe nf_conntrack_pptp"
|
||||
bash_exec "modprobe nf_conntrack_proto_gre"
|
||||
bash_exec "modprobe nf_conntrack_proto_sctp"
|
||||
bash_exec "modprobe nf_conntrack_tftp"
|
||||
bash_exec "modprobe nf_conntrack_sip"
|
||||
bash_exec "modprobe iptable_nat"
|
||||
bash_exec "modprobe x_tables"
|
||||
|
||||
echo " Enabling DynamicAddr.."
|
||||
bash_exec "sysctl -w net.ipv4.ip_dynaddr=1"
|
||||
assert " `sysctl -n net.ipv4.ip_dynaddr` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$LTEIF.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.$LTEIF.log_martians` -eq 1" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$EMULIF.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.$EMULIF.log_martians` -eq 1" $LINENO
|
||||
|
||||
if [ ! "$USE_PPP"x = yesx ]; then
|
||||
bash_exec "sysctl -w net.ipv4.conf.$INTIF.log_martians=1"
|
||||
assert " `sysctl -n net.ipv4.conf.$INTIF.log_martians` -eq 1" $LINENO
|
||||
fi
|
||||
echo " Disabling reverse path filtering"
|
||||
bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$LTEIF.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.$LTEIF.rp_filter` -eq 0" $LINENO
|
||||
|
||||
bash_exec "sysctl -w net.ipv4.conf.$EMULIF.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.$EMULIF.rp_filter` -eq 0" $LINENO
|
||||
|
||||
if [ ! "$USE_PPP"x = yesx ]; then
|
||||
bash_exec "sysctl -w net.ipv4.conf.$INTIF.rp_filter=0"
|
||||
assert " `sysctl -n net.ipv4.conf.$INTIF.rp_filter` -eq 0" $LINENO
|
||||
fi
|
||||
|
||||
bash_exec "$IPTABLES -t mangle -A PREROUTING -i $INTIF -j MARK --set-mark 22"
|
||||
|
||||
bash_exec "$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT"
|
||||
bash_exec "$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT"
|
||||
bash_exec "$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE"
|
||||
|
||||
bash_exec "ip route add 127.0.0.0/8 dev lo table int2lte"
|
||||
bash_exec "ip route add $LTE_NETWORK_CIDR dev $EXTIF table int2lte scope link"
|
||||
bash_exec "ip route add default via $ENB_IPv4 dev $EXTIF table int2lte scope global"
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
|
||||
bash_exec "ip rule add fwmark 22 lookup int2lte prio 1000"
|
||||
|
||||
echo "#####################################################################"
|
||||
echo "iptables -t nat -nvL"
|
||||
echo "---------------------------------------------------------------------"
|
||||
iptables -t nat -nvL
|
||||
echo "#####################################################################"
|
||||
echo "iptables -t mangle -nvL"
|
||||
echo "---------------------------------------------------------------------"
|
||||
iptables -t mangle -nvL
|
||||
echo "#####################################################################"
|
||||
echo "iptables -t filter -nvL"
|
||||
echo "---------------------------------------------------------------------"
|
||||
iptables -t filter -nvL
|
||||
echo "#####################################################################"
|
||||
echo "ip rule show"
|
||||
echo "---------------------------------------------------------------------"
|
||||
ip rule show
|
||||
echo "#####################################################################"
|
||||
echo "ip route show table int2lte"
|
||||
echo "---------------------------------------------------------------------"
|
||||
ip route show table int2lte
|
||||
echo "#####################################################################"
|
||||
echo "ip route show table main"
|
||||
echo "---------------------------------------------------------------------"
|
||||
ip route show table main
|
||||
|
||||
trap ctrl_c INT
|
||||
|
||||
echo "to see UE stats, please run : watch_ue script"
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null
|
||||
#gdb $OPENAIR_TARGETS/SIMU/USER/oaisim
|
||||
echo "End"
|
||||
ctrl_c
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
all: oaisim nasmesh
|
||||
|
||||
userclean: clean oaisim nasmesh
|
||||
|
||||
oaisim:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && make LINK_ENB_PDCP_TO_IP_DRIVER=1 -j2)
|
||||
nasmesh:
|
||||
(cd $(OPENAIR2_DIR) && make nasmesh_netlink.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL/ && make)
|
||||
|
||||
clean:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && make clean)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "Bringup eNB interface"
|
||||
|
||||
sudo rmmod nasmesh
|
||||
make all
|
||||
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
||||
sudo ip route add 239.0.0.160/28 dev eth0
|
||||
|
||||
|
||||
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 12
|
||||
|
||||
#xterm -T ENB -hold -e ping 10.0.1.2&
|
||||
#xterm -T ENB -hold -e ping 10.0.1.3&
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l3 > /dev/null"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l3 > /dev/null
|
||||
else
|
||||
if [ $1 = "all" ]; then
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7
|
||||
else
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7 | grep -i $1"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7 | grep -i $1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "End"
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "Bringup UE interface"
|
||||
sudo rmmod nasmesh
|
||||
make all
|
||||
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
||||
sudo ip route add 239.0.0.160/28 dev eth0
|
||||
|
||||
|
||||
sudo ifconfig oai0 10.0.1.2 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 1
|
||||
|
||||
#xterm -T UE1 -hold -e ping 10.0.1.1&
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l3 > /dev/null"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l3 > /dev/null
|
||||
else
|
||||
if [ $1 = "all" ]; then
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7
|
||||
else
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7 | grep -i $1"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7 | grep -i $1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "End"
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "Bringup UE interface"
|
||||
sudo rmmod nasmesh
|
||||
make all
|
||||
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
||||
sudo ip route add 239.0.0.160/28 dev eth0
|
||||
|
||||
sudo ifconfig oai0 10.0.1.3 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.3 -t 10.0.1.1 -r 1
|
||||
|
||||
#xterm -T UE2 -hold -e ping 10.0.1.1&
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l3 > /dev/null"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l3 > /dev/null
|
||||
else
|
||||
if [ $1 = "all" ]; then
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7
|
||||
else
|
||||
echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7 | grep -i $1"
|
||||
nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7 | grep -i $1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "End"
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
This is the folder used by the OCG(openair config generation) to parse a xml-based scenario defined by the user in the WEBXML directory, and produce emulation results in the RESULTS directory.
|
||||
|
||||
Please make sure that you have correctly set the OPENAIR_TARGETS variables.
|
||||
@@ -1,147 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE> <!-- OPTIONS: urban, rural, indoor -->
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2.0</PATHLOSS_EXPONENT> <!-- OPTIONS: >1 -->
|
||||
<PATHLOSS_0_dB>-50</PATHLOSS_0_dB>
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>Rayleigh1</SMALL_SCALE> <!-- OPTIONS: SCM_A, SCM_B, SCM_C, SCM_D, EPA, EVA, ETU, Rayleigh8, Rayleigh1, Rayleigh1_corr, Rayleigh1_anticorr, Rice8, Rice1, Rice1_corr, Rice1_anticorr, AWGN -->
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>3</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_km>1</X_km>
|
||||
<Y_km>1</Y_km>
|
||||
</AREA>
|
||||
<NETWORK_TYPE>homogeneous</NETWORK_TYPE> <!-- OPTIONS: homogeneous, heterogeneous -->
|
||||
<CELL_TYPE>macrocell</CELL_TYPE> <!-- OPTIONS: macrocell, microcell, picocell, femtocell -->
|
||||
<RELAY></RELAY>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION> <!-- OPTIONS: random, concentrated, grid -->
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>fixed</UE_MOBILITY_TYPE> <!-- OPTIONS: fixed, random_waypoint, random_walk, grid_walk, trace, sumo -->
|
||||
<UE_MOVING_DYNAMICS>
|
||||
<MIN_SPEED_mps>1</MIN_SPEED_mps>
|
||||
<MAX_SPEED_mps>200</MAX_SPEED_mps>
|
||||
<MIN_SLEEP_ms>0.1</MIN_SLEEP_ms>
|
||||
<MAX_SLEEP_ms>5.0</MAX_SLEEP_ms>
|
||||
<MIN_JOURNEY_TIME_ms>0.1</MIN_JOURNEY_TIME_ms>
|
||||
<MAX_JOURNEY_TIME_ms>10</MAX_JOURNEY_TIME_ms>
|
||||
</UE_MOVING_DYNAMICS>
|
||||
<SUMO_CONFIG> <!-- Simulation for Urban Mobility -->
|
||||
<SUMO_CMD> sumo-gui </SUMO_CMD>
|
||||
<SUMO_CONFIG_FILE>$OPENAIR2_DIR/UTIL/OMG/SUMO/SCENARIOS/scen.sumo.cfg</SUMO_CONFIG_FILE>
|
||||
<SUMO_START> 0 </SUMO_START>
|
||||
<SUMO_END> 10 </SUMO_END>
|
||||
<SUMO_STEP> 10</SUMO_STEP>
|
||||
<SUMO_HOST_IP> 127.0.1.1</SUMO_HOST_IP>
|
||||
<SUMO_HOST_PORT> 8883</SUMO_HOST_PORT>
|
||||
</SUMO_CONFIG>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION> <!-- OPTIONS: random, hexagonal, grid -->
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
|
||||
<eNB_MOBILITY_TYPE>fixed</eNB_MOBILITY_TYPE> <!-- OPTIONS: fixed, mobile -->
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>gaming_OA</APPLICATION_TYPE> <!-- OPTIONS: scbr, mcbr, bcbr, m2m_AP, m2m_BR, gaming_OA, gaming_TF, full_buffer -->
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>400</FLOW_START_ms> <!-- not less than 310 -->
|
||||
<FLOW_DURATION_ms>2000</FLOW_DURATION_ms> <!-- less than simu time - FLOW_START_ms -->
|
||||
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<PU> <!-- we are generating only one packet -->
|
||||
<PROB_OFF_PU>0.9</PROB_OFF_PU> <!-- prob to transit from off to PU -->
|
||||
<PROB_PU_ED>0.1</PROB_PU_ED> <!-- prob to transit from PU to ED -->
|
||||
<HOLDING_TIME_OFF_PU>100</HOLDING_TIME_OFF_PU> <!-- in off state -->
|
||||
</PU>
|
||||
<ED> <!-- we are generating only one packet -->
|
||||
<PROB_OFF_ED>0.1</PROB_OFF_ED> <!-- prob to transit from off to PU -->
|
||||
<PROB_ED_PE>0.1</PROB_ED_PE> <!-- prob to transit from off to PU -->
|
||||
<HOLDING_TIME_OFF_ED>10000</HOLDING_TIME_OFF_ED> <!-- in off state -->
|
||||
</ED>
|
||||
<PE>
|
||||
<HOLDING_TIME_OFF_PE>100</HOLDING_TIME_OFF_PE> <!-- in off state, how much time we should generate traffic -->
|
||||
</PE>
|
||||
<SOURCE_ID>2</SOURCE_ID> <!-- <SOURCE_ID> 1:100 </SOURCE_ID> -->
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<FLOW_START_ms>400</FLOW_START_ms> <!-- not less than 310 -->
|
||||
<FLOW_DURATION_ms>2000</FLOW_DURATION_ms> <!-- less than simu time - FLOW_START_ms -->
|
||||
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- OPTIONS: no_customized_traffic (default), uniform, poission, gaussian, exponential, fixed, weibull, pareto, gamma, cauchy -->
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms>
|
||||
<IDT_STANDARD_DEVIATION>1</IDT_STANDARD_DEVIATION>
|
||||
<IDT_LAMBDA>7</IDT_LAMBDA>
|
||||
|
||||
<SIZE_DIST>gaussian</SIZE_DIST> <!-- OPTIONS: no_customized_traffic (default), uniform, poission, gaussian, exponential, fixed, weibull, pareto, gamma, cauchy -->
|
||||
<SIZE_MIN_byte>200</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>500</SIZE_MAX_byte>
|
||||
<SIZE_STANDARD_DEVIATION>5</SIZE_STANDARD_DEVIATION>
|
||||
<SIZE_LAMBDA>4</SIZE_LAMBDA>
|
||||
|
||||
|
||||
<DESTINATION_PORT>8080</DESTINATION_PORT>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>5000</EMULATION_TIME_ms>
|
||||
|
||||
<PERFORMANCE>
|
||||
<METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>disable</LATENCY>
|
||||
</METRICS>
|
||||
|
||||
<LAYER>
|
||||
<MAC>1</MAC>
|
||||
<RLC></RLC>
|
||||
<PDCP></PDCP>
|
||||
</LAYER>
|
||||
|
||||
<LOG_EMU>
|
||||
<DEBUG>1</DEBUG>
|
||||
</LOG_EMU>
|
||||
<SEED>
|
||||
<SEED_VALUE>1</SEED_VALUE>
|
||||
</SEED>
|
||||
</PERFORMANCE>
|
||||
</EMULATION_CONFIG>
|
||||
<PROFILE>EURECOM</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
<OAI_EMULATION>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>500</EMULATION_TIME_ms>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
</LOG>
|
||||
</EMULATION_CONFIG>
|
||||
<PROFILE>EMU-TEST</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,77 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>5000</X_m>
|
||||
<Y_m>5000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>random</APPLICATION_TYPE> <!-- OPTIONS: scbr,mcbr,bcbr, gaming_OA, gaming_TF, m2m_AP, m2m_BR, , random, ,full_buffer -->
|
||||
<DESTINATION_ID>1:3</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1:2</SOURCE_ID> <!-- <SOURCE_ID> 1:100 </SOURCE_ID> -->
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gamma,-->
|
||||
<IDT_DIST>poisson</IDT_DIST> <!-- similar for exponential, -->
|
||||
<IDT_LAMBDA>7.3</IDT_LAMBDA>
|
||||
|
||||
<SIZE_DIST>unifrom</SIZE_DIST> <!-- OPTIONS: no_transmission (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gamma,-->
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>500</SIZE_MAX_byte>
|
||||
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>3</SOURCE_ID> <!-- <SOURCE_ID> 1:100 </SOURCE_ID> -->
|
||||
<TRANSPORT_PROTOCOL>tcp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv4</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gamma,-->
|
||||
<IDT_DIST>fixed</IDT_DIST> <!---->
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
|
||||
<SIZE_DIST>exponential</SIZE_DIST> <!-- OPTIONS: no_transmission (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gamma,-->
|
||||
<SIZE_LAMBDA>2.2</SIZE_LAMBDA>
|
||||
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>0</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>1</THROUGHPUT>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_3</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,123 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2.0</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-50</PATHLOSS_0_dB>
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>Rayleigh1</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>3</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>5000</X_m>
|
||||
<Y_m>5000</Y_m>
|
||||
</AREA>
|
||||
<NETWORK_TYPE>homogeneous</NETWORK_TYPE>
|
||||
<CELL_TYPE>macrocell</CELL_TYPE>
|
||||
<RELAY></RELAY>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
<UE_MOVING_DYNAMICS>
|
||||
<MIN_SPEED_mps>1</MIN_SPEED_mps>
|
||||
<MAX_SPEED_mps>200</MAX_SPEED_mps>
|
||||
<MIN_SLEEP_ms>0.1</MIN_SLEEP_ms>
|
||||
<MAX_SLEEP_ms>5.0</MAX_SLEEP_ms>
|
||||
<MIN_JOURNEY_TIME_ms>0.1</MIN_JOURNEY_TIME_ms>
|
||||
<MAX_JOURNEY_TIME_ms>10</MAX_JOURNEY_TIME_ms>
|
||||
</UE_MOVING_DYNAMICS>
|
||||
<SUMO_CONFIG>
|
||||
<SUMO_CMD> sumo-gui </SUMO_CMD>
|
||||
<SUMO_CONFIG_FILE>$OPENAIR2_DIR/UTIL/OMG/SUMO/SCENARIOS/scen.sumo.cfg</SUMO_CONFIG_FILE>
|
||||
<SUMO_START> 0 </SUMO_START>
|
||||
<SUMO_END> 10 </SUMO_END>
|
||||
<SUMO_STEP> 10</SUMO_STEP>
|
||||
<SUMO_HOST_IP> 127.0.1.1</SUMO_HOST_IP>
|
||||
<SUMO_HOST_PORT> 8883</SUMO_HOST_PORT>
|
||||
</SUMO_CONFIG>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<APPLICATION_TYPE>mcbr</APPLICATION_TYPE> <!-- OPTIONS: scbr,mcbr,bcbr, gaming_OA, gaming_TF, m2m_AP, m2m_BR, , random, ,full_buffer -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID> <!-- <SOURCE_ID> 1:100 </SOURCE_ID> -->
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
|
||||
<IDT_DIST>poisson</IDT_DIST> <!-- OPTIONS: no_transmission (default), uniform, poission, gaussian, exponential -->
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms>
|
||||
<IDT_STANDARD_DEVIATION>4.5</IDT_STANDARD_DEVIATION>
|
||||
<IDT_LAMBDA>7.3</IDT_LAMBDA>
|
||||
<IDT_SCALE>30</IDT_SCALE>
|
||||
<IDT_SHAPE>15</IDT_SHAPE>
|
||||
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>500</SIZE_MAX_byte>
|
||||
<SIZE_STANDARD_DEVIATION>5.3</SIZE_STANDARD_DEVIATION>
|
||||
<SIZE_LAMBDA>2.2</SIZE_LAMBDA>
|
||||
<SIZE_SCALE>0.5</SIZE_SCALE>
|
||||
<SIZE_SHAPE>30</SIZE_SHAPE>
|
||||
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>0</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY> <!-- include both OWD and RTT-->
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>warning</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OCM_OMG_OTG_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,106 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>1</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>10</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>10</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>100</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms>
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,106 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>1</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>10</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>500</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms>
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,105 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>10</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>100</IDT_MAX_ms>
|
||||
<SIZE_DIST>unifrom</SIZE_DIST>
|
||||
<SIZE_MIN_byte>10</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>100</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms>
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,105 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>10</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>100</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>1000</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,105 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>10</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>100</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>1000</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>6000</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,106 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>10</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>100</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,106 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>1000</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,106 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>1000</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>9000</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,106 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>1000</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>10000</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>10</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>100</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,106 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>1000</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>10000</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>1000</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,66 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
|
||||
<!-- Basic configuration of a customized traffic : one state-->
|
||||
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>tcp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv4</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>1:3</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>30</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>50</IDT_MAX_ms> <!--MAximum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>512</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>1024</SIZE_MAX_byte> <!--MAximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enabled</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>debug</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
|
||||
<!-- Basic configuration of a customized traffic : one state-->
|
||||
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>tcp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv4</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>500</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>500</IDT_MAX_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>1000</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>1500</SIZE_MAX_byte> <!--MAximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>0</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<OWD_RADIO_ACCESS>disable</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>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<PROB_OFF_PE>0.6</PROB_OFF_PE> <!-- Probability threshold to move from OFF to PE state. -->
|
||||
<HOLDING_TIME_OFF_PE>10</HOLDING_TIME_OFF_PE> <!--Holding time in OFF state before moving to PE -->
|
||||
<HOLDING_TIME_PE_OFF>200</HOLDING_TIME_PE_OFF> <!--Holding time in PE state before moving to OFF -->
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>tcp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv4</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>enable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>80</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>100</IDT_MAX_ms> <!--MAximum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>200</SIZE_MAX_byte> <!--MAximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<PROB_OFF_PE>0.6</PROB_OFF_PE> <!-- Probability threshold to move from OFF to PE state. -->
|
||||
<HOLDING_TIME_OFF_PE>10</HOLDING_TIME_OFF_PE> <!--Holding time in OFF state before moving to PE -->
|
||||
<HOLDING_TIME_PE_OFF>200</HOLDING_TIME_PE_OFF> <!--Holding time in PE state before moving to OFF -->
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>tcp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv4</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>enable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>1000</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>2000</IDT_MAX_ms> <!--MAximum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>200</SIZE_MAX_byte> <!--MAximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>100000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
|
||||
|
||||
<!-- High complexity configuration of a customized traffic with 2 states: OFF, PU and PE-->
|
||||
<!-- We configure OFF and PE holding time and off_pe, off_pu probabilities. They will be preconfigured automatically -->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<PU_SIZE_PKTS>70</PU_SIZE_PKTS> <!-- PU state packet size in bytes-->
|
||||
<PROB_OFF_PU>0.1</PROB_OFF_PU> <!-- Probability threshold to move from OFF to PU state. -->
|
||||
<PROB_OFF_PE>0.8</PROB_OFF_PE> <!-- Probability threshold to move from OFF to PE state. -->
|
||||
<HOLDING_TIME_OFF_PU>50</HOLDING_TIME_OFF_PU> <!--Holding time in OFF state before moving to PU -->
|
||||
<HOLDING_TIME_OFF_PE>13</HOLDING_TIME_OFF_PE> <!--Holding time in OFF state before moving to PE -->
|
||||
<HOLDING_TIME_PE_OFF>230</HOLDING_TIME_PE_OFF> <!--Holding time in PE state before moving to OFF -->
|
||||
<SOURCE_ID>1:3</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>enable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_STANDARD_DEVIATION>4.5</IDT_STANDARD_DEVIATION> <!-- Standard deviation-->
|
||||
<SIZE_DIST>pareto</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_SCALE>0.5</SIZE_SCALE> <!-- Scale-->
|
||||
<SIZE_SHAPE>30</SIZE_SHAPE> <!-- Shape-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>1000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
|
||||
|
||||
<!-- High complexity configuration of a customized traffic with 2 states: OFF, ED and PE-->
|
||||
<!-- We configure OFF and PE holding time and off_pe, off_ED probabilities. They will be preconfigured automatically -->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<ED_SIZE_PKTS>70</ED_SIZE_PKTS>
|
||||
<PROB_OFF_ED>0.1</PROB_OFF_ED>
|
||||
<PROB_OFF_PE>0.2</PROB_OFF_PE> <!-- Probability threshold to move from OFF to PE state. -->
|
||||
<HOLDING_TIME_OFF_ED>100</HOLDING_TIME_OFF_ED> <!--Holding time in OFF state before moving to ED -->
|
||||
<HOLDING_TIME_OFF_PE>200</HOLDING_TIME_OFF_PE> <!--Holding time in OFF state before moving to PE -->
|
||||
<HOLDING_TIME_PE_OFF>230</HOLDING_TIME_PE_OFF> <!--Holding time in PE state before moving to OFF -->
|
||||
<SOURCE_ID>1:3</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>enable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>200</IDT_MAX_ms> <!--MAximum IDT values in milliseconds-->
|
||||
<SIZE_DIST>pareto</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_SCALE>0.5</SIZE_SCALE> <!-- Scale-->
|
||||
<SIZE_SHAPE>30</SIZE_SHAPE> <!-- Shape-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>3000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<!-- Basic configuration of a preconfigured M2M traffic with 4 states: OFF, PU, ED and PE-->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>m2m_traffic</APPLICATION_TYPE> <!-- options: scbr,mcbr,bcbr, gaming_OA, gaming_TF, m2m_AP, m2m_BR ,m2m_traffic -->
|
||||
<BACKGROUND_TRAFFIC>enable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<DESTINATION_ID>1:3</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>5000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enable, disable. If CURVE is enable, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<OWD_RADIO_ACESS>enable</OWD_RADIO_ACESS> <!-- 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>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
|
||||
|
||||
<!-- High complexity configuration of a customized traffic with 3 states: OFF, ED, PU and PE-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>tcp</TRANSPORT_PROTOCOL>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>1:3</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>enable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>400</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>500</IDT_MAX_ms> <!--Maximum IDT values in milliseconds-->
|
||||
<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 -->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>0</EMULATION_TIME_ms> <!--if0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<OWD_RADIO_ACCESS>enable</OWD_RADIO_ACCESS> <!-- option: 0, 1. If 1 owd curve shows the one way radio access delay,else shows end to end owd -->
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>free_space</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-50</PATHLOSS_0_dB>
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
</FADING>
|
||||
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>-90</RX_NOISE_LEVEL_dB>
|
||||
</eNB_ANTENNA>
|
||||
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>-90</RX_NOISE_LEVEL_dB>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>1000</X_m>
|
||||
<Y_m>1000</Y_m>
|
||||
</AREA>
|
||||
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>2</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>2</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>0</EMULATION_TIME_ms>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
</LOG>
|
||||
</EMULATION_CONFIG>
|
||||
<PROFILE>OCM_OMG_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2.0</PATHLOSS_EXPONENT>
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>4</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- Basic configuration of a customized traffic : one state-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>1:3</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>40</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>50</IDT_MAX_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<SIZE_DIST>fixed</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>1400</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>1400</SIZE_MAX_byte> <!--MAximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1:3</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
<FLOW_DURATION_ms>7000</FLOW_DURATION_ms> <!-- indicates the duration of the app or the actual duration of the traffic-->
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<IDT_DIST>fixed</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>40</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>50</IDT_MAX_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>256</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>768</SIZE_MAX_byte> <!--Maximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>30000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>disable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>MEDIEVAL_OTG_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<!-- Basic configuration of a preconfigured M2M traffic with 4 states: OFF, PU, ED and PE-->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<APPLICATION_TYPE>alarm_temperature</APPLICATION_TYPE> <!-- options: scbr,mcbr,bcbr, auto_pilot_l (LOW speed), auto_pilot_m (MEDIEUM speed), auto_pilot_h (HIGH speed), auto_pilot_e (EMERGENCY), virtual_race_l (LOW speed), virtual_race_m (MEDIUM speed), virtual_race_h (HIGH speed), virtual_race_f (FINISH speed), alarm_humidity, alarm_smoke, alarm_temperature -->
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<AGGREGATION_LEVEL>1</AGGREGATION_LEVEL> <!-- options: default=1, the number of traffic to aggregate-->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enable, disable. If CURVE is enable, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>7</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- DL
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1:9</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1:7</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>0</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>8000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>fixed</IDT_DIST>
|
||||
<IDT_MIN_ms>30</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>2000</IDT_MAX_ms>
|
||||
<SIZE_DIST>fixed</SIZE_DIST>
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>200</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>trace</LEVEL>
|
||||
<VERBOSITY>medium</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2014</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,93 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2.0</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<TRANSMISSION_MODE>1</TRANSMISSION_MODE> <!-- validavalue: 1, 2, 5, 6 -->
|
||||
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>1000</X_m>
|
||||
<Y_m>1000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>7</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- Basic configuration of a customized traffic : one state-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>1:7</DESTINATION_ID>
|
||||
<FLOW_START_ms>1000</FLOW_START_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
<FLOW_DURATION_ms>10000</FLOW_DURATION_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>50</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>100</IDT_MAX_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>128</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>1400</SIZE_MAX_byte> <!--MAximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1:7</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<FLOW_START_ms>0</FLOW_START_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
<FLOW_DURATION_ms>10000</FLOW_DURATION_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<IDT_DIST>uniform</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>150</IDT_MAX_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>256</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>768</SIZE_MAX_byte> <!--Maximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>15000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>disable</CURVE> <!-- option: enable, disable. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>0</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>MEDIEVAL_OTG_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2.0</PATHLOSS_EXPONENT>
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>1000</X_m>
|
||||
<Y_m>1000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- Basic configuration of a customized traffic : one state-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv4</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
<FLOW_START_ms>1000</FLOW_START_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
<FLOW_DURATION_ms>10000</FLOW_DURATION_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<IDT_DIST>fixed</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>1000</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<SIZE_DIST>fixed</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>32</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>32</SIZE_MAX_byte> <!--MAximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<FLOW_START_ms>1000</FLOW_START_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
<FLOW_DURATION_ms>10000</FLOW_DURATION_ms> <!-- indicates the start time of the app or the actual duration of the traffic-->
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC> <!-- options: enable, disable. If enable, it generates a background traffic corresponding to the traffic direction-->
|
||||
<IDT_DIST>fixed</IDT_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<IDT_MIN_ms>1000</IDT_MIN_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms> <!--Minimum IDT values in milliseconds-->
|
||||
<SIZE_DIST>uniform</SIZE_DIST> <!-- available distributions: none (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gammav-->
|
||||
<SIZE_MIN_byte>32</SIZE_MIN_byte> <!--Minimum PAYLOAD size values in bytes-->
|
||||
<SIZE_MAX_byte>32</SIZE_MAX_byte> <!--Maximum PAYLOAD size values in bytes-->
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>15000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>disable</CURVE> <!-- option: enable, disable. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<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>debug</LEVEL>
|
||||
<VERBOSITY>medium</VERBOSITY>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>0</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>MEDIEVAL_OTG_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>free_space</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-50</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<TRANSMISSION_MODE>1</TRANSMISSION_MODE>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>43</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>2</NUMBER_OF_NODES> <!-- num UE -->
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
<!-- <UE_MOVING_DYNAMICS>
|
||||
<MIN_SPEED_mps>0.1</MIN_SPEED_mps>
|
||||
<MAX_SPEED_mps>20</MAX_SPEED_mps>
|
||||
<MIN_SLEEP_ms>0.1</MIN_SLEEP_ms>
|
||||
<MAX_SLEEP_ms>5.0</MAX_SLEEP_ms>
|
||||
<MIN_JOURNEY_TIME_ms>0.1</MIN_JOURNEY_TIME_ms>
|
||||
<MAX_JOURNEY_TIME_ms>10</MAX_JOURNEY_TIME_ms>
|
||||
</UE_MOVING_DYNAMICS> -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>2</NUMBER_OF_CELLS> <!-- num eNB -->
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- DL -->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_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 -->
|
||||
<SIZE_MIN_byte>125</SIZE_MIN_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
<!-- UL -->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<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>
|
||||
<SIZE_DIST>fixed</SIZE_DIST> <!-- option: no_customized_traffic, uniform, gaussian, exponential, poisson, fixed, weibull, pareto, gamma, cauchy, log_normal -->
|
||||
<SIZE_MIN_byte>125</SIZE_MIN_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--0 == infinity-->
|
||||
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<OWD_RADIO_ACCESS>enable</OWD_RADIO_ACCESS>
|
||||
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
<VERBOSITY>medium</VERBOSITY> <!-- low, medium, high, full -->
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>LOLA_SCHED_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,63 +0,0 @@
|
||||
<!-- how to configure: talk about the convention, range -->
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<FADING>
|
||||
<LARGE_SCALE>free_space</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-50</PATHLOSS_0_dB>
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>Rice1</SMALL_SCALE>
|
||||
</FADING>
|
||||
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL>-90</RX_NOISE_LEVEL>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL>-90</RX_NOISE_LEVEL>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION> <!-- options, range -->
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>5000</EMULATION_TIME_ms>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
</LOG>
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OCM_OMG_2</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE> <!-- STATIC -->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- M2M: MANGO AGGREGATED TRAFFIC -->
|
||||
<!-- M2M: NEWSTEO AGGREGATED TRAFFIC-->
|
||||
<!-- VOIP TRAFFICS: G729 + G711-->
|
||||
<!-- 1st VOIP TRAFFICS: G729 bidirectional -->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>voip_g729</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<APPLICATION_TYPE>voip_g729</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<!-- 2nd VOIP TRAFFICS: G711 bidirectional-->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>voip_g711</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<APPLICATION_TYPE>voip_g711</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<!-- 1st M2M: MANGO AGGREGATED TRAFFIC bidirectional-->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<APPLICATION_TYPE>iqsim_mango</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<BACKGROUND_TRAFFIC>disable</BACKGROUND_TRAFFIC>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>iqsim_mango</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<!-- 2nd M2M: NEWSTEO AGGREGATED TRAFFIC bidirectional-->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<APPLICATION_TYPE>iqsim_newsteo</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>iqsim_newsteo</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>enable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUND statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
<LATENCY>enable</LATENCY> <!-- option: enable, disable. If enable, latency measurements are plotted in real time-->
|
||||
<OWD_RADIO_ACCESS>disable</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>info</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE>
|
||||
<UE_MOVING_DYNAMICS>
|
||||
<MIN_SPEED_mps>5</MIN_SPEED_mps>
|
||||
<MAX_SPEED_mps>5</MAX_SPEED_mps>
|
||||
<MIN_SLEEP_ms>0.1</MIN_SLEEP_ms>
|
||||
<MAX_SLEEP_ms>5.0</MAX_SLEEP_ms>
|
||||
<MIN_JOURNEY_TIME_ms>0.1</MIN_JOURNEY_TIME_ms>
|
||||
<MAX_JOURNEY_TIME_ms>10</MAX_JOURNEY_TIME_ms>
|
||||
</UE_MOVING_DYNAMICS>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>1</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<OWD_RADIO_ACCESS>enable</OWD_RADIO_ACCESS>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>medium</VERBOSITY> <!-- low, medium, high, full -->
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>0</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>eMBMS_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,44 +0,0 @@
|
||||
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>100</X_m>
|
||||
<Y_m>100</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE>
|
||||
<GRID_WALK>
|
||||
<GRID_MAP>RESTRICTED</GRID_MAP>
|
||||
</GRID_WALK>
|
||||
<UE_MOVING_DYNAMICS>
|
||||
<MIN_SPEED_mps>0.01</MIN_SPEED_mps>
|
||||
<MAX_SPEED_mps>10</MAX_SPEED_mps>
|
||||
<MIN_PAUSE_TIME_ms>0.01</MIN_PAUSE_TIME_ms>
|
||||
<MAX_PAUSE_TIME_ms>10</MAX_PAUSE_TIME_ms>
|
||||
<MIN_JOURNEY_TIME_ms>0.01</MIN_JOURNEY_TIME_ms>
|
||||
<MAX_JOURNEY_TIME_ms>10</MAX_JOURNEY_TIME_ms>
|
||||
</UE_MOVING_DYNAMICS>
|
||||
</UE_MOBILITY>
|
||||
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
<!--OMV>1</OMV-->
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>1000</EMULATION_TIME_ms>
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OMG_OMV</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,84 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>3.67</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-128</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>Rayleigh1</SMALL_SCALE>
|
||||
</FADING>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<TRANSMISSION_MODE>6</TRANSMISSION_MODE> <!-- validavalue: 1, 2, 5, 6 -->
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS><!--this means we use an omnidirectional antenna and the following parameter is ignored-->
|
||||
<BEAM_WIDTH_dB>0</BEAM_WIDTH_dB><!--3dB beam width per sector-->
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>43</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>5000</X_m>
|
||||
<Y_m>5000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>TRACE</UE_MOBILITY_TYPE>
|
||||
<TRACE_MOBILITY_FILE>static_2ues.tr</TRACE_MOBILITY_FILE> <!-- file should be located at $(OPENAIR2)/UTIL/OMG/TRACE/, see README there-->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
<!--<TRACE_MOBILITY_FILE>static_1enb.tr</TRACE_MOBILITY_FILE>--> <!-- file should be located at $(OPENAIR2)/UTIL/OMG/TRACE/, see README there-->
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!--DL-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<DESTINATION_ID>1</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 -->
|
||||
<SIZE_MIN_byte>1000</SIZE_MIN_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms>
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>1</THROUGHPUT>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>high</VERBOSITY> <!-- low, medium, high, full -->
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>7111</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OCM_OMG_OTG_REF_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,92 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>3.67</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-128</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<TRANSMISSION_MODE>1</TRANSMISSION_MODE> <!-- validavalue: 1, 2, 5, 6 -->
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS><!--this means we use an omnidirectional antenna and the following parameter is ignored-->
|
||||
<BEAM_WIDTH_dB>0</BEAM_WIDTH_dB><!--3dB beam width per sector-->
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>43</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>5000</X_m>
|
||||
<Y_m>5000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>TRACE</UE_MOBILITY_TYPE>
|
||||
<TRACE_MOBILITY_FILE>static_2ues.tr</TRACE_MOBILITY_FILE> <!-- file should be located at $(OPENAIR2)/UTIL/OMG/TRACE/, see README there-->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!--DL-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<DESTINATION_ID>1</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 -->
|
||||
<SIZE_MIN_byte>1500</SIZE_MIN_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
<!--UL-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1</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>
|
||||
<SIZE_DIST>fixed</SIZE_DIST> <!-- option: no_customized_traffic, uniform, gaussian, exponential, poisson, fixed, weibull, pareto, gamma, cauchy, log_normal -->
|
||||
<SIZE_MIN_byte>1000</SIZE_MIN_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms>
|
||||
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>1</THROUGHPUT>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>medium</VERBOSITY> <!-- low, medium, high, full -->
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>7111</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OCM_OMG_OTG_REF_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,70 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>3.67</PATHLOSS_EXPONENT>
|
||||
<!-- <PATHLOSS_0_dB>-100</PATHLOSS_0_dB> --> <!--pathloss at 1km -->
|
||||
<PATHLOSS_0_dB>-120</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<TRANSMISSION_MODE>1</TRANSMISSION_MODE> <!-- validavalue: 1, 2, 5, 6 -->
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS><!--this means we use an omnidirectional antenna and the following parameter is ignored-->
|
||||
<BEAM_WIDTH_dB>0</BEAM_WIDTH_dB><!--3dB beam width per sector-->
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>15</TX_POWER_dBm><!--this is currently ignored and set in asn1_msg.c-->
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>0</TX_POWER_dBm><!--this is ignored since UE TX power is controlled by eNB-->
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>10000</X_m> //2400
|
||||
<Y_m>10000</Y_m> //2400
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>TRACE</UE_MOBILITY_TYPE>
|
||||
<TRACE_MOBILITY_FILE>handover.tr</TRACE_MOBILITY_FILE>
|
||||
<!-- file should be located at $(OPENAIR2)/UTIL/OMG/TRACE/, see README there-->
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION> <!-- use random here and trace for the mobility to define your own positions -->
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>3</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>TRACE</eNB_MOBILITY_TYPE>
|
||||
<TRACE_MOBILITY_FILE>hexagonal_eNBs.tr</TRACE_MOBILITY_FILE> <!-- file should be located at $(OPENAIR2)/UTIL/OMG/TRACE/, see README there-->
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms>
|
||||
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
<VERBOSITY>high</VERBOSITY> <!-- low, medium, high, full -->
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>HO_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,70 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
-
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>3.67</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-111</PATHLOSS_0_dB>
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>Rayleigh1</SMALL_SCALE>
|
||||
</FADING>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<TRANSMISSION_MODE>1</TRANSMISSION_MODE>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>0</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>15</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>0</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>800</X_m>
|
||||
<Y_m>800</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>TRACE</UE_MOBILITY_TYPE>
|
||||
<TRACE_MOBILITY_FILE>static_1ue.tr</TRACE_MOBILITY_FILE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>1200</EMULATION_TIME_ms>
|
||||
<CURVE>disable</CURVE>
|
||||
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY> <!-- low, medium, high, full -->
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>69</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>eMBMS_OMG_REF_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,104 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2.67</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>1000</X_m>
|
||||
<Y_m>1000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>2</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE>
|
||||
<UE_MOVING_DYNAMICS>
|
||||
<MIN_SPEED_mps>1</MIN_SPEED_mps>
|
||||
<MAX_SPEED_mps>2</MAX_SPEED_mps>
|
||||
<MIN_SLEEP_ms>0.1</MIN_SLEEP_ms>
|
||||
<MAX_SLEEP_ms>15.0</MAX_SLEEP_ms>
|
||||
</UE_MOVING_DYNAMICS>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>mcbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1:2</DESTINATION_ID>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>6000</FLOW_DURATION_ms>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1:2</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>100</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>6000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>10</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>100</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>64</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>1024</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>0</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OCM_OMG_OTG</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,43 +0,0 @@
|
||||
<!-- template for OAI CLI interface. To connect from local host: telnet 127.0.1.1 1352 from the remot: telnet ip@ 1352-->
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>5000</X_m>
|
||||
<Y_m>5000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>0</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
<VERBOSITY>high</VERBOSITY>
|
||||
<INTERVAL>10</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
<CLI> <!-- start the cli server, a simple TCP server -->
|
||||
<START_ENB>1</START_ENB>
|
||||
<START_UE>0</START_UE>
|
||||
</CLI>
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>CLI</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<!-- <SYSTEM_BANDWIDTH_MB>20</SYSTEM_BANDWIDTH_MB> -->
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>500</X_m>
|
||||
<Y_m>500</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>1</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>fixed</eNB_INITIAL_DISTRIBUTION>
|
||||
<eNB_INITIAL_COORDINATES>
|
||||
<POS_X>10</POS_X>
|
||||
<POS_Y>10</POS_Y>
|
||||
</eNB_INITIAL_COORDINATES>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<!-- 1st VOIP TRAFFICS: VOIP G729 bidirectional -->
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>voip_g729</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<APPLICATION_TYPE>voip_g729</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms>
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS>
|
||||
<CURVE>enable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
<OWD_RADIO_ACESS>enable</OWD_RADIO_ACESS>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>TEST1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,56 +0,0 @@
|
||||
<!-- test OMG with sumo -->
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>700</X_m>
|
||||
<Y_m>700</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>8</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>SUMO</UE_MOBILITY_TYPE>
|
||||
<UE_MOVING_DYNAMICS>
|
||||
<MIN_SPEED_mps>1</MIN_SPEED_mps>
|
||||
<MAX_SPEED_mps>20</MAX_SPEED_mps>
|
||||
<MIN_SLEEP_ms>0.1</MIN_SLEEP_ms>
|
||||
<MAX_SLEEP_ms>5.0</MAX_SLEEP_ms>
|
||||
<MIN_JOURNEY_TIME_ms>0.1</MIN_JOURNEY_TIME_ms>
|
||||
<MAX_JOURNEY_TIME_ms>10</MAX_JOURNEY_TIME_ms>
|
||||
</UE_MOVING_DYNAMICS>
|
||||
<SUMO_CONFIG>
|
||||
<SUMO_CMD>sumo-gui</SUMO_CMD>
|
||||
<SUMO_CONFIG_FILE>$OPENAIR2_DIR/UTIL/OMG/SUMO/SCENARIOS/traci.scen.sumo.cfg</SUMO_CONFIG_FILE>
|
||||
<SUMO_START>0</SUMO_START>
|
||||
<SUMO_END>10000</SUMO_END>
|
||||
<SUMO_STEP>1</SUMO_STEP>
|
||||
<SUMO_HOST_IP>127.0.1.1</SUMO_HOST_IP>
|
||||
<SUMO_HOST_PORT>8890</SUMO_HOST_PORT>
|
||||
</SUMO_CONFIG>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
<!-- <OMV>1</OMV> -->
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>974930</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OMG_SUMO</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,111 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<ENVIRONMENT_SYSTEM_CONFIG>
|
||||
<FADING>
|
||||
<LARGE_SCALE>urban</LARGE_SCALE>
|
||||
<FREE_SPACE_MODEL_PARAMETERS>
|
||||
<PATHLOSS_EXPONENT>2</PATHLOSS_EXPONENT>
|
||||
<PATHLOSS_0_dB>-100</PATHLOSS_0_dB><!--pathloss at 1km -->
|
||||
</FREE_SPACE_MODEL_PARAMETERS>
|
||||
<SMALL_SCALE>AWGN</SMALL_SCALE>
|
||||
</FADING>
|
||||
<WALL_PENETRATION_LOSS_dB>5</WALL_PENETRATION_LOSS_dB>
|
||||
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
|
||||
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
|
||||
<ANTENNA>
|
||||
<eNB_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>5</RX_NOISE_LEVEL_dB>
|
||||
<NUMBER_OF_SECTORS>1</NUMBER_OF_SECTORS>
|
||||
<BEAM_WIDTH_dB>1.13</BEAM_WIDTH_dB>
|
||||
<ANTENNA_GAIN_dBi>16</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>40</TX_POWER_dBm>
|
||||
</eNB_ANTENNA>
|
||||
<UE_ANTENNA>
|
||||
<RX_NOISE_LEVEL_dB>1</RX_NOISE_LEVEL_dB>
|
||||
<ANTENNA_GAIN_dBi>5</ANTENNA_GAIN_dBi>
|
||||
<TX_POWER_dBm>20</TX_POWER_dBm>
|
||||
</UE_ANTENNA>
|
||||
</ANTENNA>
|
||||
</ENVIRONMENT_SYSTEM_CONFIG>
|
||||
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>2000</X_m>
|
||||
<Y_m>2000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>2</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>1:2</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
|
||||
<!-- UL -->
|
||||
<!-- <PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1</SOURCE_ID>
|
||||
<FLOW_START_ms>200</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>600</FLOW_DURATION_ms>
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
-->
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1:2</SOURCE_ID>
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL>
|
||||
<FLOW_START_ms>0</FLOW_START_ms>
|
||||
<FLOW_DURATION_ms>55000</FLOW_DURATION_ms>
|
||||
<IP_VERSION>ipv4</IP_VERSION>
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
<IDT_DIST>uniform</IDT_DIST>
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms>
|
||||
<SIZE_DIST>uniform</SIZE_DIST>
|
||||
<SIZE_MIN_byte>100</SIZE_MIN_byte>
|
||||
<SIZE_MAX_byte>1000</SIZE_MAX_byte>
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>60000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<CURVE>disable</CURVE>
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT>
|
||||
<LATENCY>enable</LATENCY>
|
||||
<LOSS_RATE>enable</LOSS_RATE>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>info</LEVEL>
|
||||
<VERBOSITY>low</VERBOSITY>
|
||||
</LOG>
|
||||
<SEED_VALUE>2013</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROTOCOL>
|
||||
<MAC>
|
||||
<NUM_GROUPS>10</NUM_GROUPS>
|
||||
</MAC>
|
||||
</PROTOCOL>
|
||||
|
||||
<PROFILE>CBA_1</PROFILE>
|
||||
|
||||
</OAI_EMULATION>
|
||||
@@ -1,52 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>5000</X_m>
|
||||
<Y_m>5000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>4</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID> <!-- valid formats are: -->
|
||||
<APPLICATION_TYPE>mcbr</APPLICATION_TYPE> <!-- OPTIONS: scbr,mcbr,bcbr, gaming_OA, gaming_TF, m2m_AP, m2m_BR, , random, ,full_buffer -->
|
||||
<DESTINATION_ID>1:3</DESTINATION_ID> <!-- valid formats are: -->
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>1:3</SOURCE_ID> <!-- valid formats are: -->
|
||||
<APPLICATION_TYPE>scbr</APPLICATION_TYPE> <!-- OPTIONS: scbr,mcbr,bcbr, gaming_OA, gaming_TF, m2m_AP, m2m_BR, , random, ,full_buffer -->
|
||||
<DESTINATION_ID>1:3</DESTINATION_ID> <!-- valid formats are: -->
|
||||
</PREDEFINED_TRAFFIC>
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>30000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>1</THROUGHPUT>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
<VERBOSITY>medium</VERBOSITY>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_1</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,64 +0,0 @@
|
||||
<OAI_EMULATION>
|
||||
<TOPOLOGY_CONFIG>
|
||||
<AREA>
|
||||
<X_m>5000</X_m>
|
||||
<Y_m>5000</Y_m>
|
||||
</AREA>
|
||||
<MOBILITY>
|
||||
<UE_MOBILITY>
|
||||
<RANDOM_UE_DISTRIBUTION>
|
||||
<NUMBER_OF_NODES>3</NUMBER_OF_NODES>
|
||||
</RANDOM_UE_DISTRIBUTION>
|
||||
<UE_MOBILITY_TYPE>STATIC</UE_MOBILITY_TYPE>
|
||||
</UE_MOBILITY>
|
||||
<eNB_MOBILITY>
|
||||
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
|
||||
<RANDOM_eNB_DISTRIBUTION>
|
||||
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
|
||||
</RANDOM_eNB_DISTRIBUTION>
|
||||
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
|
||||
</eNB_MOBILITY>
|
||||
</MOBILITY>
|
||||
</TOPOLOGY_CONFIG>
|
||||
|
||||
<APPLICATION_CONFIG>
|
||||
<PREDEFINED_TRAFFIC>
|
||||
<SOURCE_ID>0</SOURCE_ID>
|
||||
<APPLICATION_TYPE>gaming_OA</APPLICATION_TYPE> <!-- OPTIONS: scbr,mcbr,bcbr, gaming_OA, gaming_TF, m2m_AP, m2m_BR, , random, ,full_buffer -->
|
||||
<DESTINATION_ID>3</DESTINATION_ID>
|
||||
</PREDEFINED_TRAFFIC>
|
||||
<CUSTOMIZED_TRAFFIC>
|
||||
<SOURCE_ID>1:3</SOURCE_ID> <!-- <SOURCE_ID> 1:100 </SOURCE_ID> -->
|
||||
<TRANSPORT_PROTOCOL>udp</TRANSPORT_PROTOCOL> <!-- OPTIONS: tcp (default), udp -->
|
||||
<IP_VERSION>ipv6</IP_VERSION> <!-- OPTIONS: ipv4 (default), ipv6 -->
|
||||
<DESTINATION_ID>0</DESTINATION_ID>
|
||||
|
||||
<IDT_DIST>gaussian</IDT_DIST> <!-- OPTIONS: no_transmission (default), uniform, poission, gaussian, exponential,pareto, cauchy,fixed, weibull, gamma,-->
|
||||
<IDT_MIN_ms>100</IDT_MIN_ms>
|
||||
<IDT_MAX_ms>1000</IDT_MAX_ms>
|
||||
<IDT_STANDARD_DEVIATION>4.5</IDT_STANDARD_DEVIATION>
|
||||
|
||||
<SIZE_DIST>pareto</SIZE_DIST> <!-- similar for weibull and cauchy and gamma-->
|
||||
<SIZE_SCALE>0.5</SIZE_SCALE>
|
||||
<SIZE_SHAPE>30</SIZE_SHAPE>
|
||||
|
||||
</CUSTOMIZED_TRAFFIC>
|
||||
|
||||
</APPLICATION_CONFIG>
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>5000</EMULATION_TIME_ms> <!--set to infinity-->
|
||||
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>1</THROUGHPUT>
|
||||
</PERFORMANCE_METRICS>
|
||||
<LOG> <!-- set the global log level -->
|
||||
<LEVEL>debug</LEVEL>
|
||||
<INTERVAL>1</INTERVAL>
|
||||
</LOG>
|
||||
<SEED_VALUE>1234</SEED_VALUE> <!-- value 0 means randomly generated by OAI -->
|
||||
|
||||
</EMULATION_CONFIG>
|
||||
|
||||
<PROFILE>OTG_2</PROFILE>
|
||||
</OAI_EMULATION>
|
||||
@@ -1,46 +0,0 @@
|
||||
#ifdef cygwin
|
||||
#cyg=cygwin
|
||||
#endif
|
||||
|
||||
help:
|
||||
@echo "make one_eNB_two_UE_nas: compiles the code and performs a simulation with IP traffic between two virtual nodes (Linux only)"
|
||||
@echo "make one_eNB_one_UE: compiles the code and performs a small simulation (30 frames) with 1 eNB and 1 UE and checks that RLC data is transported between the two nodes after the connection setup"
|
||||
@echo "make one_eNB_four_UE: comples the code and performs a small simulation (60 frames) with 1 eNB and 4 UE and checks that all 4 UEs have established a complete connection (RRC output is traced)"
|
||||
@echo "make clean: Removes all .o files"
|
||||
|
||||
all: help
|
||||
|
||||
oaisim:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) oaisim LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 DEBUG=1)
|
||||
oaisim_nas:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) oaisim OAI_NW_DRIVER_TYPE_ETHERNET=1 LINK_ENB_PDCP_TO_IP_DRIVER=1)
|
||||
nasmesh:
|
||||
(cd $(OPENAIR2_DIR) && make nasmesh_netlink_address_fix.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && make)
|
||||
|
||||
one_eNB_one_UE_nas: oaisim_nas nasmesh
|
||||
./start_one_eNB_multi_UE_nas 1
|
||||
|
||||
one_eNB_two_UE_nas: oaisim_nas nasmesh
|
||||
./start_one_eNB_multi_UE_nas 2
|
||||
|
||||
one_eNB_three_UE_nas: oaisim_nas nasmesh
|
||||
./start_one_eNB_multi_UE_nas 3
|
||||
|
||||
one_eNB_one_UE : oaisim
|
||||
../../USER/oaisim -n30 | egrep SEND_SDU
|
||||
|
||||
one_eNB_four_UE : oaisim
|
||||
../../USER/oaisim -n60 -u4 | egrep "\[RRC\]"
|
||||
|
||||
one_eNB_one_UE_PHY : oaisim_nas nasmesh
|
||||
./start_one_eNB_two_UE_PHY_nas 2
|
||||
|
||||
clean:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && make clean)
|
||||
|
||||
echo_vars:
|
||||
echo $(OPENAIR1_DIR)
|
||||
echo $(OPENAIR2_DIR)
|
||||
echo $(OPENAIR3_DIR)
|
||||
echo $(OPENAIR_TARGETS)
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "Bringup eNB interface"
|
||||
|
||||
sudo rmmod nasmesh
|
||||
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
||||
sudo ip route add 224.0.0.160/28 dev eth0
|
||||
|
||||
|
||||
echo "bring up oai0 interface for enb"
|
||||
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
echo "bring up oai1 interface for ue 1"
|
||||
sudo ifconfig oai1 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255
|
||||
|
||||
# enb -> ue1
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
|
||||
# ue1 -> enb
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z0 -s 10.0.2.2 -t 10.0.2.1 -r 1
|
||||
|
||||
if [ $1 -ge 2 ]; then
|
||||
echo "bring up oai2 interface for ue 2"
|
||||
sudo ifconfig oai2 10.0.3.3 netmask 255.255.255.0 broadcast 10.0.3.255
|
||||
|
||||
# enb -> ue2
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 12
|
||||
# ue2 -> enb
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i2 -z0 -s 10.0.3.3 -t 10.0.3.1 -r 1
|
||||
fi
|
||||
|
||||
if [ $1 -ge 3 ]; then
|
||||
echo "bring up oai3 interface for ue 3"
|
||||
sudo ifconfig oai3 10.0.4.4 netmask 255.255.255.0 broadcast 10.0.4.255
|
||||
|
||||
# enb -> ue2
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.1.1 -t 10.0.1.4 -r 23
|
||||
# ue2 -> enb
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i3 -z0 -s 10.0.4.4 -t 10.0.4.1 -r 1
|
||||
fi
|
||||
|
||||
if [ $1 -ge 4 ]; then
|
||||
|
||||
echo "add oai interfaces for more UEs here"
|
||||
|
||||
fi
|
||||
|
||||
echo "start the emulation with 1eNB and" $1 "UE"
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -a -V -u" $1 ">/dev/null"
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -V -u $1 > /dev/null
|
||||
|
||||
|
||||
echo "End"
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "Bringup eNB interface"
|
||||
|
||||
sudo rmmod nasmesh
|
||||
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
|
||||
|
||||
#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
|
||||
#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
||||
sudo ip route add 224.0.0.160/28 dev eth0
|
||||
|
||||
|
||||
echo "bring up oai0 interface for enb"
|
||||
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
echo "bring up oai1 interface for ue 1"
|
||||
sudo ifconfig oai1 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255
|
||||
|
||||
# enb -> ue1
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
|
||||
# ue1 -> enb
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z0 -s 10.0.2.2 -t 10.0.2.1 -r 1
|
||||
|
||||
if [ $1 -ge 2 ]; then
|
||||
echo "bring up oai2 interface for ue 2"
|
||||
sudo ifconfig oai2 10.0.3.3 netmask 255.255.255.0 broadcast 10.0.3.255
|
||||
|
||||
# enb -> ue2
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 12
|
||||
# ue2 -> enb
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i2 -z0 -s 10.0.3.3 -t 10.0.3.1 -r 1
|
||||
fi
|
||||
|
||||
if [ $1 -ge 3 ]; then
|
||||
echo "bring up oai3 interface for ue 3"
|
||||
sudo ifconfig oai3 10.0.4.4 netmask 255.255.255.0 broadcast 10.0.4.255
|
||||
|
||||
# enb -> ue2
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.1.1 -t 10.0.1.4 -r 23
|
||||
# ue2 -> enb
|
||||
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i3 -z0 -s 10.0.4.4 -t 10.0.4.1 -r 1
|
||||
fi
|
||||
|
||||
if [ $1 -ge 4 ]; then
|
||||
|
||||
echo "add oai interfaces for more UEs here"
|
||||
|
||||
fi
|
||||
|
||||
echo "start the emulation with 1eNB and 2 UE"
|
||||
echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -c40 > /dev/null"
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -c40 > /dev/null
|
||||
|
||||
|
||||
echo "End"
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
all: oaisim naslite_netlink_ether
|
||||
|
||||
oaisim:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) oaisim OAI_NW_DRIVER_TYPE_ETHERNET=1 LINK_ENB_PDCP_TO_IP_DRIVER=1)
|
||||
|
||||
naslite_netlink_ether:
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) naslite_netlink_ether.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE/RB_TOOL/ && $(MAKE))
|
||||
|
||||
userclean: clean oaisim naslite_netlink_ether
|
||||
|
||||
one_eNB_one_UE_nas: oaisim naslite_netlink_ether
|
||||
/bin/bash ./start_one_eNB_multi_UE_nas 1
|
||||
|
||||
one_eNB_two_UE_nas: oaisim naslite_netlink_ether
|
||||
/bin/bash ./start_one_eNB_multi_UE_nas 2
|
||||
|
||||
one_eNB_three_UE_nas: oaisim naslite_netlink_ether
|
||||
/bin/bash ./start_one_eNB_multi_UE_nas 3
|
||||
|
||||
clean:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) clean)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE && $(MAKE) clean)
|
||||
|
||||
echo_vars:
|
||||
echo $(OPENAIR1_DIR)
|
||||
echo $(OPENAIR2_DIR)
|
||||
echo $(OPENAIR3_DIR)
|
||||
echo $(OPENAIR_TARGETS)
|
||||
|
||||
@@ -1,531 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "Bash version ${BASH_VERSION}..."
|
||||
|
||||
declare GENERATE_SEQ_DIAGRAM="no"
|
||||
declare LOG_FILE_LTE="no"
|
||||
#------------------------------------------------
|
||||
declare MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
|
||||
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
|
||||
declare IP_DRIVER_NAME="oai_nw_drv"
|
||||
#------------------------------------------------
|
||||
declare -a NAS_IMEI=( 3 9 1 8 3 6 6 2 0 0 0 0 0 0 )
|
||||
# first value is for ENB, then UE0, UE1, etc.
|
||||
declare -a MARKING=( 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 )
|
||||
# BE CAREFULL MAY NOT WORK WITH OTHER VALUES (TO DO)
|
||||
declare -i NUM_ENB=1
|
||||
#------------------------------------------------
|
||||
# Notes:
|
||||
# We would like to remove the ipv4 addresses swap in the IP driver code for oai virtualized.
|
||||
# Let's say oai0 has ipv4 @ 10.0.1.1, oai1 has ipv4 @ 10.0.2.2 etc.
|
||||
# In the past when we generated some local traffic on the computer and wanted to make it go
|
||||
# through for example oai1 to oai0, the ipv4 destination address was 10.0.2.1
|
||||
# meaning 10.0.2.2 wants to send a paquet to 10.0.1.1,
|
||||
# so ip_destination[2] has the digit corresponding to the source
|
||||
# so ip_destination[3] has the digit corresponding to the destination
|
||||
# then in the driver we modified at the receiving side (oai0 here) the ip source and destination
|
||||
# addresses in this way:
|
||||
# Originating packet: SRC 10.0.X.X -> 10.0.2.1
|
||||
# Resulting modified packet at the receiving side: SRC 10.0.1.2 -> 10.0.1.1
|
||||
# So the packet could be accepted by the device (same dest @) and the fake source was was recorded (1.2).
|
||||
# So the response to this packet could return to the interface by where the request was pulled.
|
||||
# But this solution lead to recompute checksums of packets in the driver.
|
||||
#
|
||||
# So here we describe a solution where packets are not modified by the IP driver but by the kernel:
|
||||
#
|
||||
# +---------------+ +---------------+ +---------------+
|
||||
# |APP "VIRTUALLY"| |APP "VIRTUALLY"| |APP "VIRTUALLY"| etc
|
||||
# |running on eNB | |running on UE0 | |running on UE1 |
|
||||
# |sending traffic| | | | |
|
||||
# | to UE 1 | | | | |
|
||||
# +---------------+ +---------------+ +---------------+
|
||||
# | ^ | ^ | ^
|
||||
# | | | | | |
|
||||
# Tx packet (n1) | | | Tx packet (n2) |
|
||||
# XXXX->10.0.1.3 | | | XXXX->10.0.1.3 |
|
||||
# | | | | | |
|
||||
# | Rx packet (n2) | | | Rx packet (n1)
|
||||
# | 10.0.1.3->10.0.1.1 | | | 10.0.3.1->10.0.3.3
|
||||
# V | V | V |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | IPTABLES Table mangle chain OUTPUT TARGET MARK OPERATION setmark |
|
||||
# | On packets coming from applications |
|
||||
# |-----------------------------------------------------------------------------|
|
||||
# | Example for packet n1: |
|
||||
# | iptables -t mangle -A OUTPUT --dst 10.0.1.3 -j MARK --set-mark 0x0103 |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | | | | | |
|
||||
# Tx packet (n1) | | | | |
|
||||
# XXXX->10.0.1.3 | | | | |
|
||||
# mark 0x0103 | | | | |
|
||||
# | | | | | |
|
||||
# V | V | V |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | IPTABLES Table nat chain POSTROUTING TARGET SNAT OPERATION --to Fake IP SRC|
|
||||
# | On packets coming from applications |
|
||||
# |-----------------------------------------------------------------------------|
|
||||
# | Example for packet n1: |
|
||||
# | iptables -t nat -A POSTROUTING -m mark --mark 0x0103 -j SNAT --to 10.0.3.1 |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | | | | | |
|
||||
# | | | | | Rx packet (n1)
|
||||
# | | | | | 10.0.3.1->10.0.3.3
|
||||
# | | | | | mark 0x0103
|
||||
# | | | | | |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | IPTABLES Table mangle chain PREROUTING TARGET MARK OPERATION setmark |
|
||||
# | On packets coming from applications |
|
||||
# |-----------------------------------------------------------------------------|
|
||||
# | Example for packet n1: |
|
||||
# | iptables -t nat -A PREROUTING -m mark --mark 0x0103 -j DNAT --to 10.0.3.3 |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | ^ | ^ | ^
|
||||
# | | | | | |
|
||||
# Tx packet (n1) | | | | Rx packet (n1)
|
||||
# 10.0.3.1->10.0.1.3 | | | 10.0.3.1->10.0.1.3
|
||||
# mark 0x0103 | | | | mark 0x0103
|
||||
# | | | | | |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | IPTABLES Table mangle chain PREROUTING TARGET MARK OPERATION setmark |
|
||||
# | On packets coming from applications |
|
||||
# |-----------------------------------------------------------------------------|
|
||||
# | Example for packet n1: |
|
||||
# | iptables -t mangle -A PREROUTING --dst 10.0.1.3 -j MARK --set-mark 0x0103 |
|
||||
# +-----------------------------------------------------------------------------+
|
||||
# | ^ | ^ | ^
|
||||
# | | | | | Rx packet (n1)
|
||||
# | | | | | 10.0.3.1->10.0.1.3
|
||||
# | | | | | |
|
||||
# |10.0.1.1| |10.0.2.2| |10.0.3.3|
|
||||
# V | V | V |
|
||||
# +----------+ +----------+ +----------+
|
||||
# | oai0 | | oai1 | | oai2 |
|
||||
# | (eNB) | | (UE0) | | (UE1) |
|
||||
# +----------+ +----------+ +----------+
|
||||
|
||||
####################################################################################
|
||||
# HERE IS A DISPLAY OF THE CONTENT OF THE NAT TABLE FOR THE DESCRIBED SETTING
|
||||
####################################################################################
|
||||
# Chain PREROUTING (policy ACCEPT 1108 packets, 242K bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x102 to:10.0.2.2
|
||||
# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x103 to:10.0.3.3
|
||||
# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x201 to:10.0.1.1
|
||||
# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x203 to:10.0.3.3
|
||||
# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x301 to:10.0.1.1
|
||||
# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x302 to:10.0.2.2
|
||||
#
|
||||
# Chain POSTROUTING (policy ACCEPT 2118 packets, 175K bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x102 to:10.0.2.1
|
||||
# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x103 to:10.0.3.1
|
||||
# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x201 to:10.0.1.2
|
||||
# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x203 to:10.0.3.2
|
||||
# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x301 to:10.0.1.3
|
||||
# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x302 to:10.0.2.3
|
||||
#
|
||||
# Chain OUTPUT (policy ACCEPT 2133 packets, 186K bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
####################################################################################
|
||||
# HERE IS A DISPLAY OF THE CONTENT OF THE MANGLE TABLE FOR THE DESCRIBED SETTING
|
||||
####################################################################################
|
||||
#root@hades:~# iptables -t mangle -nvL
|
||||
# Chain PREROUTING (policy ACCEPT 2008K packets, 316M bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.2 MARK xset 0x102/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.3 MARK xset 0x103/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.1 MARK xset 0x201/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.3 MARK xset 0x203/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.1 MARK xset 0x301/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.2 MARK xset 0x302/0xffffffff
|
||||
#
|
||||
# Chain INPUT (policy ACCEPT 2008K packets, 316M bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
#
|
||||
# Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
#
|
||||
# Chain OUTPUT (policy ACCEPT 1989K packets, 331M bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.2 MARK xset 0x102/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.3 MARK xset 0x103/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.1 MARK xset 0x201/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.3 MARK xset 0x203/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.1 MARK xset 0x301/0xffffffff
|
||||
# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.2 MARK xset 0x302/0xffffffff
|
||||
#
|
||||
# Chain POSTROUTING (policy ACCEPT 1990K packets, 331M bytes)
|
||||
# pkts bytes target prot opt in out source destination
|
||||
#
|
||||
####################################################################################
|
||||
# We also avoid the manipulation of ipv4 ARP packets by setting ourselves the neighbour cache:
|
||||
####################################################################################
|
||||
#root@hades:~# ip neigh show
|
||||
#...
|
||||
#10.0.3.1 dev oai1 lladdr 00:39:18:36:62:00 PERMANENT
|
||||
#10.0.2.1 dev oai1 lladdr 00:39:18:36:62:00 PERMANENT
|
||||
#10.0.1.1 dev oai1 lladdr 00:39:18:36:62:00 PERMANENT
|
||||
#...
|
||||
#10.0.1.2 dev oai0 lladdr 00:39:18:36:62:01 PERMANENT
|
||||
#10.0.2.2 dev oai0 lladdr 00:39:18:36:62:01 PERMANENT
|
||||
#10.0.3.2 dev oai0 lladdr 00:39:18:36:62:01 PERMANENT
|
||||
#...
|
||||
#10.0.1.3 dev oai0 lladdr 00:39:18:36:62:02 PERMANENT
|
||||
#10.0.2.3 dev oai0 lladdr 00:39:18:36:62:02 PERMANENT
|
||||
#10.0.3.3 dev oai0 lladdr 00:39:18:36:62:02 PERMANENT
|
||||
|
||||
#
|
||||
|
||||
###########################################################
|
||||
IPTABLES=/sbin/iptables
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
declare -x OPENAIR_DIR=""
|
||||
declare -x OPENAIR1_DIR=""
|
||||
declare -x OPENAIR2_DIR=""
|
||||
declare -x OPENAIR3_DIR=""
|
||||
declare -x OPENAIR_TARGETS=""
|
||||
###########################################################
|
||||
|
||||
|
||||
black='\E[30m'
|
||||
red='\E[31m'
|
||||
green='\E[32m'
|
||||
yellow='\E[33m'
|
||||
blue='\E[34m'
|
||||
magenta='\E[35m'
|
||||
cyan='\E[36m'
|
||||
white='\E[37m'
|
||||
|
||||
ROOT_UID=0
|
||||
E_NOTROOT=67
|
||||
|
||||
|
||||
cecho() # Color-echo
|
||||
# arg1 = message
|
||||
# arg2 = color
|
||||
{
|
||||
local default_msg="No Message."
|
||||
message=${1:-$default_msg}
|
||||
color=${2:-$black}
|
||||
echo -e "$color"
|
||||
echo -n "$message"
|
||||
tput sgr0
|
||||
echo
|
||||
return
|
||||
}
|
||||
|
||||
echo_error() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $red
|
||||
}
|
||||
|
||||
echo_warning() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $yellow
|
||||
}
|
||||
|
||||
echo_success() {
|
||||
local my_string=""
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
my_string="$my_string$1"
|
||||
shift
|
||||
done
|
||||
cecho "$my_string" $green
|
||||
}
|
||||
|
||||
set_openair() {
|
||||
path=`pwd`
|
||||
declare -i length_path
|
||||
declare -i index
|
||||
length_path=${#path}
|
||||
|
||||
index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
|
||||
#echo ${path%$token*}
|
||||
if [[ $index -lt $length_path && index -gt 0 ]]
|
||||
then
|
||||
declare -x OPENAIR_DIR
|
||||
index=`expr $index - 1`
|
||||
openair_path=`echo $path | cut -c1-$index`
|
||||
#openair_path=`echo ${path:0:$index}`
|
||||
export OPENAIR_DIR=$openair_path
|
||||
export OPENAIR1_DIR=$openair_path/openair1
|
||||
export OPENAIR2_DIR=$openair_path/openair2
|
||||
export OPENAIR3_DIR=$openair_path/openair3
|
||||
export OPENAIR_TARGETS=$openair_path/targets
|
||||
return 0
|
||||
fi
|
||||
return -1
|
||||
}
|
||||
|
||||
bash_exec() {
|
||||
output=$($1 2>&1)
|
||||
result=$?
|
||||
if [ $result -eq 0 ]
|
||||
then
|
||||
echo_success "$1"
|
||||
else
|
||||
echo_error "$1: $output"
|
||||
fi
|
||||
}
|
||||
|
||||
wait_process_started () {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo_error "WAITING FOR PROCESS START: NO PROCESS"
|
||||
return 1
|
||||
fi
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
while [ $? -ne 0 ]; do
|
||||
echo_warning "WAITING FOR $1 START"
|
||||
sleep 2
|
||||
ps -C $1 > /dev/null 2>&1
|
||||
done
|
||||
echo_success "PROCESS $1 STARTED"
|
||||
return 0
|
||||
}
|
||||
|
||||
assert() {
|
||||
# If condition false
|
||||
# exit from script with error message
|
||||
E_PARAM_ERR=98
|
||||
E_PARAM_FAILED=99
|
||||
|
||||
if [ -z "$2" ] # Not enought parameters passed.
|
||||
then
|
||||
return $E_PARAM_ERR
|
||||
fi
|
||||
|
||||
lineno=$2
|
||||
if [ ! $1 ]
|
||||
then
|
||||
echo "Assertion failed: \"$1\""
|
||||
echo "File \"$0\", line $lineno"
|
||||
exit $E_ASSERT_FAILED
|
||||
fi
|
||||
}
|
||||
|
||||
ctrl_c() {
|
||||
bash_exec "pkill oaisim"
|
||||
bash_exec "ip link set $LTEIF down"
|
||||
|
||||
bash_exec "rmmod $IP_DRIVER_NAME"
|
||||
|
||||
bash_exec "$IPTABLES -P INPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F INPUT"
|
||||
bash_exec "$IPTABLES -P OUTPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F OUTPUT"
|
||||
bash_exec "$IPTABLES -P FORWARD ACCEPT"
|
||||
bash_exec "$IPTABLES -F FORWARD"
|
||||
bash_exec "$IPTABLES -t nat -F"
|
||||
bash_exec "$IPTABLES -t mangle -F"
|
||||
bash_exec "$IPTABLES -t filter -F"
|
||||
bash_exec "ip route flush cache"
|
||||
}
|
||||
|
||||
|
||||
set_openair
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
|
||||
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
|
||||
cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
|
||||
cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
|
||||
|
||||
|
||||
declare -i NUM_MOBILES
|
||||
declare -i INSTANCE
|
||||
declare -i IP_SOURCE
|
||||
declare -i IP_DEST
|
||||
declare -i IP
|
||||
declare -i RB_ID
|
||||
declare -i CLASSIFIER_ID
|
||||
|
||||
|
||||
trap ctrl_c INT
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
bash_exec "$IPTABLES -P INPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F INPUT"
|
||||
bash_exec "$IPTABLES -P OUTPUT ACCEPT"
|
||||
bash_exec "$IPTABLES -F OUTPUT"
|
||||
bash_exec "$IPTABLES -P FORWARD DROP"
|
||||
bash_exec "$IPTABLES -F FORWARD"
|
||||
bash_exec "$IPTABLES -t nat -F"
|
||||
bash_exec "$IPTABLES -t mangle -F"
|
||||
bash_exec "$IPTABLES -t filter -F"
|
||||
|
||||
|
||||
NUM_MOBILES=$1
|
||||
|
||||
for ((i=0 ; i < `expr $NUM_MOBILES + $NUM_ENB`; i++ ))
|
||||
do
|
||||
TEST_OAI=`/sbin/ifconfig | grep oai$i | awk '{print $1}'`
|
||||
if [ "$TEST_OAI" = oai"$i"x ]; then
|
||||
bash_exec "ip link set oai$i down"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
echo "Bringup OAI network interfaces"
|
||||
|
||||
bash_exec "rmmod $IP_DRIVER_NAME"
|
||||
cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET....." $green
|
||||
bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET"
|
||||
bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=${NAS_IMEI[0]},${NAS_IMEI[1]},${NAS_IMEI[2]},${NAS_IMEI[3]},${NAS_IMEI[4]},${NAS_IMEI[5]},${NAS_IMEI[6]},${NAS_IMEI[7]},${NAS_IMEI[8]},${NAS_IMEI[9]},${NAS_IMEI[10]},${NAS_IMEI[11]},${NAS_IMEI[12]},${NAS_IMEI[13]}"
|
||||
|
||||
|
||||
NUM_MOBILES=$1
|
||||
IP=1
|
||||
|
||||
########################
|
||||
# #
|
||||
# CONFIGURE OAI IF #
|
||||
# #
|
||||
########################
|
||||
for ((i=0 ; i < `expr $NUM_MOBILES + $NUM_ENB`; i++ ))
|
||||
do
|
||||
bash_exec "ip link set oai$i broadcast ff:ff:ff:ff:ff:ff"
|
||||
bash_exec "ip link set oai$i up"
|
||||
sleep 1
|
||||
|
||||
bash_exec "ifconfig oai$i 10.0.$IP.$IP netmask 255.255.255.0 broadcast 10.0.$IP.255"
|
||||
|
||||
sleep 1
|
||||
bash_exec "ip addr add dev oai$i 2001:$IP::$IP/64"
|
||||
|
||||
# avoid arp in virtualization
|
||||
for ((j=0 ; j <= $NUM_MOBILES ; j++ ))
|
||||
do
|
||||
if [[ $i -ne $j ]]
|
||||
then
|
||||
bash_exec "ip neighbour add to 10.0.$IP.$IP lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$i nud permanent dev oai$j"
|
||||
fi
|
||||
done
|
||||
let IP=IP+1
|
||||
done
|
||||
|
||||
for ((src=0 ; src < `expr $NUM_ENB + $NUM_MOBILES` ; src++))
|
||||
do
|
||||
let IP_SRC=$src+1
|
||||
for ((dst=0 ; dst < `expr $NUM_ENB + $NUM_MOBILES` ; dst++))
|
||||
do
|
||||
if [[ $src -ne $dst ]]
|
||||
then
|
||||
let IP_DST=$dst+1
|
||||
let marksrc=${MARKING[$src]}
|
||||
marksrc16=`printf '%02x' $marksrc`
|
||||
let markdst=${MARKING[$dst]}
|
||||
markdst16=`printf '%02x' $markdst`
|
||||
bash_exec "iptables -t mangle -A OUTPUT --dst 10.0.$IP_SRC.$IP_DST -j MARK --set-mark 0x$marksrc16$markdst16"
|
||||
bash_exec "iptables -t nat -A POSTROUTING -m mark --mark 0x$marksrc16$markdst16 -j SNAT --to 10.0.$IP_DST.$IP_SRC"
|
||||
|
||||
# we can use same mark since not same path (PREROUTING)
|
||||
bash_exec "iptables -t mangle -A PREROUTING --dst 10.0.$IP_SRC.$IP_DST -j MARK --set-mark 0x$marksrc16$markdst16"
|
||||
bash_exec "iptables -t nat -A PREROUTING -m mark --mark 0x$marksrc16$markdst16 -j DNAT --to 10.0.$IP_DST.$IP_DST"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
echo "########################################################################################"
|
||||
echo "# IPTABLES MANGLE #"
|
||||
echo "########################################################################################"
|
||||
iptables -t mangle -nvL
|
||||
echo "########################################################################################"
|
||||
echo "# IPTABLES NAT #"
|
||||
echo "########################################################################################"
|
||||
iptables -t nat -nvL
|
||||
|
||||
########################
|
||||
# #
|
||||
# CONFIGURE RABS #
|
||||
# #
|
||||
########################
|
||||
# Loop Cx 0 -> NUM_MOBILES - 1 for configuring default RABS on eNB
|
||||
CLASSIFIER_ID=4
|
||||
for ((instance=0 ; instance < $NUM_ENB ; instance++ ))
|
||||
do
|
||||
let IP_SRC=instance+1
|
||||
for ((cx=0 ; cx < $NUM_MOBILES ; cx++ ))
|
||||
do
|
||||
let IP_DEST=cx+2
|
||||
if [[ $IP_SRC -ne $IP_DEST ]]
|
||||
then
|
||||
# ON eNB
|
||||
let RB_ID=(cx*8)+3
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c$cx -i$instance -f$CLASSIFIER_ID -z0 -s 10.0.$IP_DEST.$IP_SRC/32 -t 10.0.$IP_SRC.$IP_DEST/32 -r $RB_ID"
|
||||
let CLASSIFIER_ID=CLASSIFIER_ID+2
|
||||
|
||||
# ON UE
|
||||
let IP_SOURCE=instance+1
|
||||
let instance_ue=cx+$NUM_ENB
|
||||
RB_ID=3
|
||||
bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c$instance -i$instance_ue -f$CLASSIFIER_ID -z0 -s 10.0.$IP_SRC.$IP_DEST/32 -t 10.0.$IP_DEST.$IP_SRC/32 -r $RB_ID"
|
||||
let CLASSIFIER_ID=CLASSIFIER_ID+2
|
||||
|
||||
# ON eNB
|
||||
bash_exec "ip neighbour add to 10.0.$IP_SRC.$IP_DEST lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$instance_ue nud permanent dev oai$instance"
|
||||
|
||||
# ON UE
|
||||
bash_exec "ip neighbour add to 10.0.$IP_DEST.$IP_SRC lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$instance nud permanent dev oai$instance_ue"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
IP=1
|
||||
for ((i=0 ; i < `expr $NUM_MOBILES + $NUM_ENB`; i++ ))
|
||||
do
|
||||
# avoid arp in virtualization
|
||||
for ((j=0 ; j <= $NUM_MOBILES ; j++ ))
|
||||
do
|
||||
if [[ $i -ne $j ]]
|
||||
then
|
||||
bash_exec "ip neighbour add to 10.0.$IP.$IP lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$i nud permanent dev oai$j"
|
||||
fi
|
||||
done
|
||||
let IP=IP+1
|
||||
done
|
||||
|
||||
# echo "start the emulation with 1eNB and" $1 "UE"
|
||||
if [ "$GENERATE_SEQ_DIAGRAM"x = yesx ]; then
|
||||
if [ -e /tmp/msc_log.txt ]; then
|
||||
bash_exec "rm -f /tmp/msc_log.txt"
|
||||
fi
|
||||
|
||||
if [ "$LOG_FILE_LTE"x = yesx ]; then
|
||||
if [ -e /tmp/lte_log.txt ]; then
|
||||
bash_exec "rm -f /tmp/lte_log.txt"
|
||||
fi
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 > /tmp/lte_log.txt
|
||||
chmod 777 /tmp/lte_log.txt
|
||||
cat /tmp/lte_log.txt | grep MSC_ > /tmp/msc_log.txt
|
||||
else
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 | grep MSC_ > /tmp/msc_log.txt
|
||||
fi
|
||||
chmod 777 /tmp/msc_log.txt
|
||||
echo "End of emulation, now generating sequence diagrams..."
|
||||
$OPENAIR_TARGETS/SCRIPTS/msc_gen.py /tmp/msc_log.txt
|
||||
else
|
||||
if [ "$LOG_FILE_LTE"x = yesx ]; then
|
||||
if [ -e /tmp/lte_log.txt ]; then
|
||||
bash_exec "rm -f /tmp/lte_log.txt"
|
||||
fi
|
||||
$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 -P wireshark > /tmp/lte_log.txt
|
||||
fi
|
||||
echo "End of emulation"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,531 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "SIMULATION/TOOLS/defs.h"
|
||||
#include "SIMULATION/RF/defs.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#endif
|
||||
|
||||
#include "../USER/oaisim.h"
|
||||
#include "channel_sim_proc.h"
|
||||
#include "interface.h"
|
||||
#include "Tsync.h"
|
||||
#include "Process.h"
|
||||
|
||||
#define FILENAMEMAX 255
|
||||
|
||||
//#define DEBUG_SIM
|
||||
void Process_Func(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
|
||||
node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
if(node_id<MAX_eNB)
|
||||
eNB_Inst(node_id,port,r_re0,r_im0,r_re,r_im,s_re,s_im,enb_data,abstraction_flag,frame_parms);
|
||||
else
|
||||
UE_Inst(node_id,port,r_re0,r_im0,r_re,r_im,s_re,s_im,ue_data,abstraction_flag,frame_parms);
|
||||
|
||||
|
||||
}
|
||||
void UE_Inst(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
|
||||
node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
|
||||
int next_slot,last_slot,slot=0,UE_id=0,eNB_id=0;
|
||||
lte_subframe_t direction;
|
||||
printf("UE [ %d ] Starts \n",node_id-MAX_eNB);
|
||||
// init_mmap(node_id,frame_parms, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
|
||||
init_channel_vars (frame_parms, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
|
||||
mmap_ue(node_id,&PHY_vars_UE_g[0]->lte_ue_common_vars.txdata,&PHY_vars_UE_g[0]->lte_ue_common_vars.rxdata,frame_parms);
|
||||
|
||||
// Interface_init(port,node_id);
|
||||
char p_input[FILENAMEMAX];
|
||||
int fd_pipe;
|
||||
int fd_channel;
|
||||
mkfifo("/tmp/channel", 0666);
|
||||
fd_channel=open("/tmp/channel",O_RDWR,0);
|
||||
sprintf(p_input,"/tmp/pipe_%d",node_id);
|
||||
mkfifo(p_input, 0666);
|
||||
fd_pipe=open(p_input,O_RDWR,0);
|
||||
// IntInitAll();
|
||||
mac_xface->frame=0;
|
||||
|
||||
while(1) {
|
||||
// wait_4slot(&slot,&mac_xface->frame);
|
||||
read(fd_pipe,&slot,sizeof(slot));
|
||||
|
||||
last_slot = (slot - 1)%20;
|
||||
|
||||
if (last_slot <0)
|
||||
last_slot+=20;
|
||||
|
||||
next_slot = (slot + 1)%20;
|
||||
|
||||
direction = subframe_select(frame_parms,next_slot>>1);
|
||||
#ifdef DEBUG_SIM
|
||||
printf("\n\n[SIM] EMU PHY procedures UE %d for frame %d, slot %d (subframe %d)\n",
|
||||
UE_id,mac_xface->frame, slot, (next_slot >> 1));
|
||||
#endif
|
||||
|
||||
if (PHY_vars_UE_g[UE_id]->UE_mode[0] != NOT_SYNCHED) {
|
||||
if ((mac_xface->frame)>0) {
|
||||
phy_procedures_UE_lte ((last_slot),(next_slot), PHY_vars_UE_g[UE_id], 0, abstraction_flag);
|
||||
}
|
||||
} else {
|
||||
if (((mac_xface->frame)>0) && ((last_slot) == (SLOTS_PER_FRAME-1))) {
|
||||
initial_sync(PHY_vars_UE_g[UE_id]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( direction == SF_UL || (direction == SF_S && next_slot%2!=0)) {
|
||||
do_OFDM_mod(PHY_vars_UE_g[UE_id]->lte_ue_common_vars.txdataF,PHY_vars_UE_g[UE_id]->lte_ue_common_vars.txdata,next_slot,&PHY_vars_UE_g[UE_id]->lte_frame_parms);
|
||||
}
|
||||
|
||||
write(fd_channel,&node_id,sizeof(node_id));
|
||||
|
||||
// send_exec_complete(CHANNEL_PORT);
|
||||
if(slot==19)
|
||||
(mac_xface->frame)++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void eNB_Inst(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
|
||||
node_desc_t *enb_data[NUMBER_OF_eNB_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
int next_slot,last_slot,slot=0,UE_id=0,eNB_id=0;
|
||||
lte_subframe_t direction;
|
||||
printf("eNB [ %d ] Starts \n",node_id);
|
||||
|
||||
// init_mmap(node_id,frame_parms, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
|
||||
init_channel_vars (frame_parms, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
|
||||
mmap_enb(node_id,PHY_vars_eNB_g[0]->lte_eNB_common_vars.txdata,PHY_vars_eNB_g[0]->lte_eNB_common_vars.rxdata,frame_parms);
|
||||
|
||||
// Interface_init(port,node_id);
|
||||
// IntInitAll();
|
||||
char p_input[FILENAMEMAX];
|
||||
int fd_pipe;
|
||||
int fd_channel;
|
||||
|
||||
mkfifo("/tmp/channel", 0666);
|
||||
fd_channel=open("/tmp/channel",O_RDWR,0);
|
||||
sprintf(p_input,"/tmp/pipe_%d",node_id);
|
||||
mkfifo(p_input, 0666);
|
||||
fd_pipe=open(p_input, O_RDWR,0);
|
||||
mac_xface->frame=0;
|
||||
|
||||
while(1) {
|
||||
// wait_4slot(&slot,&mac_xface->frame);
|
||||
read(fd_pipe,&slot,sizeof(slot));
|
||||
|
||||
last_slot = (slot - 1)%20;
|
||||
|
||||
if (last_slot <0)
|
||||
last_slot+=20;
|
||||
|
||||
next_slot = (slot + 1)%20;
|
||||
direction = subframe_select(frame_parms,next_slot>>1);
|
||||
#ifdef DEBUG_SIM
|
||||
printf
|
||||
("\n\n [SIM]EMU PHY procedures eNB %d for frame %d, slot %d (subframe %d) (rxdataF_ext %p) Nid_cell %d\n",
|
||||
eNB_id, mac_xface->frame, slot, next_slot >> 1,
|
||||
PHY_vars_eNB_g[0]->lte_eNB_ulsch_vars[0]->rxdataF_ext, PHY_vars_eNB_g[eNB_id]->lte_frame_parms.Nid_cell);
|
||||
#endif
|
||||
phy_procedures_eNB_lte (last_slot, next_slot, PHY_vars_eNB_g[eNB_id], abstraction_flag);
|
||||
|
||||
if( direction == SF_DL || (direction == SF_S && next_slot%2==0)) {
|
||||
do_OFDM_mod(PHY_vars_eNB_g[eNB_id]->lte_eNB_common_vars.txdataF[0],
|
||||
PHY_vars_eNB_g[eNB_id]->lte_eNB_common_vars.txdata[0],
|
||||
next_slot,
|
||||
&PHY_vars_eNB_g[eNB_id]->lte_frame_parms);
|
||||
}
|
||||
|
||||
write(fd_channel,&node_id,sizeof(node_id));
|
||||
|
||||
// send_exec_complete(CHANNEL_PORT);
|
||||
if(slot==19)
|
||||
(mac_xface->frame)++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
// Interface_init(port,node_id);
|
||||
// IntInitAll();
|
||||
mkfifo("/tmp/channel", 0666);
|
||||
fd_channel=open("/tmp/channel", O_RDWR ,0);
|
||||
|
||||
int next_slot,last_slot,slot=0,UE_id=0,eNB_id=0;
|
||||
lte_subframe_t direction;
|
||||
char in_buffer[100];
|
||||
|
||||
int ci,ji=0;
|
||||
|
||||
for(ci=0; ci<NB_eNB_INST; ci++) {
|
||||
mmap_enb(ji,tx[ci],rx[ci],frame_parms);
|
||||
init_channel_vars (frame_parms, &(s_re[ci]), &(s_im[ci]), &(r_re[ci]), &(r_im[ci]), &(r_re0), &(r_im0));
|
||||
// init_mmap_channel(ji,frame_parms, &(s_re[ci]), &(s_im[ci]), &(r_re[ci]), &(r_im[ci]), &(r_re0), &(r_im0));
|
||||
sprintf(in_buffer, "/tmp/pipe_%d",ji);
|
||||
mkfifo(in_buffer, 0666);
|
||||
fd_NB[ci]=open(in_buffer, O_RDWR ,0);
|
||||
ji++;
|
||||
}
|
||||
|
||||
ji=0;
|
||||
|
||||
for(ci=NB_eNB_INST; ci<(NB_eNB_INST+NB_UE_INST); ci++) {
|
||||
mmap_enb(MAX_eNB+ji,tx[ci],rx[ci],frame_parms);
|
||||
init_channel_vars (frame_parms, &(s_re[ci]), &(s_im[ci]), &(r_re[ci]), &(r_im[ci]), &(r_re0), &(r_im0));
|
||||
// init_mmap_channel(MAX_eNB+ji,frame_parms, &(s_re[ci]), &(s_im[ci]), &(r_re[ci]), &(r_im[ci]), &(r_re0), &(r_im0));
|
||||
sprintf(in_buffer, "/tmp/pipe_%d",MAX_eNB+ji);
|
||||
mkfifo(in_buffer, 0666);
|
||||
|
||||
fd_NB[ci]=open(in_buffer, O_RDWR ,0);
|
||||
ji++;
|
||||
}
|
||||
|
||||
for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
|
||||
init_rre(frame_parms,&(r_re0_u[eNB_id][UE_id]),&(r_im0_u[eNB_id][UE_id]));
|
||||
init_rre(frame_parms,&(r_re0_d[UE_id][eNB_id]),&(r_im0_d[UE_id][eNB_id]));
|
||||
}
|
||||
}
|
||||
|
||||
for(eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) {
|
||||
for(UE_id=0; UE_id<NB_UE_INST; UE_id++) {
|
||||
e2u_t[eNB_id][UE_id]=(ch_thread*)calloc(1,sizeof(ch_thread));
|
||||
}
|
||||
}
|
||||
|
||||
for(UE_id=0; UE_id<NB_UE_INST; UE_id++) {
|
||||
for(eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) {
|
||||
u2e_t[UE_id][eNB_id]=(ch_thread*)calloc(1,sizeof(ch_thread));
|
||||
}
|
||||
}
|
||||
|
||||
pthread_t cthr_u[NB_eNB_INST][NB_UE_INST];
|
||||
pthread_t cthr_d[NB_UE_INST][NB_eNB_INST];
|
||||
|
||||
|
||||
pthread_mutex_init(&downlink_mutex_channel,NULL);
|
||||
pthread_mutex_init(&uplink_mutex_channel,NULL);
|
||||
pthread_mutex_init(&exclusive,NULL);
|
||||
|
||||
if (pthread_cond_init (&downlink_cond_channel, NULL)) exit(1);
|
||||
|
||||
if (pthread_cond_init (&uplink_cond_channel, NULL)) exit(1);
|
||||
|
||||
if (pthread_mutex_lock(&downlink_mutex_channel)) exit(1);
|
||||
|
||||
if (pthread_mutex_lock(&uplink_mutex_channel)) exit(1);
|
||||
|
||||
NUM_THREAD_DOWNLINK=0;
|
||||
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
u2e_t[UE_id][eNB_id]->thread_id=NUM_THREAD_DOWNLINK;
|
||||
u2e_t[UE_id][eNB_id]->eNB_id=eNB_id;
|
||||
u2e_t[UE_id][eNB_id]->UE_id=UE_id;
|
||||
u2e_t[UE_id][eNB_id]->r_re0=r_re0_d[UE_id][eNB_id];
|
||||
u2e_t[UE_id][eNB_id]->r_im0=r_im0_d[UE_id][eNB_id];
|
||||
u2e_t[UE_id][eNB_id]->r_re=r_re[NB_eNB_INST+UE_id];
|
||||
u2e_t[UE_id][eNB_id]->r_im=r_im[NB_eNB_INST+UE_id];
|
||||
u2e_t[UE_id][eNB_id]->s_im=s_im[eNB_id];
|
||||
u2e_t[UE_id][eNB_id]->s_re=s_re[eNB_id];
|
||||
u2e_t[UE_id][eNB_id]->eNB2UE=eNB2UE[eNB_id][UE_id];
|
||||
u2e_t[UE_id][eNB_id]->UE2eNB=UE2eNB[UE_id][eNB_id];
|
||||
u2e_t[UE_id][eNB_id]->enb_data=enb_data[eNB_id];
|
||||
u2e_t[UE_id][eNB_id]->ue_data=ue_data[UE_id];
|
||||
u2e_t[UE_id][eNB_id]->next_slot=&next_slot;
|
||||
u2e_t[UE_id][eNB_id]->abstraction_flag=&abstraction_flag;
|
||||
u2e_t[UE_id][eNB_id]->frame_parms=frame_parms;
|
||||
|
||||
for (int i=0;i<3;i++)
|
||||
{
|
||||
u2e_t[UE_id][eNB_id]->tx_data[i]=tx[eNB_id][i];
|
||||
u2e_t[UE_id][eNB_id]->rx_data[i]=rx[NB_eNB_INST+UE_id][i];
|
||||
}
|
||||
|
||||
if(pthread_cond_init (&downlink_cond[eNB_id][UE_id], NULL)) exit(1);
|
||||
|
||||
if(pthread_mutex_lock(&downlink_mutex[eNB_id][UE_id])) exit(1);
|
||||
|
||||
pthread_create (&cthr_d[UE_id][eNB_id], NULL, do_DL_sig_channel_T,(void*)(u2e_t[UE_id][eNB_id]));
|
||||
NUM_THREAD_DOWNLINK++;
|
||||
}
|
||||
}
|
||||
|
||||
NUM_THREAD_UPLINK=0;
|
||||
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
|
||||
e2u_t[eNB_id][UE_id]->thread_id=NUM_THREAD_UPLINK;
|
||||
e2u_t[eNB_id][UE_id]->eNB_id=eNB_id;
|
||||
e2u_t[eNB_id][UE_id]->UE_id=UE_id;
|
||||
e2u_t[eNB_id][UE_id]->r_re=r_re[eNB_id];
|
||||
e2u_t[eNB_id][UE_id]->r_im=r_im[eNB_id];
|
||||
e2u_t[eNB_id][UE_id]->r_re0=r_re0_u[eNB_id][UE_id];
|
||||
e2u_t[eNB_id][UE_id]->r_im0=r_im0_u[eNB_id][UE_id];
|
||||
e2u_t[eNB_id][UE_id]->s_im=s_im[NB_eNB_INST+UE_id];
|
||||
e2u_t[eNB_id][UE_id]->s_re=s_re[NB_eNB_INST+UE_id];
|
||||
e2u_t[eNB_id][UE_id]->eNB2UE=eNB2UE[eNB_id][UE_id];
|
||||
e2u_t[eNB_id][UE_id]->UE2eNB=UE2eNB[UE_id][eNB_id];
|
||||
e2u_t[eNB_id][UE_id]->enb_data=enb_data[eNB_id];
|
||||
e2u_t[eNB_id][UE_id]->ue_data=ue_data[UE_id];
|
||||
e2u_t[eNB_id][UE_id]->next_slot=&next_slot;
|
||||
e2u_t[eNB_id][UE_id]->abstraction_flag=&abstraction_flag;
|
||||
e2u_t[eNB_id][UE_id]->frame_parms=frame_parms;
|
||||
for (int i=0;i<3;i++)
|
||||
{
|
||||
e2u_t[eNB_id][UE_id]->tx_data[i]=tx[NB_eNB_INST+UE_id][i];
|
||||
e2u_t[eNB_id][UE_id]->rx_data[i]=rx[eNB_id][i];
|
||||
}
|
||||
|
||||
if(pthread_cond_init (&uplink_cond[UE_id][eNB_id], NULL)) exit(1);
|
||||
|
||||
if(pthread_mutex_lock(&uplink_mutex[UE_id][eNB_id])) exit(1);
|
||||
|
||||
pthread_create (&cthr_u[eNB_id][UE_id], NULL, do_UL_sig_channel_T,(void*)e2u_t[eNB_id][UE_id]);
|
||||
NUM_THREAD_UPLINK++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Channel_DL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int slot)
|
||||
{
|
||||
|
||||
int count=0;
|
||||
int next_slot,last_slot,UE_id=0,eNB_id=0;
|
||||
lte_subframe_t direction;
|
||||
s32 **txdata,**rxdata;
|
||||
double tx_pwr, rx_pwr;
|
||||
s32 rx_pwr2;
|
||||
u32 i;
|
||||
u32 slot_offset;
|
||||
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
write(fd_NB[eNB_id],&slot,sizeof(slot));
|
||||
count++;
|
||||
//send_exec_msg(mac_xface->frame,slot,eNB_PORT+eNB_id);
|
||||
}
|
||||
|
||||
|
||||
while(count--) {
|
||||
int dummy=1;
|
||||
read(fd_channel,&dummy,sizeof(dummy));
|
||||
//wait_4Msg();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
frame_parms = &PHY_vars_eNB_g[eNB_id]->lte_frame_parms;
|
||||
slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
|
||||
txdata =tx[eNB_id][0];
|
||||
tx_pwr = dac_fixed_gain(s_re[eNB_id],
|
||||
s_im[eNB_id],
|
||||
txdata,
|
||||
slot_offset,
|
||||
frame_parms->nb_antennas_tx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
14,
|
||||
40);
|
||||
printf("[SIM][DL] eNB %d: tx_pwr %f dB for slot %d (subframe %d)\n",eNB_id,10*log10(tx_pwr),nslot,nslot>>1);
|
||||
}
|
||||
|
||||
_COT=0;
|
||||
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
if(pthread_cond_signal(&downlink_cond[eNB_id][UE_id])) exit(1);
|
||||
|
||||
if(pthread_mutex_unlock(&downlink_mutex[eNB_id][UE_id])) exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(pthread_cond_wait(&downlink_cond_channel, &downlink_mutex_channel)) exit(1);
|
||||
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
|
||||
Clean_Param(r_re[NB_eNB_INST+UE_id],r_im[NB_eNB_INST+UE_id],frame_parms);
|
||||
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
Channel_Out(SF_DL,eNB_id,UE_id,r_re[NB_eNB_INST+UE_id],r_im[NB_eNB_INST+UE_id],r_re0_d[UE_id][eNB_id],r_im0_d[UE_id][eNB_id],frame_parms);
|
||||
// adc_channel(eNB_id,UE_id,r_re[NB_eNB_INST+UE_id],r_im[NB_eNB_INST+UE_id]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
count=0;
|
||||
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++)
|
||||
if (mac_xface->frame >= (UE_id * 10)) {
|
||||
write(fd_NB[NB_eNB_INST+UE_id],&slot,sizeof(slot));
|
||||
//send_exec_msg(mac_xface->frame,slot,UE_PORT+UE_id);
|
||||
count++;
|
||||
}
|
||||
|
||||
while(count--) {
|
||||
int dummy=1;
|
||||
read(fd_channel,&dummy,sizeof(dummy));
|
||||
//wait_4Msg();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Channel_UL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int slot)
|
||||
{
|
||||
int count=0;
|
||||
int next_slot,last_slot,UE_id=0,eNB_id=0;
|
||||
lte_subframe_t direction;
|
||||
s32 **txdata,**rxdata;
|
||||
double tx_pwr, rx_pwr;
|
||||
s32 rx_pwr2;
|
||||
u32 i;
|
||||
u32 slot_offset;
|
||||
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++)
|
||||
if (mac_xface->frame >= (UE_id * 10)) {
|
||||
write(fd_NB[NB_eNB_INST+UE_id],&slot,sizeof(slot));
|
||||
//send_exec_msg(mac_xface->frame,slot,UE_PORT+UE_id);
|
||||
count++;
|
||||
}
|
||||
|
||||
while(count--) {
|
||||
int dummy=1;
|
||||
read(fd_channel,&dummy,sizeof(dummy));
|
||||
//wait_4Msg();
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
|
||||
frame_parms = &PHY_vars_UE_g[UE_id]->lte_frame_parms;
|
||||
slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
|
||||
txdata =tx[NB_eNB_INST+UE_id][0]; //PHY_vars_UE_g[UE_id]->lte_ue_common_vars.txdata;
|
||||
tx_pwr = dac_fixed_gain(s_re[NB_eNB_INST+UE_id],
|
||||
s_im[NB_eNB_INST+UE_id],
|
||||
txdata,
|
||||
slot_offset,
|
||||
frame_parms->nb_antennas_tx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
14,
|
||||
18);
|
||||
printf("[SIM][UL] UE %d tx_pwr %f dB for slot %d (subframe %d)\n",UE_id,10*log10(tx_pwr),nslot,nslot>>1);
|
||||
rx_pwr = signal_energy_fp(s_re[NB_eNB_INST+UE_id],s_im[NB_eNB_INST+UE_id],frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
printf("[SIM][UL] UE %d tx_pwr %f dB for slot %d (subframe %d)\n",UE_id,10*log10(rx_pwr),nslot,nslot>>1);
|
||||
}
|
||||
|
||||
_COT_U=0;
|
||||
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
|
||||
if ( pthread_cond_signal(&uplink_cond[UE_id][eNB_id])) exit(1);
|
||||
|
||||
if ( pthread_mutex_unlock(&uplink_mutex[UE_id][eNB_id])) exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ( pthread_cond_wait(&uplink_cond_channel, &uplink_mutex_channel)) exit(1);
|
||||
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
Clean_Param(r_re[eNB_id],r_im[eNB_id],frame_parms);
|
||||
|
||||
for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
|
||||
Channel_Out(SF_UL,eNB_id,UE_id,r_re[eNB_id],r_im[eNB_id],r_re0_u[eNB_id][UE_id],r_im0_u[eNB_id][UE_id],frame_parms);
|
||||
printf("[SIM][DL] eNB %d: tx_pwr %f dB for slot %d (subframe %d)\n",eNB_id,10*log10(tx_pwr),next_slot,next_slot>>1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
count=0;
|
||||
|
||||
for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
|
||||
write(fd_NB[eNB_id],&slot,sizeof(slot));
|
||||
// send_exec_msg(mac_xface->frame,slot,eNB_PORT+eNB_id);
|
||||
count++;
|
||||
}
|
||||
|
||||
while(count--) {
|
||||
int dummy=1;
|
||||
read(fd_channel,&dummy,sizeof(dummy));
|
||||
// wait_4Msg();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Channel_Func(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int slot)
|
||||
{
|
||||
int last_slot;
|
||||
lte_subframe_t direction;
|
||||
|
||||
last_slot = (slot - 1)%20;
|
||||
|
||||
if (last_slot <0)
|
||||
last_slot+=20;
|
||||
|
||||
nslot = (slot + 1)%20;
|
||||
|
||||
direction = subframe_select(frame_parms,nslot>>1);
|
||||
|
||||
if( direction == SF_DL || (direction == SF_S && nslot%2==0)) {
|
||||
Channel_DL(s_re,s_im,r_re,r_im,r_re0,r_im0,r_re0_d,r_im0_d,r_re0_u,r_im0_u,eNB2UE,UE2eNB,enb_data,ue_data,abstraction_flag,frame_parms,slot);
|
||||
} else {
|
||||
Channel_UL(s_re,s_im,r_re,r_im,r_re0,r_im0,r_re0_d,r_im0_d,r_re0_u,r_im0_u,eNB2UE,UE2eNB,enb_data,ue_data,abstraction_flag,frame_parms,slot);
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __PROCESS_H__
|
||||
# define __PROCESS_H__
|
||||
|
||||
#include "interface.h"
|
||||
|
||||
int32_t **tx[MAX_eNB+MAX_UE][3],**rx[MAX_eNB+MAX_UE][3];
|
||||
int nslot;
|
||||
|
||||
void Process_Func(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
|
||||
node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void UE_Inst(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
|
||||
node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void eNB_Inst(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
|
||||
node_desc_t *enb_data[NUMBER_OF_eNB_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void Channel_DL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int slot);
|
||||
|
||||
void Channel_UL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int slot);
|
||||
|
||||
void Channel_Func(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
|
||||
double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int slot);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import subprocess
|
||||
import optparse
|
||||
import re
|
||||
|
||||
OPT=" "
|
||||
TERMINAL="gnome-terminal -x "
|
||||
TIME="time"
|
||||
|
||||
def runBash(cmd):
|
||||
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
|
||||
out = p.stdout.read().strip()
|
||||
return out
|
||||
|
||||
def main():
|
||||
global OPT,TIME,TERMINAL
|
||||
subprocess.call('ps | nawk \'/oaisim/ {system("kill " $1)}\'', shell=True)
|
||||
p = optparse.OptionParser()
|
||||
p.add_option('--eNB', '-b', default="1")
|
||||
p.add_option('--UE', '-u', default="1")
|
||||
p.add_option('--frame','-n', default="100")
|
||||
p.add_option('--terminal','-t', default="1")
|
||||
p.add_option('--time','--time', default="0")
|
||||
options, arguments = p.parse_args()
|
||||
print '---- Configuration ---- '
|
||||
print 'Number of eNB : %s' % options.eNB
|
||||
print 'Number of UE : %s' % options.UE
|
||||
if(options.terminal=='1'):
|
||||
OPT+=TERMINAL
|
||||
if(options.time=='1'):
|
||||
OPT+=TIME
|
||||
|
||||
#CHANNEL= 'valgrind --tool=callgrind --collect-bus=yes --branch-sim=yes $OPENAIR_TARGETS/SIMU/USER/oaisim -X0 -b%s -u%s -n%s' % (options.eNB,options.UE,options.frame)
|
||||
CHANNEL= '$OPENAIR_TARGETS/SIMU/USER/oaisim -X0 -b%s -u%s -n%s' % (options.eNB,options.UE,options.frame)
|
||||
#subprocess.call(CHANNEL, shell=True)
|
||||
print CHANNEL
|
||||
|
||||
nb_enb=int(options.eNB)
|
||||
nb_ue=int(options.UE)
|
||||
frame=int(options.frame)
|
||||
|
||||
for x in xrange(0,nb_enb):
|
||||
ENB='%s $OPENAIR_TARGETS/SIMU/USER/oaisim -X1 -i%s &' % (OPT,x)
|
||||
print ENB
|
||||
subprocess.call(ENB,shell=True)
|
||||
subprocess.call('sleep 1', shell=True)
|
||||
|
||||
for x in xrange(0,nb_ue):
|
||||
UE='%s $OPENAIR_TARGETS/SIMU/USER/oaisim -X2 -i%s &' % (OPT,x)
|
||||
print UE
|
||||
subprocess.call(UE,shell=True)
|
||||
subprocess.call('sleep 1', shell=True)
|
||||
|
||||
# subprocess.call('sleep 2', shell=True)
|
||||
subprocess.call(CHANNEL, shell=True)
|
||||
# subprocess.call('ps | nawk \'/oaisim/ {system("kill " $1)}\'', shell=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
* Tsync.h
|
||||
*
|
||||
*/
|
||||
#include <pthread.h>
|
||||
#ifndef TSYNC_H_
|
||||
#define TSYNC_H_
|
||||
|
||||
#define COMPILER_BARRIER() __asm__ __volatile__ ("" ::: "memory")
|
||||
int mycount;
|
||||
pthread_mutex_t exclusive;
|
||||
pthread_mutex_t downlink_mutex[MAX_eNB][MAX_UE];
|
||||
pthread_mutex_t downlink_mutex_channel;
|
||||
pthread_cond_t downlink_cond[MAX_eNB][MAX_UE];
|
||||
pthread_cond_t downlink_cond_channel;
|
||||
|
||||
pthread_mutex_t uplink_mutex[MAX_UE][MAX_eNB];
|
||||
pthread_mutex_t uplink_mutex_channel;
|
||||
pthread_cond_t uplink_cond[MAX_UE][MAX_eNB];
|
||||
pthread_cond_t uplink_cond_channel;
|
||||
|
||||
int COT;
|
||||
int COT_U;
|
||||
|
||||
volatile int _COT;
|
||||
volatile int _COT_U;
|
||||
|
||||
|
||||
int NUM_THREAD_DOWNLINK;
|
||||
int NUM_THREAD_UPLINK;
|
||||
|
||||
ch_thread *e2u_t[MAX_UE][MAX_eNB];
|
||||
ch_thread *u2e_t[MAX_UE][MAX_eNB];
|
||||
|
||||
pthread_t cthr_u[MAX_eNB][MAX_UE];
|
||||
pthread_t cthr_d[MAX_eNB][MAX_UE];
|
||||
|
||||
int fd_NB[MAX_eNB+MAX_UE];
|
||||
int fd_channel;
|
||||
|
||||
|
||||
#endif /* TSYNC_H_ */
|
||||
@@ -1,677 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "SIMULATION/TOOLS/defs.h"
|
||||
#include "SIMULATION/RF/defs.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#endif
|
||||
|
||||
#include "../USER/oaisim.h"
|
||||
|
||||
#include "channel_sim_proc.h"
|
||||
#include "interface.h"
|
||||
#include "Tsync.h"
|
||||
#include "Process.h"
|
||||
#define RF
|
||||
//#define DEBUG_SIM
|
||||
|
||||
|
||||
void init_rre(LTE_DL_FRAME_PARMS *frame_parms,double ***r_re0,double ***r_im0)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
(*r_re0) = malloc(2*sizeof(double*));
|
||||
(*r_im0) = malloc(2*sizeof(double*));
|
||||
|
||||
for (i=0; i<2; i++) {
|
||||
(*r_re0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
bzero((*r_re0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
(*r_im0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
bzero((*r_im0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void mmap_enb(int id,int **tx_data[3],int **rx_data[3],LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
|
||||
int i;
|
||||
int fd[20];
|
||||
int result;
|
||||
unsigned int FILESIZE;
|
||||
|
||||
FILESIZE=FRAME_LENGTH_COMPLEX_SAMPLES*(sizeof(s32));
|
||||
|
||||
char buffer[100];
|
||||
int j=0,k=0;
|
||||
|
||||
char sect=1;
|
||||
|
||||
for(k=0; k<sect; k++) {
|
||||
(*(tx_data+k)) = malloc(2*sizeof(s32*));
|
||||
(*(rx_data+k)) = malloc(2*sizeof(s32*));
|
||||
}
|
||||
|
||||
for (k=0; k<sect; k++) {
|
||||
for (i=0; i<2; i++) {
|
||||
sprintf(buffer,"/tmp/tx_data_%d_%d_%d.bin",id,k,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*(tx_data+k))[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
j++;
|
||||
|
||||
sprintf(buffer,"/tmp/rx_data_%d_%d_%d.bin",id,k,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*(rx_data+k))[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void mmap_ue(int id,int ***tx_data,int ***rx_data,LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
int i;
|
||||
int fd[20];
|
||||
int result;
|
||||
unsigned int FILESIZE;
|
||||
|
||||
FILESIZE=FRAME_LENGTH_COMPLEX_SAMPLES*(sizeof(s32));
|
||||
|
||||
char buffer[100];
|
||||
int j=0,k=0;
|
||||
|
||||
(*tx_data) = malloc(2*sizeof(s32*));
|
||||
(*rx_data) = malloc(2*sizeof(s32*));
|
||||
|
||||
for (i=0; i<2; i++) {
|
||||
sprintf(buffer,"/tmp/tx_data_%d_%d_%d.bin",id,k,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*tx_data)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
j++;
|
||||
|
||||
sprintf(buffer,"/tmp/rx_data_%d_%d_%d.bin",id,k,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*rx_data)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
j++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void do_DL_sig_channel_T(void *param)
|
||||
{
|
||||
|
||||
ch_thread* cthread = (ch_thread*)param;
|
||||
int count;
|
||||
u8 eNB_i,UE_i;
|
||||
int thread_id;
|
||||
double **r_re0,**r_re,**r_im,**r_im0,**s_re,**s_im;
|
||||
channel_desc_t *eNB2UE[3][8];
|
||||
node_desc_t *enb_data[3];
|
||||
node_desc_t *ue_data[8];
|
||||
int *next_slot,abstraction_flag;
|
||||
LTE_DL_FRAME_PARMS *frame_parms;
|
||||
int **tx_data[3],**rx_data[3];
|
||||
node_desc_t *enb_data_2[3];
|
||||
eNB_i=(cthread->eNB_id);
|
||||
UE_i=(cthread->UE_id);
|
||||
r_re0=cthread->r_re0;
|
||||
r_re=cthread->r_re;
|
||||
r_im=cthread->r_im;
|
||||
r_im0=cthread->r_im0;
|
||||
s_im=cthread->s_im;
|
||||
s_re=cthread->s_re;
|
||||
eNB2UE[eNB_i][UE_i]=cthread->eNB2UE;
|
||||
enb_data[0]=(cthread->enb_data);
|
||||
enb_data_2[eNB_i]=cthread->enb_data;
|
||||
|
||||
ue_data[UE_i]=cthread->ue_data;
|
||||
frame_parms=cthread->frame_parms;
|
||||
next_slot=(cthread->next_slot);
|
||||
abstraction_flag=*(cthread->abstraction_flag);
|
||||
thread_id=(cthread->thread_id);
|
||||
|
||||
for (int i=0;i<3;i++)
|
||||
{
|
||||
tx_data[i]=cthread->tx_data[i];
|
||||
rx_data[i]=cthread->rx_data[i];
|
||||
}
|
||||
|
||||
s32 att_eNB_id=-1;
|
||||
s32 **txdata,**rxdata;
|
||||
|
||||
double tx_pwr, rx_pwr;
|
||||
s32 rx_pwr2;
|
||||
u32 i,aa;
|
||||
u32 slot_offset;
|
||||
|
||||
while(1) {
|
||||
|
||||
if(pthread_cond_wait(&downlink_cond[eNB_i][UE_i], &downlink_mutex[eNB_i][UE_i])) exit(1);
|
||||
|
||||
slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
|
||||
// pthread_mutex_lock(&exclusive);
|
||||
|
||||
multipath_channel(eNB2UE[eNB_i][UE_i],s_re,s_im,r_re0,r_im0,
|
||||
frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
|
||||
rx_pwr = signal_energy_fp2(eNB2UE[eNB_i][UE_i]->ch[0],eNB2UE[eNB_i][UE_i]->channel_length)*eNB2UE[eNB_i][UE_i]->channel_length;
|
||||
|
||||
printf("[SIM][DL] Channel eNB %d => UE %d : tx_power %f dBm, path_loss %f dB\n",
|
||||
eNB_i,UE_i,
|
||||
enb_data_2[eNB_i]->tx_power_dBm,
|
||||
eNB2UE[eNB_i][UE_i]->path_loss_dB);
|
||||
printf("[SIM][DL] Channel eNB %d => UE %d : Channel gain %f dB (%f)\n",eNB_i,UE_i,10*log10(rx_pwr),rx_pwr);
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
printf("[SIM][DL] UE %d : rx_pwr %f dB for slot %d (subframe %d)\n",UE_i,10*log10(rx_pwr),nslot,nslot>>1);
|
||||
|
||||
if (eNB2UE[eNB_i][UE_i]->first_run == 1)
|
||||
eNB2UE[eNB_i][UE_i]->first_run = 0;
|
||||
|
||||
rf_rx(r_re0,
|
||||
r_im0,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
frame_parms->nb_antennas_rx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
1e3/eNB2UE[eNB_i][UE_i]->BW, // sampling time (ns)
|
||||
0.0, // freq offset (Hz) (-20kHz..20kHz)
|
||||
0.0, // drift (Hz) NOT YET IMPLEMENTED
|
||||
ue_data[UE_i]->rx_noise_level, // noise_figure NOT YET IMPLEMENTED
|
||||
110.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
|
||||
200, // IP3_dBm (dBm)
|
||||
&eNB2UE[eNB_i][UE_i]->ip, // initial phase
|
||||
30.0e3, // pn_cutoff (kHz)
|
||||
-500.0, // pn_amp (dBc) default: 50
|
||||
0.0, // IQ imbalance (dB),
|
||||
0.0); // IQ phase imbalance (rad)
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
printf("[SIM][DL] UE %d : ADC in (eNB %d) %f dB for slot %d (subframe %d)\n",UE_i,eNB_i,10*log10(rx_pwr),nslot,nslot>>1);
|
||||
//count = __sync_add_and_fetch(&_COT, 1);
|
||||
//COMPILER_BARRIER();
|
||||
|
||||
if (pthread_mutex_lock(&downlink_mutex_channel)) exit(1);
|
||||
|
||||
_COT++;
|
||||
|
||||
if(_COT==NUM_THREAD_DOWNLINK) {
|
||||
// if(count==NUM_THREAD_DOWNLINK){
|
||||
if(pthread_cond_signal(&downlink_cond_channel)) exit(1);
|
||||
}
|
||||
|
||||
if(pthread_mutex_unlock(&downlink_mutex_channel)) exit(1);
|
||||
|
||||
// pthread_mutex_unlock(&exclusive);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void do_UL_sig_channel_T(void *param)
|
||||
{
|
||||
|
||||
ch_thread* cthread = (ch_thread*)param;
|
||||
int count=0;
|
||||
u8 eNB_i,UE_i;
|
||||
double **r_re0,**r_re,**r_im,**r_im0,**s_re,**s_im;
|
||||
channel_desc_t *UE2eNB[8][3];
|
||||
node_desc_t *enb_data2[3];
|
||||
node_desc_t *ue_data[8];
|
||||
u16 next_slot,abstraction_flag;
|
||||
LTE_DL_FRAME_PARMS *frame_parms;
|
||||
int thread_id;
|
||||
|
||||
eNB_i=(cthread->eNB_id);
|
||||
UE_i=(cthread->UE_id);
|
||||
r_re0=cthread->r_re0;
|
||||
r_re=cthread->r_re;
|
||||
r_im=cthread->r_im;
|
||||
r_im0=cthread->r_im0;
|
||||
s_im=cthread->s_im;
|
||||
s_re=cthread->s_re;
|
||||
UE2eNB[UE_i][eNB_i]=cthread->UE2eNB;
|
||||
enb_data2[eNB_i]=cthread->enb_data;
|
||||
ue_data[UE_i]=cthread->ue_data;
|
||||
next_slot=*(cthread->next_slot);
|
||||
abstraction_flag=*(cthread->abstraction_flag);
|
||||
frame_parms=cthread->frame_parms;
|
||||
thread_id=(cthread->thread_id);
|
||||
|
||||
s32 **txdata,**rxdata;
|
||||
|
||||
u8 UE_id=0,eNB_id=0,aa;
|
||||
double tx_pwr, rx_pwr;
|
||||
s32 rx_pwr2;
|
||||
u32 i;
|
||||
u32 slot_offset;
|
||||
double nf = 0; //currently unused
|
||||
|
||||
|
||||
while(1) {
|
||||
|
||||
slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
|
||||
|
||||
if(pthread_cond_wait(&uplink_cond[UE_i][eNB_i], &uplink_mutex[UE_i][eNB_i])) exit(1);//[UE_i][eNB_i]);
|
||||
|
||||
// pthread_mutex_lock(&exclusive);
|
||||
|
||||
multipath_channel(UE2eNB[UE_i][eNB_i],s_re,s_im,r_re0,r_im0,
|
||||
frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
printf("[SIM][UL] Channel UE %d => eNB %d : %f dB\n",UE_i,eNB_i,10*log10(rx_pwr));
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
printf("[SIM][UL] eNB %d : eNB out %f dB for slot %d (subframe %d), sptti %d\n",eNB_i,10*log10(rx_pwr),nslot,nslot>>1,frame_parms->samples_per_tti);
|
||||
|
||||
if (UE2eNB[UE_i][eNB_i]->first_run == 1)
|
||||
UE2eNB[UE_i][eNB_i]->first_run = 0;
|
||||
|
||||
|
||||
// RF model
|
||||
rf_rx(r_re0,
|
||||
r_im0,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
frame_parms->nb_antennas_rx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
(UE_id==0) ? (1.0/7.68e6 * 1e9) : 1e9, // sampling time (ns) + set noise bandwidth to 0 for UE>0 (i.e. no noise except for first UE)
|
||||
0.0, // freq offset (Hz) (-20kHz..20kHz)
|
||||
0.0, // drift (Hz) NOT YET IMPLEMENTED
|
||||
nf, // noise_figure NOT YET IMPLEMENTED
|
||||
150.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
|
||||
200, // IP3_dBm (dBm)
|
||||
&UE2eNB[UE_i][eNB_i]->ip, // initial phase
|
||||
30.0e3, // pn_cutoff (kHz)
|
||||
-500.0, // pn_amp (dBc) default: 50
|
||||
0.0, // IQ imbalance (dB),
|
||||
0.0); // IQ phase imbalance (rad)
|
||||
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re,r_im,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
printf("[SIM][UL] rx_pwr (ADC in) %f dB for slot %d (subframe %d)\n",10*log10(rx_pwr),nslot,nslot>>1);
|
||||
|
||||
// count = __sync_add_and_fetch(&_COT_U, 1);
|
||||
// COMPILER_BARRIER();
|
||||
|
||||
if (pthread_mutex_lock(&uplink_mutex_channel)) exit(1);
|
||||
|
||||
_COT_U++;
|
||||
|
||||
if(_COT_U==NUM_THREAD_UPLINK) {
|
||||
//if(count==NUM_THREAD_UPLINK){
|
||||
if (pthread_cond_signal(&uplink_cond_channel)) exit(1);
|
||||
}
|
||||
|
||||
if(pthread_mutex_unlock(&uplink_mutex_channel)) exit(1);
|
||||
|
||||
// pthread_mutex_unlock(&exclusive);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Clean_Param(double **r_re,double **r_im,LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
u32 i,aa;
|
||||
|
||||
for (i=0; i<(frame_parms->samples_per_tti>>1); i++) {
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
r_re[aa][i]=0.0;
|
||||
r_im[aa][i]=0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Channel_Out(lte_subframe_t direction,int eNB_id,int UE_id,double **r_re,double **r_im,double **r_re0,double **r_im0,LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
u32 i,aa;
|
||||
double alpha=0.0;
|
||||
u32 slot_offset;
|
||||
frame_parms = &PHY_vars_UE_g[0]->lte_frame_parms;
|
||||
slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
|
||||
s32 rx_pwr2;
|
||||
s32 **rxdata;
|
||||
|
||||
if(eNB_id==(UE_id % NB_eNB_INST))
|
||||
alpha=1;
|
||||
|
||||
for (i=0; i<(frame_parms->samples_per_tti>>1); i++) {
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
r_re[aa][i]+=(r_re0[aa][i]*alpha);
|
||||
r_im[aa][i]+=(r_im0[aa][i]*alpha);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
rxdata=rx[eNB_id][0];
|
||||
|
||||
if (direction == SF_DL ) {
|
||||
frame_parms = &PHY_vars_eNB_g[0]->lte_frame_parms;
|
||||
slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
|
||||
adc(r_re,
|
||||
r_im,
|
||||
0,
|
||||
slot_offset,
|
||||
rx[NB_eNB_INST+UE_id][0],
|
||||
frame_parms->nb_antennas_rx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
12);
|
||||
} else {
|
||||
frame_parms = &PHY_vars_UE_g[0]->lte_frame_parms;
|
||||
slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
|
||||
adc(r_re,
|
||||
r_im,
|
||||
0,
|
||||
slot_offset,
|
||||
rx[eNB_id][0],
|
||||
frame_parms->nb_antennas_rx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
12);
|
||||
}
|
||||
|
||||
|
||||
rx_pwr2 = signal_energy(rxdata[0]+slot_offset,frame_parms->samples_per_tti>>1);
|
||||
// printf("[SIM][DL/UL] UE/eNB %d : rx_pwr (ADC out) %f dB (%d) for slot %d (subframe %d), writing to %p\n",UE_id, 10*log10((double)rx_pwr2),rx_pwr2,nslot,nslot>>1,rxdata);
|
||||
}
|
||||
|
||||
/*
|
||||
void do_UL_sig_channel(u8 eNB_i,u8 UE_i,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],u16 next_slot,u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
|
||||
s32 **txdata,**rxdata;
|
||||
|
||||
u8 UE_id=0,eNB_id=0,aa;
|
||||
double tx_pwr, rx_pwr;
|
||||
s32 rx_pwr2;
|
||||
u32 i;
|
||||
u32 slot_offset;
|
||||
double nf = 0; //currently unused
|
||||
|
||||
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
|
||||
|
||||
multipath_channel(UE2eNB[UE_i][eNB_i],s_re,s_im,r_re0,r_im0,
|
||||
frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
if (UE2eNB[UE_i][eNB_i]->first_run == 1)
|
||||
UE2eNB[UE_i][eNB_i]->first_run = 0;
|
||||
|
||||
|
||||
// RF model
|
||||
rf_rx(r_re0,
|
||||
r_im0,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
frame_parms->nb_antennas_rx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
(UE_id==0) ? (1.0/7.68e6 * 1e9) : 1e9, // sampling time (ns) + set noise bandwidth to 0 for UE>0 (i.e. no noise except for first UE)
|
||||
0.0, // freq offset (Hz) (-20kHz..20kHz)
|
||||
0.0, // drift (Hz) NOT YET IMPLEMENTED
|
||||
nf, // noise_figure NOT YET IMPLEMENTED
|
||||
150.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
|
||||
200, // IP3_dBm (dBm)
|
||||
&UE2eNB[UE_i][eNB_i]->ip, // initial phase
|
||||
30.0e3, // pn_cutoff (kHz)
|
||||
-500.0, // pn_amp (dBc) default: 50
|
||||
0.0, // IQ imbalance (dB),
|
||||
0.0); // IQ phase imbalance (rad)
|
||||
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re,r_im,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
printf("[SIM][UL] rx_pwr (ADC in) %f dB for slot %d (subframe %d)\n",10*log10(rx_pwr),next_slot,next_slot>>1);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void do_DL_sig_channel(u8 eNB_i,u8 UE_i,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
|
||||
node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX], u16 next_slot,u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
s32 att_eNB_id=-1;
|
||||
s32 **txdata,**rxdata;
|
||||
|
||||
u8 eNB_id=0,UE_id=0;
|
||||
double tx_pwr, rx_pwr;
|
||||
s32 rx_pwr2;
|
||||
u32 i,aa;
|
||||
u32 slot_offset;
|
||||
|
||||
|
||||
multipath_channel(eNB2UE[eNB_i][UE_i],s_re,s_im,r_re0,r_im0,
|
||||
frame_parms->samples_per_tti>>1,0);
|
||||
|
||||
rx_pwr = signal_energy_fp2(eNB2UE[eNB_i][UE_i]->ch[0],eNB2UE[eNB_i][UE_i]->channel_length)*eNB2UE[eNB_i][UE_i]->channel_length;
|
||||
|
||||
|
||||
printf("[SIM][DL] Channel eNB %d => UE %d : tx_power %f dBm, path_loss %f dB\n",
|
||||
eNB_i,UE_i,
|
||||
enb_data[eNB_id]->tx_power_dBm,
|
||||
eNB2UE[eNB_id][UE_id]->path_loss_dB);
|
||||
printf("[SIM][DL] Channel eNB %d => UE %d : Channel gain %f dB (%f)\n",eNB_id,UE_id,10*log10(rx_pwr),rx_pwr);
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
printf("[SIM][DL] UE %d : rx_pwr %f dB for slot %d (subframe %d)\n",UE_id,10*log10(rx_pwr),next_slot,next_slot>>1);
|
||||
|
||||
if (eNB2UE[eNB_id][UE_id]->first_run == 1)
|
||||
eNB2UE[eNB_id][UE_id]->first_run = 0;
|
||||
|
||||
rf_rx(r_re0,
|
||||
r_im0,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
frame_parms->nb_antennas_rx,
|
||||
frame_parms->samples_per_tti>>1,
|
||||
1e3/eNB2UE[eNB_i][UE_i]->BW, // sampling time (ns)
|
||||
0.0, // freq offset (Hz) (-20kHz..20kHz)
|
||||
0.0, // drift (Hz) NOT YET IMPLEMENTED
|
||||
ue_data[UE_id]->rx_noise_level, // noise_figure NOT YET IMPLEMENTED
|
||||
110.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
|
||||
200, // IP3_dBm (dBm)
|
||||
&eNB2UE[eNB_i][UE_i]->ip, // initial phase
|
||||
30.0e3, // pn_cutoff (kHz)
|
||||
-500.0, // pn_amp (dBc) default: 50
|
||||
0.0, // IQ imbalance (dB),
|
||||
0.0); // IQ phase imbalance (rad)
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
|
||||
printf("[SIM][DL] UE %d : ADC in (eNB %d) %f dB for slot %d (subframe %d)\n",UE_id,eNB_id,10*log10(rx_pwr),next_slot,next_slot>>1);
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
void init_mmap_channel(int id,LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0) {
|
||||
|
||||
int i;
|
||||
int fd[20];
|
||||
int result;
|
||||
double *map;
|
||||
unsigned int FILESIZE;
|
||||
|
||||
FILESIZE=FRAME_LENGTH_COMPLEX_SAMPLES*(sizeof(double));
|
||||
|
||||
(*s_re) = malloc(2*sizeof(double*));
|
||||
(*s_im) = malloc(2*sizeof(double*));
|
||||
(*r_re) = malloc(2*sizeof(double*));
|
||||
(*r_im) = malloc(2*sizeof(double*));
|
||||
(*r_re0) = malloc(2*sizeof(double*));
|
||||
(*r_im0) = malloc(2*sizeof(double*));
|
||||
|
||||
char buffer[100];
|
||||
int j=0;
|
||||
for (i=0;i<2;i++) {
|
||||
|
||||
sprintf(buffer,"/tmp/s_re_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*s_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
|
||||
sprintf(buffer,"/tmp/s_im_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*s_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
|
||||
sprintf(buffer,"/tmp/r_re_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*r_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
|
||||
|
||||
sprintf(buffer,"/tmp/r_im_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*r_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
}
|
||||
|
||||
for (i=0;i<2;i++) {
|
||||
(*r_re0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
bzero((*r_re0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
(*r_im0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
bzero((*r_im0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void init_mmap(int id,LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0) {
|
||||
|
||||
int i;
|
||||
int fd[20];
|
||||
int result;
|
||||
double *map;
|
||||
unsigned int FILESIZE;
|
||||
|
||||
FILESIZE=FRAME_LENGTH_COMPLEX_SAMPLES*(sizeof(double));
|
||||
|
||||
*s_re = malloc(2*sizeof(double*));
|
||||
*s_im = malloc(2*sizeof(double*));
|
||||
*r_re = malloc(2*sizeof(double*));
|
||||
*r_im = malloc(2*sizeof(double*));
|
||||
*r_re0 = malloc(2*sizeof(double*));
|
||||
*r_im0 = malloc(2*sizeof(double*));
|
||||
char buffer[100];
|
||||
int j=0;
|
||||
for (i=0;i<2;i++) {
|
||||
|
||||
sprintf(buffer,"/tmp/s_re_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*s_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
|
||||
sprintf(buffer,"/tmp/s_im_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*s_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
|
||||
sprintf(buffer,"/tmp/r_re_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*r_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
|
||||
sprintf(buffer,"/tmp/r_im_%d_%d.bin",id,i);
|
||||
fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
|
||||
result = lseek(fd[j], FILESIZE-1, SEEK_SET);
|
||||
result = write(fd[j], "", 1);
|
||||
(*r_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
|
||||
|
||||
j++;
|
||||
}
|
||||
|
||||
for (i=0;i<2;i++) {
|
||||
|
||||
(*r_re0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
bzero((*r_re0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
(*r_im0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
bzero((*r_im0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
* channel_sim_proc.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CHANNEL_SIM_PROC_H_
|
||||
#define CHANNEL_SIM_PROC_H_
|
||||
|
||||
void mmap_enb(int id,int **tx_data[3],int **rx_data[3],LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void mmap_ue(int id,int ***tx_data,int ***rx_data,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void Clean_Param(double **r_re,double **r_im,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void do_DL_sig_channel_T(void *param);
|
||||
|
||||
void do_UL_sig_channel_T(void *param);
|
||||
|
||||
void init_rre(LTE_DL_FRAME_PARMS *frame_parms,double ***r_re0,double ***r_im0);
|
||||
|
||||
void Channel_Out(lte_subframe_t direction,int eNB_id,int UE_id,double **r_re,double **r_im,double **r_re0,double **r_im0,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
#endif /* CHANNEL_SIM_PROC_H_ */
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __INTERFACE_H__
|
||||
# define __INTERFACE_H__
|
||||
|
||||
|
||||
typedef struct {
|
||||
void* pointer;
|
||||
} memory_reference_t2;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
memory_reference_t2 mem_ref;
|
||||
} obj_ref_t2;
|
||||
|
||||
typedef struct {
|
||||
obj_ref_t2 *gm;
|
||||
} HO;
|
||||
|
||||
|
||||
typedef struct {
|
||||
void* pointer;
|
||||
int port;
|
||||
int Exec_Msg_Flag;
|
||||
int node_id;
|
||||
int node_role ;
|
||||
int next_slot;
|
||||
int last_slot;
|
||||
int frame;
|
||||
int sub_frame;
|
||||
int slot;
|
||||
int Exec_FLAG;
|
||||
int EResp_FLAG;
|
||||
int ue_id;
|
||||
} s_t;
|
||||
|
||||
HO Instance[3];
|
||||
|
||||
|
||||
typedef struct {
|
||||
int thread_id;
|
||||
int eNB_id;
|
||||
int UE_id;
|
||||
double **s_re;
|
||||
double **s_im;
|
||||
double **r_re;
|
||||
double **r_im;
|
||||
double **r_re0;
|
||||
double **r_im0;
|
||||
struct channel_desc_t *eNB2UE;
|
||||
struct channel_desc_t *UE2eNB;
|
||||
struct node_desc_t *enb_data;
|
||||
struct node_desc_t *ue_data;
|
||||
int *next_slot;
|
||||
int *abstraction_flag;
|
||||
struct LTE_DL_FRAME_PARMS *frame_parms;
|
||||
int **tx_data[3];
|
||||
int **rx_data[3];
|
||||
} ch_thread;
|
||||
|
||||
|
||||
#define CHANNEL_PORT 37800
|
||||
#define eNB_PORT 38800
|
||||
#define UE_PORT 39800
|
||||
#define MAX_eNB 20
|
||||
#define MAX_UE 20
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,503 +0,0 @@
|
||||
# Include some shared directives
|
||||
include $(OPENAIR_TARGETS)/Makerules
|
||||
|
||||
default: oaisim
|
||||
|
||||
include $(OPENAIR_TARGETS)/Makefile.common
|
||||
|
||||
TOP_DIR = $(OPENAIR1_DIR)
|
||||
OPENAIR1_TOP = $(OPENAIR1_DIR)
|
||||
OPENAIR2_TOP = $(OPENAIR2_DIR)
|
||||
OPENAIR3_TOP = $(OPENAIR3_DIR)
|
||||
OPENAIR3 = $(OPENAIR3_DIR)
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g -ggdb -DDEBUG_PHY -DDEBUG_MEAS
|
||||
CFLAGS += -DRRC_MSG_PRINT
|
||||
CFLAGS += -DPDCP_MSG_PRINT
|
||||
CFLAGS += -DTRACE_RLC_UM_PDU
|
||||
CFLAGS += -DTRACE_RLC_AM_PDU
|
||||
else
|
||||
CFLAGS += -DTRACE_RLC_UM_PDU
|
||||
CFLAGS += -DTRACE_RLC_AM_PDU
|
||||
endif
|
||||
|
||||
ifeq ($(MSG_PRINT),1)
|
||||
CFLAGS += -DRRC_MSG_PRINT
|
||||
CFLAGS += -DPDCP_MSG_PRINT
|
||||
endif
|
||||
|
||||
|
||||
CFLAGS += -Wpointer-sign
|
||||
CFLAGS += -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 $(CPUFLAGS) -I/usr/include/X11 #-Wno-packed-bitfield-compat
|
||||
|
||||
ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES
|
||||
|
||||
CFLAGS += -DOPENAIR_LTE #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE
|
||||
CFLAGS += -DMAC_CONTEXT=1 -DPHY_CONTEXT=1 #-DRLC_UM_TEST_TRAFFIC=1
|
||||
#CFLAGS += -DLLR8
|
||||
CFLAGS += -DPACKAGE_NAME='"oaisim"'
|
||||
|
||||
ifndef OPENAIR2
|
||||
OPENAIR2=1
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
DISABLE_XER_PRINT=0
|
||||
MSG_PRINT=1
|
||||
endif
|
||||
|
||||
ifeq ($(LOCALIZATION), 1)
|
||||
CFLAGS += -DLOCALIZATION
|
||||
endif
|
||||
|
||||
ifeq ($(LINUX_LIST), 1)
|
||||
CFLAGS += -DLINUX_LIST
|
||||
endif
|
||||
|
||||
ifdef TRAFFIC_TM5
|
||||
CFLAGS += -DRLC_UM_TEST_TRAFFIC=1 #-DFULL_BUFFER=1
|
||||
endif
|
||||
|
||||
# activate OCG and libxml only under linux
|
||||
ifeq ($(linux),1)
|
||||
CFLAGS += $(LIBXML2_CFLAGS) -L/usr/local/lib -I/usr/include/atlas -L/usr/X11R6/lib
|
||||
OCG_FLAG =1
|
||||
CFLAGS += -DLINUX
|
||||
endif
|
||||
|
||||
ifdef SMBV
|
||||
CFLAGS += -DSMBV
|
||||
endif
|
||||
|
||||
ifeq ($(XFORMS), 1)
|
||||
CFLAGS += -DXFORMS
|
||||
endif
|
||||
|
||||
ifdef DB
|
||||
# Check if libmysqlclient is installed and use it if found to store simulation data for postprocessing
|
||||
ENABLE_DB = $(shell if [ `dpkg -l | grep libmysqlclient -c` = "0" ]; then echo "0" ; else echo "1" ; fi )
|
||||
ifeq ($(ENABLE_DB), 1)
|
||||
CFLAGS +=-I/usr/include/mysql -L/usr/lib/mysql -DENABLE_DB_STATS
|
||||
DB_LDFLAGS = -lmysqlclient
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef PRINT_STATS
|
||||
CFLAGS += -DPRINT_STATS
|
||||
endif
|
||||
|
||||
ifndef rrc_cellular
|
||||
rrc_cellular = 0
|
||||
rrc_cellular_eNB = 0
|
||||
rrc_cellular_UE = 0
|
||||
else
|
||||
ifeq ($(eNB_flag),1)
|
||||
rrc_cellular_eNB=1
|
||||
endif
|
||||
ifeq ($(UE_flag),1)
|
||||
rrc_cellular_UE=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef LS
|
||||
CFLAGS += -DLARGE_SCALE
|
||||
endif
|
||||
|
||||
# ln -sf EUTRA-RRC-Definitions-a20.asn EUTRA-RRC-Definitions.asn
|
||||
# make cleanasn1
|
||||
#make all Rel10=1
|
||||
|
||||
ifdef CBA
|
||||
CFLAGS += -DRel10
|
||||
CFLAGS += -DCBA
|
||||
$(info "Rel10=1 CBA=1")
|
||||
|
||||
else ifdef Rel10
|
||||
CFLAGS += -DRel10
|
||||
$(info "Rel10=1")
|
||||
else # default is rel 8
|
||||
$(info "Rel8=1")
|
||||
CFLAGS += -DRel8
|
||||
endif
|
||||
|
||||
#CFLAGS += -DMAX_NUM_CCs=1
|
||||
|
||||
ifeq ($(RLC_STOP_ON_LOST_PDU), 1)
|
||||
CFLAGS += -DRLC_STOP_ON_LOST_PDU
|
||||
endif
|
||||
ifeq ($(STOP_ON_IP_TRAFFIC_OVERLOAD), 1)
|
||||
CFLAGS += -DSTOP_ON_IP_TRAFFIC_OVERLOAD
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(USE_3GPP_ADDR_AS_LINK_ADDR), 1)
|
||||
CFLAGS += -DUSE_3GPP_ADDR_AS_LINK_ADDR
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
ifeq ($(LINK_ENB_PDCP_TO_IP_DRIVER), 1)
|
||||
CFLAGS += -DPDCP_USE_NETLINK -DLINUX
|
||||
NAS_FLAG=1
|
||||
endif
|
||||
|
||||
ifeq ($(LINK_ENB_PDCP_TO_GTPV1U), 1)
|
||||
CFLAGS += -DLINK_ENB_PDCP_TO_GTPV1U
|
||||
endif
|
||||
|
||||
ifdef TEST_OMG
|
||||
CFLAGS += -DTEST_OMG
|
||||
#CFLAGS += -DDEBUG_OMG
|
||||
endif
|
||||
# after the execution, a profiling output "gmon.out" will be created,
|
||||
#then we need to run "gprof ./oaisim > gmon.txt" in the same directory as "gmon.out"
|
||||
# you could also use the script "grpof2dot.py gmon.txt" for visual diagrams
|
||||
ifdef GPROF
|
||||
CFLAGS += -pg
|
||||
endif
|
||||
|
||||
#require kernel patch for oai driver to enable address autoconfiguration (IPv6 only)
|
||||
ifdef ADDCONF
|
||||
CFLAGS+=-DADDRCONF
|
||||
endif
|
||||
|
||||
ifdef OAI_NW_DRIVER_TYPE_ETHERNET
|
||||
CFLAGS+=-DOAI_NW_DRIVER_TYPE_ETHERNET
|
||||
endif
|
||||
|
||||
CFLAGS += -DENABLE_USE_CPU_EXECUTION_TIME
|
||||
ifndef DISABLE_XER_PRINT
|
||||
CFLAGS += -DXER_PRINT
|
||||
endif
|
||||
|
||||
ifdef SECU
|
||||
ifeq ($(NETTLE_FOUND), 0)
|
||||
$(warning "Nettle library >= 2.5 is not installed on your system, nettle-dev lib needed, continuing with security disabled")
|
||||
SECU=0
|
||||
else
|
||||
ifeq ($(OPENSSL_FOUND), 0)
|
||||
$(warning "openssl library is not installed on your system, openssl lib needed, continuing with security disabled")
|
||||
SECU=0
|
||||
else
|
||||
CFLAGS += -DENABLE_SECURITY
|
||||
LIBS += $(OPENSSL_LIBS) $(NETTLE_LIBS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(OPENAIR1_DIR)/PHY/Makefile.inc
|
||||
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
|
||||
include $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/RRC/NAS/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/UTIL/Makefile.inc
|
||||
include $(OPENAIR3_DIR)/RAL-LTE/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/ENB_APP/Makefile.inc
|
||||
|
||||
|
||||
INCLUDES += -I$(TOP_DIR)
|
||||
INCLUDES += $(L2_incl)
|
||||
INCLUDES += $(ENB_APP_incl)
|
||||
INCLUDES += $(UTIL_incl)
|
||||
INCLUDES += $(UTILS_incl)
|
||||
INCLUDES += -I$(ASN1_MSG_INC)
|
||||
INCLUDES += -I$(COMMON_UTILS_DIR)/collection
|
||||
|
||||
SIMULATION_OBJS = $(TOP_DIR)/SIMULATION/TOOLS/gauss.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/random_channel.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/rangen_double.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/taus.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/multipath_channel.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/abstraction.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/rf.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/adc.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/dac.o
|
||||
|
||||
ASN1_RRC_MSG_OBJS1=$(addprefix $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/, $(ASN1_MSG_OBJS))
|
||||
|
||||
OAISIM_OBJS_COMMON = $(OPENAIR_TARGETS)/SIMU/USER/channel_sim.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/init_lte.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_config.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/sinr_sim.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/cor_SF_sim.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_functions.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/event_handler.o
|
||||
|
||||
OAISIM_OBJS = $(OPENAIR_TARGETS)/SIMU/USER/oaisim.o
|
||||
|
||||
ifeq ($(XFORMS), 1)
|
||||
TOOLS_OBJS += $(OPENAIR1_DIR)/PHY/TOOLS/lte_phy_scope.o
|
||||
endif
|
||||
|
||||
ifdef PAD
|
||||
CFLAGS += -DPAD
|
||||
endif
|
||||
|
||||
OAISIM_PAD_OBJS = $(OPENAIR_TARGETS)/SIMU/USER/discrete_event_generator.o
|
||||
OAISIM_PAD_OBJS += $(OPENAIR_TARGETS)/SIMU/USER/threadpool.o
|
||||
OAISIM_PAD_OBJS += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_pad.o
|
||||
#deactivate the log offloading
|
||||
ifndef LOG_THREAD
|
||||
CFLAGS +=-DLOG_NO_THREAD
|
||||
endif
|
||||
|
||||
ifdef PROC
|
||||
INT_OBJS += $(OPENAIR_TARGETS)/SIMU/PROC/channel_sim_proc.o
|
||||
INT_OBJS += $(OPENAIR_TARGETS)/SIMU/PROC/Process.o
|
||||
CFLAGS += -DPROC
|
||||
endif
|
||||
|
||||
CFLAGS += -DENABLE_VCD_FIFO
|
||||
CFLAGS += -DENABLE_NEW_MULTICAST
|
||||
ifdef NAS
|
||||
CFLAGS += -DPDCP_USE_NETLINK_QUEUES
|
||||
endif
|
||||
# CFLAGS += -DENABLE_LOG_FIFO
|
||||
|
||||
# Check if libpgm is installed and use it if found instead of the unreliable
|
||||
# multicast
|
||||
ifeq ($(PGM_FOUND), 1)
|
||||
CFLAGS += $(PGM_CFLAGS)
|
||||
LIBS += $(PGM_LIBS)
|
||||
endif
|
||||
|
||||
OBJ += $(PHY_OBJS) $(SIMULATION_OBJS) $(ETHERNET_TRANSPORT_OBJS) $(TOOLS_OBJS) $(SCHED_OBJS) $(STATS_OBJS) $(NAS_OBJS)
|
||||
OBJ += $(INT_OBJS) $(UTIL_OBJ) $(UTILS_OBJS) $(OAISIM_OBJS_COMMON) $(ENB_APP_OBJS)
|
||||
ifeq ($(OPENAIR2),1)
|
||||
OBJ += $(L2_OBJS)
|
||||
endif
|
||||
|
||||
LFDS_OBJ_DIR = $(subst $(OPENAIR_DIR),$(OBJS_DIR),$(LFDS_DIR))
|
||||
LFDS_LIB = $(LFDS_OBJ_DIR)/bin/liblfds611.a
|
||||
LIBS += $(LFDS_LIB)
|
||||
SHARED_DEPENDENCIES += $(LFDS_LIB)
|
||||
|
||||
all: oaisim
|
||||
|
||||
pad: oaisim_pad
|
||||
|
||||
userclean: cleanall oaisim
|
||||
|
||||
objsdir:
|
||||
@if [ ! -d $(OBJS_DIR) ]; then mkdir -p $(OBJS_DIR); fi
|
||||
|
||||
printvars:
|
||||
@echo rrc_cellular variable is $(rrc_cellular)
|
||||
@echo EXTRA_CFLAGS = $(EXTRA_CFLAGS)
|
||||
@echo OAI Config generator is $(OCG_FLAG)
|
||||
@echo OAI NETLINK FLAG is $(NAS_FLAG)
|
||||
@echo SSE3 proc is $(SSE3PROC)
|
||||
@echo L2 objs are $(L2_OBJS)
|
||||
@echo eNB_flag is $(eNB_flag)
|
||||
@echo UE_flag is $(UE_flag)
|
||||
@echo S1AP objs: $(S1AP_BUILT_OBJS)
|
||||
@echo X2AP objs: $(X2AP_BUILT_OBJS)
|
||||
@echo CFLAGS: $(CFLAGS)
|
||||
@echo Enable PGM: $(PGM_FOUND)
|
||||
|
||||
##UTIL_YAC_C = $(OPENAIR2_TOP)/UTIL/enb_parser.o
|
||||
##$(UTIL_LEX_C) = $(subst $(OPENAIR_DIR), $(OBJS_DIR), $(OBJ) $(OAISIM_OBJS) $(ASN1_RRC_MSG_OBJS1))
|
||||
|
||||
|
||||
OAISIM_COMPILED_OBJECTS = $(subst $(OPENAIR_DIR), $(OBJS_DIR), $(OBJ) $(OAISIM_OBJS) $(ASN1_RRC_MSG_OBJS1))
|
||||
|
||||
-include $(ITTI_MESSAGES_XML:.xml=.d)
|
||||
-include $(OAISIM_PAD_OBJS:.o=.d)
|
||||
-include $(OAISIM_COMPILED_OBJECTS:.o=.d)
|
||||
|
||||
ifdef ENABLE_ITTI
|
||||
$(OAISIM_COMPILED_OBJECTS): $(ITTI_MESSAGES_H)
|
||||
|
||||
oaisim_pad.o: $(ITTI_MESSAGES_H)
|
||||
endif
|
||||
|
||||
$(OAISIM_COMPILED_OBJECTS): | objsdir
|
||||
|
||||
.SECONDEXPANSION:
|
||||
$(OAISIM_COMPILED_OBJECTS) $(OAISIM_PAD_OBJS): %.o : $$(subst $(OBJS_DIR), $(OPENAIR_DIR), $$*.c)
|
||||
@echo Compiling $<
|
||||
@if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi;
|
||||
@$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DPHY_CONTEXT=1 $(INCLUDES) -o $@ $<
|
||||
@$(CC) -MM $(CFLAGS) $(EXTRA_CFLAGS) -DPHY_CONTEXT=1 $(INCLUDES) $< > $*.d
|
||||
@mv -f $*.d $*.d.tmp
|
||||
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
|
||||
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
|
||||
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
|
||||
@rm -f $*.d.tmp
|
||||
|
||||
$(LFDS_LIB):
|
||||
@if [ ! -d $(LFDS_OBJ_DIR)/bin ]; then mkdir -p $(LFDS_OBJ_DIR)/bin; fi;
|
||||
@if [ ! -d $(LFDS_OBJ_DIR)/obj ]; then mkdir -p $(LFDS_OBJ_DIR)/obj; fi;
|
||||
$(MAKE) -C $(LFDS_DIR) -f makefile.linux OUTDIR=$(LFDS_OBJ_DIR)
|
||||
|
||||
oaisim_pad: $(OBJ) $(OAISIM_PAD_OBJS) $(ASN1_RRC_MSG_OBJS1)
|
||||
@echo "Linking oaisim_pad ..."
|
||||
@$(MPICC) $(INCLUDES) $(S1AP_Incl) $(X2AP_Incl) -o oaisim_pad $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(OAISIM_PAD_OBJS) $(ASN1_RRC_MSG_OBJS1) \
|
||||
-lpthread -llapack_atlas -lforms -lrt -lconfig $(LIBS) $(DB_LDFLAGS)
|
||||
|
||||
oaisim: $(OAISIM_COMPILED_OBJECTS) $(SHARED_DEPENDENCIES)
|
||||
@echo "Linking oaisim ..."
|
||||
@$(CC) $(INCLUDES) $(S1AP_Incl) $(X2AP_Incl) -o oaisim $(CFLAGS) $(EXTRA_CFLAGS) $(OAISIM_COMPILED_OBJECTS) \
|
||||
-lpthread -llapack_atlas -lforms -lrt -lconfig $(LIBS) $(DB_LDFLAGS)
|
||||
|
||||
ifeq ($(rrc_cellular_eNB),1)
|
||||
mv oaisim oaisim_eNB
|
||||
endif
|
||||
ifeq ($(rrc_cellular_UE),1)
|
||||
mv oaisim oaisim_UE
|
||||
endif
|
||||
|
||||
oaisimCROWN: $(OBJ) $(ASN1_RRC_MSG_OBJS1) oaisimCROWN.c
|
||||
@echo "Compiling oaisimCROWN.c ..."
|
||||
@$(CC) oaisimCROWN.c $(INCLUDES) $(S1AP_Incl) $(X2AP_Incl) -o oaisimCROWN $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(ASN1_RRC_MSG_OBJS1) -lm -lblas -lpthread -llapack_atlas -lforms $(LIBXML2_LIBS) -lX11 -lXpm -lrt -lconfig
|
||||
|
||||
oai_nw_drv:
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) oai_nw_drv.ko)
|
||||
(cp $(OPENAIR2_DIR)/NAS/DRIVER/LITE/oai_nw_drv.ko . )
|
||||
oai_nw_drv_clean:
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE && $(MAKE) clean)
|
||||
nasmesh_fix:
|
||||
(cd $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/RB_TOOL && $(MAKE) clean && $(MAKE))
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) clean && $(MAKE) nasmesh_netlink_address_fix.ko)
|
||||
nasmesh_fix_uninstall:
|
||||
(sudo rmmod nasmesh.ko)
|
||||
nasmesh_fix_install:
|
||||
(sudo insmod $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/nasmesh.ko)
|
||||
nasmesh_fix_reinstall:
|
||||
(sudo rmmod nasmesh.ko)
|
||||
(sudo insmod $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/nasmesh.ko)
|
||||
nasmesh_nl:
|
||||
(cd $(OPENAIR2_DIR)/NETWORK_RIVER/MESH/RB_TOOL && $(MAKE))
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink.ko)
|
||||
(sudo insmod $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/nasmesh.ko)
|
||||
rb_tool:
|
||||
(cd $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/RB_TOOL && $(MAKE))
|
||||
|
||||
nasmesh_install:
|
||||
(sudo rmmod nasmesh)
|
||||
(sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko)
|
||||
nasmesh_clean:
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) clean)
|
||||
nas_sim_mt_cellular:
|
||||
( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make nasmt_sim CELLULAR=1 NO_RRM=1)
|
||||
|
||||
nas_sim_rg_cellular:
|
||||
( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make nasrg_sim MASTER=1 CELLULAR=1 NO_RRM=1)
|
||||
|
||||
rrm_std_cellular:
|
||||
( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make cell_rrm CELL_RRM=1 CELLULAR=1 NO_RRM=1)
|
||||
|
||||
cleanall: common-cleanall clean cleanasn1
|
||||
|
||||
cleanalmostall: clean
|
||||
rm -f $(ASN1_RRC_MSG_OBJS1)
|
||||
|
||||
clean: common-clean
|
||||
@$(RM_F_V) oaisim
|
||||
@$(RM_F_V) oaisim_pad
|
||||
# @$(RM_F_V) $(ITTI_MESSAGES_H) $(ITTI_MESSAGES_XML) $(ITTI_MESSAGES_XML:.xml=.d)
|
||||
@$(RM_F_V) $(OAISIM_PAD_OBJS)
|
||||
@$(RM_F_V) $(OAISIM_PAD_OBJS:.o=.d)
|
||||
@$(RM_F_V) $(OAISIM_COMPILED_OBJECTS)
|
||||
@$(RM_F_V) $(OAISIM_COMPILED_OBJECTS:.o=.d)
|
||||
@$(RM_F_V) *.exe*
|
||||
@$(RM_F_V) $(ASN1_MSG_INC)/asn1_msg.o
|
||||
|
||||
cleanl1:
|
||||
@$(RM_F_V) LOG_THREAD oaisim
|
||||
@$(RM_F_V) $(PHY_OBJS) $(SCHED_OBJS)
|
||||
@$(RM_F_V) *.o
|
||||
@$(RM_F_V) *.exe
|
||||
|
||||
cleanl2:
|
||||
@$(RM_F_V) $(L2_OBJS)
|
||||
@$(RM_F_V) $(ASN1_MSG_INC)/asn1_msg.o
|
||||
|
||||
cleanasn1:
|
||||
@$(RM_F_V) $(ASN1_RRC_MSG_OBJS1)
|
||||
$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) *.o *.d)
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel*
|
||||
|
||||
cleancell:
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/CELLULAR/*.o
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/CELLULAR/*.d
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/L2_INTERFACE/*.o
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/L2_INTERFACE/*.d
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR/*.o
|
||||
@$(RM_F_V) $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR/*.d
|
||||
|
||||
cleanlfds:
|
||||
$(MAKE) -C $(LFDS_DIR) -f makefile.linux clean
|
||||
|
||||
cppcheck:
|
||||
@echo "cppcheck oaisim ..."
|
||||
cppcheck $(INCLUDES) ${OBJ:.o=.c} ${OAISIM_OBJS,.o=.c} ${ASN1_RRC_MSG_OBJS1,.o=.c}
|
||||
print:
|
||||
@echo "OBJ " $(OBJ)
|
||||
@echo "OAISIM_OBJS " $(OAISIM_OBJS)
|
||||
@echo "OAISIM_PAD_OBJS " $(OAISIM_PAD_OBJS)
|
||||
@echo "OCG_FLAG are " $(OCG_FLAG)
|
||||
@echo "CFLAGS are " $(CFLAGS)
|
||||
@echo "EXTRA_CFLAGS are" $(EXTRA_CFLAGS)
|
||||
@echo "COMMON_CFLAGS are" $(COMMON_CFLAGS)
|
||||
@echo "L2 includes are" $(L2_incl)
|
||||
@echo "INCLUDES are" $(INCLUDES)
|
||||
@echo "S1AP Includes are" $(S1AP_Incl)
|
||||
@echo "X2AP Includes are" $(X2AP_Incl)
|
||||
@echo "TOP_DIR Include is" I$(TOP_DIR)
|
||||
@echo "UTIL includes are" $(UTIL_incl)
|
||||
@echo "UTILS includes are" $(UTILS_incl)
|
||||
@echo "IS_REL8 is " $(IS_REL8)
|
||||
@echo "IS_REL10 is " $(IS_REL10)
|
||||
@echo "ENABLE_DB is " $(ENABLE_DB)
|
||||
@echo "Libs are" $(LIBS)
|
||||
@echo "NAS" $(NAS)
|
||||
|
||||
showcflags:
|
||||
@echo oaisim cflags: $(CFLAGS)
|
||||
@echo oaisim includes: $(INCLUDES)
|
||||
@if [ -d $(S1AP_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB showcflags; fi
|
||||
@if [ -d $(X2AP_DIR) ]; then $(MAKE) -C $(X2AP_DIR) -f Makefile.inc showcflags; fi
|
||||
|
||||
otg_all: otg_latency otg_gp
|
||||
|
||||
# need to check if the file exists before calling otgplot
|
||||
otg_latency:
|
||||
export TITLE="Application OWD(ms)"
|
||||
cp /tmp/otg_latency.dat /tmp/onewaydelay.dat
|
||||
$(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_latency.dat" "[$(COL1):$(COL2)]"
|
||||
otg_latency_bg:
|
||||
export TITLE="Background OWD(ms)"
|
||||
$(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_latency_bg.dat" "[$(COL1):$(COL2)]"
|
||||
otg_gp:
|
||||
export TITLE="Application Goodput(Kb/s)"
|
||||
cp /tmp/otg_goodput.dat /tmp/goodput.dat
|
||||
$(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/goodput.dat" "[$(COL1):$(COL2)]"
|
||||
otg_gp_bg:
|
||||
export TITLE="Background Goodput(Kb/s)"
|
||||
$(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_goodput_bg.dat" "[$(COL1):$(COL2)]"
|
||||
otg_jitter:
|
||||
export TITLE="Aplication Jitter(ms)"
|
||||
$(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_jitter.dat" "[$(COL1):$(COL2)]"
|
||||
|
||||
pexpect = $(shell if [ `dpkg -l | grep pexpect -c` = "0" ]; then echo "0" ; else echo "1" ; fi )
|
||||
|
||||
pre-ci:
|
||||
@echo "Pre-commit check"
|
||||
|
||||
ifeq ($(pexpect), 1)
|
||||
ifndef PW
|
||||
@echo "Usage: make pre-ci PW=mypassword"
|
||||
@echo "Password is used to access the local host through ssh."
|
||||
python $(OPENAIR_TARGETS)/TEST/OAI/test01.py
|
||||
else
|
||||
python $(OPENAIR_TARGETS)/TEST/OAI/test01.py -w $(PW)
|
||||
endif
|
||||
else
|
||||
@echo "Python pexpect package is missing, please install"
|
||||
endif
|
||||
@@ -1,618 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "SIMULATION/RF/rf.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/phy_extern_ue.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OPT/opt.h" // to test OPT
|
||||
|
||||
#include "UTIL/FIFO/types.h"
|
||||
|
||||
#ifdef XFORMS
|
||||
#include "forms.h"
|
||||
#include "phy_procedures_sim_form.h"
|
||||
#endif
|
||||
|
||||
#include "oaisim.h"
|
||||
|
||||
#define RF
|
||||
#define DEBUG_SIM
|
||||
/*
|
||||
#undef LOG_D
|
||||
#define LOG_D(A,B,C...) printf(B,C)
|
||||
*/
|
||||
|
||||
int number_rb_ul;
|
||||
int first_rbUL ;
|
||||
|
||||
extern Signal_buffers_t *signal_buffers_g;
|
||||
|
||||
|
||||
double r_re_DL[NUMBER_OF_UE_MAX][2][30720];
|
||||
double r_im_DL[NUMBER_OF_UE_MAX][2][30720];
|
||||
double r_re_UL[NUMBER_OF_eNB_MAX][2][30720];
|
||||
double r_im_UL[NUMBER_OF_eNB_MAX][2][30720];
|
||||
int RU_output_mask[NUMBER_OF_UE_MAX];
|
||||
int UE_output_mask[NUMBER_OF_RU_MAX];
|
||||
pthread_mutex_t RU_output_mutex[NUMBER_OF_UE_MAX];
|
||||
pthread_mutex_t UE_output_mutex[NUMBER_OF_RU_MAX];
|
||||
|
||||
double ru_amp[NUMBER_OF_RU_MAX];
|
||||
|
||||
void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs],
|
||||
node_desc_t *enb_data[NUMBER_OF_RU_MAX],
|
||||
node_desc_t *ue_data[NUMBER_OF_UE_MAX],
|
||||
uint16_t subframe,
|
||||
uint32_t offset,
|
||||
uint32_t length,
|
||||
uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *ue_frame_parms,
|
||||
uint8_t UE_id,
|
||||
int CC_id)
|
||||
{
|
||||
|
||||
int32_t att_eNB_id=-1;
|
||||
int32_t **txdata,**rxdata;
|
||||
|
||||
uint32_t eNB_id,ru_id=0;
|
||||
double tx_pwr;
|
||||
double rx_pwr;
|
||||
int32_t rx_pwr2;
|
||||
uint32_t i,aa;
|
||||
uint32_t sf_offset;
|
||||
|
||||
double min_path_loss=-200;
|
||||
uint8_t hold_channel=0;
|
||||
uint8_t nb_antennas_rx = RU2UE[0][0][CC_id]->nb_rx; // number of rx antennas at UE
|
||||
uint8_t nb_antennas_tx = RU2UE[0][0][CC_id]->nb_tx; // number of tx antennas at eNB
|
||||
|
||||
double s_re0[30720];
|
||||
double s_re1[30720];
|
||||
double *s_re[2];
|
||||
double s_im0[30720];
|
||||
double s_im1[30720];
|
||||
double *s_im[2];
|
||||
double r_re00[30720];
|
||||
double r_re01[30720];
|
||||
double *r_re0[2];
|
||||
double r_im00[30720];
|
||||
double r_im01[30720];
|
||||
double *r_im0[2];
|
||||
LTE_DL_FRAME_PARMS *frame_parms;
|
||||
|
||||
s_re[0] = s_re0;
|
||||
s_im[0] = s_im0;
|
||||
s_re[1] = s_re1;
|
||||
s_im[1] = s_im1;
|
||||
|
||||
r_re0[0] = r_re00;
|
||||
r_im0[0] = r_im00;
|
||||
r_re0[1] = r_re01;
|
||||
r_im0[1] = r_im01;
|
||||
|
||||
if (subframe==0)
|
||||
hold_channel = 0;
|
||||
else
|
||||
hold_channel = 1;
|
||||
|
||||
if (abstraction_flag != 0) {
|
||||
//for (UE_id=0;UE_id<NB_UE_INST;UE_id++) {
|
||||
|
||||
if (!hold_channel) {
|
||||
// calculate the random channel from each RU
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
frame_parms = &RC.ru[ru_id]->frame_parms;
|
||||
|
||||
random_channel(RU2UE[ru_id][UE_id][CC_id],abstraction_flag);
|
||||
/*
|
||||
for (i=0;i<RU2UE[eNB_id][UE_id]->nb_taps;i++)
|
||||
printf("RU2UE[%d][%d]->a[0][%d] = (%f,%f)\n",eNB_id,UE_id,i,RU2UE[eNB_id][UE_id]->a[0][i].x,RU2UE[eNB_id][UE_id]->a[0][i].y);
|
||||
*/
|
||||
freq_channel(RU2UE[ru_id][UE_id][CC_id], frame_parms->N_RB_DL,frame_parms->N_RB_DL*12+1);
|
||||
}
|
||||
|
||||
// find out which eNB the UE is attached to
|
||||
/*
|
||||
for (eNB_id=0; eNB_id<RC.nb_inst; eNB_id++) {
|
||||
if (find_ue(PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[0][0]->crnti,RC.eNB[eNB_id][CC_id])>=0) {
|
||||
// UE with UE_id is connected to eNb with eNB_id
|
||||
att_eNB_id=eNB_id;
|
||||
LOG_D(OCM,"A: UE attached to eNB (UE%d->eNB%d)\n",UE_id,eNB_id);
|
||||
}
|
||||
}
|
||||
*/
|
||||
// if UE is not attached yet, find assume its the eNB with the smallest pathloss
|
||||
if (att_eNB_id<0) {
|
||||
for (eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) {
|
||||
for (int ru=0;ru<RC.nb_RU;ru++) {
|
||||
ru_id = RC.eNB[eNB_id][CC_id]->RU_list[ru]->idx;
|
||||
if (min_path_loss<RU2UE[ru_id][UE_id][CC_id]->path_loss_dB) {
|
||||
min_path_loss = RU2UE[ru_id][UE_id][CC_id]->path_loss_dB;
|
||||
att_eNB_id=eNB_id;
|
||||
LOG_D(OCM,"B: UE attached to eNB (UE%d->eNB%d)\n",UE_id,eNB_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (att_eNB_id<0) {
|
||||
LOG_E(OCM,"Cannot find eNB for UE %d, return\n",UE_id);
|
||||
return; //exit(-1);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp2(RU2UE[att_eNB_id][UE_id][CC_id]->ch[0],
|
||||
RU2UE[att_eNB_id][UE_id][CC_id]->channel_length)*RU2UE[att_eNB_id][UE_id][CC_id]->channel_length;
|
||||
LOG_D(OCM,"Channel (CCid %d) eNB %d => UE %d : tx_power %d dBm, path_loss %f dB\n",
|
||||
CC_id,att_eNB_id,UE_id,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower,
|
||||
RU2UE[att_eNB_id][UE_id][CC_id]->path_loss_dB);
|
||||
#endif
|
||||
|
||||
//dlsch_abstraction(PHY_vars_UE_g[UE_id]->sinr_dB, rb_alloc, 8);
|
||||
// fill in perfect channel estimates
|
||||
channel_desc_t *desc1 = RU2UE[att_eNB_id][UE_id][CC_id];
|
||||
int32_t **dl_channel_est = PHY_vars_UE_g[UE_id][CC_id]->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0];
|
||||
// double scale = pow(10.0,(enb_data[att_eNB_id]->tx_power_dBm + RU2UE[att_eNB_id][UE_id]->path_loss_dB + (double) PHY_vars_UE_g[UE_id]->rx_total_gain_dB)/20.0);
|
||||
double scale = pow(10.0,(frame_parms->pdsch_config_common.referenceSignalPower+RU2UE[att_eNB_id][UE_id][CC_id]->path_loss_dB + (double) PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB)/20.0);
|
||||
LOG_D(OCM,"scale =%lf (%d dB)\n",scale,(int) (20*log10(scale)));
|
||||
// freq_channel(desc1,frame_parms->N_RB_DL,nb_samples);
|
||||
//write_output("channel.m","ch",desc1->ch[0],desc1->channel_length,1,8);
|
||||
//write_output("channelF.m","chF",desc1->chF[0],nb_samples,1,8);
|
||||
int count,count1,a_rx,a_tx;
|
||||
|
||||
for(a_tx=0; a_tx<nb_antennas_tx; a_tx++) {
|
||||
for (a_rx=0; a_rx<nb_antennas_rx; a_rx++) {
|
||||
//for (count=0;count<frame_parms->symbols_per_tti/2;count++)
|
||||
for (count=0; count<1; count++) {
|
||||
for (count1=0; count1<frame_parms->N_RB_DL*12; count1++) {
|
||||
((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count1+(count*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(desc1->chF[a_rx+(a_tx*nb_antennas_rx)][count1].x*scale);
|
||||
((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count1+1+(count*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(desc1->chF[a_rx+(a_tx*nb_antennas_rx)][count1].y*scale) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// calculate the SNR for the attached eNB (this assumes eNB always uses PMI stored in eNB_UE_stats; to be improved)
|
||||
init_snr(RU2UE[att_eNB_id][UE_id][CC_id], enb_data[att_eNB_id], ue_data[UE_id], PHY_vars_UE_g[UE_id][CC_id]->sinr_dB, &PHY_vars_UE_g[UE_id][CC_id]->N0,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->transmission_mode[att_eNB_id], RC.eNB[att_eNB_id][CC_id]->UE_stats[UE_id].DL_pmi_single,
|
||||
RC.eNB[att_eNB_id][CC_id]->mu_mimo_mode[UE_id].dl_pow_off,RC.eNB[att_eNB_id][CC_id]->frame_parms.N_RB_DL);
|
||||
|
||||
// calculate sinr here
|
||||
for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
|
||||
if (att_eNB_id != eNB_id) {
|
||||
calculate_sinr(RU2UE[eNB_id][UE_id][CC_id], enb_data[eNB_id], ue_data[UE_id], PHY_vars_UE_g[UE_id][CC_id]->sinr_dB,
|
||||
RC.eNB[att_eNB_id][CC_id]->frame_parms.N_RB_DL);
|
||||
}
|
||||
}
|
||||
} // hold channel
|
||||
}
|
||||
else { //abstraction_flag
|
||||
|
||||
|
||||
pthread_mutex_lock(&RU_output_mutex[UE_id]);
|
||||
|
||||
if (RU_output_mask[UE_id] == 0) { // This is the first eNodeB for this UE, clear the buffer
|
||||
for (aa=0; aa<nb_antennas_rx; aa++) {
|
||||
memset((void*)r_re_DL[UE_id][aa],0,(RC.ru[0]->frame_parms.samples_per_tti)*sizeof(double));
|
||||
memset((void*)r_im_DL[UE_id][aa],0,(RC.ru[0]->frame_parms.samples_per_tti)*sizeof(double));
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&RU_output_mutex[UE_id]);
|
||||
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
txdata = RC.ru[ru_id]->common.txdata;
|
||||
frame_parms = &RC.ru[ru_id]->frame_parms;
|
||||
|
||||
sf_offset = (subframe*frame_parms->samples_per_tti) + offset;
|
||||
LOG_D(EMU,">>>>>>>>>>>>>>>>>TXPATH: RU %d : DL_sig reading TX for subframe %d (sf_offset %d, length %d) from %p\n",ru_id,subframe,sf_offset,length,txdata[0]+sf_offset);
|
||||
int length_meas = frame_parms->ofdm_symbol_size;
|
||||
if (sf_offset+length <= frame_parms->samples_per_tti*10) {
|
||||
|
||||
tx_pwr = dac_fixed_gain(s_re,
|
||||
s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
length,
|
||||
sf_offset,
|
||||
length_meas,
|
||||
14,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
|
||||
0,
|
||||
&ru_amp[ru_id],
|
||||
frame_parms->N_RB_DL*12);
|
||||
|
||||
}
|
||||
else {
|
||||
tx_pwr = dac_fixed_gain(s_re,
|
||||
s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
(frame_parms->samples_per_tti*10)-sf_offset,
|
||||
sf_offset,
|
||||
length_meas,
|
||||
14,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
|
||||
0,
|
||||
&ru_amp[ru_id],
|
||||
frame_parms->N_RB_DL*12);
|
||||
|
||||
tx_pwr = dac_fixed_gain(s_re,
|
||||
s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
length+sf_offset-(frame_parms->samples_per_tti*10),
|
||||
sf_offset,
|
||||
length_meas,
|
||||
14,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
|
||||
0,
|
||||
&ru_amp[ru_id],
|
||||
frame_parms->N_RB_DL*12);
|
||||
}
|
||||
#ifdef DEBUG_SIM
|
||||
LOG_D(PHY,"[SIM][DL] subframe %d: txp (time) %d dB\n",
|
||||
subframe,dB_fixed(signal_energy(&txdata[0][sf_offset],length_meas)));
|
||||
|
||||
LOG_D(OCM,"[SIM][DL] RU %d (CCid %d): tx_pwr %.1f dBm/RE (target %d dBm/RE), for subframe %d\n",
|
||||
ru_id,CC_id,
|
||||
10*log10(tx_pwr),
|
||||
frame_parms->pdsch_config_common.referenceSignalPower,
|
||||
subframe);
|
||||
|
||||
#endif
|
||||
tx_pwr = signal_energy_fp(s_re,s_im,nb_antennas_tx,
|
||||
length<length_meas?length:length_meas,
|
||||
0)/(12.0*frame_parms->N_RB_DL);
|
||||
|
||||
//RU2UE[eNB_id][UE_id]->path_loss_dB = 0;
|
||||
multipath_channel(RU2UE[ru_id][UE_id][CC_id],s_re,s_im,r_re0,r_im0,
|
||||
length,hold_channel);
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp2(RU2UE[ru_id][UE_id][CC_id]->ch[0],
|
||||
RU2UE[ru_id][UE_id][CC_id]->channel_length)*RU2UE[ru_id][UE_id][CC_id]->channel_length;
|
||||
LOG_D(OCM,"[SIM][DL] Channel RU %d => UE %d (CCid %d): Channel gain %f dB (%f)\n",ru_id,UE_id,CC_id,10*log10(rx_pwr),rx_pwr);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
|
||||
for (i=0; i<RU2UE[ru_id][UE_id][CC_id]->channel_length; i++)
|
||||
LOG_D(OCM,"channel(%d,%d)[%d] : (%f,%f)\n",ru_id,UE_id,i,RU2UE[ru_id][UE_id][CC_id]->ch[0][i].x,RU2UE[ru_id][UE_id][CC_id]->ch[0][i].y);
|
||||
|
||||
#endif
|
||||
|
||||
LOG_D(OCM,"[SIM][DL] Channel RU %d => UE %d (CCid %d): tx_power %.1f dBm/RE, path_loss %1.f dB\n",
|
||||
ru_id,UE_id,CC_id,
|
||||
(double)frame_parms->pdsch_config_common.referenceSignalPower,
|
||||
// enb_data[eNB_id]->tx_power_dBm,
|
||||
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB);
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,nb_antennas_rx,
|
||||
length<length_meas?length:length_meas,
|
||||
0)/(12.0*frame_parms->N_RB_DL);
|
||||
LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr %f dBm/RE (%f dBm RSSI,tx %f dB)for subframe %d (length %d)\n",UE_id,
|
||||
10*log10(rx_pwr),
|
||||
10*log10(rx_pwr*(double)frame_parms->N_RB_DL*12),
|
||||
10*log10(tx_pwr),subframe,
|
||||
length<length_meas?length:length_meas);
|
||||
|
||||
|
||||
LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr (noise) -132 dBm/RE (N0fs = %.1f dBm, N0B = %.1f dBm) for subframe %d\n",
|
||||
UE_id,
|
||||
10*log10(RU2UE[ru_id][UE_id][CC_id]->sampling_rate*1e6)-174,
|
||||
10*log10(RU2UE[ru_id][UE_id][CC_id]->sampling_rate*1e6*12*frame_parms->N_RB_DL/(double)frame_parms->ofdm_symbol_size)-174,
|
||||
subframe);
|
||||
#endif
|
||||
|
||||
if (RU2UE[ru_id][UE_id][CC_id]->first_run == 1)
|
||||
RU2UE[ru_id][UE_id][CC_id]->first_run = 0;
|
||||
|
||||
|
||||
// RF model
|
||||
#ifdef DEBUG_SIM
|
||||
LOG_D(OCM,"[SIM][DL] UE %d (CCid %d): rx_gain %d dB (-ADC %f) for subframe %d\n",UE_id,CC_id,PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB-66.227,subframe);
|
||||
#endif
|
||||
|
||||
rf_rx_simple(r_re0,
|
||||
r_im0,
|
||||
nb_antennas_rx,
|
||||
length,
|
||||
1e3/RU2UE[ru_id][UE_id][CC_id]->sampling_rate, // sampling time (ns)
|
||||
(double)PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,
|
||||
nb_antennas_rx,
|
||||
length<length_meas?length:length_meas,
|
||||
0)/(12.0*frame_parms->N_RB_DL);
|
||||
LOG_D(OCM,"[SIM][DL] UE %d : ADC in (RU %d) %f dBm/RE for subframe %d\n",
|
||||
UE_id,ru_id,
|
||||
10*log10(rx_pwr),subframe);
|
||||
#endif
|
||||
|
||||
|
||||
pthread_mutex_lock(&RU_output_mutex[UE_id]);
|
||||
for (i=0; i<frame_parms->samples_per_tti; i++) {
|
||||
for (aa=0; aa<nb_antennas_rx; aa++) {
|
||||
r_re_DL[UE_id][aa][i]+=r_re0[aa][i];
|
||||
r_im_DL[UE_id][aa][i]+=r_im0[aa][i];
|
||||
}
|
||||
}
|
||||
RU_output_mask[UE_id] |= (1<<ru_id);
|
||||
if (RU_output_mask[UE_id] == (1<<RC.nb_RU)-1) {
|
||||
RU_output_mask[UE_id]=0;
|
||||
|
||||
|
||||
|
||||
double *r_re_p[2] = {r_re_DL[UE_id][0],r_re_DL[UE_id][1]};
|
||||
double *r_im_p[2] = {r_im_DL[UE_id][0],r_im_DL[UE_id][1]};
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,length<length_meas?length:length_meas,0)/(12.0*frame_parms->N_RB_DL);
|
||||
LOG_D(OCM,"[SIM][DL] UE %d : ADC in %f dBm/RE for subframe %d\n",UE_id,10*log10(rx_pwr),subframe);
|
||||
#endif
|
||||
|
||||
rxdata = PHY_vars_UE_g[UE_id][CC_id]->common_vars.rxdata;
|
||||
sf_offset = (subframe*frame_parms->samples_per_tti)+offset;
|
||||
|
||||
|
||||
adc(r_re_p,
|
||||
r_im_p,
|
||||
0,
|
||||
sf_offset,
|
||||
rxdata,
|
||||
nb_antennas_rx,
|
||||
length,
|
||||
12);
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr2 = signal_energy(rxdata[0]+sf_offset,length<length_meas?length:length_meas)/(12.0*frame_parms->N_RB_DL);
|
||||
LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr (ADC out) %f dB/RE (%d) for subframe %d, writing to %p, length %d\n",UE_id, 10*log10((double)rx_pwr2),rx_pwr2,subframe,rxdata,length<length_meas?length:length_meas);
|
||||
LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr (ADC out) %f dB for subframe %d\n",UE_id,10*log10((double)rx_pwr2*12*frame_parms->N_RB_DL) ,subframe);
|
||||
#else
|
||||
UNUSED_VARIABLE(rx_pwr2);
|
||||
UNUSED_VARIABLE(tx_pwr);
|
||||
UNUSED_VARIABLE(rx_pwr);
|
||||
#endif
|
||||
|
||||
} // RU_output_mask
|
||||
pthread_mutex_unlock(&RU_output_mutex[UE_id]);
|
||||
} // ru_id
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs],
|
||||
node_desc_t *enb_data[NUMBER_OF_RU_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],
|
||||
uint16_t subframe,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint32_t frame,int ru_id,uint8_t CC_id)
|
||||
{
|
||||
|
||||
int32_t **txdata,**rxdata;
|
||||
uint8_t UE_id=0;
|
||||
|
||||
uint8_t nb_antennas_rx = UE2RU[0][0][CC_id]->nb_rx; // number of rx antennas at eNB
|
||||
uint8_t nb_antennas_tx = UE2RU[0][0][CC_id]->nb_tx; // number of tx antennas at UE
|
||||
|
||||
double tx_pwr, rx_pwr;
|
||||
int32_t rx_pwr2;
|
||||
uint32_t i,aa;
|
||||
uint32_t sf_offset;
|
||||
|
||||
uint8_t hold_channel=0;
|
||||
|
||||
double s_re0[30720];
|
||||
double s_re1[30720];
|
||||
double *s_re[2];
|
||||
double s_im0[30720];
|
||||
double s_im1[30720];
|
||||
double *s_im[2];
|
||||
double r_re00[30720];
|
||||
double r_re01[30720];
|
||||
double *r_re0[2];
|
||||
double r_im00[30720];
|
||||
double r_im01[30720];
|
||||
double *r_im0[2];
|
||||
|
||||
s_re[0] = s_re0;
|
||||
s_im[0] = s_im0;
|
||||
s_re[1] = s_re1;
|
||||
s_im[1] = s_im1;
|
||||
|
||||
r_re0[0] = r_re00;
|
||||
r_im0[0] = r_im00;
|
||||
r_re0[1] = r_re01;
|
||||
r_im0[1] = r_im01;
|
||||
|
||||
if (abstraction_flag!=0) {
|
||||
} else { //without abstraction
|
||||
|
||||
pthread_mutex_lock(&UE_output_mutex[ru_id]);
|
||||
// Clear RX signal for eNB = eNB_id
|
||||
for (i=0; i<frame_parms->samples_per_tti; i++) {
|
||||
for (aa=0; aa<nb_antennas_rx; aa++) {
|
||||
r_re_UL[ru_id][aa][i]=0.0;
|
||||
r_im_UL[ru_id][aa][i]=0.0;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&UE_output_mutex[ru_id]);
|
||||
|
||||
// Compute RX signal for eNB = eNB_id
|
||||
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
|
||||
|
||||
txdata = PHY_vars_UE_g[UE_id][CC_id]->common_vars.txdata;
|
||||
AssertFatal(txdata != NULL,"txdata is null\n");
|
||||
sf_offset = subframe*frame_parms->samples_per_tti;
|
||||
if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe] +
|
||||
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB) <= -125.0) {
|
||||
// don't simulate a UE that is too weak
|
||||
LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
UE_id,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
|
||||
subframe,sf_offset);
|
||||
} else {
|
||||
tx_pwr = dac_fixed_gain((double**)s_re,
|
||||
(double**)s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
frame_parms->samples_per_tti,
|
||||
sf_offset,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
14,
|
||||
(double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe]-10*log10((double)PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
|
||||
1,
|
||||
NULL,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]); // This make the previous argument the total power
|
||||
LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
UE_id,
|
||||
10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
|
||||
subframe,sf_offset);
|
||||
|
||||
|
||||
multipath_channel(UE2RU[UE_id][ru_id][CC_id],s_re,s_im,r_re0,r_im0,
|
||||
frame_parms->samples_per_tti,hold_channel);
|
||||
|
||||
|
||||
rx_pwr = signal_energy_fp2(UE2RU[UE_id][ru_id][CC_id]->ch[0],
|
||||
UE2RU[UE_id][ru_id][CC_id]->channel_length)*UE2RU[UE_id][ru_id][CC_id]->channel_length;
|
||||
|
||||
LOG_D(OCM,"[SIM][UL] subframe %d Channel UE %d => RU %d : %f dB (hold %d,length %d, PL %f)\n",subframe,UE_id,ru_id,10*log10(rx_pwr),
|
||||
hold_channel,UE2RU[UE_id][ru_id][CC_id]->channel_length,
|
||||
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB);
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re0,r_im0,nb_antennas_rx,frame_parms->samples_per_tti,0);
|
||||
LOG_D(OCM,"[SIM][UL] RU %d (%d/%d rx antennas) : rx_pwr %f dBm (tx_pwr - PL %f) for subframe %d, sptti %d\n",
|
||||
ru_id,nb_antennas_rx,UE2RU[UE_id][ru_id][CC_id]->nb_rx,10*log10(rx_pwr),10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe])+UE2RU[UE_id][ru_id][CC_id]->path_loss_dB,subframe,frame_parms->samples_per_tti);
|
||||
/*
|
||||
if (abs(10*log10(rx_pwr)-10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe])-UE2RU[UE_id][ru_id][CC_id]->path_loss_dB)>3) {
|
||||
write_output("txsig_re.m","s_re",s_re[0],frame_parms->samples_per_tti,1,7);
|
||||
write_output("txsig_im.m","s_im",s_im[0],frame_parms->samples_per_tti,1,7);
|
||||
write_output("rxsig_re.m","r_re",r_re0[0],frame_parms->samples_per_tti,1,7);
|
||||
write_output("rxsig_im.m","r_im",r_im0[0],frame_parms->samples_per_tti,1,7);
|
||||
exit(-1);
|
||||
}*/
|
||||
|
||||
if (UE2RU[UE_id][ru_id][CC_id]->first_run == 1)
|
||||
UE2RU[UE_id][ru_id][CC_id]->first_run = 0;
|
||||
|
||||
|
||||
pthread_mutex_lock(&UE_output_mutex[ru_id]);
|
||||
for (aa=0; aa<nb_antennas_rx; aa++) {
|
||||
for (i=0; i<frame_parms->samples_per_tti; i++) {
|
||||
r_re_UL[ru_id][aa][i]+=r_re0[aa][i];
|
||||
r_im_UL[ru_id][aa][i]+=r_im0[aa][i];
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&UE_output_mutex[ru_id]);
|
||||
}
|
||||
} //UE_id
|
||||
|
||||
double *r_re_p[2] = {r_re_UL[ru_id][0],r_re_UL[ru_id][1]};
|
||||
double *r_im_p[2] = {r_im_UL[ru_id][0],r_im_UL[ru_id][1]};
|
||||
|
||||
rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);
|
||||
LOG_D(OCM,"[SIM][UL] RU %d (%d/%d rx antennas) : rx_pwr %f dBm (before RF) for subframe %d, gain %f\n",
|
||||
ru_id,nb_antennas_rx,nb_antennas_rx,10*log10(rx_pwr),subframe,
|
||||
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227);
|
||||
rf_rx_simple(r_re_p,
|
||||
r_im_p,
|
||||
nb_antennas_rx,
|
||||
frame_parms->samples_per_tti,
|
||||
1e3/UE2RU[0][ru_id][CC_id]->sampling_rate, // sampling time (ns)
|
||||
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
|
||||
|
||||
//#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);//*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL;
|
||||
LOG_D(OCM,"[SIM][UL] rx_pwr (ADC in) %f dB for subframe %d (rx_gain %f)\n",10*log10(rx_pwr),subframe,
|
||||
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx);
|
||||
//#endif
|
||||
|
||||
rxdata = RC.ru[ru_id]->common.rxdata;
|
||||
sf_offset = subframe*frame_parms->samples_per_tti;
|
||||
|
||||
|
||||
adc(r_re_p,
|
||||
r_im_p,
|
||||
0,
|
||||
sf_offset,
|
||||
rxdata,
|
||||
nb_antennas_rx,
|
||||
frame_parms->samples_per_tti,
|
||||
12);
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr2 = signal_energy(rxdata[0]+sf_offset,frame_parms->samples_per_tti)*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL);
|
||||
LOG_D(OCM,"[SIM][UL] RU %d rx_pwr (ADC out) %f dB (%d) for subframe %d (offset %d) = %p\n",ru_id,10*log10((double)rx_pwr2),rx_pwr2,subframe,sf_offset,rxdata[0]+sf_offset);
|
||||
#else
|
||||
UNUSED_VARIABLE(tx_pwr);
|
||||
UNUSED_VARIABLE(rx_pwr);
|
||||
UNUSED_VARIABLE(rx_pwr2);
|
||||
#endif
|
||||
|
||||
} // abstraction_flag==0
|
||||
|
||||
}
|
||||
|
||||
|
||||
void init_channel_vars(LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
memset(RU_output_mask,0,sizeof(int)*NUMBER_OF_UE_MAX);
|
||||
for (i=0;i<NB_UE_INST;i++)
|
||||
pthread_mutex_init(&RU_output_mutex[i],NULL);
|
||||
|
||||
memset(UE_output_mask,0,sizeof(int)*NUMBER_OF_RU_MAX);
|
||||
for (i=0;i<NB_eNB_INST;i++)
|
||||
pthread_mutex_init(&UE_output_mutex[i],NULL);
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user