Commit 0b1050c1 authored by ROBERT Benoit's avatar ROBERT Benoit

Add following functionnalities to OAI UE autotest framework

- add progess bar report
- reduce ssh max_tries to 10
- cleanOldPrograms -> change kill cmd line to be able to run autotest on same machine than lte-softmodem (thanks Rohit & Gabriel)
- Cleanning output prints
- add --skip-machine-preparation on cmd line
- add --skip-sanity-check on cmd line
- add HTML REPORT (no-S1 only)
- add XML detailled report (no-S1 only)
parent 9648d1f2
...@@ -235,6 +235,7 @@ add_boolean_option(DEBUG_OMG False "???") ...@@ -235,6 +235,7 @@ add_boolean_option(DEBUG_OMG False "???")
add_boolean_option(XFORMS False "This adds the possibility to see the signal oscilloscope") add_boolean_option(XFORMS False "This adds the possibility to see the signal oscilloscope")
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status") add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
add_boolean_option(T_TRACER False "Activate the T tracer, a debugging/monitoring framework" ) add_boolean_option(T_TRACER False "Activate the T tracer, a debugging/monitoring framework" )
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
......
...@@ -75,7 +75,7 @@ class openair(core): ...@@ -75,7 +75,7 @@ class openair(core):
return (stdout, stderr) return (stdout, stderr)
def connect(self, username, password, prompt='PEXPECT_OAI'): def connect(self, username, password, prompt='PEXPECT_OAI'):
max_retries=100 max_retries=10
i=0 i=0
while i <= max_retries: while i <= max_retries:
self.prompt1 = prompt self.prompt1 = prompt
...@@ -97,9 +97,9 @@ class openair(core): ...@@ -97,9 +97,9 @@ class openair(core):
# need to look for twice the string of the prompt # need to look for twice the string of the prompt
self.oai.prompt() self.oai.prompt()
self.oai.prompt() self.oai.prompt()
self.oai.sendline('uptime') # self.oai.sendline('uptime')
self.oai.prompt() # self.oai.prompt()
print self.oai.before # print self.oai.before
break break
except Exception, e: except Exception, e:
error='' error=''
...@@ -171,7 +171,7 @@ class openair(core): ...@@ -171,7 +171,7 @@ class openair(core):
sys.exit(1) sys.exit(1)
def disconnect(self): def disconnect(self):
print 'disconnecting the ssh connection to ' + self.address + '\n' # print 'disconnecting the ssh connection to ' + self.address + '\n'
self.oai.send('exit') self.oai.send('exit')
# self.cancel() # self.cancel()
......
diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
index d2c7ac6..0853373 100644
--- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
+++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
@@ -493,7 +493,7 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho
#endif
- if (frame_length > 6143) {
+ if (frame_length > 6144) {
LOG_E(PHY,"compute_beta: frame_length %d\n",frame_length);
return;
}
@@ -979,6 +979,11 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
} else
n2 = n;
+ if(n2<256)
+ {
+ printf("phy_threegpplte_turbo_decoder8 : frame length < 256\n");
+ return 255;
+ }
for (iind=0; iind < 188 && f1f2mat[iind].nb_bits != n; iind++);
diff --git a/openair1/PHY/LTE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_TRANSPORT/initial_sync.c diff --git a/openair1/PHY/LTE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_TRANSPORT/initial_sync.c
index 71372d9..763397b 100644 index 661fe96..782305d 100644
--- a/openair1/PHY/LTE_TRANSPORT/initial_sync.c --- a/openair1/PHY/LTE_TRANSPORT/initial_sync.c
+++ b/openair1/PHY/LTE_TRANSPORT/initial_sync.c +++ b/openair1/PHY/LTE_TRANSPORT/initial_sync.c
@@ -477,6 +477,13 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) @@ -469,6 +469,15 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
//#endif //#endif
if (ue->UE_scan_carrier == 0) { if (ue->UE_scan_carrier == 0) {
+ +
+ /* SYRTEM */ + #if UE_AUTOTEST_TRACE
+ printf("AUTOTEST Cell Sync : frame = %d, rx_offset %d, freq_offset %d \n", + LOG_I(PHY,"[UE %d] AUTOTEST Cell Sync : frame = %d, rx_offset %d, freq_offset %d \n",
+ ue->proc.proc_rxtx[0].frame_rx, + ue->Mod_id,
+ ue->rx_offset, + ue->proc.proc_rxtx[0].frame_rx,
+ ue->common_vars.freq_offset ); + ue->rx_offset,
+ ue->common_vars.freq_offset );
+ #endif
+ +
if (ue->mac_enabled==1) { if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id); LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
......
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index 96645f8..a7f1dfb 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -1602,6 +1602,11 @@ int main( int argc, char **argv )
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,abstraction_flag);
PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id;
+ PHY_vars_eNB_g[0][CC_id]->ue_dl_rb_alloc=0x1fff;
+ PHY_vars_eNB_g[0][CC_id]->target_ue_dl_mcs=target_dl_mcs;
+ PHY_vars_eNB_g[0][CC_id]->ue_ul_nb_rb=6;
+ PHY_vars_eNB_g[0][CC_id]->target_ue_ul_mcs=target_ul_mcs;
+
if (phy_test==1) PHY_vars_eNB_g[0][CC_id]->mac_enabled = 0;
else PHY_vars_eNB_g[0][CC_id]->mac_enabled = 1;
This diff is collapsed.
...@@ -35,12 +35,15 @@ import getopt ...@@ -35,12 +35,15 @@ import getopt
import sys import sys
from subprocess import call from subprocess import call
import encoder
sys.path.append(os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/'))
#test_cases = ('030001', '030901', '031001', '031601', '031701', '031801', '031901', '032001', '032101', '032201', '032301', '032501', '032601', '032801') #test_cases = ('030001', '030901', '031001', '031601', '031701', '031801', '031901', '032001', '032101', '032201', '032301', '032501', '032601', '032801')
test_cases = ('030030' , '030030' ) test_cases = ('032800' , '032730' )
nb_run = 3 nb_run = 2
def error_opt(msg): def error_opt(msg):
print("Option error: " + msg) print("Option error: " + msg)
...@@ -58,14 +61,27 @@ def main(args): ...@@ -58,14 +61,27 @@ def main(args):
# metric = {}
# metric['id'] = 'UE_DLSCH_BITRATE'
# metric['description'] = 'UE downlink physical throughput'
# metric['regex'] = '(UE_DLSCH_BITRATE) =\s+(\d+\.\d+) kbps.+frame = (\d+)\)'
# metric['unit_of_meas'] = 'kbps'
# metric['min_limit'] = 14668.8
#AUTOTEST Metric : RRC Measurments RSRP[0]=-97.60 dBm/RE, RSSI=-72.83 dBm, RSRQ[0] 9.03 dB, N0 -125 dBm/RE, NF 7.2 dB (frame = 4490)
metric = {} metric = {}
metric['id'] = 'UE_DLSCH_BITRATE' metric['id'] = 'UE_DL_RRC_MEAS'
metric['description'] = 'UE downlink physical throughput' metric['description'] = 'UE downlink RRC Measurments'
metric['regex'] = '(UE_DLSCH_BITRATE) =\s+(\d+\.\d+) kbps.+frame = (\d+)\)' metric['nb_metric'] = 5
# metric['regex'] = 'AUTOTEST Metric : RRC Measurments (RSRP\[0\])=(-?\d+\.?\d*)\s+(.+),\s+(RSRQ\[0\])=(-?\d+\.?\d*)\s+(.+),,\s+(N0)=(-?\d+\.?\d*)\s+(.+),,\s+(NF)=(-?\d+\.?\d*)\s+(.+)\s+\(frame = (\d+)\) '
metric['regex'] = 'AUTOTEST Metric : RRC Measurments (RSRP\[0\])=(-?\d+\.?\d*)\s+(.+)\,\s+(RSSI)=(-?\d+\.?\d*)\s+(.+)\,\s+(RSRQ\[0\])=(-?\d+\.?\d*)\s+(.+)\,\s+(N0)=(-?\d+\.?\d*)\s+(.+)\,\s+(NF)=(-?\d+\.?\d*)\s+(.+)\s+\(frame = (\d+)\)'
metric['unit_of_meas'] = 'kbps' metric['unit_of_meas'] = 'kbps'
metric['min_limit'] = 14668.8 metric['min_limit'] = 14668.8
#report_path = log_path+'/report/' #report_path = log_path+'/report/'
#os.system(' mkdir -p ' + report_path) #os.system(' mkdir -p ' + report_path)
...@@ -74,58 +90,44 @@ def main(args): ...@@ -74,58 +90,44 @@ def main(args):
#return(0) #return(0)
for test_case in test_cases: test_results = []
# print test_case
if test_case == '030001':
metric['min_limit'] = 500.0
if test_case == '030901':
metric['min_limit'] = 640.0
if test_case == '031001':
metric['min_limit'] = 3200.0
if test_case == '031601':
metric['min_limit'] = 5920.0
if test_case == '031701':
metric['min_limit'] = 6000.0
if test_case == '031801':
metric['min_limit'] = 6200.0
if test_case == '031901':
metric['min_limit'] = 7000.0
if test_case == '032001':
metric['min_limit'] = 7800.0
if test_case == '032101':
metric['min_limit'] = 8000.0
if test_case == '032201':
metric['min_limit'] = 9000.0
if test_case == '032301':
metric['min_limit'] = 10000.0
if test_case == '032501':
metric['min_limit'] = 11000.0
if test_case == '032601':
metric['min_limit'] = 12000.0
if test_case == '032801':
metric['min_limit'] = 12500.0
if test_case == '035201':
metric['min_limit'] = 14668.8
if test_case == '036001':
metric['min_limit'] = 25363.2
for test_case in test_cases:
for i in range(0, nb_run): for i in range(0, nb_run):
fname = 'log//'+test_case+'/run_'+str(i)+'/UE_exec_'+str(i)+'_.log' fname = '..//log//'+test_case+'/run_'+str(i)+'/UE_exec_'+str(i)+'_.log'
args = {'metric' : metric, args = {'metric' : metric,
'file' : fname } 'file' : fname }
cell_synch_status = analyser.check_cell_synchro(fname) # cell_synch_status = analyser.check_cell_synchro(fname)
if cell_synch_status == 'CELL_SYNCH': # if cell_synch_status == 'CELL_SYNCH':
print '!!!!!!!!!!!!!! Cell synchronized !!!!!!!!!!!' # print '!!!!!!!!!!!!!! Cell synchronized !!!!!!!!!!!'
metric_checks_flag = 0 # metric_checks_flag = 0
else : # else :
print '!!!!!!!!!!!!!! Cell NOT NOT synchronized !!!!!!!!!!!' # print '!!!!!!!!!!!!!! Cell NOT NOT synchronized !!!!!!!!!!!'
# metric_extracted = analyser.do_extract_metrics(args) # metrics_extracted = analyser.do_extract_metrics_new(args)
# de-xmlfy test report
xml_file = '..//log//'+test_case+'/test.'+test_case+'_ng.xml'
print xml_file
# test_result =
# test_results.append(test_result)
# xmlFile = logdir_local_testcase + '/test.' + testcasename + '.xml'
# xml="\n<testcase classname=\'"+ testcaseclass + "\' name=\'" + testcasename + "."+tags + "\' Run_result=\'" + test_result_string + "\' time=\'" + str(duration) + " s \' RESULT=\'" + testcase_verdict + "\'></testcase> \n"
# write_file(xmlFile, xml, mode="w")
# xmlFile_ng = logdir_local_testcase + '/test.' + testcasename + '_ng.xml'
# xml_ng = xmlify(test_result, wrap=testcasename, indent=" ")
# write_file(xmlFile_ng, xml_ng, mode="w")
# print "min = "+ str( metric_extracted['metric_min'] ) # print "min = "+ str( metric_extracted['metric_min'] )
# print "min_index = "+ str( metric_extracted['metric_min_index'] ) # print "min_index = "+ str( metric_extracted['metric_min_index'] )
...@@ -143,16 +145,27 @@ def main(args): ...@@ -143,16 +145,27 @@ def main(args):
# print fname # print fname
# analyser.do_img_metrics(metric, metric_extracted, fname) # analyser.do_img_metrics(metric, metric_extracted, fname)
# fname = 'log//'+test_case+'/run_'+str(i)+'/UE_traffic_'+str(i)+'_.log' # fname = 'log//'+test_case+'/run_'+str(i)+'/UE_traffic_'+str(i)+'_.log'
# args = {'file' : fname } # args = {'file' : fname }
# traffic_metrics = analyser.do_extract_traffic_metrics(args) # traffic_metrics = analyser.do_extract_traffic_metrics(args)
# fname= 'report/iperf_'+test_case+'_'+str(i)+'.png' # fname= 'report/iperf_'+test_case+'_'+str(i)+'.png'
# print fname # print fname
# analyser.do_img_traffic(traffic_metrics, fname) # analyser.do_img_traffic(traffic_metrics, fname)
for test_result in test_results:
cmd = 'mkdir -p ' + report_dir + '/'+ test_result['testcase_name']
result = os.system(cmd)
report_file = report_dir + '/'+ test_result['testcase_name'] + '/'+ test_result['testcase_name']+ '_report.html'
analyser.create_test_report_detailed_html(test_result, report_file )
print test_result
......
...@@ -41,7 +41,7 @@ from jinja2 import Environment, FileSystemLoader ...@@ -41,7 +41,7 @@ from jinja2 import Environment, FileSystemLoader
PATH = os.path.dirname(os.path.abspath(__file__)) PATH = os.path.dirname(os.path.abspath(__file__))
TEMPLATE_ENVIRONMENT = Environment( TEMPLATE_ENVIRONMENT = Environment(
autoescape=False, autoescape=False,
loader=FileSystemLoader(os.path.join(PATH, 'templates')), loader=FileSystemLoader(os.path.join(PATH, '../templates')),
trim_blocks=False) trim_blocks=False)
...@@ -103,6 +103,129 @@ def do_extract_metrics(args): ...@@ -103,6 +103,129 @@ def do_extract_metrics(args):
} }
return(ret) return(ret)
def do_extract_metrics_new(args):
# print ""
# print "do_extract_metrics ... "
fname = args['file']
metric = args['metric']
print(fname)
print 'metric id = ' + metric['id']
print 'metric regex = ' + metric['regex']
count = 0
mmin = 0
mmin_index = 0
mmax = 0
mmax_index = 0
mean = 0
median = 0
toto = [('id', 'S20'), ('metric', np.float), ('frame', np.int)]
print toto
np_format = []
for x in range(0, metric['nb_metric']):
np_format.append( ('id'+str(x), 'S20') )
np_format.append( ('metric'+str(x), np.float) )
np_format.append( ('uom'+str(x), 'S20') )
np_format.append( ('frame', np.int))
print np_format
output = np.fromregex(fname,metric['regex'], np_format)
print output
count = output['frame'].size
print count
if count > 0:
fontP = FontProperties()
fontP.set_size('small')
fig = plt.figure(1)
plt.figure(figsize=(10,10))
plot_xmax = np.amax(output['frame'])+np.amin(output['frame'])
for x in range(0, metric['nb_metric']):
metric_name = output['id'+str(x)][0]
metric_uom = output['uom'+str(x)][0]
mmin = np.amin(output['metric'+str(x)])
mmax = np.amax(output['metric'+str(x)])
mmean = np.mean(output['metric'+str(x)])
mmedian = np.median(output['metric'+str(x)])
plot_loc = 100*metric['nb_metric']+10+x+1
sbplt = plt.subplot(plot_loc)
sbplt.plot(output['frame'], output['metric'+str(x)], color='b' )
sbplt.set_title( metric_name+' ('+metric_uom+')')
if mmin < 0:
sbplot_ymin=mmin+mmin/10
else:
sbplot_ymin=0
sbplt.set_ylim(ymin=sbplot_ymin)
if mmax > 0:
sbplot_ymax=mmax+mmax/10
else:
sbplot_ymax=0
sbplt.set_ylim(ymax=sbplot_ymax)
sbplt.set_xlim(xmax=plot_xmax)
sbplt.set_xlim(xmin=0)
text='min: '+str(mmin)+'\nmax: '+str(mmax)+'\nmean: '+str(mmean)+'\nmedian: '+str(mmedian)
sbplt.text( plot_xmax+10,sbplot_ymin,text)
sbplt.set_xlabel('frame')
sbplt.set_ylabel(metric_name)
plt.tight_layout()
fname = "toto.png"
# lgd = plt.legend(prop=fontP, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
mng = plt.get_current_fig_manager()
plt.savefig(fname, bbox_inches='tight')
plt.close()
mmin = np.amin(output['metric']);
mmin_index = np.argmin(output['metric']);
mmax = np.amax(output['metric']);
mmax_index = np.argmax(output['metric']);
mean = np.mean(output['metric']);
median = np.median(output['metric']);
# print ( ( (metric['min_limit'] > output['metric']).sum() / float(output['metric'].size) ) * 100 )
ret = { 'metric_count' : count,
'metric_buf' : output,
'metric_min' : mmin,
'metric_min_index' : mmin_index,
'metric_max' : mmax,
'metric_max_index' : mmax_index,
'metric_mean' : mean,
'metric_median' : median,
}
return(ret)
# #
# #
# #
...@@ -182,24 +305,30 @@ def do_img_metrics(metric_def, metric_data, fname): ...@@ -182,24 +305,30 @@ def do_img_metrics(metric_def, metric_data, fname):
# print output['metric'].size # print output['metric'].size
plt.scatter(output['frame'], output['metric'], color='b', alpha=0.33, s = 1 , label=metric_def['id']) plt.scatter(output['frame'], output['metric'], color='b', alpha=0.33, s = 1 , label=metric_def['id'])
plt.plot([0, output['frame'][metric_data['metric_count']-1]],[ metric_def['min_limit'],metric_def['min_limit']], 'r-', lw=2, label='min limit') # Red straight line
if 'min_limit' in metric_def:
plt.plot([0, output['frame'][metric_data['metric_count']-1]],[ metric_def['min_limit'],metric_def['min_limit']], 'r-', lw=2, label='min limit') # Red straight line
plt.title('Physical throughput ('+metric_def['unit_of_meas']+')') plt.title(metric_def['id'] +' ('+metric_def['unit_of_meas']+')')
plt.xlabel('frame') plt.xlabel('frame')
plt.ylabel(metric_def['id']) plt.ylabel(metric_def['id'])
# Set graphic minimum Y axis # Set graphic minimum Y axis
# ------------------------- # -------------------------
if metric_data['metric_min'] == 0 : if metric_data['metric_min'] < 0:
plt.ylim(ymin=-metric_def['min_limit']/10) plt.ylim(ymin=metric_data['metric_min']+metric_data['metric_min']/10)
else : else :
plt.ylim(ymin=0) plt.ylim(ymin=0)
y_axis_max = 0 y_axis_max = 0
if metric_data['metric_max'] > metric_def['min_limit']: if 'min_limit' in metric_def:
y_axis_max =metric_data['metric_max']+metric_data['metric_max']/10 if metric_data['metric_max'] > metric_def['min_limit']:
y_axis_max =metric_data['metric_max']+metric_data['metric_max']/10
else:
y_axis_max =metric_def['min_limit']+metric_def['min_limit']/10
else: else:
y_axis_max =metric_def['min_limit']+metric_def['min_limit']/10 y_axis_max =metric_data['metric_max']+metric_data['metric_max']/10
plt.ylim(ymax=y_axis_max) plt.ylim(ymax=y_axis_max)
...@@ -219,9 +348,6 @@ def do_img_metrics(metric_def, metric_data, fname): ...@@ -219,9 +348,6 @@ def do_img_metrics(metric_def, metric_data, fname):
def do_extract_traffic_metrics(args): def do_extract_traffic_metrics(args):
print ""
print "do_extract_traffic_metrics ... "
fname = args['file'] fname = args['file']
# print(fname) # print(fname)
...@@ -325,7 +451,8 @@ def do_img_traffic(traffic_data, fname): ...@@ -325,7 +451,8 @@ def do_img_traffic(traffic_data, fname):
ax1.set_xlim(xmax=np.amax(output['interval_stop'])) ax1.set_xlim(xmax=np.amax(output['interval_stop']))
text='min: '+str(traffic_data['bw_min'])+'\nmax: '+str(traffic_data['bw_max'])+'\nmean: '+str(traffic_data['bw_mean'])+'\nmedian: '+str(traffic_data['bw_median']) text='min: '+str(traffic_data['bw_min'])+'\nmax: '+str(traffic_data['bw_max'])+'\nmean: '+str(traffic_data['bw_mean'])+'\nmedian: '+str(traffic_data['bw_median'])
ax1.text( np.amax(output['interval_stop'])+10,0,text) ax1.text( np.amax(output['interval_stop'])+10,0,text)
ax1.set_xlabel('time (s)')
ax1.set_ylabel(' ')
ax2=plt.subplot(312) ax2=plt.subplot(312)
plt.plot(output['interval_stop'], output['jitter'], color='b' ) plt.plot(output['interval_stop'], output['jitter'], color='b' )
...@@ -334,6 +461,8 @@ def do_img_traffic(traffic_data, fname): ...@@ -334,6 +461,8 @@ def do_img_traffic(traffic_data, fname):
ax2.set_ylim(ymin=-1) ax2.set_ylim(ymin=-1)
text='min: '+str(traffic_data['jitter_min'])+'\nmax: '+str(traffic_data['jitter_max'])+'\nmean: '+str(traffic_data['jitter_mean'])+'\nmedian: '+str(traffic_data['jitter_median']) text='min: '+str(traffic_data['jitter_min'])+'\nmax: '+str(traffic_data['jitter_max'])+'\nmean: '+str(traffic_data['jitter_mean'])+'\nmedian: '+str(traffic_data['jitter_median'])
ax2.text( np.amax(output['interval_stop'])+10,0,text) ax2.text( np.amax(output['interval_stop'])+10,0,text)
ax2.set_xlabel('time (s)')
ax2.set_ylabel(' ')
ax3=plt.subplot(313) ax3=plt.subplot(313)
plt.plot(output['interval_stop'], output['rate_lost'], color='b') plt.plot(output['interval_stop'], output['rate_lost'], color='b')
...@@ -342,10 +471,11 @@ def do_img_traffic(traffic_data, fname): ...@@ -342,10 +471,11 @@ def do_img_traffic(traffic_data, fname):
ax3.set_ylim(ymin=-1) ax3.set_ylim(ymin=-1)
text='min: '+str(traffic_data['rl_min'])+'\nmax: '+str(traffic_data['rl_max'])+'\nmean: '+str(traffic_data['rl_mean'])+'\nmedian: '+str(traffic_data['rl_median']) text='min: '+str(traffic_data['rl_min'])+'\nmax: '+str(traffic_data['rl_max'])+'\nmean: '+str(traffic_data['rl_mean'])+'\nmedian: '+str(traffic_data['rl_median'])
ax3.text( np.amax(output['interval_stop'])+10,0,text) ax3.text( np.amax(output['interval_stop'])+10,0,text)
ax3.set_xlabel('time (s)')
ax3.set_ylabel(' ')
# plt.title('Physical throughput ('+metric_def['unit_of_meas']+')') # plt.title('Physical throughput ('+metric_def['unit_of_meas']+')')
plt.xlabel('time (s)') # plt.xlabel('time (s)')
# plt.ylabel(metric_def['id']) # plt.ylabel(metric_def['id'])
# Set graphic minimum Y axis # Set graphic minimum Y axis
...@@ -365,7 +495,7 @@ def do_img_traffic(traffic_data, fname): ...@@ -365,7 +495,7 @@ def do_img_traffic(traffic_data, fname):
plt.tight_layout() plt.tight_layout()
lgd = plt.legend(prop=fontP, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) # lgd = plt.legend(prop=fontP, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
mng = plt.get_current_fig_manager() mng = plt.get_current_fig_manager()
plt.savefig(fname, bbox_inches='tight') plt.savefig(fname, bbox_inches='tight')
plt.close() plt.close()
...@@ -395,7 +525,7 @@ def check_cell_synchro(fname): ...@@ -395,7 +525,7 @@ def check_cell_synchro(fname):
m = re.search('AUTOTEST Cell Sync \:', line) m = re.search('AUTOTEST Cell Sync \:', line)
if m : if m :
print line #print line
return 'CELL_SYNCH' return 'CELL_SYNCH'
return 'CELL_NOT_SYNCH' return 'CELL_NOT_SYNCH'
...@@ -407,7 +537,7 @@ def check_exec_seg_fault(fname): ...@@ -407,7 +537,7 @@ def check_exec_seg_fault(fname):
for line in f: for line in f:
m = re.search('Segmentation fault', line) m = re.search('Segmentation fault', line)
if m : if m :
print line #print line
return 'SEG_FAULT' return 'SEG_FAULT'
return 'NO_SEG_FAULT' return 'NO_SEG_FAULT'
......
...@@ -53,6 +53,7 @@ BUILD_DOXYGEN=0 ...@@ -53,6 +53,7 @@ BUILD_DOXYGEN=0
T_TRACER="False" T_TRACER="False"
DISABLE_HARDWARE_DEPENDENCY="False" DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE="" CMAKE_BUILD_TYPE=""
UE_AUTOTEST_TRACE="False"
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
...@@ -127,6 +128,8 @@ Options ...@@ -127,6 +128,8 @@ Options
Enables the T tracer. Enables the T tracer.
--disable-hardware-dependency --disable-hardware-dependency
Disable HW dependency during installation Disable HW dependency during installation
--ue-autotest-trace
Enable specific traces for UE autotest framework
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
...@@ -278,6 +281,10 @@ function main() { ...@@ -278,6 +281,10 @@ function main() {
echo_info "Disabling hardware dependency for compiling software" echo_info "Disabling hardware dependency for compiling software"
DISABLE_HARDWARE_DEPENDENCY="True" DISABLE_HARDWARE_DEPENDENCY="True"
shift 1;; shift 1;;
--ue-autotest-trace)
UE_AUTOTEST_TRACE="True"
echo_info "Enabling autotest specific trace for UE"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -447,6 +454,7 @@ function main() { ...@@ -447,6 +454,7 @@ function main() {
echo "set (DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file echo "set (DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$lte_build_dir/build cd $DIR/$lte_build_dir/build
cmake .. cmake ..
......
...@@ -486,7 +486,7 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho ...@@ -486,7 +486,7 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho
#endif #endif
if (frame_length > 6143) { if (frame_length > 6144) {
LOG_E(PHY,"compute_beta: frame_length %d\n",frame_length); LOG_E(PHY,"compute_beta: frame_length %d\n",frame_length);
return; return;
} }
...@@ -972,6 +972,11 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y, ...@@ -972,6 +972,11 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
} else } else
n2 = n; n2 = n;
if(n2<256)
{
printf("phy_threegpplte_turbo_decoder8 : frame length < 256\n");
return 255;
}
for (iind=0; iind < 188 && f1f2mat[iind].nb_bits != n; iind++); for (iind=0; iind < 188 && f1f2mat[iind].nb_bits != n; iind++);
......
...@@ -469,6 +469,15 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -469,6 +469,15 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
//#endif //#endif
if (ue->UE_scan_carrier == 0) { if (ue->UE_scan_carrier == 0) {
#if UE_AUTOTEST_TRACE
LOG_I(PHY,"[UE %d] AUTOTEST Cell Sync : frame = %d, rx_offset %d, freq_offset %d \n",
ue->Mod_id,
ue->proc.proc_rxtx[0].frame_rx,
ue->rx_offset,
ue->common_vars.freq_offset );
#endif
if (ue->mac_enabled==1) { if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id); LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
//mac_resynch(); //mac_resynch();
......
...@@ -2944,6 +2944,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -2944,6 +2944,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n", LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n",
ue->Mod_id,frame_rx,ue->total_TBS[eNB_id], ue->Mod_id,frame_rx,ue->total_TBS[eNB_id],
ue->total_TBS_last[eNB_id],(float) ue->bitrate[eNB_id]/1000.0); ue->total_TBS_last[eNB_id],(float) ue->bitrate[eNB_id]/1000.0);
#if UE_AUTOTEST_TRACE
if ((frame_rx % 100 == 0)) {
LOG_I(PHY,"[UE %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[eNB_id]/1000.0, frame_rx);
}
#endif
} }
......
...@@ -1601,6 +1601,11 @@ int main( int argc, char **argv ) ...@@ -1601,6 +1601,11 @@ int main( int argc, char **argv )
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,abstraction_flag); PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,abstraction_flag);
PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id; PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id;
PHY_vars_eNB_g[0][CC_id]->ue_dl_rb_alloc=0x1fff;
PHY_vars_eNB_g[0][CC_id]->target_ue_dl_mcs=target_dl_mcs;
PHY_vars_eNB_g[0][CC_id]->ue_ul_nb_rb=6;
PHY_vars_eNB_g[0][CC_id]->target_ue_ul_mcs=target_ul_mcs;
if (phy_test==1) PHY_vars_eNB_g[0][CC_id]->mac_enabled = 0; if (phy_test==1) PHY_vars_eNB_g[0][CC_id]->mac_enabled = 0;
else PHY_vars_eNB_g[0][CC_id]->mac_enabled = 1; else PHY_vars_eNB_g[0][CC_id]->mac_enabled = 1;
......
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