Commit 388ad205 authored by nikaeinn's avatar nikaeinn

*update dlsim to capture overall timing

*add performance measurment test cases
*update the start_one_eNB_multi_UE_nas script



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5151 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 3dfe046c
......@@ -233,7 +233,7 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN
memcpy(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->b,
a,
phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3);
LOG_D(PHY, "eNB %d dlsch_encoding_emul pmch , tbs is %d \n",
LOG_D(PHY, "[eNB %d] dlsch_encoding_emul pmch , tbs is %d \n",
phy_vars_eNB->Mod_id,
phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3);
......
......@@ -32,3 +32,15 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
}
}
double get_time_meas_us(time_stats_t *ts){
static double cpu_freq_GHz = 0.0;
if (cpu_freq_GHz == 0.0)
cpu_freq_GHz = get_cpu_freq_GHz();
if (ts->trials>0)
return (ts->diff/ts->trials/cpu_freq_GHz/1000.0);
}
......@@ -17,6 +17,7 @@ static inline void start_meas(time_stats_t *ts) __attribute__((always_inline));
static inline void stop_meas(time_stats_t *ts) __attribute__((always_inline));
void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_time, time_stats_t * sf_exec_time);
double get_time_meas_us(time_stats_t *ts);
#if defined(__i386__)
static inline unsigned long long rdtsc_oai(void) __attribute__((always_inline));
......
......@@ -512,6 +512,7 @@ typedef struct
time_stats_t ulsch_multiplexing_stats;
time_stats_t ofdm_demod_stats;
time_stats_t dlsch_rx_pdcch_stats;
time_stats_t rx_dft_stats;
time_stats_t dlsch_channel_estimation_stats;
time_stats_t dlsch_freq_offset_estimation_stats;
......
This diff is collapsed.
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France
*******************************************************************************/
/*! \file ulsim.c
\brief Top-level DL simulator
\author R. Knopp
\date 2011
\version 0.1
\company Eurecom
\email: knopp@eurecom.fr
\note
\warning
*/
#include <string.h>
#include <math.h>
#include <unistd.h>
......
......@@ -1053,7 +1053,7 @@ void ue_get_sdu(module_id_t module_idP,frame_t frameP,sub_frame_t subframe, uint
start_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_IN);
#ifdef CBA
if (*access_mode==CBA_ACCESS){
LOG_D(MAC,"[UE %d] frameP %d subframe %d try CBA transmission\n",
......@@ -1087,8 +1087,13 @@ void ue_get_sdu(module_id_t module_idP,frame_t frameP,sub_frame_t subframe, uint
bsr_len = bsr_ce_len + bsr_header_len;
LOG_D(MAC,"[UE %d] header size info: dcch %d, dcch1 %d, dtch %d, bsr (ce%d,hdr%d) buff_len %d\n",
module_idP, dcch_header_len,dcch1_header_len,dtch_header_len, bsr_ce_len, bsr_header_len, buflen);
} else
bsr_len = 0;
} else {
bsr_len=0;
//LOG_D(MAC,"[UE %d] Empty buffers, send a long BSR to reset the bsr at eNB \n ",Mod_id);
// bsr_ce_len = sizeof(BSR_LONG);
//bsr_len = bsr_ce_len + bsr_header_len;
}
// check for UL bandwidth requests and add SR control element
// check for UL bandwidth requests and add SR control element
......@@ -1259,6 +1264,7 @@ void ue_get_sdu(module_id_t module_idP,frame_t frameP,sub_frame_t subframe, uint
bsr_s, // short bsr
bsr_l,
post_padding); // long_bsr
LOG_I(MAC,"[UE %d] Generate header :bufflen %d sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d, dcch_header_len %d, dtch_header_len %d, padding %d,post_padding %d, bsr len %d, phr len %d, reminder %d \n",
module_idP,buflen, sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],payload_offset, dcch_header_len, dtch_header_len,
short_padding,post_padding, bsr_len, phr_len,buflen-sdu_length_total-payload_offset);
......
......@@ -157,6 +157,12 @@ boolean_t pdcp_data_req(
rlc_status = rlc_data_req(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p);
} else {
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
LOG_W(PDCP,"[FRAME %5u][%s][PDCP][MOD %u/%u][RB %u] PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
frameP,
(enb_flagP) ? "eNB" : "UE",
enb_mod_idP,
ue_mod_idP,
rb_idP);
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
AssertFatal(0, "[FRAME %5u][%s][PDCP][MOD %u/%u][RB %u] PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
frameP,
......
......@@ -24,7 +24,7 @@ if [ $1 -ge 2 ]; then
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 14
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 17
# 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 3
fi
......@@ -34,7 +34,7 @@ if [ $1 -ge 3 ]; then
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 25
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.1.1 -t 10.0.1.4 -r 31
# 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 3
fi
......
#******************************************************************************
# Eurecom OpenAirInterface
# Copyright(c) 1999 - 2013 Eurecom
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
# Contact Information
# Openair Admin: openair_admin@eurecom.fr
# Openair Tech : openair_tech@eurecom.fr
# Forums : http://forums.eurecom.fsr/openairinterface
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France
#*****************************************************************************
# \file case02.py
# \brief test case 02 for OAI: executions
# \author Navid Nikaein
# \date 2013
# \version 0.1
# @ingroup _test
import time
import random
import log
import openair
import core
NUM_UE=2
NUM_eNB=1
NUM_TRIALS=3
def execute(oai, user, pw, logfile,logdir):
case = '04'
oai.send('cd $OPENAIR1_DIR;')
oai.send('cd SIMULATION/LTE_PHY;')
try:
test = '00'
name = 'Run oai.dlsim.sanity'
conf = '-a -A AWGN -n 100'
diag = 'dlsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
trace = logdir + '/log_' + case + test + '_1.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'Segmentation fault', 30)
trace = logdir + '/log_' + case + test + '_2.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'Exiting', 30)
trace = logdir + '/log_' + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '01'
name = 'Run oai.dlsim.test1'
diag = 'Test 1, 10 MHz, R2.FDD (MCS 5), EVA5, -1dB'
conf = '-m5 -gF -s-3.2 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70'
trace = logdir + '/log_' + case + test +'.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '06'
name = 'Run oai.dlsim.test5'
diag = 'Test 5, 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)'
conf = '-m4 -gF -s-2 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '06'
name = 'Run oai.dlsim.test6'
diag = 'Test 6, 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)'
conf = '-m15 -gF -s4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '06b'
name = 'Run oai.dlsim.test6b'
diag = 'Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)'
conf = '-m14 -gF -s4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '07'
name = 'Run oai.dlsim.test7'
diag = 'Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)'
conf = '-m15 -gG -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O30'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '07b'
name = 'Run oai.dlsim.test7b'
diag = 'Test 7b, 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)'
conf = '-m14 -gG -s-1 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O30'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '10'
name = 'Run oai.dlsim.test10'
diag = 'Test 10, 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)'
conf = '-m25 -gF -s13 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '10b'
name = 'Run oai.dlsim.test10b'
diag = 'Test 10b, 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)'
conf = '-m25 -gF -s15.2 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '11'
name = 'Run oai.dlsim.test11'
diag = 'Test 11, 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)'
conf = '-m26 -gF -s14.2 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./dlsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
#******************************************************************************
# Eurecom OpenAirInterface
# Copyright(c) 1999 - 2013 Eurecom
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
# Contact Information
# Openair Admin: openair_admin@eurecom.fr
# Openair Tech : openair_tech@eurecom.fr
# Forums : http://forums.eurecom.fsr/openairinterface
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France
#*****************************************************************************
# \file case02.py
# \brief test case 02 for OAI: executions
# \author Navid Nikaein
# \date 2013
# \version 0.1
# @ingroup _test
import time
import random
import log
import openair
import core
NUM_UE=2
NUM_eNB=1
NUM_TRIALS=3
def execute(oai, user, pw, logfile,logdir):
case = '04'
oai.send('cd $OPENAIR1_DIR;')
oai.send('cd SIMULATION/LTE_PHY;')
try:
test = '00'
name = 'Run oai.dlsim.sanity'
conf = '-a -A AWGN -n 100'
diag = 'ulsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
trace = logdir + '/log_' + case + test + '_1.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./ulsim.rel8 ' + conf + tee, 'Segmentation fault', 30)
trace = logdir + '/log_' + case + test + '_2.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./ulsim.rel8 ' + conf + tee, 'Exiting', 30)
trace = logdir + '/log_' + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./ulsim.rel8 ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '01'
name = 'Run oai.ulsim.test1'
diag = 'Test 1, 10 MHz, R2.FDD (MCS 5), EVA5, -1dB'
conf = '-m5 -gF -s-3.2 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70'
trace = logdir + '/log_' + case + test +'.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '06'
name = 'Run oai.ulsim.test5'
diag = 'Test 5, 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)'
conf = '-m4 -gF -s-2 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '06'
name = 'Run oai.ulsim.test6'
diag = 'Test 6, 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)'
conf = '-m15 -gF -s4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '06b'
name = 'Run oai.ulsim.test6b'
diag = 'Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)'
conf = '-m14 -gF -s4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '07'
name = 'Run oai.ulsim.test7'
diag = 'Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)'
conf = '-m15 -gG -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O30'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '10'
name = 'Run oai.ulsim.test10'
diag = 'Test 10, 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)'
conf = '-m25 -gF -s13 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '10b'
name = 'Run oai.ulsim.test10b'
diag = 'Test 10b, 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)'
conf = '-m25 -gF -s15.2 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '11'
name = 'Run oai.ulsim.test11'
diag = 'Test 11, 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)'
conf = '-m26 -gF -s14.2 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
print test + 'not performed'
#oai.send_expect('./ulsim.rel8 ' + conf + tee, ' effective rate passed', 150)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
#******************************************************************************
# Eurecom OpenAirInterface
# Copyright(c) 1999 - 2013 Eurecom
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
# Contact Information
# Openair Admin: openair_admin@eurecom.fr
# Openair Tech : openair_tech@eurecom.fr
# Forums : http://forums.eurecom.fsr/openairinterface
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France
#*****************************************************************************
# \file case01.py
# \brief test case 01 for OAI: compilations
# \author Navid Nikaein
# \date 2014
# \version 0.1
# @ingroup _test
import log
import openair
import core
makerr1 = '***'
makerr2 = 'Error 1'
def execute(oai, user, pw, logfile,logdir):
case = '101'
oai.send('cd $OPENAIR1_DIR;')
oai.send('cd SIMULATION/LTE_PHY;')
try:
test = '01'
name = 'Compile oai.rel8.phy.dlsim.make'
conf = 'make dlsim'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for dlsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
oai.send('make clean;')
oai.send('rm -f ./dlsim.rel8;')
oai.send_expect_false('make dlsim -j4' + tee, makerr1, 1500)
oai.send('cp ./dlsim ./dlsim.rel8;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '02'
name = 'Compile oai.rel8.phy.ulsim.make'
conf = 'make ulsim'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for ulsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
oai.send('make clean;')
oai.send('rm -f ./ulsim.rel8;')
oai.send_expect_false('make ulsim -j4' + tee, makerr1, 1500)
oai.send('cp ./ulsim ./ulsim.rel8;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
#******************************************************************************
# Eurecom OpenAirInterface
# Copyright(c) 1999 - 2013 Eurecom
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
# Contact Information
# Openair Admin: openair_admin@eurecom.fr
# Openair Tech : openair_tech@eurecom.fr
# Forums : http://forums.eurecom.fsr/openairinterface
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France
#*****************************************************************************
# \file case02.py
# \brief test case 02 for OAI: executions
# \author Navid Nikaein
# \date 2013
# \version 0.1
# @ingroup _test
import time
import random
import log
import openair
import core
import os
import shutil # copy file
NUM_UE=2
NUM_eNB=1
NUM_TRIALS=3
PRB=[25,50,75,100]
MCS=[4,5,7,9,12,15,18,21,24,27]
ANT_TX=2 # 2
ANT_RX=2 # 2
PDCCH=2 #, 2, 3, 4
CHANNEL=["N"] # A,B,C,D,E,F,
TX_MODE=2 # 2,
MIN_SNR=2
MAX_SNR=18
#OPT="-L -d" # 8bit decoder , activate dci decoding at UE
def execute(oai, user, pw, logfile,logdir):
case = '102'
oai.send('cd $OPENAIR1_DIR;')
oai.send('cd SIMULATION/LTE_PHY;')
try:
test = '0'
name = 'Run oai.dlsim.sanity'
conf = '-a -n 100'
diag = 'dlsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
trace = logdir + '/log_' + case + test + '_1.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'Segmentation fault', 30)
trace = logdir + '/log_' + case + test + '_2.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'Exiting', 30)
trace = logdir + '/log_' + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = 1
MIN_SNR = 2
name = 'Run oai.dlsim.perf.70%'
diag = 'no diagnostic is available, check the log file'
for i in range(len(PRB)):
for j in range(len(MCS)):
for k in range(1,ANT_TX):
for m in range (1,ANT_RX):
for n in range(1,PDCCH):
for o in range(len(CHANNEL)):