Merge remote-tracking branch 'origin/hotfix-71-freq_channel' into feature-59-tm4
Conflicts: openair1/PHY/TOOLS/cdot_prod.c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf
This commit is contained in:
@@ -27,24 +27,24 @@ Obj.# Case# Test# Description
|
||||
|
||||
|
||||
|
||||
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation
|
||||
01 02 00 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit
|
||||
01 02 01 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors
|
||||
01 02 02 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit
|
||||
01 02 03 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors
|
||||
01 02 04 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE,
|
||||
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
|
||||
01 02 00 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 02 01 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 02 02 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 02 03 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 02 04 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) without PHY_ABSTRACTION mode, ping from from eNB to UE,
|
||||
and for check for no packet losses
|
||||
01 02 05 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE,
|
||||
01 02 05 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode, send ping from from eNB to UE,
|
||||
and check for no packet losses
|
||||
|
||||
01 03 Run OAISIM-NOS1 Rel10 (FDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation
|
||||
01 03 00 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit
|
||||
01 03 01 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors
|
||||
01 03 02 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit
|
||||
01 03 03 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors
|
||||
01 03 04 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE,
|
||||
01 03 Run OAISIM-NOS1 Rel10 (FDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
|
||||
01 03 00 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 03 01 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 03 02 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 03 03 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 03 04 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) without PHY_ABSTRACTION mode, ping from from eNB to UE,
|
||||
and for check for no packet losses
|
||||
01 03 05 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE,
|
||||
01 03 05 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode, send ping from from eNB to UE,
|
||||
and check for no packet losses
|
||||
|
||||
|
||||
@@ -97,31 +97,49 @@ Obj.# Case# Test# Description
|
||||
01 51 06 mbmssim (TBD)
|
||||
|
||||
|
||||
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 1TX/2RX, 2TX/1RX 2TX/2RX
|
||||
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX, 2TX/2RX
|
||||
01 55 00 Band 7 FDD 5MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 55 00 Band 7 FDD 10MHz UL Throughput for 60 sec
|
||||
01 55 00 Band 7 FDD 20MHz UL Throughput for 60 sec
|
||||
01 55 00 Band 7 FDD 5MHz DL Throughput for 60 sec
|
||||
01 55 00 Band 7 FDD 10MHz DL Throughput for 60 sec
|
||||
01 55 00 Band 7 FDD 20MHz DL Throughput for 60 sec
|
||||
|
||||
01 55 01 Band 7 FDD 10MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 55 02 Band 7 FDD 20MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 55 03 Band 7 FDD 5MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
01 55 04 Band 7 FDD 10MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
01 55 05 Band 7 FDD 20MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
01 55 06 Band 7 FDD 5MHz UL Throughput for 60 sec for 2TX/2RX
|
||||
01 55 07 Band 7 FDD 10MHz UL Throughput for 60 sec for 2TX/2RX
|
||||
01 55 08 Band 7 FDD 20MHz UL Throughput for 60 sec for 2TX/2RX
|
||||
01 55 09 Band 7 FDD 5MHz DL Throughput for 60 sec for 2TX/2RX
|
||||
01 55 10 Band 7 FDD 10MHz DL Throughput for 60 sec for 2TX/2RX
|
||||
01 55 11 Band 7 FDD 20MHz DL Throughput for 60 sec for 2TX/2RX
|
||||
|
||||
01 56 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
|
||||
|
||||
|
||||
01 57 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
|
||||
|
||||
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 1TX/2RX, 2TX/1RX 2TX/2RX
|
||||
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
|
||||
01 58 00 Band 7 FDD 5MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 58 01 Band 7 FDD 10MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 58 02 Band 7 FDD 20MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 58 03 Band 7 FDD 5MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
01 58 04 Band 7 FDD 10MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
01 58 05 Band 7 FDD 20MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
|
||||
01 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
|
||||
|
||||
01 61 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
|
||||
|
||||
01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE
|
||||
01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
|
||||
01 61 00 Band 7 FDD 5MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 61 01 Band 7 FDD 10MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 61 02 Band 7 FDD 20MHz UL Throughput for 60 sec for 1TX/1RX
|
||||
01 61 03 Band 7 FDD 5MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
01 61 04 Band 7 FDD 10MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
01 61 05 Band 7 FDD 20MHz DL Throughput for 60 sec for 1TX/1RX
|
||||
|
||||
01 62 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
|
||||
01 63 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
|
||||
|
||||
01 58 lte-softmodem-noS1 tests
|
||||
01 64 lte-softmodem-noS1 tests
|
||||
|
||||
02 Functional test case
|
||||
|
||||
|
||||
@@ -181,7 +181,8 @@ class core:
|
||||
rsp2 = self.prompt2
|
||||
self.wait_quiet()
|
||||
if sudo == True:
|
||||
command = 'echo \'' + self.password + '\' | sudo -S -E ' + command
|
||||
#command = 'echo \'' + self.password + '\' | sudo -S -E ' + command
|
||||
command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
|
||||
if self.send_cr:
|
||||
log.stats['cmd'] += 1
|
||||
self.oai.sendline(command)
|
||||
|
||||
@@ -43,6 +43,7 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import traceback
|
||||
import time
|
||||
# import call
|
||||
|
||||
from core import *
|
||||
@@ -82,6 +83,7 @@ class openair(core):
|
||||
return (stdout, stderr)
|
||||
|
||||
def connect(self, username, password, prompt='PEXPECT_OAI'):
|
||||
while True:
|
||||
self.prompt1 = prompt
|
||||
self.prompt2 = prompt
|
||||
self.password = ''
|
||||
@@ -103,13 +105,15 @@ class openair(core):
|
||||
self.oai.sendline('uptime')
|
||||
self.oai.prompt()
|
||||
print self.oai.before
|
||||
|
||||
break
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
print "Retrying again in 60 seconds"
|
||||
time.sleep(60)
|
||||
#sys.exit(1)
|
||||
|
||||
def connect2(self, username, password, prompt='$'):
|
||||
self.prompt1 = prompt
|
||||
@@ -190,7 +194,7 @@ class openair(core):
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
#sys.exit(1)
|
||||
|
||||
def rm_driver(self,oai,user, pw):
|
||||
try:
|
||||
@@ -205,7 +209,7 @@ class openair(core):
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
#sys.exit(1)
|
||||
|
||||
def driver(self,oai,user,pw):
|
||||
#pwd = oai.send_recv('pwd')
|
||||
@@ -222,7 +226,7 @@ class openair(core):
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
#sys.exit(1)
|
||||
|
||||
def cleandir (self, logdir,debug) :
|
||||
|
||||
@@ -238,8 +242,8 @@ class openair(core):
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
|
||||
#sys.exit(1)
|
||||
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
|
||||
|
||||
def create_dir(self,dirname,debug) :
|
||||
if not os.path.exists(dirname) :
|
||||
|
||||
@@ -400,12 +400,13 @@ else
|
||||
fi
|
||||
|
||||
tmpfile=`mktemp`
|
||||
echo \'$passwd\' | sudo echo $HOME >& $tmpfile
|
||||
echo \'$passwd\' | $SUDO echo $HOME >& $tmpfile
|
||||
tstsudo=`cat $tmpfile`
|
||||
if [ "$tstsudo" != "$HOME" ]; then
|
||||
echo "User might not have sudo privileges. Exiting"
|
||||
echo "tstsudo = $tstsudo"
|
||||
echo "$USER might not have sudo privileges. Exiting"
|
||||
exit
|
||||
else
|
||||
echo "$USER has sudo privileges"
|
||||
fi
|
||||
echo "tstsudo = $tstsudo"
|
||||
rm -fr $tmpfile
|
||||
@@ -495,6 +496,7 @@ for search_expr in "${test_case_array[@]}"
|
||||
if [ "$class" == "compilation" ]; then
|
||||
test_compile "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags"
|
||||
elif [ "$class" == "execution" ]; then
|
||||
$SUDO killall -q oaisim_nos1
|
||||
test_compile_and_run "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags" "$mypassword"
|
||||
else
|
||||
echo "Unexpected class of test case...Skipping the test case $name ...."
|
||||
|
||||
@@ -52,11 +52,6 @@ import re
|
||||
import numpy as np
|
||||
|
||||
import log
|
||||
import case01
|
||||
import case02
|
||||
import case03
|
||||
import case04
|
||||
import case05
|
||||
|
||||
from openair import *
|
||||
|
||||
@@ -81,8 +76,8 @@ def write_file(filename, string, mode="w"):
|
||||
#$5 minimum duration of throughput
|
||||
#The throughput values found in file must be higher than values from from 2,3,4,5
|
||||
#The function returns True if throughput conditions are saisfied else it returns fails
|
||||
|
||||
def tput_test(filename, min_tput, max_tput, average, min_duration):
|
||||
|
||||
if os.path.exists(filename):
|
||||
with open (filename, "r") as myfile:
|
||||
data=myfile.read()
|
||||
@@ -98,13 +93,13 @@ def tput_test(filename, min_tput, max_tput, average, min_duration):
|
||||
min_list = 0
|
||||
max_list = 0
|
||||
average_list=0
|
||||
|
||||
tput_string=' ( '+ "min=%0.2f" % min_list + ' Mbps / ' + "max=%0.2f" % max_list + ' Mbps / ' + "avg=%0.2f" % average_list + ' Mbps / ' + "dur=%0.2f" % duration + ' s) '
|
||||
if (min_list >= min_tput and max_list >= max_tput and average_list >= average and duration >= min_duration):
|
||||
return True
|
||||
return True , tput_string
|
||||
else:
|
||||
return False
|
||||
return False , tput_string
|
||||
else:
|
||||
return False
|
||||
return False , tput_string
|
||||
|
||||
|
||||
def try_convert_to_float(string, fail=None):
|
||||
@@ -115,6 +110,7 @@ def try_convert_to_float(string, fail=None):
|
||||
|
||||
def tput_test_search_expr (search_expr, logfile_traffic):
|
||||
result=0
|
||||
tput_string=''
|
||||
if search_expr !='':
|
||||
if search_expr.find('throughput_test')!= -1 :
|
||||
p= re.compile('min\s*=\s*(\d*.\d*)\s*Mbits/sec')
|
||||
@@ -151,9 +147,11 @@ def tput_test_search_expr (search_expr, logfile_traffic):
|
||||
duration = try_convert_to_float(duration)
|
||||
|
||||
if (min_tput != None and max_tput != None and avg_tput != None and duration != None ):
|
||||
result = tput_test(logfile_traffic, min_tput, max_tput, avg_tput, duration)
|
||||
return result
|
||||
result, tput_string = tput_test(logfile_traffic, min_tput, max_tput, avg_tput, duration)
|
||||
else:
|
||||
result=1
|
||||
|
||||
return result, tput_string
|
||||
|
||||
|
||||
def sftp_module (username, password, hostname, ports, paramList,logfile):
|
||||
@@ -254,12 +252,28 @@ def update_config_file(oai, config_string, logdirRepo, python_script):
|
||||
return cmd
|
||||
#result = oai.send_recv(cmd)
|
||||
|
||||
def SSHSessionWrapper(machine, username, key_file, password, logdir_remote_testcase, logdir_local_base):
|
||||
while True:
|
||||
try:
|
||||
ssh = SSHSession(machine , username, key_file, password)
|
||||
ssh.get_all(logdir_remote_testcase , logdir_local_base)
|
||||
break
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In Class = function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + '\n username = ' + username + '\n machine = ' + machine + '\n logdir_remote = ' + logdir_remote_testcase + '\n logdir_local_base = ' + logdir_local_base
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
print " Trying again in 60 seconds"
|
||||
time.sleep(60)
|
||||
print "Continuing ..."
|
||||
|
||||
|
||||
|
||||
#Function to clean old programs that might be running from earlier execution
|
||||
#oai - parameter for making connection to machine
|
||||
#programList - list of programs that must be terminated before execution of any test case
|
||||
def cleanOldPrograms(oai, programList, CleanUpAluLteBox):
|
||||
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
|
||||
cmd = 'killall -q -r ' + programList
|
||||
result = oai.send(cmd, True)
|
||||
print "Killing old programs..." + result
|
||||
@@ -271,7 +285,7 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox):
|
||||
result = oai.send_expect_false(cmd, 'Match found', False)
|
||||
print result
|
||||
res=oai.send_recv(CleanUpAluLteBox, True)
|
||||
|
||||
res = oai.send_recv(ExmimoRfStop, True)
|
||||
|
||||
class myThread (threading.Thread):
|
||||
def __init__(self, threadID, name, counter):
|
||||
@@ -313,7 +327,7 @@ class oaiThread (threading.Thread):
|
||||
|
||||
#This class runs test cases with class execution, compilatation
|
||||
class testCaseThread_generic (threading.Thread):
|
||||
def __init__(self, threadID, name, machine, logdirOAI5GRepo, testcasename,oldprogramList, CleanupAluLteBox, password, timeout):
|
||||
def __init__(self, threadID, name, machine, logdirOAI5GRepo, testcasename,oldprogramList, CleanupAluLteBox, password, timeout, ExmimoRfStop):
|
||||
threading.Thread.__init__(self)
|
||||
self.threadID = threadID
|
||||
self.name = name
|
||||
@@ -324,6 +338,7 @@ class testCaseThread_generic (threading.Thread):
|
||||
self.oldprogramList = oldprogramList
|
||||
self.CleanupAluLteBox = CleanupAluLteBox
|
||||
self.password=password
|
||||
self.ExmimoRfStop = ExmimoRfStop
|
||||
def run(self):
|
||||
try:
|
||||
mypassword=''
|
||||
@@ -333,7 +348,7 @@ class testCaseThread_generic (threading.Thread):
|
||||
print "Starting test case : " + self.testcasename + " On machine " + self.machine + " timeout = " + str(self.timeout)
|
||||
oai = openair('localdomain',self.machine)
|
||||
oai.connect(user, self.password)
|
||||
cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox)
|
||||
cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop)
|
||||
logdir_local = os.environ.get('OPENAIR_DIR')
|
||||
logdir_local_testcase = logdir_local +'/cmake_targets/autotests/log/'+ self.testcasename
|
||||
logdir_local_base = logdir_local +'/cmake_targets/autotests/log/'
|
||||
@@ -363,26 +378,30 @@ class testCaseThread_generic (threading.Thread):
|
||||
#print "ThreadID = " + str(self.threadID) + "ThreadName: " + self.name + " testcasename: " + self.testcasename + "Execution Result = " + res
|
||||
write_file(logfile_task_testcasename, cmd, mode="w")
|
||||
#Now we copy all the remote files
|
||||
ssh = SSHSession(self.machine , username=user, key_file=None, password=self.password)
|
||||
ssh.get_all(logdir_remote_testcase , logdir_local_base)
|
||||
#ssh = SSHSession(self.machine , username=user, key_file=None, password=self.password)
|
||||
#ssh.get_all(logdir_remote_testcase , logdir_local_base)
|
||||
SSHSessionWrapper(self.machine, user, None, self.password, logdir_remote_testcase, logdir_local_base)
|
||||
print "Finishing test case : " + self.testcasename + " On machine " + self.machine
|
||||
cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox)
|
||||
cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop)
|
||||
#oai.kill(user,mypassword)
|
||||
oai.disconnect()
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In Class = testCaseThread_generic, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + '\n threadID = ' + str(self.threadID) + '\n threadName = ' + self.name + '\n testcasename = ' + self.testcasename + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo + '\n' + '\n timeout = ' + str(timeout)
|
||||
error = error + '\n threadID = ' + str(self.threadID) + '\n threadName = ' + self.name + '\n testcasename = ' + self.testcasename + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo + '\n' + '\n timeout = ' + str(self.timeout)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit()
|
||||
print "Continuing with next test case..."
|
||||
#sys.exit()
|
||||
|
||||
|
||||
|
||||
|
||||
def addsudo (cmd, password=""):
|
||||
cmd = 'echo \'' + password + '\' | sudo -S -E bash -c \' ' + cmd + '\' '
|
||||
return cmd
|
||||
|
||||
def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, password, CleanupAluLteBox,timeout):
|
||||
def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, password, CleanupAluLteBox,timeout, ExmimoRfStop):
|
||||
try:
|
||||
mypassword=password
|
||||
MachineListFree=[]
|
||||
@@ -420,7 +439,7 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis
|
||||
print "MachineListBusy = " + ','.join(MachineListBusy)
|
||||
print "MachineList = " + ','.join(MachineList)
|
||||
machine = MachineListFree[0]
|
||||
thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+ "machine_", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout)
|
||||
thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+ "machine_", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout, ExmimoRfStop)
|
||||
param={"thread_id":thread, "Machine":machine, "testcasename":testcasename}
|
||||
thread.start()
|
||||
threadListNew.append(param)
|
||||
@@ -431,26 +450,29 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis
|
||||
error = error + '\n testcasename = ' + testcasename + '\n logdirOAI5GRepo = ' + logdirOAI5GRepo + '\n MachineList = ' + ','.join(MachineList) + '\n timeout = ' + str(timeout) + '\n'
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
print "Continuing..."
|
||||
#sys.exit(1)
|
||||
|
||||
#Blocking wait for all threads related to generic testcase execution, class (compilation and execution)
|
||||
def wait_testcaseclass_generic_threads(threadListGeneric, timeout = 1):
|
||||
threadListGenericNew=[]
|
||||
for param in threadListGeneric:
|
||||
thread_id = param["thread_id"]
|
||||
machine = param["Machine"]
|
||||
testcasenameold = param["testcasename"]
|
||||
thread_id.join(timeout)
|
||||
if thread_id.isAlive() == True:
|
||||
threadListGenericNew.append(param)
|
||||
print "thread_id on machine: " + machine + " is still alive: testcasename: " + testcasenameold
|
||||
print " Exiting now..."
|
||||
sys.exit(1)
|
||||
else:
|
||||
print "thread_id on machine: " + machine + " is stopped: testcasename: " + testcasenameold
|
||||
threadListGeneric.remove(param)
|
||||
return threadListGeneric
|
||||
#threadListGeneric.remove(param)
|
||||
return threadListGenericNew
|
||||
|
||||
#Function to handle test case class : lte-softmodem
|
||||
def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, password, CleanUpAluLteBox):
|
||||
def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, password, CleanUpAluLteBox, ExmimoRfStop):
|
||||
#We ignore the password sent to this function for secuirity reasons for password present in log files
|
||||
#It is recommended to add a line in /etc/sudoers that looks something like below. The line below will run sudo without password prompt
|
||||
# your_user_name ALL=(ALL:ALL) NOPASSWD: ALL
|
||||
@@ -492,6 +514,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
|
||||
UE_traffic_exec_args = testcase.findtext('UE_traffic_exec_args',default='')
|
||||
UE_terminate_missing_procs = testcase.findtext('UE_terminate_missing_procs',default='True')
|
||||
UE_search_expr_true = testcase.findtext('UE_search_expr_true','')
|
||||
UE_stop_script = testcase.findtext('UE_stop_script','')
|
||||
|
||||
EPCMachine = testcase.findtext('EPC',default='')
|
||||
EPC_config_file = testcase.findtext('EPC_config_file',default='')
|
||||
@@ -514,16 +537,20 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
|
||||
index_eNBMachine = MachineList.index(eNBMachine)
|
||||
index_UEMachine = MachineList.index(UEMachine)
|
||||
index_EPCMachine = MachineList.index(EPCMachine)
|
||||
cmd = 'cd ' + logdirOAI5GRepo + '; source oaienv ; env|grep OPENAIR'
|
||||
oai_eNB = openair('localdomain', eNBMachine)
|
||||
oai_eNB.connect(user, password)
|
||||
res= oai_eNB.send_recv(cmd)
|
||||
oai_UE = openair('localdomain', UEMachine)
|
||||
oai_UE.connect(user, password)
|
||||
res = oai_eNB.send_recv(cmd)
|
||||
oai_EPC = openair('localdomain', EPCMachine)
|
||||
oai_EPC.connect(user, password)
|
||||
res = oai_eNB.send_recv(cmd)
|
||||
|
||||
cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox)
|
||||
cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox)
|
||||
cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox)
|
||||
cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
|
||||
cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
|
||||
cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
|
||||
logdir_eNB = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename
|
||||
logdir_UE = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename
|
||||
logdir_EPC = logdirOpenaircnRepo+'/TEST/autotests/log/'+ testcasename
|
||||
@@ -573,6 +600,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
|
||||
logfile_task_eNB_compile = logdir_local_testcase + '/eNB_task_compile' + '_' + str(run) + '_.log'
|
||||
logfile_task_eNB_out = logdir_eNB + '/eNB_task_out' + '_' + str(run) + '_.log'
|
||||
logfile_task_eNB = logdir_local_testcase + '/eNB_task' + '_' + str(run) + '_.log'
|
||||
logfile_local_traffic_eNB_out = logdir_local_testcase + '/eNB_traffic' + '_' + str(run) + '_.log'
|
||||
|
||||
task_eNB_compile = ' ( uname -a ; date \n'
|
||||
task_eNB_compile = task_eNB_compile + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n'
|
||||
@@ -613,6 +641,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
|
||||
logfile_task_UE = logdir_local_testcase + '/UE_task' + '_' + str(run) + '_.log'
|
||||
logfile_task_UE_compile_out = logdir_UE + '/UE_task_compile_out' + '_' + str(run) + '_.log'
|
||||
logfile_task_UE_compile = logdir_local_testcase + '/UE_task_compile' + '_' + str(run) + '_.log'
|
||||
logfile_local_traffic_UE_out = logdir_local_testcase + '/UE_traffic' + '_' + str(run) + '_.log'
|
||||
|
||||
task_UE_compile = ' ( uname -a ; date \n'
|
||||
task_UE_compile = task_UE_compile + 'array_exec_pid=()' + '\n'
|
||||
@@ -660,6 +689,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
|
||||
logfile_task_EPC = logdir_local_testcase + '/EPC_task' + '_' + str(run) + '_.log'
|
||||
logfile_task_EPC_compile_out = logdir_EPC + '/EPC_task_compile_out' + '_' + str(run) + '_.log'
|
||||
logfile_task_EPC_compile = logdir_local_testcase + '/EPC_task_compile' + '_' + str(run) + '_.log'
|
||||
logfile_local_traffic_EPC_out = logdir_local_testcase + '/EPC_traffic' + '_' + str(run) + '_.log'
|
||||
|
||||
task_EPC_compile = ' ( uname -a ; date \n'
|
||||
task_EPC_compile = task_EPC_compile + 'array_exec_pid=()' + '\n'
|
||||
@@ -734,34 +764,59 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
|
||||
t.join()
|
||||
#Now we get the log files from remote machines on the local machine
|
||||
|
||||
cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox)
|
||||
cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox)
|
||||
cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox)
|
||||
cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
|
||||
cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
|
||||
cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
|
||||
logfile_UE_stop_script_out = logdir_UE + '/UE_stop_script_out' + '_' + str(run) + '_.log'
|
||||
logfile_UE_stop_script = logdir_local_testcase + '/UE_stop_script' + '_' + str(run) + '_.log'
|
||||
|
||||
if UE_stop_script != "":
|
||||
cmd = ' ( uname -a ; date \n'
|
||||
cmd = cmd + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n'
|
||||
cmd = cmd + 'env |grep OPENAIR \n' + 'array_exec_pid=() \n'
|
||||
cmd = cmd + UE_stop_script + '\n'
|
||||
cmd = cmd + ') > ' + logfile_UE_stop_script_out + ' 2>&1 '
|
||||
write_file(logfile_UE_stop_script , cmd, mode="w")
|
||||
thread_UE = oaiThread(4, "UE_thread", UEMachine, user, password , cmd, False, timeout_thread)
|
||||
thread_UE.start()
|
||||
thread_UE.join()
|
||||
|
||||
|
||||
print "Copying files from EPCMachine : " + EPCMachine + "logdir_EPC = " + logdir_EPC
|
||||
ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password)
|
||||
ssh.get_all(logdir_EPC , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
#ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password)
|
||||
#ssh.get_all(logdir_EPC , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
SSHSessionWrapper(EPCMachine, user, None, password, logdir_EPC, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
|
||||
print "Copying files from eNBMachine " + eNBMachine + "logdir_eNB = " + logdir_eNB
|
||||
ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password)
|
||||
ssh.get_all(logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
#ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password)
|
||||
#ssh.get_all(logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
SSHSessionWrapper(eNBMachine, user, None, password, logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
|
||||
print "Copying files from UEMachine : " + UEMachine + "logdir_UE = " + logdir_UE
|
||||
ssh = SSHSession(UEMachine , username=user, key_file=None, password=password)
|
||||
ssh.get_all(logdir_UE , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
#ssh = SSHSession(UEMachine , username=user, key_file=None, password=password)
|
||||
#ssh.get_all(logdir_UE , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
SSHSessionWrapper(UEMachine, user, None, password, logdir_UE, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
|
||||
|
||||
|
||||
|
||||
#Currently we only perform throughput tests
|
||||
result = tput_test_search_expr(eNB_search_expr_true, logfile_traffic_eNB)
|
||||
tput_run_string=''
|
||||
result, tput_string = tput_test_search_expr(eNB_search_expr_true, logfile_local_traffic_eNB_out)
|
||||
tput_run_string = tput_run_string + tput_string
|
||||
run_result=run_result&result
|
||||
result = tput_test_search_expr(EPC_search_expr_true, logfile_traffic_EPC)
|
||||
result, tput_string = tput_test_search_expr(EPC_search_expr_true, logfile_local_traffic_EPC_out)
|
||||
run_result=run_result&result
|
||||
result = tput_test_search_expr(UE_search_expr_true, logfile_traffic_UE)
|
||||
tput_run_string = tput_run_string + tput_string
|
||||
result, tput_string = tput_test_search_expr(UE_search_expr_true, logfile_local_traffic_UE_out)
|
||||
run_result=run_result&result
|
||||
tput_run_string = tput_run_string + tput_string
|
||||
|
||||
if run_result == 1:
|
||||
run_result_string = 'RUN_'+str(run) + ' = PASS'
|
||||
run_result_string = ' RUN_'+str(run) + ' = PASS'
|
||||
else:
|
||||
run_result_string = 'RUN_'+str(run) + ' = FAIL'
|
||||
run_result_string = ' RUN_'+str(run) + ' = FAIL'
|
||||
|
||||
run_result_string = run_result_string + tput_run_string
|
||||
|
||||
test_result=test_result & run_result
|
||||
test_result_string=test_result_string + run_result_string
|
||||
@@ -775,28 +830,43 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
|
||||
#Now we finalize the xml file of the test case
|
||||
end_time=time.time()
|
||||
duration= end_time - start_time
|
||||
xmlFile = logdir_local + '/cmake_targets/autotests/log/'+ testcasename + 'test.' + testcasename + '.xml'
|
||||
xmlFile = logdir_local + '/cmake_targets/autotests/log/'+ testcasename + '/test.' + testcasename + '.xml'
|
||||
if test_result ==0:
|
||||
result='FAIL'
|
||||
else:
|
||||
result = 'PASS'
|
||||
xml="<testcase classname=\'"+ testcaseclass + "\' name=\'" + testcasename + "."+tags + "\' Run_result=\'" + test_result_string + "\' time=\'" + duration + "\'s RESULT=\'" +result + "\'></testcase>"
|
||||
xml="\n<testcase classname=\'"+ testcaseclass + "\' name=\'" + testcasename + "."+tags + "\' Run_result=\'" + test_result_string + "\' time=\'" + str(duration) + " s \' RESULT=\'" + result + "\'></testcase> \n"
|
||||
write_file(xmlFile, xml, mode="w")
|
||||
|
||||
|
||||
#This function searches if test case is present in list of test cases that need to be executed by user
|
||||
def search_test_case_group(testcasename, testcasegroup):
|
||||
def search_test_case_group(testcasename, testcasegroup, test_case_exclude):
|
||||
|
||||
if test_case_exclude != "":
|
||||
testcase_exclusion_list=test_case_exclude.split()
|
||||
for entry in testcase_exclusion_list:
|
||||
if entry.find('+') >=0:
|
||||
match = re.search(entry, testcasename)
|
||||
if match:
|
||||
print "\nSkipping test case as it is found in black list: " + testcasename
|
||||
return False
|
||||
else:
|
||||
match = entry.find(testcasename)
|
||||
if match >=0:
|
||||
print "\nSkipping test case as it is found in black list: " + testcasename
|
||||
return False
|
||||
if testcasegroup == '':
|
||||
return True
|
||||
testcaselist = testcasegroup.split()
|
||||
for entry in testcaselist:
|
||||
if entry.find('+') >=0:
|
||||
match = re.search(entry, testcasename)
|
||||
if match:
|
||||
return True
|
||||
else:
|
||||
match = testcasename.find(entry)
|
||||
if match >=0:
|
||||
return True
|
||||
else:
|
||||
testcaselist = testcasegroup.split()
|
||||
for entry in testcaselist:
|
||||
if entry.find('+') >=0:
|
||||
match = re.search(entry, testcasename)
|
||||
if match:
|
||||
return True
|
||||
else:
|
||||
match = testcasename.find(entry)
|
||||
if match >=0:
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -858,7 +928,8 @@ while i < len (sys.argv):
|
||||
print "-d: low debug level"
|
||||
print "-dd: high debug level"
|
||||
print "-p: set the prompt"
|
||||
print "-r: Remove the log directory in autotests/"
|
||||
print "-r: Remove the log directory in autotests"
|
||||
print "-g: Run test cases in a group"
|
||||
print "-w: set the password for ssh to localhost"
|
||||
print "-l: use local shell instead of ssh connection"
|
||||
print "-t: set the time out in second for commands"
|
||||
@@ -925,6 +996,8 @@ CleanUpOldProgs = xmlRoot.findtext('CleanUpOldProgs',default='')
|
||||
CleanUpAluLteBox = xmlRoot.findtext('CleanUpAluLteBox',default='')
|
||||
Timeout_execution = int (xmlRoot.findtext('Timeout_execution'))
|
||||
MachineListGeneric = xmlRoot.findtext('MachineListGeneric',default='')
|
||||
TestCaseExclusionList = xmlRoot.findtext('TestCaseExclusionList',default='')
|
||||
ExmimoRfStop = xmlRoot.findtext('ExmimoRfStop',default='')
|
||||
print "MachineList = " + MachineList
|
||||
print "GitOpenair-cnRepo = " + GitOpenaircnRepo
|
||||
print "GitOAI5GRepo = " + GitOAI5GRepo
|
||||
@@ -989,7 +1062,7 @@ if localshell == 0:
|
||||
print "Sudo permissions..." + result
|
||||
|
||||
print '\nCleaning Older running programs : ' + CleanUpOldProgs
|
||||
cleanOldPrograms(oai_list[index], CleanUpOldProgs, CleanUpAluLteBox)
|
||||
cleanOldPrograms(oai_list[index], CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop)
|
||||
|
||||
result = oai_list[index].send('mount ' + NFSResultsDir, True)
|
||||
print "Mounting NFS Share " + NFSResultsDir + "..." + result
|
||||
@@ -1054,6 +1127,7 @@ for index in oai_list:
|
||||
#cmd = cmd + 'rm -fR ' + logdir + '\n'
|
||||
#cmd = cmd + 'mkdir -p ' + logdir + '\n'
|
||||
cmd = cmd + 'cd '+ logdir + '\n'
|
||||
cmd = cmd + 'git config --global http.sslVerify false \n'
|
||||
cmd = cmd + 'git clone '+ GitOAI5GRepo + '\n'
|
||||
cmd = cmd + 'git clone '+ GitOpenaircnRepo + '\n'
|
||||
cmd = cmd + 'cd ' + logdirOAI5GRepo + '\n'
|
||||
@@ -1132,6 +1206,10 @@ for t in threads_init_setup:
|
||||
sftp_log = os.path.expandvars(locallogdir + '/sftp_module.log')
|
||||
sftp_module (user, pw, MachineList[index], port, paramList, sftp_log)
|
||||
index = index+1
|
||||
|
||||
if os.path.exists(localfile) == 0:
|
||||
print "Setup log file <" + localfile + "> missing for machine <" + MachineList[index] + ">. Please check the setup log files. Exiting now"
|
||||
sys.exit(1)
|
||||
|
||||
#Now we process all the test cases
|
||||
#Now we check if there was error in setup files
|
||||
@@ -1139,7 +1217,7 @@ for t in threads_init_setup:
|
||||
status, out = commands.getstatusoutput('grep ' + ' -il \'error\' ' + locallogdir + '/setup*')
|
||||
if (out != '') :
|
||||
print "There is error in setup of machines"
|
||||
print "status = " + str(status) + "\n out = " + out
|
||||
print "status = " + str(status) + "\n Check files for error = " + out
|
||||
print sys.exit(1)
|
||||
|
||||
|
||||
@@ -1152,7 +1230,7 @@ for testcase in testcaseList:
|
||||
testcaseclass = testcase.findtext('class',default='')
|
||||
desc = testcase.findtext('desc',default='')
|
||||
#print "Machine list top level = " + ','.join(MachineList)
|
||||
if search_test_case_group(testcasename, testcasegroup) == True:
|
||||
if search_test_case_group(testcasename, testcasegroup, TestCaseExclusionList) == True:
|
||||
if testcaseclass == 'lte-softmodem' :
|
||||
eNBMachine = testcase.findtext('eNB',default='')
|
||||
UEMachine = testcase.findtext('UE',default='')
|
||||
@@ -1165,11 +1243,11 @@ for testcase in testcaseList:
|
||||
print "eNBMachine : " + eNBMachine + "UEMachine : " + UEMachine + "EPCMachine : " + EPCMachine + "MachineList : " + ','.join(MachineList)
|
||||
print "testcasename = " + testcasename + " class = " + testcaseclass
|
||||
threadListGlobal = wait_testcaseclass_generic_threads(threadListGlobal, Timeout_execution)
|
||||
handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, pw, CleanUpAluLteBox )
|
||||
handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, pw, CleanUpAluLteBox, ExmimoRfStop )
|
||||
elif (testcaseclass == 'compilation'):
|
||||
threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,Timeout_execution)
|
||||
threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop)
|
||||
elif (testcaseclass == 'execution'):
|
||||
threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,Timeout_execution)
|
||||
threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,ExmimoRfStop)
|
||||
else :
|
||||
print "Unknown test case class: " + testcaseclass
|
||||
sys.exit()
|
||||
@@ -1180,7 +1258,8 @@ for testcase in testcaseList:
|
||||
error = error + '\n testcasename = ' + testcasename + '\n testcaseclass = ' + testcaseclass + '\n desc = ' + 'desc' + '\n'
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
print "Continuing to next test case..."
|
||||
#sys.exit(1)
|
||||
|
||||
|
||||
print "Exiting the test cases execution now..."
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -127,7 +127,7 @@ def start_ue () :
|
||||
ip = IPRoute()
|
||||
idx = ip.link_lookup(ifname=iface)[0]
|
||||
os.system ('route add 192.172.0.1 ppp0')
|
||||
os.system ('ping 192.172.0.1')
|
||||
os.system ('ping -c 5 192.172.0.1')
|
||||
break
|
||||
except Exception, e:
|
||||
error = ' Interface ' + iface + 'does not exist...'
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
n=oarf_get_num_detected_cards;
|
||||
for i=n-1:0
|
||||
oarf_stop(i);
|
||||
end
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# OpenAirInterface
|
||||
# Copyright(c) 1999 - 2015 Eurecom
|
||||
#
|
||||
# OpenAirInterface is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# OpenAirInterface is distributed in the hope that 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 OpenAirInterface.The full GNU General Public License is
|
||||
# included in this distribution in the file called "COPYING". If not,
|
||||
# see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Contact Information
|
||||
# OpenAirInterface Admin: openair_admin@eurecom.fr
|
||||
# OpenAirInterface Tech : openair_tech@eurecom.fr
|
||||
# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
|
||||
#
|
||||
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||
#
|
||||
################################################################################
|
||||
# file init_nas_nos1
|
||||
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
|
||||
# author Florian Kaltenberger
|
||||
#
|
||||
#######################################
|
||||
|
||||
load_module()
|
||||
{
|
||||
mod_name=${1##*/}
|
||||
mod_name=${mod_name%.*}
|
||||
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
|
||||
then
|
||||
echo "module $mod_name already loaded: I remove it first"
|
||||
sudo rmmod $mod_name
|
||||
fi
|
||||
echo loading $mod_name
|
||||
sudo insmod $1
|
||||
}
|
||||
|
||||
|
||||
function main()
|
||||
{
|
||||
PCI=`lspci -m | grep Xilinx`
|
||||
if [ -z "$PCI" ]; then
|
||||
echo "No card found. Stopping!"
|
||||
return
|
||||
fi
|
||||
|
||||
## This part corrects the wrong configuration of the endpoint done by the bios in some machines
|
||||
echo "$PCI" | while read config_reg; do
|
||||
SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'`
|
||||
sudo setpci -s $SLOT_NUMBER 60.b=10
|
||||
done
|
||||
|
||||
|
||||
load_module $OPENAIR_DIR/targets/bin/openair_rf.ko
|
||||
sleep 1
|
||||
|
||||
if [ ! -e /dev/openair0 ]; then
|
||||
sudo mknod /dev/openair0 c 127 0
|
||||
sudo chmod a+rw /dev/openair0
|
||||
fi
|
||||
|
||||
DEVICE=`echo $PCI | awk -F\" '{print $(NF-1)}' | awk '{print $2}'`
|
||||
DEVICE_SWID=${DEVICE:2:2}
|
||||
if [ $DEVICE_SWID == '0a' ]; then
|
||||
echo "Using firware version 10"
|
||||
$OPENAIR_DIR/targets/bin/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10
|
||||
else
|
||||
echo 'No corresponding firmware found'
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -555,17 +555,22 @@ function main() {
|
||||
#####################
|
||||
if [ "$OAI_TEST" = "1" ]; then
|
||||
echo_info "10. Running OAI pre commit tests (pre-ci) ..."
|
||||
read -s -p "Enter Password: " mypassword
|
||||
echo -e "\n"
|
||||
echo_error "These scripts ASSUME that user is in /etc/sudoers and can execute commands without PASSWORD prompt"
|
||||
echo_error "Add the following lines in /etc/sudoers file to make your __user_name__ sudo without password prompt"
|
||||
echo_error " __your_user_name__ ALL = (ALL:ALL) NOPASSWD: ALL"
|
||||
echo_error " __your_user_name__ ALL = (ALL) NOPASSWD: ALL "
|
||||
echo_info "The log file for the autotest script for debugging is located here: $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log "
|
||||
echo_info "The results of autotests results is located here: $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml "
|
||||
echo_info "You can hit CTRL-C any time to terminate the autotests..."
|
||||
echo "Current User Name: $USER"
|
||||
read -s -p "Enter Password: " mypassword
|
||||
echo -e "\n"
|
||||
rm -fr $OPENAIR_DIR/cmake_targets/autotests/log
|
||||
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
|
||||
if [ "$RUN_GROUP" -eq "1" ]; then
|
||||
echo '$mypassword' | $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
|
||||
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
|
||||
else
|
||||
echo '$mypassword' | $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
|
||||
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
|
||||
fi
|
||||
wait
|
||||
else
|
||||
|
||||
@@ -5,7 +5,8 @@ export OPENAIR1_DIR=$OPENAIR_HOME/openair1
|
||||
export OPENAIR2_DIR=$OPENAIR_HOME/openair2
|
||||
export OPENAIR3_DIR=$OPENAIR_HOME/openair3
|
||||
export OPENAIR_TARGETS=$OPENAIR_HOME/targets
|
||||
export OPENAIRITS_DIR=$OPENAIR_HOME/openairITS
|
||||
|
||||
export PATH=$PATH:$OPENAIR_TARGETS/bin
|
||||
|
||||
alias oai='cd $OPENAIR_HOME'
|
||||
alias oai0='cd $OPENAIR0_DIR'
|
||||
|
||||
@@ -1103,8 +1103,12 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
|
||||
dlsch[0]->harq_ids[subframe] = harq_pid;
|
||||
|
||||
if (dlsch0_harq->round == 0)
|
||||
if (dlsch0_harq->round == 0) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch[0], harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -1238,6 +1242,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
|
||||
|
||||
if (dlsch0_harq->round == 0) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch[0], harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
|
||||
// MCS and TBS don't change across HARQ rounds
|
||||
@@ -1598,10 +1605,16 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
|
||||
// reset HARQ process if this is the first transmission
|
||||
if (dlsch0_harq->round == 0) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch0, harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
}
|
||||
|
||||
if (dlsch1_harq->round == 0) {
|
||||
/* necessary test? */
|
||||
if (dlsch1_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch1, harq_pid);
|
||||
dlsch1_harq->status = ACTIVE;
|
||||
}
|
||||
|
||||
@@ -1980,10 +1993,16 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
|
||||
// reset HARQ process if this is the first transmission
|
||||
if ((dlsch0->active==1) && (dlsch0_harq->round == 0)) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch0, harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
}
|
||||
|
||||
if ((dlsch1->active==1) && (dlsch1_harq->round == 0)) {
|
||||
/* necessary test? */
|
||||
if (dlsch1_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch1, harq_pid);
|
||||
dlsch1_harq->status = ACTIVE;
|
||||
}
|
||||
|
||||
@@ -2126,16 +2145,23 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
// check if either TB is disabled (see 36-213 V8.6 p. 26)
|
||||
|
||||
|
||||
if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0))
|
||||
if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) {
|
||||
LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n");
|
||||
dlsch0_harq->status = DISABLED;
|
||||
}
|
||||
|
||||
if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0))
|
||||
if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) {
|
||||
LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n");
|
||||
dlsch1_harq->status = DISABLED;
|
||||
}
|
||||
|
||||
dlsch0_harq->Nl = 1;
|
||||
|
||||
|
||||
if (dlsch0_harq->round == 0) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch0, harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
|
||||
}
|
||||
@@ -2300,11 +2326,17 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
|
||||
|
||||
if ((dlsch0_harq->round == 0) && (dlsch0->active == 1) ) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch0, harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
dlsch0_harq->mcs = mcs1;
|
||||
}
|
||||
|
||||
if ((dlsch1_harq->round == 0) && (dlsch1->active == 1) ) {
|
||||
/* necessary test? */
|
||||
if (dlsch1_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch1, harq_pid);
|
||||
dlsch1_harq->status = ACTIVE;
|
||||
dlsch1_harq->mcs = mcs2;
|
||||
}
|
||||
@@ -2468,6 +2500,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
|
||||
|
||||
if (dlsch0_harq->round == 0) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch0, harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
|
||||
}
|
||||
@@ -2600,6 +2635,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
||||
|
||||
// dlsch0_harq->Ndi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->ndi;
|
||||
if (dlsch0_harq->round == 0) {
|
||||
/* necessary test? */
|
||||
if (dlsch0_harq->status == SCH_IDLE)
|
||||
remove_harq_pid_from_freelist(dlsch0, harq_pid);
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
|
||||
}
|
||||
|
||||
@@ -264,6 +264,13 @@ typedef struct {
|
||||
uint8_t error_threshold;
|
||||
/// Pointers to 8 HARQ processes for the DLSCH
|
||||
LTE_DL_eNB_HARQ_t *harq_processes[8];
|
||||
/// circular list of free harq PIDs (the oldest come first)
|
||||
/// (10 is arbitrary value, must be > to max number of DL HARQ processes in LTE)
|
||||
int harq_pid_freelist[10];
|
||||
/// the head position of the free list (if list is free then head=tail)
|
||||
int head_freelist;
|
||||
/// the tail position of the free list
|
||||
int tail_freelist;
|
||||
/// Number of soft channel bits
|
||||
uint32_t G;
|
||||
/// Codebook index for this dlsch (0,1,2,3)
|
||||
|
||||
@@ -152,6 +152,9 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
|
||||
for (i=0; i<10; i++)
|
||||
dlsch->harq_ids[i] = Mdlharq;
|
||||
|
||||
dlsch->head_freelist = 0;
|
||||
dlsch->tail_freelist = 0;
|
||||
|
||||
for (i=0; i<Mdlharq; i++) {
|
||||
dlsch->harq_processes[i] = (LTE_DL_eNB_HARQ_t *)malloc16(sizeof(LTE_DL_eNB_HARQ_t));
|
||||
LOG_T(PHY, "Required mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n",
|
||||
@@ -192,6 +195,8 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
|
||||
msg("Can't get harq_p %d\n",i);
|
||||
exit_flag=3;
|
||||
}
|
||||
|
||||
put_harq_pid_in_freelist(dlsch, i);
|
||||
}
|
||||
|
||||
if (exit_flag==0) {
|
||||
|
||||
@@ -119,6 +119,7 @@ int32_t dot_product(int16_t *x,
|
||||
_m_empty();
|
||||
|
||||
return(result);
|
||||
|
||||
#elif defined(__arm__)
|
||||
int16x4_t *x_128=(int16x4_t*)x;
|
||||
int16x4_t *y_128=(int16x4_t*)y;
|
||||
|
||||
@@ -94,7 +94,7 @@ static inline void cmacc(__m128i a,__m128i b, __m128i *re32, __m128i *im32)
|
||||
cmac_tmp = _mm_sign_epi16(b,*(__m128i*)reflip);
|
||||
// cmac_tmp = _mm_shufflelo_epi16(b,_MM_SHUFFLE(2,3,0,1));
|
||||
// cmac_tmp = _mm_shufflehi_epi16(cmac_tmp,_MM_SHUFFLE(2,3,0,1));
|
||||
cmac_tmp = _mm_shuffle_epi8(b,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2));
|
||||
cmac_tmp = _mm_shuffle_epi8(cmac_tmp,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2));
|
||||
cmac_tmp_im32 = _mm_madd_epi16(cmac_tmp,a);
|
||||
|
||||
*re32 = _mm_add_epi32(*re32,cmac_tmp_re32);
|
||||
|
||||
@@ -401,6 +401,8 @@ uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1);
|
||||
|
||||
int get_nCCE_offset(unsigned char L, int nCCE, int common_dci, unsigned short rnti, unsigned char subframe);
|
||||
|
||||
void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
|
||||
void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
|
||||
|
||||
int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
|
||||
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
|
||||
|
||||
@@ -136,6 +136,30 @@ uint8_t is_SR_subframe(PHY_VARS_eNB *phy_vars_eNB,uint8_t UE_id,uint8_t sched_su
|
||||
return(0);
|
||||
}
|
||||
|
||||
void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid)
|
||||
{
|
||||
DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->tail_freelist] = harq_pid;
|
||||
DLSCH_ptr->tail_freelist = (DLSCH_ptr->tail_freelist + 1) % 10;
|
||||
}
|
||||
|
||||
void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid)
|
||||
{
|
||||
if (DLSCH_ptr->head_freelist == DLSCH_ptr->tail_freelist) {
|
||||
LOG_E(PHY, "%s:%d: you cannot read this!\n", __FILE__, __LINE__);
|
||||
abort();
|
||||
}
|
||||
/* basic check, in case several threads deal with the free list at the same time
|
||||
* in normal situations it should not happen, that's also why we don't use any
|
||||
* locking mechanism to protect the free list
|
||||
* to be refined in case things don't work properly
|
||||
*/
|
||||
if (harq_pid != DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist]) {
|
||||
LOG_E(PHY, "%s:%d: critical error, get in touch with the authors\n", __FILE__, __LINE__);
|
||||
abort();
|
||||
}
|
||||
DLSCH_ptr->head_freelist = (DLSCH_ptr->head_freelist + 1) % 10;
|
||||
}
|
||||
|
||||
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB)
|
||||
{
|
||||
uint8_t i;
|
||||
@@ -178,6 +202,7 @@ int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB)
|
||||
int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB, uint8_t abstraction_flag)
|
||||
{
|
||||
uint8_t i;
|
||||
int j;
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
if ((phy_vars_eNB->dlsch_eNB[i]==NULL) || (phy_vars_eNB->ulsch_eNB[i]==NULL)) {
|
||||
@@ -196,6 +221,13 @@ int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB, uint8_t abstraction
|
||||
//phy_vars_eNB->eNB_UE_stats[i].crnti = 0;
|
||||
memset(&phy_vars_eNB->eNB_UE_stats[i],0,sizeof(LTE_eNB_UE_stats));
|
||||
// mac_exit_wrapper("Removing UE");
|
||||
|
||||
/* clear the harq pid freelist */
|
||||
phy_vars_eNB->dlsch_eNB[i][0]->head_freelist = 0;
|
||||
phy_vars_eNB->dlsch_eNB[i][0]->tail_freelist = 0;
|
||||
for (j = 0; j < 8; j++)
|
||||
put_harq_pid_in_freelist(phy_vars_eNB->dlsch_eNB[i][0], j);
|
||||
|
||||
return(i);
|
||||
}
|
||||
}
|
||||
@@ -224,14 +256,12 @@ int8_t find_next_ue_index(PHY_VARS_eNB *phy_vars_eNB)
|
||||
|
||||
int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16_t rnti, const int frame, const uint8_t subframe,uint8_t *harq_pid,uint8_t *round,const uint8_t ul_flag)
|
||||
{
|
||||
|
||||
LTE_eNB_DLSCH_t *DLSCH_ptr;
|
||||
LTE_eNB_ULSCH_t *ULSCH_ptr;
|
||||
uint8_t ulsch_subframe,ulsch_frame;
|
||||
uint8_t i;
|
||||
int8_t UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][CC_id]);
|
||||
int sf1=(10*frame)+subframe,sf2,sfdiff,sfdiff_max=7;
|
||||
int first_proc_found=0;
|
||||
|
||||
if (UE_id==-1) {
|
||||
LOG_D(PHY,"Cannot find UE with rnti %x (Mod_id %d, CC_id %d)\n",rnti, Mod_id, CC_id);
|
||||
@@ -247,18 +277,7 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
|
||||
|
||||
for (i=0; i<DLSCH_ptr->Mdlharq; i++) {
|
||||
if (DLSCH_ptr->harq_processes[i]!=NULL) {
|
||||
if (DLSCH_ptr->harq_processes[i]->status != ACTIVE) {
|
||||
// store first inactive process
|
||||
if (first_proc_found == 0) {
|
||||
first_proc_found = 1;
|
||||
*harq_pid = i;
|
||||
*round = 0;
|
||||
LOG_D(PHY,"process %d is first free process\n",i);
|
||||
}
|
||||
else {
|
||||
LOG_D(PHY,"process %d is free\n",i);
|
||||
}
|
||||
} else {
|
||||
if (DLSCH_ptr->harq_processes[i]->status == ACTIVE) {
|
||||
sf2 = (DLSCH_ptr->harq_processes[i]->frame*10) + DLSCH_ptr->harq_processes[i]->subframe;
|
||||
if (sf2<=sf1)
|
||||
sfdiff = sf1-sf2;
|
||||
@@ -270,7 +289,6 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
|
||||
sfdiff_max = sfdiff;
|
||||
*harq_pid = i;
|
||||
*round = DLSCH_ptr->harq_processes[i]->round;
|
||||
first_proc_found = 1;
|
||||
}
|
||||
}
|
||||
} else { // a process is not defined
|
||||
@@ -278,6 +296,14 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
/* if no active harq pid, get the oldest in the freelist, if any */
|
||||
if (*harq_pid == 255 && DLSCH_ptr->head_freelist != DLSCH_ptr->tail_freelist) {
|
||||
*harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
*round = 0;
|
||||
LOG_D(PHY,"process %d is first free process\n", *harq_pid);
|
||||
}
|
||||
|
||||
LOG_D(PHY,"get_ue_active_harq_pid DL => Frame %d, Subframe %d : harq_pid %d\n",
|
||||
frame,subframe,*harq_pid);
|
||||
} else { // This is a UL request
|
||||
@@ -296,7 +322,6 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int CCE_table[800];
|
||||
|
||||
void init_nCCE_table(void)
|
||||
@@ -2868,6 +2893,7 @@ void process_HARQ_feedback(uint8_t UE_id,
|
||||
dlsch_harq_proc->round = 0;
|
||||
ue_stats->dlsch_l2_errors[dl_harq_pid[m]]++;
|
||||
dlsch_harq_proc->status = SCH_IDLE;
|
||||
put_harq_pid_in_freelist(dlsch, dl_harq_pid[m]);
|
||||
dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq;
|
||||
}
|
||||
} else {
|
||||
@@ -2880,6 +2906,7 @@ void process_HARQ_feedback(uint8_t UE_id,
|
||||
// Received ACK so set round to 0 and set dlsch_harq_pid IDLE
|
||||
dlsch_harq_proc->round = 0;
|
||||
dlsch_harq_proc->status = SCH_IDLE;
|
||||
put_harq_pid_in_freelist(dlsch, dl_harq_pid[m]);
|
||||
dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq;
|
||||
|
||||
ue_stats->total_TBS = ue_stats->total_TBS +
|
||||
@@ -3949,6 +3976,9 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
|
||||
phy_vars_eNB->eNB_UE_stats[i].sr_received++;
|
||||
|
||||
if (phy_vars_eNB->first_sr[i] == 1) { // this is the first request for uplink after Connection Setup, so clear HARQ process 0 use for Msg4
|
||||
/* is this test necessary? */
|
||||
if (phy_vars_eNB->dlsch_eNB[i][0]->harq_processes[0]->status != SCH_IDLE)
|
||||
put_harq_pid_in_freelist(phy_vars_eNB->dlsch_eNB[i][0], 0);
|
||||
phy_vars_eNB->first_sr[i] = 0;
|
||||
phy_vars_eNB->dlsch_eNB[i][0]->harq_processes[0]->round=0;
|
||||
phy_vars_eNB->dlsch_eNB[i][0]->harq_processes[0]->status=SCH_IDLE;
|
||||
|
||||
@@ -45,7 +45,7 @@ double **cos_lut=NULL,**sin_lut=NULL;
|
||||
|
||||
|
||||
|
||||
void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
{
|
||||
|
||||
|
||||
@@ -54,12 +54,14 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
int16_t f;
|
||||
uint8_t l;
|
||||
|
||||
if ((n_samples&1)==0) {
|
||||
fprintf(stderr, "freq_channel_init: n_samples has to be odd\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
cos_lut = (double **)malloc(n_samples*sizeof(double*));
|
||||
sin_lut = (double **)malloc(n_samples*sizeof(double*));
|
||||
|
||||
|
||||
|
||||
delta_f = nb_rb*180000/(n_samples-1);
|
||||
|
||||
for (f=-(n_samples>>1); f<(n_samples>>1); f++) {
|
||||
@@ -81,9 +83,11 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
int freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
{
|
||||
|
||||
|
||||
@@ -93,18 +97,28 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
static int freq_channel_init=0;
|
||||
static int n_samples_max=0;
|
||||
|
||||
// printf("no of samples:%d,",n_samples);
|
||||
// do some error checking
|
||||
// n_samples has to be a odd number because we assume the spectrum is symmetric around the DC and includes the DC
|
||||
if ((n_samples&1)==0) {
|
||||
fprintf(stderr, "freq_channel: n_samples has to be odd\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
// printf("no of taps:%d,",(int)desc->nb_taps);
|
||||
|
||||
if (freq_channel_init == 0) {
|
||||
// we are initializing the lut for the largets possible n_samples=12*nb_rb+1
|
||||
// if called with n_samples<12*nb_rb+1, we decimate the lut
|
||||
n_samples_max=12*nb_rb+1;
|
||||
init_freq_channel(desc,nb_rb,n_samples_max);
|
||||
freq_channel_init=1;
|
||||
if (init_freq_channel(desc,nb_rb,n_samples_max)==0)
|
||||
freq_channel_init=1;
|
||||
else
|
||||
return(-1);
|
||||
}
|
||||
|
||||
d=n_samples_max/n_samples;
|
||||
d=(n_samples_max-1)/(n_samples-1);
|
||||
|
||||
//printf("no_samples=%d, n_samples_max=%d, d=%d\n",n_samples,n_samples_max,d);
|
||||
|
||||
start_meas(&desc->interp_freq);
|
||||
|
||||
@@ -129,6 +143,8 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
|
||||
}
|
||||
|
||||
stop_meas(&desc->interp_freq);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
double compute_pbch_sinr(channel_desc_t *desc,
|
||||
|
||||
@@ -360,8 +360,8 @@ int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
|
||||
double gaussdouble(double,double);
|
||||
void randominit(unsigned int seed_init);
|
||||
double uniformrandom(void);
|
||||
void freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples);
|
||||
void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples);
|
||||
int freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples);
|
||||
int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples);
|
||||
uint8_t multipath_channel_nosigconv(channel_desc_t *desc);
|
||||
void multipath_tv_channel(channel_desc_t *desc,
|
||||
double **tx_sig_re,
|
||||
|
||||
@@ -60,6 +60,11 @@ typedef enum {
|
||||
max_gain=0,med_gain,byp_gain
|
||||
} rx_gain_t;
|
||||
|
||||
typedef enum {
|
||||
duplex_mode_TDD=1,duplex_mode_FDD=0
|
||||
} duplex_mode_t;
|
||||
|
||||
|
||||
/** @addtogroup _PHY_RF_INTERFACE_
|
||||
* @{
|
||||
*/
|
||||
@@ -76,6 +81,8 @@ typedef struct {
|
||||
int Mod_id;
|
||||
// device log level
|
||||
int log_level;
|
||||
//! duplexing mode
|
||||
duplex_mode_t duplex_mode;
|
||||
//! number of downlink resource blocks
|
||||
int num_rb_dl;
|
||||
//! number of samples per frame
|
||||
|
||||
@@ -316,7 +316,9 @@ typedef struct {
|
||||
//
|
||||
// In TDD mode, there are two ways to control the RX/TX switch:
|
||||
// 1. using the LSB from the TX data (TXRXSWITCH_LSB)
|
||||
// only the LSB from RF chain set in the ACTIVE_RF register controls the switch on all the chains
|
||||
// 2. using FPGA logic, based on switch_offset[0..3]
|
||||
// this mode is not tested well and should be used with care
|
||||
#define DUPLEXMODE_MASK (1<<0)
|
||||
#define DUPLEXMODE_FDD 0
|
||||
#define DUPLEXMODE_TDD (1<<0)
|
||||
@@ -330,6 +332,11 @@ typedef struct {
|
||||
#define SWITCHSTATE_1 (1<<3)
|
||||
#define TEST_ADACLOOP_MASK (1<<4)
|
||||
#define TEST_ADACLOOP_EN (1<<4)
|
||||
#define RF_ACTIVE_MASK (15<<5)
|
||||
#define RF_ACTIVE_1 (1<<5)
|
||||
#define RF_ACTIVE_2 (2<<5)
|
||||
#define RF_ACTIVE_3 (4<<5)
|
||||
#define RF_ACTIVE_4 (8<<5)
|
||||
|
||||
typedef enum {
|
||||
BW5,
|
||||
|
||||
@@ -296,6 +296,7 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
|
||||
int ant, card;
|
||||
int resampling_factor=2;
|
||||
int rx_filter=RXLPF25, tx_filter=TXLPF25;
|
||||
int ACTIVE_RF=0;
|
||||
|
||||
exmimo_config_t *p_exmimo_config;
|
||||
exmimo_id_t *p_exmimo_id;
|
||||
@@ -315,8 +316,6 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
|
||||
else
|
||||
p_exmimo_config->framing.eNB_flag = !UE_flag;
|
||||
|
||||
p_exmimo_config->framing.tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
|
||||
|
||||
if (openair0_num_detected_cards==1)
|
||||
p_exmimo_config->framing.multicard_syncmode=SYNCMODE_FREE;
|
||||
else if (card==0)
|
||||
@@ -355,6 +354,7 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
|
||||
|
||||
for (ant=0; ant<4; ant++) {
|
||||
if (openair0_cfg[card].rx_freq[ant] || openair0_cfg[card].tx_freq[ant]) {
|
||||
ACTIVE_RF += (1<<ant)<<5;
|
||||
p_exmimo_config->rf.rf_mode[ant] = RF_MODE_BASE;
|
||||
p_exmimo_config->rf.do_autocal[ant] = 1;//openair0_cfg[card].autocal[ant];
|
||||
printf("card %d, antenna %d, autocal %d\n",card,ant,openair0_cfg[card].autocal[ant]);
|
||||
@@ -408,6 +408,15 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
|
||||
}
|
||||
}
|
||||
|
||||
if (openair0_cfg[card].duplex_mode==duplex_mode_FDD) {
|
||||
p_exmimo_config->framing.tdd_config = DUPLEXMODE_FDD;
|
||||
printf("!!!!!setting FDD (tdd_config=%d)\n",p_exmimo_config->framing.tdd_config);
|
||||
}
|
||||
else {
|
||||
p_exmimo_config->framing.tdd_config = DUPLEXMODE_TDD + TXRXSWITCH_LSB + ACTIVE_RF;
|
||||
printf("!!!!!setting TDD (tdd_config=%d)\n",p_exmimo_config->framing.tdd_config);
|
||||
}
|
||||
|
||||
ret = ioctl(openair0_fd, openair_DUMP_CONFIG, card);
|
||||
|
||||
if (ret!=0)
|
||||
|
||||
Binary file not shown.
@@ -464,7 +464,7 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
|
||||
break;
|
||||
case 7680000:
|
||||
openair0_cfg[0].samples_per_packet = 1024;
|
||||
openair0_cfg[0].tx_sample_advance = 103;
|
||||
openair0_cfg[0].tx_sample_advance = 70;//103;
|
||||
openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
case 1920000:
|
||||
@@ -479,13 +479,11 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(i=0;i<s->usrp->get_rx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].rx_num_channels) {
|
||||
s->usrp->set_rx_rate(openair0_cfg[0].sample_rate,i);
|
||||
s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
|
||||
printf("Setting rx freq/gain on channel %lu/%lu\n",i,s->usrp->get_rx_num_channels());
|
||||
printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
|
||||
s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i);
|
||||
set_rx_gain_offset(&openair0_cfg[0],i);
|
||||
|
||||
@@ -506,7 +504,7 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
|
||||
if (i<openair0_cfg[0].tx_num_channels) {
|
||||
s->usrp->set_tx_rate(openair0_cfg[0].sample_rate,i);
|
||||
s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i);
|
||||
printf("Setting tx freq/gain on channel %lu/%lu\n",i,s->usrp->get_tx_num_channels());
|
||||
printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6);
|
||||
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i);
|
||||
s->usrp->set_tx_gain(openair0_cfg[0].tx_gain[i],i);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "92";
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
@@ -131,7 +131,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.13.11";
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.70";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -141,10 +141,10 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "92";
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
@@ -31,7 +31,7 @@ eNBs =
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
@@ -131,7 +131,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.1.1";
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.171";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -140,11 +140,11 @@ eNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.1.229/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth2";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.80/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.1.229/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth2";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.80/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ eNBs =
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 120;
|
||||
rx_gain = 132;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
@@ -143,10 +143,10 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.216/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.216/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ eNBs =
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 120;
|
||||
rx_gain = 132;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
|
||||
@@ -30,12 +30,12 @@ eNBs =
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 119;
|
||||
rx_gain = 132;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
|
||||
@@ -36,7 +36,7 @@ eNBs =
|
||||
nb_antennas_tx = 2;
|
||||
nb_antennas_rx = 2;
|
||||
tx_gain = 90;
|
||||
rx_gain = 115;
|
||||
rx_gain = 132;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
@@ -132,7 +132,8 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.70";
|
||||
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -142,10 +143,10 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -289,6 +289,8 @@ double bw = 10.0e6;
|
||||
|
||||
static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/;
|
||||
|
||||
int chain_offset=0;
|
||||
|
||||
#ifndef EXMIMO
|
||||
char ref[128] = "internal";
|
||||
char channels[128] = "0";
|
||||
@@ -314,6 +316,7 @@ static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
int multi_thread=1;
|
||||
uint32_t target_dl_mcs = 28; //maximum allowed mcs
|
||||
uint32_t target_ul_mcs = 10;
|
||||
uint32_t timing_advance = 0;
|
||||
uint8_t exit_missed_slots=1;
|
||||
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||
|
||||
@@ -418,7 +421,7 @@ void help (void) {
|
||||
printf(" --ue-txgain set UE TX gain\n");
|
||||
printf(" --ue-scan_carrier set UE to scan around carrier\n");
|
||||
printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n");
|
||||
printf(" -C Set the downlink frequecny for all Component carrier\n");
|
||||
printf(" -C Set the downlink frequency for all component carriers\n");
|
||||
printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n");
|
||||
printf(" -F Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n");
|
||||
printf(" -g Set the global log level, valide options: (9:trace, 8/7:debug, 6:info, 4:warn, 3:error)\n");
|
||||
@@ -432,6 +435,7 @@ void help (void) {
|
||||
printf(" -r Set the PRB, valid values: 6, 25, 50, 100 \n");
|
||||
printf(" -S Skip the missed slots/subframes \n");
|
||||
printf(" -t Set the maximum uplink MCS\n");
|
||||
printf(" -T Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n");
|
||||
printf(" -U Set the lte softmodem as a UE\n");
|
||||
printf(" -W Enable L2 wireshark messages on localhost \n");
|
||||
printf(" -V Enable VCD (generated file will be located atopenair_dump_eNB.vcd, read it with target/RT/USER/eNB.gtkw\n");
|
||||
@@ -966,6 +970,25 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
|
||||
phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset++] = 0x00010001;
|
||||
}
|
||||
}
|
||||
|
||||
if ((((phy_vars_eNB->lte_frame_parms.tdd_config==0) ||
|
||||
(phy_vars_eNB->lte_frame_parms.tdd_config==1) ||
|
||||
(phy_vars_eNB->lte_frame_parms.tdd_config==2) ||
|
||||
(phy_vars_eNB->lte_frame_parms.tdd_config==6)) &&
|
||||
(subframe==0)) || (subframe==5)) {
|
||||
// turn on tx switch N_TA_offset before
|
||||
//LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,phy_vars_eNB->N_TA_offset,slot_offset);
|
||||
for (i=0; i<phy_vars_eNB->N_TA_offset; i++) {
|
||||
tx_offset = (int)slot_offset+time_offset[aa]+i-phy_vars_eNB->N_TA_offset/2;
|
||||
if (tx_offset<0)
|
||||
tx_offset += LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->lte_frame_parms.samples_per_tti;
|
||||
|
||||
if (tx_offset>=(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->lte_frame_parms.samples_per_tti))
|
||||
tx_offset -= LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->lte_frame_parms.samples_per_tti;
|
||||
|
||||
phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset] = 0x00000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2037,7 +2060,7 @@ static void get_options (int argc, char **argv)
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
while ((c = getopt_long (argc, argv, "C:dK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:x:",long_options,NULL)) != -1) {
|
||||
while ((c = getopt_long (argc, argv, "A:a:C:dK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:Tx:",long_options,NULL)) != -1) {
|
||||
switch (c) {
|
||||
case LONG_OPTION_MAXPOWER:
|
||||
tx_max_power[0]=atoi(optarg);
|
||||
@@ -2112,6 +2135,10 @@ static void get_options (int argc, char **argv)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
timing_advance = atoi (optarg);
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
downlink_frequency[CC_id][0] = atof(optarg); // Use float to avoid issue with frequency over 2^31.
|
||||
@@ -2125,6 +2152,10 @@ static void get_options (int argc, char **argv)
|
||||
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
chain_offset = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
#ifdef XFORMS
|
||||
do_forms=1;
|
||||
@@ -2302,8 +2333,13 @@ static void get_options (int argc, char **argv)
|
||||
printf("Transmission mode > 2 (%d) not supported for the moment\n",transmission_mode);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++)
|
||||
frame_parms[CC_id]->frame_type = TDD;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
help ();
|
||||
exit (-1);
|
||||
@@ -2463,12 +2499,10 @@ int main( int argc, char **argv )
|
||||
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
|
||||
set_latency_target();
|
||||
|
||||
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
frame_parms[CC_id] = (LTE_DL_FRAME_PARMS*) malloc(sizeof(LTE_DL_FRAME_PARMS));
|
||||
/* Set some default values that may be overwritten while reading options */
|
||||
frame_parms[CC_id]->frame_type = FDD; /* TDD */
|
||||
frame_parms[CC_id]->frame_type = FDD;
|
||||
frame_parms[CC_id]->tdd_config = 3;
|
||||
frame_parms[CC_id]->tdd_config_S = 0;
|
||||
frame_parms[CC_id]->N_RB_DL = 100;
|
||||
@@ -2765,7 +2799,7 @@ int main( int argc, char **argv )
|
||||
PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*));
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,Nid_cell,cooperation_flag,transmission_mode,abstraction_flag);
|
||||
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,cooperation_flag,transmission_mode,abstraction_flag);
|
||||
PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id;
|
||||
|
||||
#ifndef OPENAIR2
|
||||
@@ -2816,7 +2850,7 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
#else
|
||||
//already taken care of in lte-softmodem
|
||||
//already taken care of in lte-softmodem.c
|
||||
PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 0;
|
||||
#endif
|
||||
|
||||
@@ -2854,8 +2888,8 @@ int main( int argc, char **argv )
|
||||
} else if (frame_parms[0]->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;
|
||||
openair0_cfg[card].tx_bw = 5e6;
|
||||
openair0_cfg[card].rx_bw = 5e6;
|
||||
|
||||
} else if (frame_parms[0]->N_RB_DL == 6) {
|
||||
openair0_cfg[card].sample_rate=1.92e6;
|
||||
@@ -2863,7 +2897,12 @@ int main( int argc, char **argv )
|
||||
openair0_cfg[card].tx_bw = 1.5e6;
|
||||
openair0_cfg[card].rx_bw = 1.5e6;
|
||||
}
|
||||
|
||||
|
||||
if (frame_parms[0]->frame_type==TDD)
|
||||
openair0_cfg[card].duplex_mode = duplex_mode_TDD;
|
||||
else //FDD
|
||||
openair0_cfg[card].duplex_mode = duplex_mode_FDD;
|
||||
|
||||
#ifdef ETHERNET
|
||||
|
||||
//calib needed
|
||||
@@ -3025,13 +3064,13 @@ int main( int argc, char **argv )
|
||||
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
rf_map[CC_id].card=0;
|
||||
rf_map[CC_id].chain=CC_id;
|
||||
rf_map[CC_id].chain=CC_id+chain_offset;
|
||||
}
|
||||
|
||||
// connect the TX/RX buffers
|
||||
if (UE_flag==1) {
|
||||
#ifdef OAI_USRP
|
||||
openair_daq_vars.timing_advance = 0;
|
||||
openair_daq_vars.timing_advance = timing_advance;
|
||||
#else
|
||||
openair_daq_vars.timing_advance = 160;
|
||||
#endif
|
||||
|
||||
@@ -1003,7 +1003,7 @@ void *UE_thread(void *arg)
|
||||
static int UE_thread_retval;
|
||||
PHY_VARS_UE *UE = PHY_vars_UE_g[0][0];
|
||||
int spp = openair0_cfg[0].samples_per_packet;
|
||||
int slot=1, frame=0, hw_subframe=0, rxpos=0, txpos=spp*openair0_cfg[0].tx_scheduling_advance;
|
||||
int slot=1, frame=0, hw_subframe=0, rxpos=0, txpos=openair0_cfg[0].tx_scheduling_advance;
|
||||
#ifdef __AVX2__
|
||||
int dummy[2][spp] __attribute__((aligned(32)));
|
||||
#else
|
||||
@@ -1020,6 +1020,10 @@ void *UE_thread(void *arg)
|
||||
|
||||
openair0_timestamp timestamp;
|
||||
|
||||
#ifdef NAS_UE
|
||||
MessageDef *message_p;
|
||||
#endif
|
||||
|
||||
#ifdef RTAI
|
||||
RT_TASK *task = rt_task_init_schmod(nam2num("UE thread"), 0, 0, 0, SCHED_FIFO, 0xF);
|
||||
|
||||
@@ -1075,6 +1079,11 @@ void *UE_thread(void *arg)
|
||||
|
||||
printf("starting UE thread\n");
|
||||
|
||||
#ifdef NAS_UE
|
||||
message_p = itti_alloc_new_message(TASK_NAS_UE, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_NAS_UE, INSTANCE_DEFAULT, message_p);
|
||||
#endif
|
||||
|
||||
T0 = rt_get_time_ns();
|
||||
first_rx = 1;
|
||||
rxpos=0;
|
||||
|
||||
Reference in New Issue
Block a user