Commit 0bd324bd authored by Navid Nikaein's avatar Navid Nikaein

* update the lte_rate_matching for rx (temporarily)

* update the oai performance test cases
* update ulsim and dlsim for automatic logging for performance testing



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5343 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 166235fd
......@@ -62,11 +62,11 @@ The MME needs some libraries and tools:
S1AP/MESSAGES/ASN1)
- flex
- bison
To install the dependencies:
sudo apt-get install libsctp-dev libpthread-dev flex bison g++ gcc make -y
A script is present in S6A/freediameter to install required packages for
S6A interface over diameter
S6A interface over diameter. Run it as a sudoer.
install_openvswitch1.9.0.bash
cd S6A/freediameter/README
......
......@@ -263,9 +263,10 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
/* We already have a mme ue s1ap id check the received is the same */
if (ue_desc_p->mme_ue_s1ap_id != downlink_NAS_transport_p->mme_ue_s1ap_id) {
S1AP_ERROR("[SCTP %d] Mismatch in MME UE S1AP ID (0x%08x != 0x%08x)\n",
downlink_NAS_transport_p->mme_ue_s1ap_id,
ue_desc_p->mme_ue_s1ap_id,
assoc_id);
assoc_id,
downlink_NAS_transport_p->mme_ue_s1ap_id,
ue_desc_p->mme_ue_s1ap_id
);
}
}
......
......@@ -95,7 +95,7 @@ if [ -d freeDiameter-1.1.5/ ]
fi
wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz > install_log.txt
tar -xf 1.1.5.tar.gz > install_log.txt
tar -xzf 1.1.5.tar.gz > install_log.txt
echo "Uncompressing freeDiameter archive"
cd freeDiameter-1.1.5
patch -p1 < $CURRENT_PATH/freediameter-1.1.5.patch > install_log.txt
......
......@@ -691,7 +691,8 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
if (clear==1)
memset(w,0,Ncb*sizeof(int16_t));
soft_input2 = soft_input + (r*E);
//soft_input2 = soft_input + (r*E);
soft_input2 = soft_input; // navid
k=0;
for (;(ind<Ncb)&&(k<E);ind++) {
......
......@@ -366,11 +366,15 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *phy_vars_eNB) {
phy_vars_eNB->pucch_config_dedicated[UE_id].ackNackRepetition=1;
}
if (physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode)
phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode = *physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode;
else
phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode = bundling;
if (phy_vars_eNB->lte_frame_parms.frame_type == FDD) {
phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode = multiplexing;
}
else {
if (physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode)
phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode = *physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode;
else
phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode = bundling;
}
if ( phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode == multiplexing)
LOG_D(PHY,"pucch_config_dedicated.tdd_AckNackFeedbackMode = multiplexing\n");
else
......@@ -1433,7 +1437,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS = 0;
phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_last = 0;
phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC = 0;
// phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC = 0;
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate = 0;
phy_vars_eNB->physicalConfigDedicated[UE_id] = NULL;
......
......@@ -94,7 +94,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
#ifdef USER_MODE
#if defined(USER_MODE)
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes;
......@@ -437,6 +437,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
alpha = (int16_t) (((int32_t) SCALE * (int32_t) (pilot_pos2-k))/(pilot_pos2-pilot_pos1));
beta = (int16_t) (((int32_t) SCALE * (int32_t) (k-pilot_pos1))/(pilot_pos2-pilot_pos1));
#ifdef DEBUG_CH
msg("lte_ul_channel_estimation: k=%d, alpha = %d, beta = %d\n",k,alpha,beta);
#endif
......
......@@ -350,6 +350,8 @@ typedef struct {
uint32_t B;
/// Length of ACK information (bits)
uint8_t O_ACK;
/// The value of DAI in DCI format 0
uint8_t V_UL_DAI;
/// Pointer to the payload
uint8_t *b;
/// Pointers to transport block segments
......
......@@ -662,8 +662,12 @@ int main(int argc, char **argv) {
fprintf(bler_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3; dci_err\n");
if (test_perf != 0) {
sprintf(time_meas_fname,"%s/TEST/OAI/PERF/time_meas_prb%d_mcs%d_anttx%d_antrx%d_pdcch%d_channel%s_tx%d.csv",
getenv("OPENAIR_TARGETS"),
char hostname[1024];
hostname[1023] = '\0';
gethostname(hostname, 1023);
printf("Hostname: %s\n", hostname);
sprintf(time_meas_fname,"%s/TEST/OAI/PERF_%s/time_meas_prb%d_mcs%d_anttx%d_antrx%d_pdcch%d_channel%s_tx%d.csv",
getenv("OPENAIR_TARGETS"),hostname,
N_RB_DL,mcs,n_tx,n_rx,num_pdcch_symbols,channel_model_input,transmission_mode);
time_meas_fd = fopen(time_meas_fname,"w");
}
......
......@@ -516,8 +516,12 @@ int main(int argc, char **argv) {
fprintf(bler_fd,"#SNR;mcs;nb_rb;TBS;rate;errors[0];trials[0];errors[1];trials[1];errors[2];trials[2];errors[3];trials[3]\n");
if (test_perf != 0) {
sprintf(time_meas_fname,"%s/TEST/OAI/PERF/time_meas_prb%d_mcs%d_antrx%d_channel%s_tx%d.csv",
getenv("OPENAIR_TARGETS"),
char hostname[1024];
hostname[1023] = '\0';
gethostname(hostname, 1023);
printf("Hostname: %s\n", hostname);
sprintf(time_meas_fname,"%s/TEST/OAI/PERF_%s/time_meas_prb%d_mcs%d_antrx%d_channel%s_tx%d.csv",
getenv("OPENAIR_TARGETS"),hostname,
N_RB_DL,mcs,n_rx,channel_model_input,transmission_mode);
time_meas_fd = fopen(time_meas_fname,"w");
}
......
......@@ -30,7 +30,7 @@
<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>0</DESTINATION_ID> <!-- valid formats are: -->
<DESTINATION_ID>1:3</DESTINATION_ID> <!-- valid formats are: -->
</PREDEFINED_TRAFFIC>
</APPLICATION_CONFIG>
......
......@@ -42,7 +42,7 @@ makerr1 = '***'
makerr2 = 'Error 1'
def execute(oai, user, pw, logfile,logdir,debug):
def execute(oai, user, pw, host,logfile,logdir,debug):
case = '101'
rv = 1;
......@@ -57,9 +57,10 @@ def execute(oai, user, pw, logfile,logdir,debug):
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for dlsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
oai.send('make cleanall;')
oai.send('rm -f ./dlsim.rel8;')
oai.send('rm -f ./dlsim.rel8.'+host)
oai.send_expect_false('make dlsim -j4' + tee, makerr1, 1500)
oai.send('cp ./dlsim ./dlsim.rel8;')
oai.send('cp ./dlsim ./dlsim.rel8.'+host)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
rv =0
......@@ -74,9 +75,9 @@ def execute(oai, user, pw, logfile,logdir,debug):
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for ulsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
oai.send('make cleanall;')
oai.send('rm -f ./ulsim.rel8;')
oai.send('rm -f ./ulsim.rel8.'+host)
oai.send_expect_false('make ulsim -j4' + tee, makerr1, 1500)
oai.send('cp ./ulsim ./ulsim.rel8;')
oai.send('cp ./ulsim ./ulsim.rel8.'+host)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
rv = 0
......
......@@ -48,8 +48,8 @@ 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]
PRB=[25,50,100]
MCS=[0,4,9,10,13,16,17,22,27]
ANT_TX=2 # 2
ANT_RX=2 # 2
PDCCH=2 #, 2, 3, 4
......@@ -65,26 +65,26 @@ FRAME=500
def execute(oai, user, pw, logfile,logdir,debug):
def execute(oai, user, pw, host, logfile,logdir,debug):
case = '102'
case = '10'
oai.send('cd $OPENAIR1_DIR;')
oai.send('cd SIMULATION/LTE_PHY;')
try:
test = '0'
test = '200'
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;'
trace = logdir + '/log_' + host + 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;'
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
trace = logdir + '/log_' + host + 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;'
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'Exiting', 30)
trace = logdir + '/log_' + host + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'FATAL', 30)
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
......@@ -92,11 +92,12 @@ def execute(oai, user, pw, logfile,logdir,debug):
log.ok(case, test, name, conf, '', logfile)
try:
test = 1
MIN_SNR = 0
test = 210
name = 'Run oai.dlsim.perf.'+str(PERF)+'%'
diag = 'no diagnostic is available, check the log file'
for i in range(len(PRB)):
MIN_SNR = 0
for j in range(len(MCS)):
for k in range(1,ANT_TX):
for m in range (1,ANT_RX):
......@@ -106,13 +107,15 @@ def execute(oai, user, pw, logfile,logdir,debug):
for q in range(MIN_SNR,MAX_SNR):
#if if PRB[i] :
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(k) + ' -z'+str(m) +' -c'+str(n) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -f.1 -P -n'+str(FRAME)+' -O'+str(PERF) #+' '+ OPT
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(k) + ' -z'+str(m) +' -c'+str(n) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -f.1 -P -n'+str(FRAME)+' -O'+str(PERF) +' '+ OPT
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_anttx' + str(k)+ '_antrx' + str(m) + '_pdcch' + str(n) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
tee = ' 2>&1 | tee ' + trace
match = oai.send_expect_re('./dlsim.rel8 ' + conf + tee, 'passed', 0, 1000)
cmd = 'taskset -c 0 ./dlsim.rel8.'+ host + ' ' + conf + tee
if debug :
print conf
print cmd
match = oai.send_expect_re(cmd, 'passed', 0, 1000)
if match :
log.ok(case, str(test), name, conf, '', logfile)
MIN_SNR = q -1 # just to speed up the test
......@@ -131,8 +134,7 @@ def execute(oai, user, pw, logfile,logdir,debug):
print ("Error: %s - %s." % (e.filename,e.strerror))
except log.err, e:
log.fail(case, str(test), name, conf, e.value, diag, logfile,trace)
#else:
......
......@@ -48,8 +48,8 @@ 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]
PRB=[25,50,100]
MCS=[0,4,9,10,13,16,17,22,27]
ANT_TX=1 # 2
ANT_RX=2 # 2
CHANNEL=["N"] # A,B,C,D,E,F,
......@@ -63,26 +63,26 @@ FRAME=500
def execute(oai, user, pw, logfile,logdir,debug):
def execute(oai, user, pw, host,logfile,logdir,debug):
case = '103'
case = '10'
oai.send('cd $OPENAIR1_DIR;')
oai.send('cd SIMULATION/LTE_PHY;')
try:
test = '0'
test = '300'
name = 'Run oai.ulsim.sanity'
conf = '-a -n 100'
diag = 'ulsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
trace = logdir + '/log_' + case + test + '_1.txt;'
trace = logdir + '/log_' + host + 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;'
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
trace = logdir + '/log_' + host + 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;'
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'Exiting', 30)
trace = logdir + '/log_' + host + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./ulsim.rel8 ' + conf + tee, 'FATAL', 30)
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
......@@ -90,11 +90,11 @@ def execute(oai, user, pw, logfile,logdir,debug):
log.ok(case, test, name, conf, '', logfile)
try:
test = 1
MIN_SNR=2
test = 310
name = 'Run oai.ulsim.perf.'+str(PERF)+'%'
diag = 'no diagnostic is available, check the log file'
for i in range(len(PRB)):
MIN_SNR=0
for j in range(len(MCS)):
for m in range (1,ANT_RX):
for o in range(len(CHANNEL)):
......@@ -102,13 +102,16 @@ def execute(oai, user, pw, logfile,logdir,debug):
for q in range(MIN_SNR,MAX_SNR):
#if if PRB[i] :
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF) #+' '+ OPT
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF)+' '+ OPT
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_antrx' + str(m) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
tee = ' 2>&1 | tee ' + trace
match = oai.send_expect_re('./ulsim.rel8 ' + conf + tee, 'passed', 0, 1000)
cmd = 'taskset -c 0 ./ulsim.rel8.'+ host + ' ' + conf + tee
if debug :
print conf
print cmd
match = oai.send_expect_re(cmd, 'passed', 0, 1000)
if match :
log.ok(case, str(test), name, conf, '', logfile)
MIN_SNR = q - 1 # just to speed up the test
......
......@@ -187,7 +187,7 @@ class openair(core):
def create_dir(self,dirname,debug) :
if not os.path.exists(dirname) :
try:
os.makedirs(dirname)
os.makedirs(dirname,0755)
except OSError:
# There was an error on creation, so make sure we know about it
raise
......@@ -79,13 +79,14 @@ for arg in sys.argv:
sys.exit()
i= i + 1
host = os.uname()[1]
# get the oai object
oai = openair('localdomain','localhost')
#start_time = time.time() # datetime.datetime.now()
try:
user = getpass.getuser()
print '\n******* Note that the user <'+user+'> should be a sudoer *******\n'
print '******* Connecting to the localhost to perform the test *******\n'
print '******* Connecting to the localhost <'+host+'> to perform the test *******\n'
if not pw :
print "username: " + user
......@@ -104,10 +105,10 @@ except :
test = 'test02'
ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d.%Hh%M")
logdir = os.getcwd() + '/PERF';
logdir = os.getcwd() + '/PERF_'+host;
logfile = logdir+'/'+user+'.'+test+'.'+ctime+'.txt'
oai.send_nowait('mkdir -p -m 755' + logdir + ';')
#oai.send_nowait('mkdir -p -m 755' + logdir + ';')
oai.create_dir(logdir,debug)
#print '=================start the ' + test + ' at ' + ctime + '=================\n'
#print 'Results will be reported in log file : ' + logfile
log.writefile(logfile,'====================start'+test+' at ' + ctime + '=======================\n')
......@@ -121,10 +122,11 @@ if clean == 1 :
# start te test cases
#compile
rv=case11.execute(oai, user, pw, logfile,logdir,debug)
rv=case11.execute(oai, user, pw, host,logfile,logdir,debug)
if rv != 0 :
case12.execute(oai, user, pw, logfile,logdir,debug)
case13.execute(oai, user, pw, logfile,logdir,debug)
case12.execute(oai, user, pw, host,logfile,logdir,debug)
case13.execute(oai, user, pw, host,logfile,logdir,debug)
else :
print 'Compilation error: skip case 12 and 13'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment