develop&-nr current as of 22.7.19 & OAI fully ready for testing
This commit is contained in:
@@ -193,6 +193,7 @@ RUs = (
|
||||
att_rx = 20;
|
||||
eNB_instances = [0];
|
||||
is_slave = "no";
|
||||
ota_sync_enabled = "yes";
|
||||
},
|
||||
{
|
||||
local_if_name = "enp129s0f0";
|
||||
@@ -210,6 +211,7 @@ RUs = (
|
||||
att_rx = 20;
|
||||
eNB_instances = [0];
|
||||
is_slave = "yes";
|
||||
ota_sync_enabled = "yes";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ RUs = (
|
||||
max_rxgain = 100;
|
||||
bands = [38];
|
||||
is_slave = "no";
|
||||
ota_sync_enabled = "yes";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ RUs = (
|
||||
max_rxgain = 100;
|
||||
bands = [38];
|
||||
is_slave = "yes";
|
||||
ota_sync_enabled = "yes";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
+179
-134
@@ -58,6 +58,11 @@ OAI_UE_PROCESS_FAILED = -23
|
||||
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24
|
||||
OAI_UE_PROCESS_OK = +6
|
||||
|
||||
UE_STATUS_DETACHED = 0
|
||||
UE_STATUS_DETACHING = 1
|
||||
UE_STATUS_ATTACHING = 2
|
||||
UE_STATUS_ATTACHED = 3
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
@@ -82,6 +87,7 @@ logging.basicConfig(
|
||||
#-----------------------------------------------------------
|
||||
class SSHConnection():
|
||||
def __init__(self):
|
||||
self.prematureExit = False
|
||||
self.ranRepository = ''
|
||||
self.ranBranch = ''
|
||||
self.ranAllowMerge = False
|
||||
@@ -128,6 +134,7 @@ class SSHConnection():
|
||||
self.iperf_profile = ''
|
||||
self.nbMaxUEtoAttach = -1
|
||||
self.UEDevices = []
|
||||
self.UEDevicesStatus = []
|
||||
self.CatMDevices = []
|
||||
self.UEIPAddresses = []
|
||||
self.htmlFile = ''
|
||||
@@ -141,6 +148,7 @@ class SSHConnection():
|
||||
self.htmlTabRefs = []
|
||||
self.htmlTabNames = []
|
||||
self.htmlTabIcons = []
|
||||
self.repeatCounts = []
|
||||
self.finalStatus = False
|
||||
self.OsVersion = ''
|
||||
self.KernelVersion = ''
|
||||
@@ -390,6 +398,7 @@ class SSHConnection():
|
||||
self.close()
|
||||
self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
|
||||
return
|
||||
|
||||
self.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||
# if the commit ID is provided use it to point to it
|
||||
if self.ranCommitID != '':
|
||||
@@ -459,6 +468,18 @@ class SSHConnection():
|
||||
result = re.search(self.air_interface + '-softmodem', str(self.ssh.before))
|
||||
if result is None:
|
||||
buildStatus = False
|
||||
else:
|
||||
# Generating a BUILD INFO file
|
||||
self.command('echo "SRC_BRANCH: ' + self.ranBranch + '" > ../LAST_BUILD_INFO.txt', '\$', 2)
|
||||
self.command('echo "SRC_COMMIT: ' + self.ranCommitID + '" >> ../LAST_BUILD_INFO.txt', '\$', 2)
|
||||
if (self.ranAllowMerge):
|
||||
self.command('echo "MERGED_W_TGT_BRANCH: YES" >> ../LAST_BUILD_INFO.txt', '\$', 2)
|
||||
if self.ranTargetBranch == '':
|
||||
self.command('echo "TGT_BRANCH: develop" >> ../LAST_BUILD_INFO.txt', '\$', 2)
|
||||
else:
|
||||
self.command('echo "TGT_BRANCH: ' + self.ranTargetBranch + '" >> ../LAST_BUILD_INFO.txt', '\$', 2)
|
||||
else:
|
||||
self.command('echo "MERGED_W_TGT_BRANCH: NO" >> ../LAST_BUILD_INFO.txt', '\$', 2)
|
||||
self.command('mkdir -p build_log_' + testcaseId, '\$', 5)
|
||||
self.command('mv log/* ' + 'build_log_' + testcaseId, '\$', 5)
|
||||
self.command('mv compile_oai_enb.log ' + 'build_log_' + testcaseId, '\$', 5)
|
||||
@@ -747,7 +768,6 @@ class SSHConnection():
|
||||
doLoop = False
|
||||
logging.error('\u001B[1;37;41m eNB logging system did not show got sync! \u001B[0m')
|
||||
self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', ALL_PROCESSES_OK)
|
||||
self.CreateHtmlTabFooter(False)
|
||||
# In case of T tracer recording, we need to kill tshark on EPC side
|
||||
result = re.search('T_stdout', str(self.Initialize_eNB_args))
|
||||
if result is not None:
|
||||
@@ -763,7 +783,8 @@ class SSHConnection():
|
||||
copyin_res = self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.')
|
||||
if (copyin_res == 0):
|
||||
self.copyout(lIpAddr, lUserName, lPassWord, self.EPC_PcapFileName, lSourcePath + '/cmake_targets/.')
|
||||
sys.exit(1)
|
||||
self.prematureExit = True
|
||||
return
|
||||
else:
|
||||
self.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Starting"', '\$', 4)
|
||||
if rruCheck:
|
||||
@@ -957,8 +978,6 @@ class SSHConnection():
|
||||
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_NO_TUNNEL_INTERFACE, 'OAI UE')
|
||||
logging.error('\033[91mInitialize OAI UE Failed! \033[0m')
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
def checkDevTTYisUnlocked(self):
|
||||
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
||||
@@ -1109,8 +1128,8 @@ class SSHConnection():
|
||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE)
|
||||
if (pStatus < 0):
|
||||
self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
self.prematureExit = True
|
||||
return
|
||||
try:
|
||||
statusQueue = SimpleQueue()
|
||||
lock = Lock()
|
||||
@@ -1192,8 +1211,6 @@ class SSHConnection():
|
||||
else:
|
||||
self.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
|
||||
@@ -1254,14 +1271,14 @@ class SSHConnection():
|
||||
if (pStatus < 0):
|
||||
self.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
return
|
||||
multi_jobs = []
|
||||
status_queue = SimpleQueue()
|
||||
lock = Lock()
|
||||
nb_ue_to_connect = 0
|
||||
for device_id in self.UEDevices:
|
||||
if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach):
|
||||
self.UEDevicesStatus[nb_ue_to_connect] = UE_STATUS_ATTACHING
|
||||
p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,))
|
||||
p.daemon = True
|
||||
p.start()
|
||||
@@ -1272,9 +1289,8 @@ class SSHConnection():
|
||||
|
||||
if (status_queue.empty()):
|
||||
self.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK)
|
||||
self.CreateHtmlTabFooter(False)
|
||||
self.AutoTerminateUEandeNB()
|
||||
sys.exit(1)
|
||||
return
|
||||
else:
|
||||
attach_status = True
|
||||
html_queue = SimpleQueue()
|
||||
@@ -1290,6 +1306,11 @@ class SSHConnection():
|
||||
html_cell = '<pre style="background-color:white">UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds</pre>'
|
||||
html_queue.put(html_cell)
|
||||
if (attach_status):
|
||||
cnt = 0
|
||||
while cnt < len(self.UEDevices):
|
||||
if self.UEDevicesStatus[cnt] == UE_STATUS_ATTACHING:
|
||||
self.UEDevicesStatus[cnt] = UE_STATUS_ATTACHED
|
||||
cnt += 1
|
||||
self.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue)
|
||||
result = re.search('T_stdout', str(self.Initialize_eNB_args))
|
||||
if result is not None:
|
||||
@@ -1298,8 +1319,6 @@ class SSHConnection():
|
||||
else:
|
||||
self.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
def DetachUE_common(self, device_id):
|
||||
try:
|
||||
@@ -1320,14 +1339,16 @@ class SSHConnection():
|
||||
if (pStatus < 0):
|
||||
self.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
return
|
||||
multi_jobs = []
|
||||
cnt = 0
|
||||
for device_id in self.UEDevices:
|
||||
self.UEDevicesStatus[cnt] = UE_STATUS_DETACHING
|
||||
p = Process(target = self.DetachUE_common, args = (device_id,))
|
||||
p.daemon = True
|
||||
p.start()
|
||||
multi_jobs.append(p)
|
||||
cnt += 1
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
@@ -1335,6 +1356,10 @@ class SSHConnection():
|
||||
if result is not None:
|
||||
logging.debug('Waiting 5 seconds to fill up record file')
|
||||
time.sleep(5)
|
||||
cnt = 0
|
||||
while cnt < len(self.UEDevices):
|
||||
self.UEDevicesStatus[cnt] = UE_STATUS_DETACHED
|
||||
cnt += 1
|
||||
|
||||
def RebootUE_common(self, device_id):
|
||||
try:
|
||||
@@ -1455,6 +1480,11 @@ class SSHConnection():
|
||||
if len(self.UEDevices) == 0:
|
||||
logging.debug('\u001B[1;37;41m UE Not Found! \u001B[0m')
|
||||
sys.exit(1)
|
||||
if len(self.UEDevicesStatus) == 0:
|
||||
cnt = 0
|
||||
while cnt < len(self.UEDevices):
|
||||
self.UEDevicesStatus.append(UE_STATUS_DETACHED)
|
||||
cnt += 1
|
||||
self.close()
|
||||
|
||||
def GetAllCatMDevices(self, terminate_ue_flag):
|
||||
@@ -1561,8 +1591,6 @@ class SSHConnection():
|
||||
if (status_queue.empty()):
|
||||
self.CreateHtmlTestRow(htmlOptions, 'KO', ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
else:
|
||||
check_status = True
|
||||
html_queue = SimpleQueue()
|
||||
@@ -1579,8 +1607,6 @@ class SSHConnection():
|
||||
else:
|
||||
self.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
def GetAllUEIPAddresses(self):
|
||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||
@@ -1605,7 +1631,11 @@ class SSHConnection():
|
||||
self.close()
|
||||
return ue_ip_status
|
||||
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
||||
idx = 0
|
||||
for device_id in self.UEDevices:
|
||||
if self.UEDevicesStatus[idx] != UE_STATUS_ATTACHED:
|
||||
idx += 1
|
||||
continue
|
||||
count = 0
|
||||
while count < 4:
|
||||
self.command('stdbuf -o0 adb -s ' + device_id + ' shell ip addr show | grep rmnet', '\$', 15)
|
||||
@@ -1627,6 +1657,7 @@ class SSHConnection():
|
||||
ue_ip_status -= 1
|
||||
continue
|
||||
self.UEIPAddresses.append(UE_IPAddress)
|
||||
idx += 1
|
||||
self.close()
|
||||
return ue_ip_status
|
||||
|
||||
@@ -1721,8 +1752,7 @@ class SSHConnection():
|
||||
if (pStatus < 0):
|
||||
self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
return
|
||||
ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args))
|
||||
if ping_from_eNB is not None:
|
||||
if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '':
|
||||
@@ -1825,14 +1855,12 @@ class SSHConnection():
|
||||
if (pStatus < 0):
|
||||
self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
return
|
||||
ueIpStatus = self.GetAllUEIPAddresses()
|
||||
if (ueIpStatus < 0):
|
||||
self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
return
|
||||
multi_jobs = []
|
||||
i = 0
|
||||
lock = Lock()
|
||||
@@ -1850,8 +1878,6 @@ class SSHConnection():
|
||||
if (status_queue.empty()):
|
||||
self.CreateHtmlTestRow(self.ping_args, 'KO', ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
else:
|
||||
ping_status = True
|
||||
html_queue = SimpleQueue()
|
||||
@@ -1869,8 +1895,6 @@ class SSHConnection():
|
||||
else:
|
||||
self.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
def Iperf_ComputeTime(self):
|
||||
result = re.search('-t (?P<iperf_time>\d+)', str(self.iperf_args))
|
||||
@@ -2348,8 +2372,6 @@ class SSHConnection():
|
||||
if (pStatus < 0):
|
||||
self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '':
|
||||
Usage()
|
||||
sys.exit('Insufficient Parameter')
|
||||
@@ -2439,8 +2461,6 @@ class SSHConnection():
|
||||
else:
|
||||
self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
def Iperf(self):
|
||||
result = re.search('noS1', str(self.Initialize_eNB_args))
|
||||
@@ -2459,14 +2479,12 @@ class SSHConnection():
|
||||
if (pStatus < 0):
|
||||
self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
return
|
||||
ueIpStatus = self.GetAllUEIPAddresses()
|
||||
if (ueIpStatus < 0):
|
||||
self.CreateHtmlTestRow(self.iperf_args, 'KO', UE_IP_ADDRESS_ISSUE)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
return
|
||||
multi_jobs = []
|
||||
i = 0
|
||||
ue_num = len(self.UEIPAddresses)
|
||||
@@ -2485,8 +2503,6 @@ class SSHConnection():
|
||||
if (status_queue.empty()):
|
||||
self.CreateHtmlTestRow(self.iperf_args, 'KO', ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
else:
|
||||
iperf_status = True
|
||||
iperf_noperf = False
|
||||
@@ -2509,8 +2525,6 @@ class SSHConnection():
|
||||
else:
|
||||
self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
def CheckProcessExist(self, check_eNB, check_OAI_UE):
|
||||
multi_jobs = []
|
||||
@@ -2838,10 +2852,17 @@ class SSHConnection():
|
||||
rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected'
|
||||
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
|
||||
self.htmleNBFailureMsg += rrcMsg + '\n'
|
||||
if cdrxActivationMessageCount > 0:
|
||||
rrcMsg = 'eNB activated the CDRX Configuration for ' + str(cdrxActivationMessageCount) + ' time(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
|
||||
self.htmleNBFailureMsg += rrcMsg + '\n'
|
||||
if self.eNBOptions[int(self.eNB_instance)] != '':
|
||||
res1 = re.search('drx_Config_present prSetup', self.eNBOptions[int(self.eNB_instance)])
|
||||
if res1 is not None:
|
||||
if cdrxActivationMessageCount > 0:
|
||||
rrcMsg = 'eNB activated the CDRX Configuration for ' + str(cdrxActivationMessageCount) + ' time(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
|
||||
self.htmleNBFailureMsg += rrcMsg + '\n'
|
||||
else:
|
||||
rrcMsg = 'eNB did NOT ACTIVATE the CDRX Configuration'
|
||||
logging.debug('\u001B[1;37;43m ' + rrcMsg + ' \u001B[0m')
|
||||
self.htmleNBFailureMsg += rrcMsg + '\n'
|
||||
if rachCanceledProcedure > 0:
|
||||
rachMsg = nodeB_prefix + 'NB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m')
|
||||
@@ -2856,6 +2877,7 @@ class SSHConnection():
|
||||
rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU'
|
||||
logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m')
|
||||
self.htmleNBFailureMsg += rruMsg + '\n'
|
||||
self.prematureExit = True
|
||||
return ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
|
||||
if foundSegFault:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with a Segmentation Fault! \u001B[0m')
|
||||
@@ -3159,8 +3181,8 @@ class SSHConnection():
|
||||
logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze)
|
||||
if (logStatus < 0):
|
||||
self.CreateHtmlTestRow('N/A', 'KO', logStatus)
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
self.preamtureExit = True
|
||||
return
|
||||
else:
|
||||
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
else:
|
||||
@@ -3300,8 +3322,6 @@ class SSHConnection():
|
||||
if (logStatus != OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
|
||||
self.Initialize_OAI_UE_args = ''
|
||||
self.AutoTerminateUEandeNB()
|
||||
self.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
else:
|
||||
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
|
||||
self.htmlUEFailureMsg = '<b>' + ueAction + ' Completed</b>\n' + self.htmlUEFailureMsg
|
||||
@@ -3327,6 +3347,7 @@ class SSHConnection():
|
||||
self.ShowTestID()
|
||||
self.eNB_instance = '0'
|
||||
self.TerminateeNB()
|
||||
self.prematureExit = True
|
||||
|
||||
def IdleSleep(self):
|
||||
time.sleep(self.idle_sleep_time)
|
||||
@@ -3350,7 +3371,6 @@ class SSHConnection():
|
||||
self.command('cd cmake_targets', '\$', 5)
|
||||
self.command('rm -f build.log.zip', '\$', 5)
|
||||
self.command('zip build.log.zip build_log_*/*', '\$', 60)
|
||||
self.command('echo ' + Password + ' | sudo -S rm -rf build_log_*', '\$', 5)
|
||||
self.close()
|
||||
|
||||
def LogCollecteNB(self):
|
||||
@@ -3611,6 +3631,7 @@ class SSHConnection():
|
||||
pillMsg = ' <li><a data-toggle="pill" href="#'
|
||||
pillMsg += self.htmlTabRefs[count]
|
||||
pillMsg += '">'
|
||||
pillMsg += '__STATE_' + self.htmlTabNames[count] + '__'
|
||||
pillMsg += self.htmlTabNames[count]
|
||||
pillMsg += ' <span class="glyphicon glyphicon-'
|
||||
pillMsg += self.htmlTabIcons[count]
|
||||
@@ -3664,6 +3685,14 @@ class SSHConnection():
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' </div>\n')
|
||||
self.htmlFile.close()
|
||||
time.sleep(1)
|
||||
if passStatus:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
else:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
self.htmlFooterCreated = False
|
||||
|
||||
def CreateHtmlFooter(self, passStatus):
|
||||
@@ -4264,6 +4293,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
requested_tests=xmlRoot.findtext('TestCaseRequestedList',default='')
|
||||
if (SSH.nbTestXMLfiles == 1):
|
||||
SSH.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-0'))
|
||||
SSH.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-0'))
|
||||
repeatCount = xmlRoot.findtext('repeatCount',default='1')
|
||||
SSH.repeatCounts.append(int(repeatCount))
|
||||
all_tests=xmlRoot.findall('testCase')
|
||||
|
||||
exclusion_tests=exclusion_tests.split()
|
||||
@@ -4305,89 +4337,102 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
|
||||
SSH.CreateHtmlTabHeader()
|
||||
|
||||
for test_case_id in todo_tests:
|
||||
for test in all_tests:
|
||||
id = test.get('id')
|
||||
if test_case_id != id:
|
||||
continue
|
||||
SSH.testCase_id = id
|
||||
SSH.desc = test.findtext('desc')
|
||||
action = test.findtext('class')
|
||||
mode = test.findtext('mode')
|
||||
if (CheckClassValidity(action, id) == False):
|
||||
continue
|
||||
SSH.ShowTestID()
|
||||
GetParametersFromXML(action)
|
||||
if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE' or action == 'DataDisable_UE' or action == 'DataEnable_UE' or action == 'CheckStatusUE':
|
||||
if (SSH.ADBIPAddress != 'none'):
|
||||
terminate_ue_flag = False
|
||||
SSH.GetAllUEDevices(terminate_ue_flag)
|
||||
if action == 'Build_eNB':
|
||||
SSH.BuildeNB()
|
||||
elif action == 'WaitEndBuild_eNB':
|
||||
SSH.WaitBuildeNBisFinished()
|
||||
elif action == 'Initialize_eNB':
|
||||
SSH.InitializeeNB()
|
||||
elif action == 'Terminate_eNB':
|
||||
SSH.TerminateeNB()
|
||||
elif action == 'Initialize_UE':
|
||||
SSH.InitializeUE()
|
||||
elif action == 'Terminate_UE':
|
||||
SSH.TerminateUE()
|
||||
elif action == 'Attach_UE':
|
||||
SSH.AttachUE()
|
||||
elif action == 'Detach_UE':
|
||||
SSH.DetachUE()
|
||||
elif action == 'DataDisable_UE':
|
||||
SSH.DataDisableUE()
|
||||
elif action == 'DataEnable_UE':
|
||||
SSH.DataEnableUE()
|
||||
elif action == 'CheckStatusUE':
|
||||
SSH.CheckStatusUE()
|
||||
elif action == 'Build_OAI_UE':
|
||||
SSH.BuildOAIUE()
|
||||
elif action == 'Initialize_OAI_UE':
|
||||
SSH.InitializeOAIUE()
|
||||
elif action == 'Terminate_OAI_UE':
|
||||
SSH.TerminateOAIUE()
|
||||
elif action == 'Initialize_CatM_module':
|
||||
SSH.InitializeCatM()
|
||||
elif action == 'Terminate_CatM_module':
|
||||
SSH.TerminateCatM()
|
||||
elif action == 'Attach_CatM_module':
|
||||
SSH.AttachCatM()
|
||||
elif action == 'Detach_CatM_module':
|
||||
SSH.TerminateCatM()
|
||||
elif action == 'Ping_CatM_module':
|
||||
SSH.PingCatM()
|
||||
elif action == 'Ping':
|
||||
SSH.Ping()
|
||||
elif action == 'Iperf':
|
||||
SSH.Iperf()
|
||||
elif action == 'Reboot_UE':
|
||||
SSH.RebootUE()
|
||||
elif action == 'Initialize_HSS':
|
||||
SSH.InitializeHSS()
|
||||
elif action == 'Terminate_HSS':
|
||||
SSH.TerminateHSS()
|
||||
elif action == 'Initialize_MME':
|
||||
SSH.InitializeMME()
|
||||
elif action == 'Terminate_MME':
|
||||
SSH.TerminateMME()
|
||||
elif action == 'Initialize_SPGW':
|
||||
SSH.InitializeSPGW()
|
||||
elif action == 'Terminate_SPGW':
|
||||
SSH.TerminateSPGW()
|
||||
elif action == 'Initialize_FlexranCtrl':
|
||||
SSH.InitializeFlexranCtrl()
|
||||
elif action == 'Terminate_FlexranCtrl':
|
||||
SSH.TerminateFlexranCtrl()
|
||||
elif action == 'IdleSleep':
|
||||
SSH.IdleSleep()
|
||||
else:
|
||||
sys.exit('Invalid action')
|
||||
|
||||
SSH.CreateHtmlTabFooter(True)
|
||||
cnt = 0
|
||||
SSH.prematureExit = True
|
||||
while cnt < SSH.repeatCounts[0] and SSH.prematureExit:
|
||||
SSH.prematureExit = False
|
||||
for test_case_id in todo_tests:
|
||||
for test in all_tests:
|
||||
id = test.get('id')
|
||||
if test_case_id != id:
|
||||
continue
|
||||
SSH.testCase_id = id
|
||||
SSH.desc = test.findtext('desc')
|
||||
action = test.findtext('class')
|
||||
if (CheckClassValidity(action, id) == False):
|
||||
continue
|
||||
SSH.ShowTestID()
|
||||
GetParametersFromXML(action)
|
||||
if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE' or action == 'DataDisable_UE' or action == 'DataEnable_UE' or action == 'CheckStatusUE':
|
||||
if (SSH.ADBIPAddress != 'none'):
|
||||
terminate_ue_flag = False
|
||||
SSH.GetAllUEDevices(terminate_ue_flag)
|
||||
if action == 'Build_eNB':
|
||||
SSH.BuildeNB()
|
||||
elif action == 'WaitEndBuild_eNB':
|
||||
SSH.WaitBuildeNBisFinished()
|
||||
elif action == 'Initialize_eNB':
|
||||
SSH.InitializeeNB()
|
||||
elif action == 'Terminate_eNB':
|
||||
SSH.TerminateeNB()
|
||||
elif action == 'Initialize_UE':
|
||||
SSH.InitializeUE()
|
||||
elif action == 'Terminate_UE':
|
||||
SSH.TerminateUE()
|
||||
elif action == 'Attach_UE':
|
||||
SSH.AttachUE()
|
||||
elif action == 'Detach_UE':
|
||||
SSH.DetachUE()
|
||||
elif action == 'DataDisable_UE':
|
||||
SSH.DataDisableUE()
|
||||
elif action == 'DataEnable_UE':
|
||||
SSH.DataEnableUE()
|
||||
elif action == 'CheckStatusUE':
|
||||
SSH.CheckStatusUE()
|
||||
elif action == 'Build_OAI_UE':
|
||||
SSH.BuildOAIUE()
|
||||
elif action == 'Initialize_OAI_UE':
|
||||
SSH.InitializeOAIUE()
|
||||
elif action == 'Terminate_OAI_UE':
|
||||
SSH.TerminateOAIUE()
|
||||
elif action == 'Initialize_CatM_module':
|
||||
SSH.InitializeCatM()
|
||||
elif action == 'Terminate_CatM_module':
|
||||
SSH.TerminateCatM()
|
||||
elif action == 'Attach_CatM_module':
|
||||
SSH.AttachCatM()
|
||||
elif action == 'Detach_CatM_module':
|
||||
SSH.TerminateCatM()
|
||||
elif action == 'Ping_CatM_module':
|
||||
SSH.PingCatM()
|
||||
elif action == 'Ping':
|
||||
SSH.Ping()
|
||||
elif action == 'Iperf':
|
||||
SSH.Iperf()
|
||||
elif action == 'Reboot_UE':
|
||||
SSH.RebootUE()
|
||||
elif action == 'Initialize_HSS':
|
||||
SSH.InitializeHSS()
|
||||
elif action == 'Terminate_HSS':
|
||||
SSH.TerminateHSS()
|
||||
elif action == 'Initialize_MME':
|
||||
SSH.InitializeMME()
|
||||
elif action == 'Terminate_MME':
|
||||
SSH.TerminateMME()
|
||||
elif action == 'Initialize_SPGW':
|
||||
SSH.InitializeSPGW()
|
||||
elif action == 'Terminate_SPGW':
|
||||
SSH.TerminateSPGW()
|
||||
elif action == 'Initialize_FlexranCtrl':
|
||||
SSH.InitializeFlexranCtrl()
|
||||
elif action == 'Terminate_FlexranCtrl':
|
||||
SSH.TerminateFlexranCtrl()
|
||||
elif action == 'IdleSleep':
|
||||
SSH.IdleSleep()
|
||||
else:
|
||||
sys.exit('Invalid action')
|
||||
if SSH.prematureExit:
|
||||
break
|
||||
if SSH.prematureExit:
|
||||
break
|
||||
cnt += 1
|
||||
if cnt == SSH.repeatCounts[0] and SSH.prematureExit:
|
||||
logging.debug('Testsuite failed ' + str(cnt) + ' time(s)')
|
||||
SSH.CreateHtmlTabFooter(False)
|
||||
sys.exit('Failed Scenario')
|
||||
else:
|
||||
logging.info('Testsuite passed after ' + str(cnt) + ' time(s)')
|
||||
SSH.CreateHtmlTabFooter(True)
|
||||
else:
|
||||
Usage()
|
||||
sys.exit('Invalid mode')
|
||||
|
||||
@@ -167,7 +167,7 @@ function variant__v2__basic_sim {
|
||||
}
|
||||
|
||||
function variant__v3__phy_sim {
|
||||
NB_PATTERN_FILES=3
|
||||
NB_PATTERN_FILES=12
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
|
||||
}
|
||||
@@ -195,6 +195,7 @@ function variant__v7__enb_ethernet {
|
||||
NB_PATTERN_FILES=8
|
||||
BUILD_OPTIONS="--eNB"
|
||||
}
|
||||
|
||||
function variant__v8__ue_ethernet {
|
||||
VM_MEMORY=4096
|
||||
ARCHIVES_LOC=ue_eth
|
||||
@@ -208,6 +209,7 @@ function variant__v10__flexran_rtc {
|
||||
BUILD_OPTIONS="cmake . && make -j2"
|
||||
VARIANT_INFO="non-OSA"
|
||||
}
|
||||
|
||||
function variant__v20__l1_sim {
|
||||
ARCHIVES_LOC=l1_sim
|
||||
RUN_OPTIONS="complex"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<testCase id="030111">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/10MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf --eNBs.[0].component_carriers.[0].drx_Config_present prRelease</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-10-cdrx-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz-CDRX-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
030112 040302 040512 040612 040650 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030112">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/10MHz) with CDRX</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf --eNBs.[0].component_carriers.[0].drx_Config_present prSetup</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040302">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040512">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040612">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040650">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -22,8 +22,9 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-f1-05</htmlTabRef>
|
||||
<htmlTabName>Test-F1-CU/DU-05MHz</htmlTabName>
|
||||
<htmlTabName>Test-F1-CU-DU-05MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-f1-10</htmlTabRef>
|
||||
<htmlTabName>Test-F1-CU/DU-10MHz</htmlTabName>
|
||||
<htmlTabName>Test-F1-CU-DU-10MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-f1-20</htmlTabRef>
|
||||
<htmlTabName>Test-F1-CU/DU-20MHz</htmlTabName>
|
||||
<htmlTabName>Test-F1-CU-DU-20MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>test-multi-rru-10</htmlTabRef>
|
||||
<htmlTabName>Test-Multi-RRU-10MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030211 030212 030213
|
||||
030111 030112 030113
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>test-10mhz-orange</htmlTabRef>
|
||||
<htmlTabName>Test-10Mhz-Orange</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
090109
|
||||
090110 000001 090109
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>test-10mHz-sfr</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz-SFR</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
090109
|
||||
090111 000001 090109
|
||||
|
||||
@@ -2645,21 +2645,21 @@ add_executable(nr_dlschsim
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${T_SOURCE})
|
||||
target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
|
||||
add_executable(nr_pbchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${T_SOURCE})
|
||||
target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
|
||||
#PUCCH ---> Prashanth
|
||||
add_executable(nr_pucchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${T_SOURCE})
|
||||
target_link_libraries(nr_pucchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
target_link_libraries(nr_pucchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
#PUCCH ---> Prashanth
|
||||
|
||||
add_executable(nr_dlsim
|
||||
@@ -2673,7 +2673,7 @@ add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${T_SOURCE})
|
||||
target_link_libraries(nr_ulschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
target_link_libraries(nr_ulschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
||||
|
||||
add_executable(nr_ulsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
|
||||
|
||||
@@ -101,8 +101,8 @@ typedef struct paramdef {
|
||||
char *helpstr; /* help string */
|
||||
unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */
|
||||
union { /* pointer to the parameter value, completed by the config module */
|
||||
char **strptr;
|
||||
char **strlistptr;
|
||||
char **strptr;
|
||||
char **strlistptr;
|
||||
uint8_t *u8ptr;
|
||||
int8_t *i8ptr;
|
||||
uint16_t *u16ptr;
|
||||
|
||||
@@ -184,7 +184,7 @@ void config_printhelp(paramdef_t *params,int numparams, char *prefix) {
|
||||
printf("--------------------------------------------------------------------\n\n");
|
||||
}
|
||||
|
||||
int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
|
||||
int config_execcheck(paramdef_t *params, int numparams, char *prefix) {
|
||||
int st=0;
|
||||
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
@@ -204,7 +204,7 @@ int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
|
||||
return st;
|
||||
}
|
||||
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix) {
|
||||
int config_get(paramdef_t *params, int numparams, char *prefix) {
|
||||
int ret= -1;
|
||||
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
@@ -215,11 +215,11 @@ int config_get(paramdef_t *params,int numparams, char *prefix) {
|
||||
configmodule_interface_t *cfgif = config_get_if();
|
||||
|
||||
if (cfgif != NULL) {
|
||||
ret = config_get_if()->get(params, numparams,prefix);
|
||||
ret = config_get_if()->get(params, numparams, prefix);
|
||||
|
||||
if (ret >= 0) {
|
||||
config_process_cmdline(params,numparams,prefix);
|
||||
config_execcheck(params,numparams,prefix);
|
||||
config_process_cmdline(params, numparams, prefix);
|
||||
config_execcheck(params, numparams, prefix);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
+45
-34
@@ -123,7 +123,7 @@ extern void nr_phy_config_request(NR_PHY_Config_t *gNB);
|
||||
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
|
||||
extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
|
||||
void init_RU(char *);
|
||||
void init_NR_RU(char *);
|
||||
void stop_RU(int nb_ru);
|
||||
void do_ru_sync(RU_t *ru);
|
||||
|
||||
@@ -147,7 +147,8 @@ extern int numerology;
|
||||
|
||||
extern void wait_gNBs(void);
|
||||
|
||||
int attach_rru(RU_t *ru) {
|
||||
int attach_rru(RU_t *ru)
|
||||
{
|
||||
ssize_t msg_len,len;
|
||||
RRU_CONFIG_msg_t rru_config_msg;
|
||||
int received_capabilities=0;
|
||||
@@ -204,9 +205,10 @@ int attach_rru(RU_t *ru) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int connect_rau(RU_t *ru) {
|
||||
int connect_rau(RU_t *ru)
|
||||
{
|
||||
RRU_CONFIG_msg_t rru_config_msg;
|
||||
ssize_t msg_len;
|
||||
ssize_t msg_len;
|
||||
int tick_received = 0;
|
||||
int configuration_received = 0;
|
||||
RRU_capabilities_t *cap;
|
||||
@@ -238,15 +240,15 @@ int connect_rau(RU_t *ru) {
|
||||
|
||||
switch (ru->function) {
|
||||
case NGFI_RRU_IF4p5:
|
||||
cap->FH_fmt = OAI_IF4p5_only;
|
||||
cap->FH_fmt = OAI_IF4p5_only;
|
||||
break;
|
||||
|
||||
case NGFI_RRU_IF5:
|
||||
cap->FH_fmt = OAI_IF5_only;
|
||||
cap->FH_fmt = OAI_IF5_only;
|
||||
break;
|
||||
|
||||
case MBP_RRU_IF5:
|
||||
cap->FH_fmt = MBP_IF5;
|
||||
cap->FH_fmt = MBP_IF5;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -301,34 +303,39 @@ int connect_rau(RU_t *ru) {
|
||||
/* Southbound Fronthaul functions, RCC/RAU */
|
||||
|
||||
// southbound IF5 fronthaul for 16-bit OAI format
|
||||
static inline void fh_if5_south_out(RU_t *ru,int frame,int slot,uint64_t timestamp) {
|
||||
static inline void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
send_IF5(ru, timestamp, slot, &ru->seqno, IF5_RRH_GW_DL);
|
||||
}
|
||||
|
||||
// southbound IF5 fronthaul for Mobipass packet format
|
||||
static inline void fh_if5_mobipass_south_out(RU_t *ru,int frame,int slot,uint64_t timestamp) {
|
||||
static inline void fh_if5_mobipass_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
send_IF5(ru, timestamp, slot, &ru->seqno, IF5_MOBIPASS);
|
||||
}
|
||||
|
||||
// southbound IF4p5 fronthaul
|
||||
static inline void fh_if4p5_south_out(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
static inline void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
LOG_D(PHY,"Sending IF4p5 for frame %d subframe %d\n",ru->proc.frame_tx,ru->proc.tti_tx);
|
||||
|
||||
if (nr_slot_select(&ru->gNB_list[0]->gNB_config,ru->proc.tti_tx)!=SF_UL)
|
||||
send_IF4p5(ru,frame, slot, IF4p5_PDLFFT);
|
||||
if (nr_slot_select(&ru->gNB_list[0]->gNB_config,ru->proc.tti_tx)!=SF_UL) send_IF4p5(ru,frame, slot, IF4p5_PDLFFT);
|
||||
}
|
||||
|
||||
/*************************************************************/
|
||||
/* Input Fronthaul from south RCC/RAU */
|
||||
|
||||
// Synchronous if5 from south
|
||||
void fh_if5_south_in(RU_t *ru,int *frame, int *tti) {
|
||||
void fh_if5_south_in(RU_t *ru,
|
||||
int *frame,
|
||||
int *tti)
|
||||
{
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
recv_IF5(ru, &proc->timestamp_rx, *tti, IF5_RRH_GW_UL);
|
||||
@@ -355,7 +362,10 @@ void fh_if5_south_in(RU_t *ru,int *frame, int *tti) {
|
||||
}
|
||||
|
||||
// Synchronous if4p5 from south
|
||||
void fh_if4p5_south_in(RU_t *ru,int *frame,int *slot) {
|
||||
void fh_if4p5_south_in(RU_t *ru,
|
||||
int *frame,
|
||||
int *slot)
|
||||
{
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
int f,sl;
|
||||
@@ -1361,9 +1371,9 @@ static void *ru_thread( void *param ) {
|
||||
}
|
||||
} else {
|
||||
// Start IF device if any
|
||||
if (ru->start_if) {
|
||||
if (ru->nr_start_if) {
|
||||
LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx);
|
||||
AssertFatal(ru->start_if(ru,NULL) == 0, "Could not start the IF device\n");
|
||||
AssertFatal(ru->nr_start_if(ru,NULL) == 0, "Could not start the IF device\n");
|
||||
|
||||
if (ru->if_south == LOCAL_RF) ret = connect_rau(ru);
|
||||
else ret = attach_rru(ru);
|
||||
@@ -1594,7 +1604,7 @@ void *ru_thread_synch(void *arg) {
|
||||
}
|
||||
*/
|
||||
|
||||
int start_if(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB) {
|
||||
int nr_start_if(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB) {
|
||||
return(ru->ifdevice.trx_start_func(&ru->ifdevice));
|
||||
}
|
||||
|
||||
@@ -1951,7 +1961,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->feprx = NULL; // nothing (this is a time-domain signal)
|
||||
ru->feptx_ofdm = NULL; // nothing (this is a time-domain signal)
|
||||
ru->feptx_prec = NULL; // nothing (this is a time-domain signal)
|
||||
ru->start_if = start_if; // need to start the if interface for if5
|
||||
ru->nr_start_if = nr_start_if; // need to start the if interface for if5
|
||||
ru->ifdevice.host_type = RRU_HOST;
|
||||
ru->rfdevice.host_type = RRU_HOST;
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
@@ -1975,7 +1985,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->feprx = (get_nprocs()<=2) ? fep_full :ru_fep_full_2thread; // RX DFTs
|
||||
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU)
|
||||
ru->feptx_prec = NULL;
|
||||
ru->start_if = start_if; // need to start the if interface for if4p5
|
||||
ru->nr_start_if = nr_start_if; // need to start the if interface for if4p5
|
||||
ru->ifdevice.host_type = RRU_HOST;
|
||||
ru->rfdevice.host_type = RRU_HOST;
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
@@ -1999,7 +2009,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->feptx_prec = feptx_prec; // this is fep with idft and precoding
|
||||
ru->fh_north_in = NULL; // no incoming fronthaul from north
|
||||
ru->fh_north_out = NULL; // no outgoing fronthaul to north
|
||||
ru->start_if = NULL; // no if interface
|
||||
ru->nr_start_if = NULL; // no if interface
|
||||
ru->rfdevice.host_type = RAU_HOST;
|
||||
}
|
||||
|
||||
@@ -2025,14 +2035,14 @@ void set_function_spec_param(RU_t *ru) {
|
||||
case REMOTE_IF5: // the remote unit is IF5 RRU
|
||||
ru->do_prach = 0;
|
||||
ru->feprx = (get_nprocs()<=2) ? fep_full : fep_full; // this is frequency-shift + DFTs
|
||||
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
|
||||
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs
|
||||
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
|
||||
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs
|
||||
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
|
||||
ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission
|
||||
ru->fh_south_asynch_in = NULL; // no asynchronous UL
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->stop_rf = NULL;
|
||||
ru->start_if = start_if; // need to start if interface for IF5
|
||||
ru->nr_start_if = nr_start_if; // need to start if interface for IF5
|
||||
ru->ifdevice.host_type = RAU_HOST;
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
ru->ifdevice.configure_rru = configure_ru;
|
||||
@@ -2058,7 +2068,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_north_asynch_in = NULL;
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->stop_rf = NULL;
|
||||
ru->start_if = start_if; // need to start if interface for IF4p5
|
||||
ru->nr_start_if = nr_start_if; // need to start if interface for IF4p5
|
||||
ru->ifdevice.host_type = RAU_HOST;
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
ru->ifdevice.configure_rru = configure_ru;
|
||||
@@ -2081,7 +2091,8 @@ void set_function_spec_param(RU_t *ru) {
|
||||
|
||||
extern void RCconfig_RU(void);
|
||||
|
||||
void init_RU(char *rf_config_file) {
|
||||
void init_NR_RU(char *rf_config_file)
|
||||
{
|
||||
int ru_id;
|
||||
RU_t *ru;
|
||||
PHY_VARS_gNB *gNB0= (PHY_VARS_gNB *)NULL;
|
||||
@@ -2105,10 +2116,10 @@ void init_RU(char *rf_config_file) {
|
||||
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
LOG_D(PHY,"Process RC.ru[%d]\n",ru_id);
|
||||
ru = RC.ru[ru_id];
|
||||
ru = RC.ru[ru_id];
|
||||
ru->rf_config_file = rf_config_file;
|
||||
ru->idx = ru_id;
|
||||
ru->ts_offset = 0;
|
||||
ru->idx = ru_id;
|
||||
ru->ts_offset = 0;
|
||||
// use gNB_list[0] as a reference for RU frame parameters
|
||||
// NOTE: multiple CC_id are not handled here yet!
|
||||
|
||||
@@ -2149,7 +2160,7 @@ void init_RU(char *rf_config_file) {
|
||||
}
|
||||
}
|
||||
|
||||
// LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],NB_timing[ru->if_timing],ru->function);
|
||||
//LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],NB_timing[ru->if_timing],ru->function);
|
||||
set_function_spec_param(ru);
|
||||
LOG_I(PHY,"Starting ru_thread %d\n",ru_id);
|
||||
init_RU_proc(ru);
|
||||
@@ -2160,9 +2171,8 @@ void init_RU(char *rf_config_file) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void stop_RU(int nb_ru) {
|
||||
void stop_RU(int nb_ru)
|
||||
{
|
||||
for (int inst = 0; inst < nb_ru; inst++) {
|
||||
LOG_I(PHY, "Stopping RU %d processing threads\n", inst);
|
||||
kill_NR_RU_proc(inst);
|
||||
@@ -2172,7 +2182,8 @@ void stop_RU(int nb_ru) {
|
||||
|
||||
/* --------------------------------------------------------*/
|
||||
/* from here function to use configuration module */
|
||||
void RCconfig_RU(void) {
|
||||
void RCconfig_RU(void)
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
paramdef_t RUParams[] = GNBRUPARAMS_DESC;
|
||||
paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define START_MSC softmodem_params.start_msc
|
||||
#define CMDLINE_LOGPARAMS_DESC { \
|
||||
#define CMDLINE_LOGPARAMS_DESC_NR { \
|
||||
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
|
||||
|
||||
@@ -126,7 +126,7 @@ unsigned char NB_gNB_INST = 1;
|
||||
int UE_scan = 1;
|
||||
int UE_scan_carrier = 0;
|
||||
runmode_t mode = normal_txrx;
|
||||
double snr_dB=20;
|
||||
static double snr_dB=20;
|
||||
|
||||
FILE *input_fd=NULL;
|
||||
|
||||
@@ -510,7 +510,7 @@ static void get_options(void) {
|
||||
uint32_t glog_level, glog_verbosity;
|
||||
uint32_t start_telnetsrv;
|
||||
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ;
|
||||
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC ;
|
||||
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC_NR ;
|
||||
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||
|
||||
if (strlen(in_path) > 0) {
|
||||
@@ -1047,7 +1047,7 @@ int main( int argc, char **argv )
|
||||
|
||||
if (RC.nb_RU >0) {
|
||||
printf("Initializing RU threads\n");
|
||||
init_RU(rf_config_file);
|
||||
init_NR_RU(rf_config_file);
|
||||
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
RC.ru[ru_id]->rf_map.card=0;
|
||||
|
||||
@@ -67,7 +67,7 @@ extern void stop_gNB(int);
|
||||
extern void kill_gNB_proc(int inst);
|
||||
|
||||
// In nr-ru.c
|
||||
extern void init_RU(char *);
|
||||
extern void init_NR_RU(char *);
|
||||
extern void init_RU_proc(RU_t *ru);
|
||||
extern void stop_RU(int nb_ru);
|
||||
extern void kill_NR_RU_proc(int inst);
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
#include "openair1/SIMULATION/TOOLS/sim.h"
|
||||
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
@@ -112,9 +113,9 @@ volatile int start_eNB = 0;
|
||||
volatile int start_UE = 0;
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
static clock_source_t clock_source = internal;
|
||||
static clock_source_t clock_source = internal;
|
||||
int single_thread_flag=1;
|
||||
double snr_dB=20;
|
||||
static double snr_dB=20;
|
||||
|
||||
int threequarter_fs=0;
|
||||
|
||||
@@ -409,7 +410,7 @@ static void get_options(void) {
|
||||
uint32_t glog_level, glog_verbosity;
|
||||
uint32_t start_telnetsrv=0;
|
||||
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC_UE ;
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC_NR ;
|
||||
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||
|
||||
if (strlen(in_path) > 0) {
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, iptr:&do_forms, defintval:0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:&do_forms, defintval:0, TYPE_INT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \
|
||||
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
|
||||
+40
-34
@@ -37,32 +37,33 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "SCHED_NR/fapi_nr_l1.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
/*
|
||||
extern uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn);
|
||||
extern int32_t get_uldl_offset(int nr_bandP);
|
||||
extern int32_t get_nr_uldl_offset(int nr_bandP);*/
|
||||
extern openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
|
||||
int l1_north_init_gNB() {
|
||||
int i,j;
|
||||
|
||||
int l1_north_init_gNB()
|
||||
{
|
||||
if (RC.nb_nr_L1_inst > 0 && RC.nb_nr_L1_CC != NULL && RC.gNB != NULL) {
|
||||
AssertFatal(RC.nb_nr_L1_inst>0,"nb_nr_L1_inst=%d\n",RC.nb_nr_L1_inst);
|
||||
AssertFatal(RC.nb_nr_L1_CC!=NULL,"nb_nr_L1_CC is null\n");
|
||||
AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n");
|
||||
LOG_I(PHY,"%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
|
||||
|
||||
for (i=0; i<RC.nb_nr_L1_inst; i++) {
|
||||
for (int i=0; i<RC.nb_nr_L1_inst; i++) {
|
||||
AssertFatal(RC.gNB[i]!=NULL,"RC.gNB[%d] is null\n",i);
|
||||
AssertFatal(RC.nb_nr_L1_CC[i]>0,"RC.nb_nr_L1_CC[%d]=%d\n",i,RC.nb_nr_L1_CC[i]);
|
||||
LOG_I(PHY,"%s() RC.nb_nr_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_nr_L1_CC[i]);
|
||||
|
||||
for (j=0; j<RC.nb_nr_L1_CC[i]; j++) {
|
||||
for (int j=0; j<RC.nb_nr_L1_CC[i]; j++) {
|
||||
AssertFatal(RC.gNB[i][j]!=NULL,"RC.gNB[%d][%d] is null\n",i,j);
|
||||
|
||||
if ((RC.gNB[i][j]->if_inst = NR_IF_Module_init(i))<0) return(-1);
|
||||
|
||||
LOG_I(PHY,"%s() RC.gNB[%d][%d] installing callbacks\n", __FUNCTION__, i, j);
|
||||
RC.gNB[i][j]->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
RC.gNB[i][j]->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
RC.gNB[i][j]->if_inst->NR_Schedule_response = nr_schedule_response;
|
||||
}
|
||||
}
|
||||
@@ -356,41 +357,46 @@ void install_schedule_handlers(IF_Module_t *if_inst)
|
||||
/// this function is a temporary addition for NR configuration
|
||||
|
||||
|
||||
void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,int Nid_cell,uint64_t position_in_burst) {
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
|
||||
nfapi_nr_config_request_t *gNB_config = &gNB->gNB_config;
|
||||
void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
|
||||
int N_RB_DL,
|
||||
int N_RB_UL,
|
||||
int mu,
|
||||
int Nid_cell,
|
||||
uint64_t position_in_burst)
|
||||
{
|
||||
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
|
||||
nfapi_nr_config_request_t *gNB_config = &gNB->gNB_config;
|
||||
//overwrite for new NR parameters
|
||||
gNB_config->nfapi_config.rf_bands.rf_band[0] = 78;
|
||||
gNB_config->nfapi_config.nrarfcn.value = 620000;
|
||||
gNB_config->subframe_config.numerology_index_mu.value = mu;
|
||||
gNB_config->subframe_config.duplex_mode.value = TDD;
|
||||
gNB_config->rf_config.dl_carrier_bandwidth.value = N_RB_DL;
|
||||
gNB_config->rf_config.ul_carrier_bandwidth.value = N_RB_UL;
|
||||
gNB_config->sch_config.half_frame_index.value = 0;
|
||||
gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
|
||||
gNB_config->sch_config.n_ssb_crb.value = (N_RB_DL-20);
|
||||
gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
|
||||
gNB_config->sch_config.physical_cell_id.value=Nid_cell;
|
||||
gNB_config->sch_config.ssb_scg_position_in_burst.value=position_in_burst;
|
||||
gNB_config->nfapi_config.rf_bands.rf_band[0] = 78;
|
||||
gNB_config->nfapi_config.nrarfcn.value = 620000;
|
||||
gNB_config->subframe_config.numerology_index_mu.value = mu;
|
||||
gNB_config->subframe_config.duplex_mode.value = TDD;
|
||||
gNB_config->rf_config.dl_carrier_bandwidth.value = N_RB_DL;
|
||||
gNB_config->rf_config.ul_carrier_bandwidth.value = N_RB_UL;
|
||||
gNB_config->sch_config.half_frame_index.value = 0;
|
||||
gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
|
||||
gNB_config->sch_config.n_ssb_crb.value = (N_RB_DL-20);
|
||||
gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
|
||||
gNB_config->sch_config.physical_cell_id.value = Nid_cell;
|
||||
gNB_config->sch_config.ssb_scg_position_in_burst.value = position_in_burst;
|
||||
gNB_config->subframe_config.dl_cyclic_prefix_type.value = (fp->Ncp == NORMAL) ? NFAPI_CP_NORMAL : NFAPI_CP_EXTENDED;
|
||||
|
||||
gNB->mac_enabled = 1;
|
||||
gNB->mac_enabled = 1;
|
||||
fp->dl_CarrierFreq = 3500000000;//from_nrarfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.nrarfcn.value);
|
||||
fp->ul_CarrierFreq = 3500000000;//fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
|
||||
fp->threequarter_fs = 0;
|
||||
fp->threequarter_fs= 0;
|
||||
nr_init_frame_parms(gNB_config, fp);
|
||||
gNB->configured = 1;
|
||||
gNB->configured = 1;
|
||||
LOG_I(PHY,"gNB configured\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
|
||||
uint8_t Mod_id = phy_config->Mod_id;
|
||||
int CC_id = phy_config->CC_id;
|
||||
NR_DL_FRAME_PARMS *fp = &RC.gNB[Mod_id][CC_id]->frame_parms;
|
||||
nfapi_nr_config_request_t *gNB_config = &RC.gNB[Mod_id][CC_id]->gNB_config;
|
||||
void nr_phy_config_request(NR_PHY_Config_t *phy_config)
|
||||
{
|
||||
uint8_t Mod_id = phy_config->Mod_id;
|
||||
int CC_id = phy_config->CC_id;
|
||||
NR_DL_FRAME_PARMS *fp = &RC.gNB[Mod_id][CC_id]->frame_parms;
|
||||
nfapi_nr_config_request_t *gNB_config = &RC.gNB[Mod_id][CC_id]->gNB_config;
|
||||
gNB_config->nfapi_config.rf_bands.rf_band[0] = phy_config->cfg->nfapi_config.rf_bands.rf_band[0]; //22
|
||||
gNB_config->nfapi_config.nrarfcn.value = phy_config->cfg->nfapi_config.nrarfcn.value; //6600
|
||||
gNB_config->subframe_config.numerology_index_mu.value = phy_config->cfg->subframe_config.numerology_index_mu.value;//1
|
||||
@@ -401,7 +407,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
|
||||
gNB_config->sch_config.n_ssb_crb.value = (phy_config->cfg->rf_config.dl_carrier_bandwidth.value-20);
|
||||
gNB_config->sch_config.physical_cell_id.value = phy_config->cfg->sch_config.physical_cell_id.value;
|
||||
gNB_config->sch_config.ssb_scg_position_in_burst.value= phy_config->cfg->sch_config.ssb_scg_position_in_burst.value;
|
||||
gNB_config->sch_config.ssb_periodicity.value = phy_config->cfg->sch_config.ssb_periodicity.value;
|
||||
gNB_config->sch_config.ssb_periodicity.value = phy_config->cfg->sch_config.ssb_periodicity.value;
|
||||
|
||||
if (phy_config->cfg->subframe_config.duplex_mode.value == 0) {
|
||||
gNB_config->subframe_config.duplex_mode.value = TDD;
|
||||
@@ -411,7 +417,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
|
||||
|
||||
RC.gNB[Mod_id][CC_id]->mac_enabled = 1;
|
||||
fp->dl_CarrierFreq = from_nrarfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.nrarfcn.value);
|
||||
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
|
||||
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_nr_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
|
||||
fp->threequarter_fs = openair0_cfg[0].threequarter_fs;
|
||||
LOG_I(PHY,"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,DL freq %u)\n",
|
||||
Mod_id,
|
||||
|
||||
@@ -293,6 +293,8 @@ typedef struct RU_proc_t_s {
|
||||
pthread_cond_t cond_eNBs;
|
||||
/// condition variable for gNB signal
|
||||
pthread_cond_t cond_gNBs;
|
||||
/// condition variable for ru_thread
|
||||
pthread_cond_t cond_ru_thread;
|
||||
/// mutex for RU FH
|
||||
pthread_mutex_t mutex_FH;
|
||||
pthread_mutex_t mutex_FH1;
|
||||
@@ -419,6 +421,8 @@ typedef struct RU_t_s{
|
||||
int north_out_cnt;
|
||||
/// flag to indicate the RU is a slave to another source
|
||||
int is_slave;
|
||||
/// flag to indicate if the RU has to perform OTA sync
|
||||
int ota_sync_enable;
|
||||
/// flag to indicate that the RU should generate the DMRS sequence in slot 2 (subframe 1) for OTA synchronization and calibration
|
||||
int generate_dmrs_sync;
|
||||
/// flag to indicate if the RU has a control channel
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
@param *phy_vars_rn pointer to RN variables
|
||||
*/
|
||||
void phy_procedures_UE_lte(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type);
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/*! \brief Top-level entry routine for relay node procedures actinf as UE. This proc will make us of the existing UE procs.
|
||||
@param last_slot Index of last slot (0-19)
|
||||
@param next_slot Index of next_slot (0-19)
|
||||
|
||||
@@ -81,9 +81,8 @@ int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) {
|
||||
return (0);
|
||||
}
|
||||
//uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
|
||||
|
||||
int32_t get_uldl_offset(int eutra_bandP) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0
|
||||
|
||||
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {return(0);}
|
||||
|
||||
uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
|
||||
//uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
|
||||
int32_t get_uldl_offset(int nr_bandP) {return(0);}
|
||||
|
||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);}
|
||||
|
||||
@@ -60,14 +60,10 @@ double cpuf;
|
||||
int nfapi_mode=0;
|
||||
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0);}
|
||||
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); }
|
||||
|
||||
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
|
||||
|
||||
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); }
|
||||
|
||||
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {return(0);}
|
||||
|
||||
uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
|
||||
//uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
|
||||
int32_t get_uldl_offset(int nr_bandP) {return(0);}
|
||||
|
||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);}
|
||||
|
||||
@@ -69,7 +69,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return (0); }
|
||||
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return (0); }
|
||||
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return (0); }
|
||||
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) { return (0); }
|
||||
uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
|
||||
//uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
|
||||
int32_t get_uldl_offset(int eutra_bandP) { return (0); }
|
||||
NR_IF_Module_t * NR_IF_Module_init(int Mod_id) { return (NULL); }
|
||||
|
||||
|
||||
@@ -73,36 +73,16 @@ double cpuf;
|
||||
|
||||
// dummy functions
|
||||
int nfapi_mode = 0;
|
||||
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) {
|
||||
return (0);
|
||||
}
|
||||
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) {
|
||||
return (0);
|
||||
}
|
||||
int32_t get_uldl_offset(int eutra_bandP) {
|
||||
return (0);
|
||||
}
|
||||
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return (0); }
|
||||
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return (0); }
|
||||
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return (0); }
|
||||
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return (0); }
|
||||
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) { return (0); }
|
||||
//uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
|
||||
int32_t get_uldl_offset(int eutra_bandP) { return (0); }
|
||||
|
||||
NR_IF_Module_t *
|
||||
NR_IF_Module_init(int Mod_id) {
|
||||
return (NULL);
|
||||
}
|
||||
NR_IF_Module_init(int Mod_id) { return (NULL); }
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
const char *msg = s == NULL ? "no comment" : s;
|
||||
@@ -477,17 +457,17 @@ int main(int argc, char **argv) {
|
||||
rel15_ul->ulsch_pdu_rel15.n_layers = precod_nbr_layers;
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
fapi_nr_ul_config_request_t ul_config;
|
||||
/*fapi_nr_ul_config_request_t ul_config;
|
||||
//fapi_nr_tx_request_t tx_request;
|
||||
|
||||
/*nr_scheduled_response_t scheduled_response;
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
scheduled_response.module_id = 0;
|
||||
scheduled_response.CC_id = 0;
|
||||
scheduled_response.frame = frame;
|
||||
scheduled_response.slot = slot;
|
||||
scheduled_response.dl_config = NULL;
|
||||
scheduled_response.ul_config = &ul_config;
|
||||
scheduled_response.dl_config = NULL;*/
|
||||
scheduled_response.dl_config = NULL;
|
||||
|
||||
|
||||
ul_config.sfn_slot = slot;
|
||||
@@ -501,7 +481,7 @@ int main(int argc, char **argv) {
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = Imcs;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = 0;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers;*/
|
||||
//there are plenty of other parameters that we don't seem to be using for now. e.g.
|
||||
//ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.absolute_delta_PUSCH = 0;
|
||||
|
||||
|
||||
@@ -35,15 +35,15 @@
|
||||
#include "common/config/config_paramdesc.h"
|
||||
#include "RRC_paramsvalues.h"
|
||||
|
||||
#define ENB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
|
||||
#define ENB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
|
||||
#define ENB_CONFIG_STRING_CC_NODE_SYNCH_REF "node_synch_ref"
|
||||
#define ENB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
|
||||
#define ENB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
|
||||
#define ENB_CONFIG_STRING_CC_NODE_SYNCH_REF "node_synch_ref"
|
||||
|
||||
// OTG config per ENB-UE DL
|
||||
#define ENB_CONF_STRING_OTG_CONFIG "otg_config"
|
||||
#define ENB_CONF_STRING_OTG_UE_ID "ue_id"
|
||||
#define ENB_CONF_STRING_OTG_APP_TYPE "app_type"
|
||||
#define ENB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
|
||||
#define ENB_CONF_STRING_OTG_CONFIG "otg_config"
|
||||
#define ENB_CONF_STRING_OTG_UE_ID "ue_id"
|
||||
#define ENB_CONF_STRING_OTG_APP_TYPE "app_type"
|
||||
#define ENB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
|
||||
|
||||
#ifdef LIBCONFIG_LONG
|
||||
#define libconfig_int long
|
||||
@@ -92,6 +92,7 @@ typedef enum {
|
||||
#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src"
|
||||
#define CONFIG_STRING_RU_SF_EXTENSION "sf_extension"
|
||||
#define CONFIG_STRING_RU_END_OF_BURST_DELAY "end_of_burst_delay"
|
||||
#define CONFIG_STRING_RU_OTA_SYNC_ENABLE "ota_sync_enabled"
|
||||
|
||||
#define RU_LOCAL_IF_NAME_IDX 0
|
||||
#define RU_LOCAL_ADDRESS_IDX 1
|
||||
@@ -116,6 +117,7 @@ typedef enum {
|
||||
#define RU_SDR_CLK_SRC 20
|
||||
#define RU_SF_EXTENSION_IDX 21
|
||||
#define RU_END_OF_BURST_DELAY_IDX 22
|
||||
#define RU_OTA_SYNC_ENABLE_IDX 23
|
||||
|
||||
|
||||
|
||||
@@ -147,6 +149,7 @@ typedef enum {
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -83,36 +83,36 @@ typedef struct band_info_s {
|
||||
|
||||
|
||||
static const eutra_bandentry_t eutra_bandtable[] = {
|
||||
{1, 19200, 19800, 21100, 21700, 0},
|
||||
{2, 18500, 19100, 19300, 19900, 6000},
|
||||
{3, 17100, 17850, 18050, 18800, 12000},
|
||||
{4, 17100, 17550, 21100, 21550, 19500},
|
||||
{5, 8240, 8490, 8690, 8940, 24000},
|
||||
{6, 8300, 8400, 8750, 8850, 26500},
|
||||
{7, 25000, 25700, 26200, 26900, 27500},
|
||||
{8, 8800, 9150, 9250, 9600, 34500},
|
||||
{9, 17499, 17849, 18449, 18799, 38000},
|
||||
{1, 19200, 19800, 21100, 21700, 0 },
|
||||
{2, 18500, 19100, 19300, 19900, 6000 },
|
||||
{3, 17100, 17850, 18050, 18800, 12000},
|
||||
{4, 17100, 17550, 21100, 21550, 19500},
|
||||
{5, 8240, 8490, 8690, 8940, 24000},
|
||||
{6, 8300, 8400, 8750, 8850, 26500},
|
||||
{7, 25000, 25700, 26200, 26900, 27500},
|
||||
{8, 8800, 9150, 9250, 9600, 34500},
|
||||
{9, 17499, 17849, 18449, 18799, 38000},
|
||||
{10, 17100, 17700, 21100, 21700, 41500},
|
||||
{11, 14279, 14529, 14759, 15009, 47500},
|
||||
{12, 6980, 7160, 7280, 7460, 50100},
|
||||
{13, 7770, 7870, 7460, 7560, 51800},
|
||||
{14, 7880, 7980, 7580, 7680, 52800},
|
||||
{17, 7040, 7160, 7340, 7460, 57300},
|
||||
{18, 8150, 9650, 8600, 10100, 58500},
|
||||
{19, 8300, 8450, 8750, 8900, 60000},
|
||||
{20, 8320, 8620, 7910, 8210, 61500},
|
||||
{12, 6980, 7160, 7280, 7460, 50100},
|
||||
{13, 7770, 7870, 7460, 7560, 51800},
|
||||
{14, 7880, 7980, 7580, 7680, 52800},
|
||||
{17, 7040, 7160, 7340, 7460, 57300},
|
||||
{18, 8150, 9650, 8600, 10100, 58500},
|
||||
{19, 8300, 8450, 8750, 8900, 60000},
|
||||
{20, 8320, 8620, 7910, 8210, 61500},
|
||||
{21, 14479, 14629, 14959, 15109, 64500},
|
||||
{22, 34100, 34900, 35100, 35900, 66000},
|
||||
{23, 20000, 20200, 21800, 22000, 75000},
|
||||
{24, 16126, 16605, 15250, 15590, 77000},
|
||||
{25, 18500, 19150, 19300, 19950, 80400},
|
||||
{26, 8140, 8490, 8590, 8940, 86900},
|
||||
{27, 8070, 8240, 8520, 8690, 90400},
|
||||
{28, 7030, 7580, 7580, 8130, 92100},
|
||||
{29, 0, 0, 7170, 7280, 96600},
|
||||
{26, 8140, 8490, 8590, 8940, 86900},
|
||||
{27, 8070, 8240, 8520, 8690, 90400},
|
||||
{28, 7030, 7580, 7580, 8130, 92100},
|
||||
{29, 0, 0, 7170, 7280, 96600},
|
||||
{30, 23050, 23250, 23500, 23600, 97700},
|
||||
{31, 45250, 34900, 46250, 35900, 98700},
|
||||
{32, 0, 0, 14520, 14960, 99200},
|
||||
{32, 0, 0, 14520, 14960, 99200},
|
||||
{33, 19000, 19200, 19000, 19200, 36000},
|
||||
{34, 20100, 20250, 20100, 20250, 36200},
|
||||
{35, 18500, 19100, 18500, 19100, 36350},
|
||||
@@ -124,13 +124,13 @@ static const eutra_bandentry_t eutra_bandtable[] = {
|
||||
{41, 24960, 26900, 24960, 26900, 39650},
|
||||
{42, 34000, 36000, 34000, 36000, 41590},
|
||||
{43, 36000, 38000, 36000, 38000, 43590},
|
||||
{44, 7030, 8030, 7030, 8030, 45590},
|
||||
{44, 7030, 8030, 7030, 8030, 45590},
|
||||
{45, 14470, 14670, 14470, 14670, 46590},
|
||||
{46, 51500, 59250, 51500, 59250, 46790},
|
||||
{65, 19200, 20100, 21100, 22000, 65536},
|
||||
{66, 17100, 18000, 21100, 22000, 66436},
|
||||
{67, 0, 0, 7380, 7580, 67336},
|
||||
{68, 6980, 7280, 7530, 7830, 67536}
|
||||
{67, 0, 0, 7380, 7580, 67336},
|
||||
{68, 6980, 7280, 7530, 7830, 67536}
|
||||
};
|
||||
|
||||
|
||||
@@ -216,7 +216,8 @@ uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) {
|
||||
}
|
||||
|
||||
|
||||
int32_t get_uldl_offset(int eutra_bandP) {
|
||||
int32_t get_uldl_offset(int eutra_bandP)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
@@ -38,16 +38,16 @@ void mac_top_init_gNB(void);
|
||||
|
||||
void config_common(int Mod_idP,
|
||||
int CC_idP,
|
||||
int Nid_cell,
|
||||
int Nid_cell,
|
||||
int nr_bandP,
|
||||
uint64_t ssb_pattern,
|
||||
uint16_t ssb_periodicity,
|
||||
uint64_t ssb_pattern,
|
||||
uint16_t ssb_periodicity,
|
||||
uint64_t dl_CarrierFreqP,
|
||||
uint32_t dl_BandwidthP);
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int CC_id,
|
||||
int cellid,
|
||||
int cellid,
|
||||
int p_gNB,
|
||||
int nr_bandP,
|
||||
uint64_t ssb_pattern,
|
||||
@@ -55,8 +55,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
uint64_t dl_CarrierFreqP,
|
||||
int dl_BandwidthP,
|
||||
NR_BCCH_BCH_Message_t *mib,
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
||||
);
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon);
|
||||
|
||||
int is_nr_UL_slot(NR_COMMON_channels_t * ccP, int slotP);
|
||||
|
||||
@@ -65,14 +64,10 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);
|
||||
|
||||
void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);
|
||||
|
||||
|
||||
|
||||
void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
@@ -81,30 +76,29 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t slotP);
|
||||
|
||||
|
||||
void nr_configure_css_dci_initial(nfapi_nr_dl_config_pdcch_parameters_rel15_t* pdcch_params,
|
||||
nr_scs_e scs_common,
|
||||
nr_scs_e pdcch_scs,
|
||||
nr_frequency_range_e freq_range,
|
||||
uint8_t rmsi_pdcch_config,
|
||||
uint8_t ssb_idx,
|
||||
uint8_t k_ssb,
|
||||
uint16_t sfn_ssb,
|
||||
uint8_t n_ssb,
|
||||
uint16_t nb_slots_per_frame,
|
||||
uint16_t N_RB);
|
||||
nr_scs_e scs_common,
|
||||
nr_scs_e pdcch_scs,
|
||||
nr_frequency_range_e freq_range,
|
||||
uint8_t rmsi_pdcch_config,
|
||||
uint8_t ssb_idx,
|
||||
uint8_t k_ssb,
|
||||
uint16_t sfn_ssb,
|
||||
uint8_t n_ssb,
|
||||
uint16_t nb_slots_per_frame,
|
||||
uint16_t N_RB);
|
||||
|
||||
int nr_is_dci_opportunity(nfapi_nr_search_space_t search_space,
|
||||
nfapi_nr_coreset_t coreset,
|
||||
uint16_t frame,
|
||||
uint16_t slot,
|
||||
nfapi_nr_config_request_t cfg);
|
||||
nfapi_nr_coreset_t coreset,
|
||||
uint16_t frame,
|
||||
uint16_t slot,
|
||||
nfapi_nr_config_request_t cfg);
|
||||
|
||||
void nr_configure_dci_from_pdcch_config(nfapi_nr_dl_config_pdcch_parameters_rel15_t* pdcch_params,
|
||||
nfapi_nr_coreset_t* coreset,
|
||||
nfapi_nr_search_space_t* search_space,
|
||||
nfapi_nr_config_request_t cfg,
|
||||
uint16_t N_RB);
|
||||
nfapi_nr_coreset_t* coreset,
|
||||
nfapi_nr_search_space_t* search_space,
|
||||
nfapi_nr_config_request_t cfg,
|
||||
uint16_t N_RB);
|
||||
|
||||
int get_dlscs(nfapi_nr_config_request_t *cfg);
|
||||
|
||||
@@ -116,20 +110,22 @@ int to_absslot(nfapi_nr_config_request_t *cfg,int frame,int slot);
|
||||
|
||||
int get_symbolsperslot(nfapi_nr_config_request_t *cfg);
|
||||
|
||||
void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type);
|
||||
void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type);
|
||||
|
||||
uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn);
|
||||
|
||||
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw);
|
||||
|
||||
int32_t get_nr_uldl_offset(int nr_bandP);
|
||||
|
||||
void config_nr_mib(int Mod_idP,
|
||||
int CC_idP,
|
||||
int p_gNBP,
|
||||
int subCarrierSpacingCommon,
|
||||
uint32_t ssb_SubcarrierOffset,
|
||||
int dmrs_TypeA_Position,
|
||||
uint32_t pdcch_ConfigSIB1,
|
||||
int cellBarred,
|
||||
int intraFreqReselection);
|
||||
int CC_idP,
|
||||
int p_gNBP,
|
||||
int subCarrierSpacingCommon,
|
||||
uint32_t ssb_SubcarrierOffset,
|
||||
int dmrs_TypeA_Position,
|
||||
uint32_t pdcch_ConfigSIB1,
|
||||
int cellBarred,
|
||||
int intraFreqReselection);
|
||||
|
||||
#endif /*__LAYER2_NR_MAC_PROTO_H__*/
|
||||
|
||||
@@ -67,8 +67,13 @@ nr_bandentry_t nr_bandtable[] = {
|
||||
{86, 1710000, 1785000, 000, 000, 20, 342000}
|
||||
};
|
||||
|
||||
void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type) {
|
||||
#define NR_BANDTABLE_SIZE (sizeof(nr_bandtable)/sizeof(nr_bandentry_t))
|
||||
|
||||
void get_band(uint32_t downlink_frequency,
|
||||
uint8_t *current_band,
|
||||
int32_t *current_offset,
|
||||
lte_frame_type_t *current_type)
|
||||
{
|
||||
int ind;
|
||||
int64_t dl_freq_khz = downlink_frequency/1000;
|
||||
for ( ind=0;
|
||||
@@ -96,9 +101,10 @@ void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *c
|
||||
|
||||
}
|
||||
|
||||
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw)
|
||||
uint32_t to_nrarfcn(int nr_bandP,
|
||||
uint64_t dl_CarrierFreq,
|
||||
uint32_t bw)
|
||||
{
|
||||
|
||||
uint64_t dl_CarrierFreq_by_1k = dl_CarrierFreq / 1000;
|
||||
int bw_kHz = bw / 1000;
|
||||
|
||||
@@ -112,8 +118,7 @@ uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw)
|
||||
"Band %d, bw %u : DL carrier frequency %llu kHz < %llu\n",
|
||||
nr_bandP, bw, (long long unsigned int)dl_CarrierFreq_by_1k,
|
||||
(long long unsigned int)nr_bandtable[i].dl_min);
|
||||
AssertFatal(dl_CarrierFreq_by_1k <=
|
||||
(nr_bandtable[i].dl_max - bw_kHz),
|
||||
AssertFatal(dl_CarrierFreq_by_1k <= (nr_bandtable[i].dl_max - bw_kHz),
|
||||
"Band %d, dl_CarrierFreq %llu bw %u: DL carrier frequency %llu kHz > %llu\n",
|
||||
nr_bandP, (long long unsigned int)dl_CarrierFreq,bw, (long long unsigned int)dl_CarrierFreq_by_1k,
|
||||
(long long unsigned int)(nr_bandtable[i].dl_max - bw_kHz));
|
||||
@@ -130,9 +135,9 @@ uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw)
|
||||
}
|
||||
|
||||
|
||||
uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn)
|
||||
uint64_t from_nrarfcn(int nr_bandP,
|
||||
uint32_t dl_nrarfcn)
|
||||
{
|
||||
|
||||
int i;
|
||||
int deltaFglobal;
|
||||
|
||||
@@ -144,5 +149,16 @@ uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn)
|
||||
AssertFatal(dl_nrarfcn>=nr_bandtable[i].N_OFFs_DL,"dl_nrarfcn %u < N_OFFs_DL %llu\n",dl_nrarfcn, (long long unsigned int)nr_bandtable[i].N_OFFs_DL);
|
||||
|
||||
return 1000*(nr_bandtable[i].dl_min + (dl_nrarfcn - nr_bandtable[i].N_OFFs_DL) * deltaFglobal);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int32_t get_nr_uldl_offset(int nr_bandP)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NR_BANDTABLE_SIZE && nr_bandtable[i].band != nr_bandP; i++);
|
||||
|
||||
AssertFatal(i < NR_BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, NR_BANDTABLE_SIZE);
|
||||
|
||||
return (nr_bandtable[i].dl_min - nr_bandtable[i].ul_min);
|
||||
}
|
||||
|
||||
@@ -74,8 +74,9 @@ typedef struct {
|
||||
} pdcp_params_t;
|
||||
|
||||
|
||||
|
||||
#define PDCP_USE_NETLINK ( get_pdcp_optmask() & PDCP_USE_NETLINK_BIT)
|
||||
#ifndef PDCP_USE_NETLINK
|
||||
#define PDCP_USE_NETLINK ( get_pdcp_optmask() & PDCP_USE_NETLINK_BIT)
|
||||
#endif
|
||||
#define LINK_ENB_PDCP_TO_IP_DRIVER ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_IP_DRIVER_BIT)
|
||||
#define LINK_ENB_PDCP_TO_GTPV1U ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_GTPV1U_BIT)
|
||||
#define UE_NAS_USE_TUN ( get_pdcp_optmask() & UE_NAS_USE_TUN_BIT)
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
#include <linux/in.h>
|
||||
#include <net/ndisc.h>
|
||||
|
||||
|
||||
|
||||
#include "constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "sap.h"
|
||||
|
||||
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
|
||||
#ifndef MAKE_VERSION
|
||||
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
|
||||
#endif
|
||||
|
||||
typedef struct ue_ip_priv_s {
|
||||
int irq;
|
||||
|
||||
@@ -158,7 +158,7 @@ typedef struct UE_RRC_INFO_NR_s {
|
||||
uint8_t SIB1systemInfoValueTag;
|
||||
uint32_t SIStatus;
|
||||
uint32_t SIcnt;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
|
||||
#endif
|
||||
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
|
||||
@@ -260,7 +260,7 @@ typedef struct SRB_INFO_TABLE_ENTRY_NR_s {
|
||||
|
||||
typedef struct gNB_RRC_UE_s {
|
||||
uint8_t primaryCC_id;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t sCell_config[2];
|
||||
#endif
|
||||
NR_SRB_ToAddModList_t* SRB_configList;
|
||||
|
||||
@@ -481,34 +481,34 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
|
||||
// s->tx_md.start_of_burst = true;
|
||||
// s->tx_md.end_of_burst = false;
|
||||
first_packet_state = true;
|
||||
last_packet_state = false;
|
||||
last_packet_state = false;
|
||||
} else if (flags == 3) { // end of burst
|
||||
//s->tx_md.start_of_burst = false;
|
||||
//s->tx_md.end_of_burst = true;
|
||||
first_packet_state = false;
|
||||
last_packet_state - true;
|
||||
last_packet_state = true;
|
||||
} else if (flags == 4) { // start and end
|
||||
// s->tx_md.start_of_burst = true;
|
||||
// s->tx_md.end_of_burst = true;
|
||||
first_packet_state = true;
|
||||
last_packet_state = true;
|
||||
last_packet_state = true;
|
||||
} else if (flags==1) { // middle of burst
|
||||
// s->tx_md.start_of_burst = false;
|
||||
// s->tx_md.end_of_burst = false;
|
||||
first_packet_state = false;
|
||||
last_packet_state = false;
|
||||
last_packet_state = false;
|
||||
}
|
||||
else if (flags==10) { // fail safe mode
|
||||
// s->tx_md.has_time_spec = false;
|
||||
// s->tx_md.start_of_burst = false;
|
||||
// s->tx_md.end_of_burst = true;
|
||||
first_packet_state=false;
|
||||
last_packet_state=true;
|
||||
first_packet_state = false;
|
||||
last_packet_state = true;
|
||||
}
|
||||
s->tx_md.has_time_spec = true;
|
||||
s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet_state;
|
||||
s->tx_md.end_of_burst = last_packet_state;
|
||||
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
|
||||
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
|
||||
|
||||
s->tx_count++;
|
||||
|
||||
|
||||
@@ -471,7 +471,7 @@ void eNB_top(PHY_VARS_eNB *eNB,
|
||||
proc->subframe_rx = subframe_rx;
|
||||
|
||||
if (!oai_exit) {
|
||||
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(ru_proc->frame_rx), T_INT(ru_proc->subframe_rx));
|
||||
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(ru_proc->frame_rx), T_INT(ru_proc->tti_rx));
|
||||
L1_proc->timestamp_tx = ru_proc->timestamp_rx + (sf_ahead*fp->samples_per_tti);
|
||||
L1_proc->frame_rx = ru_proc->frame_rx;
|
||||
L1_proc->subframe_rx = ru_proc->tti_rx;
|
||||
@@ -523,7 +523,7 @@ int wakeup_txfh(PHY_VARS_eNB *eNB,
|
||||
for(int ru_id=0; ru_id<eNB->num_RU; ru_id++){
|
||||
ru = eNB->RU_list[ru_id];
|
||||
ru_proc = &ru->proc;
|
||||
fp = &ru->frame_parms;
|
||||
fp = ru->frame_parms;
|
||||
if (((fp->frame_type == TDD) && (subframe_select(fp,proc->subframe_tx)==SF_UL))||
|
||||
(eNB->RU_list[ru_id]->state == RU_SYNC)||
|
||||
(eNB->RU_list[ru_id]->wait_cnt>0)){
|
||||
@@ -536,7 +536,7 @@ int wakeup_txfh(PHY_VARS_eNB *eNB,
|
||||
AssertFatal((ret = pthread_mutex_lock(&ru_proc->mutex_eNBs))==0,"ERROR pthread_mutex_lock failed on mutex_eNBs L1_thread_tx with ret=%d\n",ret);
|
||||
|
||||
if (ru_proc->instance_cnt_eNBs == 0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: TX FH thread busy, dropping Frame %d, subframe %d\n", ru_proc->frame_tx, ru_proc->subframe_tx, proc->frame_rx, proc->subframe_rx);
|
||||
LOG_E(PHY,"Frame %d, subframe %d: TX FH thread busy, dropping Frame %d, subframe %d\n", ru_proc->frame_tx, ru_proc->tti_tx, proc->frame_rx, proc->subframe_rx);
|
||||
AssertFatal((ret=pthread_mutex_lock(&eNB->proc.mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
|
||||
eNB->proc.RU_mask_tx = 0;
|
||||
AssertFatal((ret=pthread_mutex_unlock(&eNB->proc.mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
|
||||
@@ -609,7 +609,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
|
||||
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
|
||||
int ret;
|
||||
|
||||
LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->subframe_rx);
|
||||
LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
|
||||
|
||||
// wake up TX for subframe n+sl_ahead
|
||||
// lock the TX mutex and make sure the thread is ready
|
||||
@@ -617,7 +617,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (L1_proc->instance_cnt == 0) { // L1_thread is busy so abort the subframe
|
||||
AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret);
|
||||
LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->subframe_rx);
|
||||
LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ void fh_if5_north_asynch_in(RU_t *ru,
|
||||
frame_tx = (timestamp_tx/(fp->samples_per_tti*10))&1023;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_RU, proc->tti_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
|
||||
|
||||
if (proc->first_tx != 0) {
|
||||
*subframe = tti_tx;
|
||||
@@ -1622,7 +1622,7 @@ static void* ru_thread_tx( void* param )
|
||||
// wait until eNBs are finished subframe RX n and TX n+4
|
||||
wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx");
|
||||
|
||||
LOG_D(PHY,"ru_thread_tx: TX in %d.%d\n",ru->proc.frame_tx,ru->proc.subframe_tx);
|
||||
LOG_D(PHY,"ru_thread_tx: TX in %d.%d\n",ru->proc.frame_tx,ru->proc.tti_tx);
|
||||
|
||||
if (oai_exit) break;
|
||||
|
||||
@@ -2007,7 +2007,6 @@ void *ru_thread_synch(void *arg)
|
||||
RU_t *ru = (RU_t *)arg;
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
int64_t peak_val, avg;
|
||||
uint32_t sync_corr[307200] __attribute__((aligned(32)));
|
||||
static int ru_thread_synch_status = 0;
|
||||
int cnt=0;
|
||||
thread_top_init("ru_thread_synch",0,5000000,10000000,10000000);
|
||||
@@ -2040,7 +2039,7 @@ void *ru_thread_synch(void *arg)
|
||||
//exit(-1);
|
||||
} // sync_pos > 0
|
||||
else //AssertFatal(cnt<1000,"Cannot find synch reference\n");
|
||||
{
|
||||
{
|
||||
if (cnt>200) {
|
||||
LOG_M("ru_sync_rx.m","rurx",&ru->common.rxdata[0][0],LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,1);
|
||||
LOG_M("ru_sync_corr.m","sync_corr",ru->dmrs_corr,LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,6);
|
||||
@@ -2408,7 +2407,7 @@ void init_RU_proc(RU_t *ru)
|
||||
pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru );
|
||||
ru->state=RU_RUN;
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
init_frame_parms(&ru->frame_parms,1);
|
||||
init_frame_parms(ru->frame_parms,1);
|
||||
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
|
||||
phy_init_RU(ru);
|
||||
|
||||
@@ -2799,10 +2798,14 @@ void init_RU(char *rf_config_file,
|
||||
// NOTE: multiple CC_id are not handled here yet!
|
||||
ru->openair0_cfg.clock_source = clock_source;
|
||||
ru->openair0_cfg.time_source = time_source;
|
||||
ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
|
||||
//ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
|
||||
if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1))
|
||||
ru->generate_dmrs_sync = 1;
|
||||
else
|
||||
ru->generate_dmrs_sync = 0;
|
||||
if (ru->generate_dmrs_sync == 1) {
|
||||
generate_ul_ref_sigs();
|
||||
ru->dmrssync = (int16_t*)malloc16_clear(ofdm_symbol_size*2*sizeof(int16_t));
|
||||
ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms->ofdm_symbol_size*2*sizeof(int16_t));
|
||||
}
|
||||
ru->wakeup_L1_sleeptime = 2000;
|
||||
ru->wakeup_L1_sleep_cnt_max = 3;
|
||||
@@ -3087,6 +3090,9 @@ void RCconfig_RU(void)
|
||||
printf("RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr));
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1;
|
||||
else RC.ru[j]->is_slave=0;
|
||||
printf("RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr));
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) RC.ru[j]->ota_sync_enable=1;
|
||||
else RC.ru[j]->ota_sync_enable=0;
|
||||
}
|
||||
RC.ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;
|
||||
RC.ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr);
|
||||
|
||||
@@ -56,7 +56,6 @@ softmodem_params_t *get_softmodem_params(void) {
|
||||
void get_common_options(void) {
|
||||
uint32_t online_log_messages;
|
||||
uint32_t glog_level ;
|
||||
uint32_t glog_verbosity;
|
||||
uint32_t start_telnetsrv;
|
||||
uint32_t noS1;
|
||||
uint32_t nokrnmod;
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
#define CMDLINE_DUMPMEMORY_IDX 7
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define START_MSC softmodem_params.start_msc
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters specific to UE */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -218,15 +218,14 @@
|
||||
#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n"
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters for LOG utility */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define START_MSC softmodem_params.start_msc
|
||||
#define CMDLINE_LOGPARAMS_DESC { \
|
||||
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
#define CMDLINE_ONLINELOG_IDX 0
|
||||
|
||||
@@ -287,7 +287,7 @@ void init_UE(int nb_inst,
|
||||
// needed for memcopy below. these are not used in the RU, but needed for UE
|
||||
RC.ru[0]->frame_parms->nb_antennas_rx = fp0->nb_antennas_rx;
|
||||
RC.ru[0]->frame_parms->nb_antennas_tx = fp0->nb_antennas_tx;
|
||||
PHY_vars_UE_g[inst][0] = init_ue_vars(&RC.ru[0]->frame_parms,inst,0);
|
||||
PHY_vars_UE_g[inst][0] = init_ue_vars(RC.ru[0]->frame_parms,inst,0);
|
||||
}
|
||||
|
||||
// turn off timing control loop in UE
|
||||
|
||||
@@ -578,8 +578,8 @@ void* ru_thread_control( void* param )
|
||||
|
||||
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
init_frame_parms(&ru->frame_parms,1);
|
||||
ru->frame_parms.nb_antennas_rx = ru->nb_rx;
|
||||
init_frame_parms(ru->frame_parms,1);
|
||||
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
|
||||
phy_init_RU(ru);
|
||||
|
||||
//if (ru->is_slave == 1) lte_sync_time_init(&ru->frame_parms);
|
||||
|
||||
Reference in New Issue
Block a user