Merge remote-tracking branch 'origin/develop' into NR_MIMO_memory
This commit is contained in:
@@ -529,28 +529,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - TDD - Band 38 - B210 - MultiRRU") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('eNB-CI-IF4p5-TDD-Band38-MultiRRU-B210', 'Test-IF4p5-TDD-Band38-Multi-RRU')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('eNB-CI-IF4p5-TDD-Band38-MultiRRU-B210')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test OAI UE - FDD - Band 20 - B200") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
|
||||
@@ -506,6 +506,7 @@ class Containerize():
|
||||
# mySSH.command('sed -i -e "s/FLEXRAN_ENABLED:.*$/FLEXRAN_ENABLED: \'no\'/" ci-docker-compose.yml', '\$', 2)
|
||||
# mySSH.command('sed -i -e "s/CI_FLEXRAN_CTL_IP_ADDR/127.0.0.1/" ci-docker-compose.yml', '\$', 2)
|
||||
# Currently support only one
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 15)
|
||||
mySSH.command('docker-compose --file ci-docker-compose.yml config --services | sed -e "s@^@service=@" 2>&1', '\$', 10)
|
||||
result = re.search('service=(?P<svc_name>[a-zA-Z0-9\_]+)', mySSH.getBefore())
|
||||
if result is not None:
|
||||
@@ -715,7 +716,7 @@ class Containerize():
|
||||
logging.debug(cmd)
|
||||
networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
|
||||
def UndeployGenObject(self, HTML, RAN):
|
||||
def UndeployGenObject(self, HTML, RAN, UE):
|
||||
self.exitStatus = 0
|
||||
ymlPath = self.yamlPath[0].split('/')
|
||||
logPath = '../cmake_targets/log/' + ymlPath[1]
|
||||
@@ -751,7 +752,7 @@ class Containerize():
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
|
||||
# Analyzing log file!
|
||||
# Analyzing log file(s)!
|
||||
listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du']
|
||||
for container in listOfPossibleRanContainers:
|
||||
filename = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log'
|
||||
@@ -766,7 +767,6 @@ class Containerize():
|
||||
continue
|
||||
|
||||
logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m')
|
||||
# For the moment just assume this exists
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML)
|
||||
if (logStatus < 0):
|
||||
fullStatus = False
|
||||
@@ -774,6 +774,27 @@ class Containerize():
|
||||
else:
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*']
|
||||
for container in listOfPossibleUeContainers:
|
||||
filename = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log'
|
||||
cmd = 'ls ' + filename
|
||||
containerStatus = True
|
||||
try:
|
||||
lsStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
filename = str(lsStatus).strip()
|
||||
except:
|
||||
containerStatus = False
|
||||
if not containerStatus:
|
||||
continue
|
||||
|
||||
logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m')
|
||||
logStatus = UE.AnalyzeLogFile_UE(filename, HTML, RAN)
|
||||
if (logStatus < 0):
|
||||
fullStatus = False
|
||||
HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
cmd = 'rm ' + self.yamlPath[0] + '/*.log'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
@@ -789,6 +810,7 @@ class Containerize():
|
||||
cmd = 'sudo rm /tmp/capture_' + ymlPath[1] + '.pcap'
|
||||
logging.debug(cmd)
|
||||
copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
self.tsharkStarted = False
|
||||
|
||||
logging.debug('\u001B[1m Undeploying \u001B[0m')
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down'
|
||||
@@ -814,7 +836,7 @@ class Containerize():
|
||||
HTML.CreateHtmlTestRow('n/a', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
logging.info('\u001B[1m Undeploying OAI Object(s) FAIL\u001B[0m')
|
||||
|
||||
def PingFromContainer(self, HTML):
|
||||
def PingFromContainer(self, HTML, RAN, UE):
|
||||
self.exitStatus = 0
|
||||
ymlPath = self.yamlPath[0].split('/')
|
||||
logPath = '../cmake_targets/log/' + ymlPath[1]
|
||||
@@ -828,17 +850,17 @@ class Containerize():
|
||||
|
||||
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus)
|
||||
if result is None:
|
||||
self.PingExit(HTML, False, 'Packet Loss Not Found')
|
||||
self.PingExit(HTML, RAN, UE, False, 'Packet Loss Not Found')
|
||||
return
|
||||
|
||||
packetloss = result.group('packetloss')
|
||||
if float(packetloss) == 100:
|
||||
self.PingExit(HTML, False, 'Packet Loss is 100%')
|
||||
self.PingExit(HTML, RAN, UE, False, 'Packet Loss is 100%')
|
||||
return
|
||||
|
||||
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', deployStatus)
|
||||
if result is None:
|
||||
self.PingExit(HTML, False, 'Ping RTT_Min RTT_Avg RTT_Max Not Found!')
|
||||
self.PingExit(HTML, RAN, UE, False, 'Ping RTT_Min RTT_Avg RTT_Max Not Found!')
|
||||
return
|
||||
|
||||
rtt_min = result.group('rtt_min')
|
||||
@@ -860,7 +882,7 @@ class Containerize():
|
||||
packetLossOK = False
|
||||
elif float(packetloss) > 0:
|
||||
message += '\nPacket Loss is not 0%'
|
||||
self.PingExit(HTML, packetLossOK, message)
|
||||
self.PingExit(HTML, RAN, UE, packetLossOK, message)
|
||||
|
||||
if packetLossOK:
|
||||
logging.debug('\u001B[1;37;44m ping result \u001B[0m')
|
||||
@@ -870,7 +892,7 @@ class Containerize():
|
||||
logging.debug('\u001B[1;34m ' + max_msg + '\u001B[0m')
|
||||
logging.info('\u001B[1m Ping Test PASS\u001B[0m')
|
||||
|
||||
def PingExit(self, HTML, status, message):
|
||||
def PingExit(self, HTML, RAN, UE, status, message):
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">UE\n' + message + '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
@@ -885,10 +907,10 @@ class Containerize():
|
||||
logging.debug('----------------------------------------')
|
||||
HTML.testCase_id = 'AUTO-UNDEPLOY'
|
||||
HTML.desc = 'Automatic Un-Deployment'
|
||||
self.UndeployGenObject(HTML)
|
||||
self.UndeployGenObject(HTML, RAN, UE)
|
||||
self.exitStatus = 1
|
||||
|
||||
def IperfFromContainer(self, HTML):
|
||||
def IperfFromContainer(self, HTML, RAN):
|
||||
self.exitStatus = 0
|
||||
|
||||
ymlPath = self.yamlPath[0].split('/')
|
||||
|
||||
@@ -93,7 +93,7 @@ class Log_Mgt:
|
||||
avail_space =int(self.__CheckAvailSpace())*1000 #avail space in target folder, initially displayed in Gb
|
||||
avg_size=self.__AvgSize() #average size of artifacts in the target folder
|
||||
logging.debug("Avail Space : " + str(avail_space) + " / Artifact Avg Size : " + str(avg_size))
|
||||
if avail_space < 2*avg_size: #reserved space is 2x artifact file ; oldest file will be deleted
|
||||
if avail_space < 50*avg_size: #reserved space is 50x artifact file ; oldest file will be deleted
|
||||
oldestfile=self.__GetOldestFile()
|
||||
HOST=self.Username+'@'+self.IPAddress
|
||||
COMMAND="echo " + self.Password + " | sudo -S rm "+ self.path + "/" + oldestfile
|
||||
|
||||
+134
-12
@@ -2045,6 +2045,52 @@ class OaiCiTest():
|
||||
else:
|
||||
return -2
|
||||
|
||||
|
||||
def Iperf_analyzeV2BIDIR(self, lock, UE_IPAddress, device_id, statusQueue,server_filename,client_filename):
|
||||
|
||||
#check the 2 files are here
|
||||
if (not os.path.isfile(client_filename)) or (not os.path.isfile(server_filename)):
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Client or Server Log File not present')
|
||||
return
|
||||
#check the 2 files size
|
||||
if (os.path.getsize(client_filename)==0) and (os.path.getsize(server_filename)==0):
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Client and Server Log File are empty')
|
||||
return
|
||||
|
||||
report_msg='TCP BIDIR Report:\n'
|
||||
#if client is not empty, all the info is in, otherwise we ll use the server file to get some partial info
|
||||
client_filesize = os.path.getsize(client_filename)
|
||||
if client_filesize == 0:
|
||||
report_msg+="Client file (UE) present but !!! EMPTY !!!\n"
|
||||
report_msg+="Partial report from server file\n"
|
||||
filename = server_filename
|
||||
else :
|
||||
report_msg+="Report from client file (UE)\n"
|
||||
filename = client_filename
|
||||
|
||||
report=[] #used to check if relevant lines were found
|
||||
|
||||
with open(filename, 'r') as f_client:
|
||||
for line in f_client.readlines():
|
||||
result = re.search(rf'^\[\s+\d+\](?P<direction>\[.+\]).*\s+(?P<bitrate>[0-9\.]+ [KMG]bits\/sec).*\s+(?P<role>\bsender|receiver\b)', str(line))
|
||||
if result is not None:
|
||||
report.append(str(line))
|
||||
report_msg+=result.group('role') + ' ' + result.group('direction')+ '\t = ' +result.group('bitrate')+'\n'
|
||||
|
||||
if len(report)>0:
|
||||
lock.acquire()
|
||||
statusQueue.put(0)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
statusQueue.put(report_msg)
|
||||
logging.debug('\u001B[1;37;45m TCP Bidir Iperf Result (' + UE_IPAddress + ') \u001B[0m')
|
||||
logging.debug('\u001B[1;35m ' + report_msg + '\u001B[0m')
|
||||
lock.release()
|
||||
else:
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from Log file')
|
||||
|
||||
|
||||
|
||||
def Iperf_analyzeV2Server(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options, filename,type):
|
||||
if (not os.path.isfile(filename)):
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log')
|
||||
@@ -2342,17 +2388,22 @@ class OaiCiTest():
|
||||
result = re.search('TRF_IP_ADDR = (?P<trf_ip_addr>[0-9\.]+)', SSH.getBefore())
|
||||
if result is not None:
|
||||
trf_gen_IP = result.group('trf_ip_addr')
|
||||
#kill iperf processes on EPC side
|
||||
SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"', '\$', 5)
|
||||
SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf3"', '\$', 5)
|
||||
SSH.close()
|
||||
#kill iperf processes on UE side before (in case there are still some remaining)
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
iperf_time = self.Iperf_ComputeTime()
|
||||
iperf_time = self.Iperf_ComputeTime()
|
||||
if self.iperf_direction=="DL":
|
||||
logging.debug("Iperf for Module in DL mode detected")
|
||||
#server side UE
|
||||
##server side UE
|
||||
server_filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'rm ' + server_filename
|
||||
@@ -2360,20 +2411,21 @@ class OaiCiTest():
|
||||
cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > ' + server_filename + ' &'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
#client side EPC
|
||||
##client side EPC
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"', '\$', 5)
|
||||
#remove old client file in EPC.SourceCodePath
|
||||
cmd = 'rm ' + EPC.SourceCodePath + '/' + client_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
iperf_cmd = 'bin/iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename
|
||||
cmd = 'docker exec -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
cmd = 'docker exec -w /iperf-2.0.13 -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
SSH.command(cmd,'\$',int(iperf_time)*5.0)
|
||||
SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/'+ client_filename + ' ' + EPC.SourceCodePath, '\$', 5)
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + client_filename, '.')
|
||||
SSH.close()
|
||||
|
||||
#copy the 2 resulting files locally
|
||||
#copy the 2 resulting files locally (python executor)
|
||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, server_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, client_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + client_filename, '.')
|
||||
#send for analysis
|
||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,server_filename,1)
|
||||
|
||||
@@ -2382,9 +2434,9 @@ class OaiCiTest():
|
||||
#server side EPC
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"', '\$', 5)
|
||||
|
||||
iperf_cmd = 'echo $USER; nohup bin/iperf -s -u 2>&1 > ' + server_filename
|
||||
cmd = 'docker exec -d prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
@@ -2399,14 +2451,49 @@ class OaiCiTest():
|
||||
#once client is done, retrieve the server file from container to EPC Host
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/' + server_filename + ' ' + EPC.SourceCodePath, '\$', 5)
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + server_filename, '.')
|
||||
SSH.close()
|
||||
|
||||
#copy the 2 resulting files locally
|
||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, client_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, server_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + server_filename, '.')
|
||||
#send for analysis
|
||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,server_filename,1)
|
||||
|
||||
elif self.iperf_direction=="BIDIR":
|
||||
logging.debug("Iperf for Module in BIDIR mode detected")
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
|
||||
#server side EPC
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
iperf_cmd = 'echo $USER; nohup /usr/local/bin/iperf3 -s 2>&1 > ' + server_filename
|
||||
cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
#client side UE
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'rm '+ client_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.command('iperf3 -B ' + UE_IPAddress + ' -c ' + trf_gen_IP + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename, '\$', int(iperf_time)*5.0)
|
||||
SSH.close()
|
||||
|
||||
#once client is done, retrieve the server file from container to EPC Host
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
#remove old server file in EPC.SourceCodePath
|
||||
cmd = 'rm ' + EPC.SourceCodePath + '/' + server_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
#copy from docker container to EPC.SourceCodePath
|
||||
SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/' + server_filename + ' ' + EPC.SourceCodePath, '\$', 5)
|
||||
SSH.close()
|
||||
|
||||
#copy the 2 resulting files locally
|
||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, client_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + server_filename, '.')
|
||||
|
||||
#send for analysis
|
||||
self.Iperf_analyzeV2BIDIR(lock, UE_IPAddress, device_id, statusQueue, server_filename, client_filename)
|
||||
|
||||
else :
|
||||
logging.debug("Incorrect or missing IPERF direction in XML")
|
||||
|
||||
@@ -2418,10 +2505,15 @@ class OaiCiTest():
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
|
||||
@@ -2472,6 +2564,32 @@ class OaiCiTest():
|
||||
#send for analysis
|
||||
filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)
|
||||
elif self.iperf_direction=="BIDIR":
|
||||
logging.debug("Iperf for Module in BIDIR mode detected")
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
|
||||
|
||||
#server side EPC
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
cmd = 'rm ' + server_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'echo $USER; nohup iperf3 -s 2>&1 > '+server_filename+' &'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
#client side UE
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'rm ' + client_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.command('iperf3 -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > '+client_filename, '\$', int(iperf_time)*5.0)
|
||||
SSH.close()
|
||||
|
||||
#copy the 2 resulting files locally
|
||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, client_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, server_filename, '.')
|
||||
#send for analysis
|
||||
self.Iperf_analyzeV2BIDIR(lock, UE_IPAddress, device_id, statusQueue, server_filename, client_filename)
|
||||
else :
|
||||
logging.debug("Incorrect or missing IPERF direction in XML")
|
||||
|
||||
@@ -2479,10 +2597,14 @@ class OaiCiTest():
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
return
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ class PhySim:
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
mySSH.command('cd '+self.__workSpacePath,'\$',5)
|
||||
#run and redirect the results to a log file
|
||||
mySSH.command(self.__workSpacePath+'phy_simulators/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30)
|
||||
mySSH.command(self.__workSpacePath+'ran_build/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30)
|
||||
mySSH.close()
|
||||
#return updated HTML to main
|
||||
lHTML = html.HTMLManagement()
|
||||
|
||||
@@ -121,7 +121,7 @@ class StaticCodeAnalysis():
|
||||
mySSH.command('docker build --tag oai-cppcheck:xenial --file ci-scripts/docker/Dockerfile.cppcheck.xenial . > cmake_targets/log/cppcheck-xenial.txt 2>&1', '\$', 600)
|
||||
mySSH.command('sed -e "s@xenial@bionic@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.bionic', '\$', 6)
|
||||
mySSH.command('docker build --tag oai-cppcheck:bionic --file ci-scripts/docker/Dockerfile.cppcheck.bionic . > cmake_targets/log/cppcheck-bionic.txt 2>&1', '\$', 600)
|
||||
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 60)
|
||||
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 30)
|
||||
|
||||
# Analyzing the logs
|
||||
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
|
||||
|
||||
@@ -215,11 +215,11 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -36,7 +36,7 @@ gNBs =
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
min_rxtxtime_pdsch = 6;
|
||||
min_rxtxtime = 6;
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 12;
|
||||
@@ -241,13 +241,13 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -36,7 +36,7 @@ gNBs =
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
min_rxtxtime_pdsch = 6;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
@@ -242,13 +242,13 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -227,14 +227,14 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -229,13 +229,13 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -226,12 +226,12 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -211,12 +211,12 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
thread_pool_size = 8;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -195,12 +195,12 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
thread_pool_size = 8;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -210,12 +210,12 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -41,6 +41,7 @@ gNBs =
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 2;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
do_SRS = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
@@ -226,18 +227,18 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
# pusch_TargetSNRx10 = 200;
|
||||
# pucch_TargetSNRx10 = 150;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 4;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -44,6 +44,7 @@ gNBs =
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
min_rxtxtime = 6;
|
||||
do_SRS = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
@@ -236,13 +237,12 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 4;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -39,11 +39,8 @@ gNBs =
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
#pusch_TargetSNRx10 = 200;
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
min_rxtxtime = 6;
|
||||
pusch_AntennaPorts = 2;
|
||||
ul_prbblacklist = "79,80,81,82"
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
@@ -82,11 +79,11 @@ gNBs =
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 106;
|
||||
dl_carrierBandwidth = 162;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875;
|
||||
initialDLBWPlocationAndBandwidth = 31899;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
@@ -94,8 +91,6 @@ gNBs =
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
@@ -104,11 +99,11 @@ gNBs =
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 106;
|
||||
ul_carrierBandwidth = 162;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
initialULBWPlocationAndBandwidth = 31899;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
@@ -229,27 +224,27 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
# pusch_TargetSNRx10 = 200;
|
||||
# pucch_TargetSNRx10 = 150;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 4;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
nb_tx = 2
|
||||
nb_rx = 2
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
|
||||
@@ -194,11 +194,11 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -210,12 +210,12 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 6;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 6;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
@@ -211,11 +211,11 @@ MACRLCs = (
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 6;
|
||||
}
|
||||
thread_pool_size = 6;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
|
||||
+4
-4
@@ -313,7 +313,7 @@ def GetParametersFromXML(action):
|
||||
CiTestObj.ue_id = ""
|
||||
else:
|
||||
CiTestObj.ue_id = ue_id
|
||||
CiTestObj.iperf_direction = test.findtext('direction')#used for modules only
|
||||
CiTestObj.iperf_direction = test.findtext('direction')#used for modules only
|
||||
CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold')
|
||||
iperf_bitrate_threshold = test.findtext('iperf_bitrate_threshold')
|
||||
if (iperf_bitrate_threshold is None):
|
||||
@@ -914,15 +914,15 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'UndeployGenObject':
|
||||
CONTAINERS.UndeployGenObject(HTML, RAN)
|
||||
CONTAINERS.UndeployGenObject(HTML, RAN, CiTestObj)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'PingFromContainer':
|
||||
CONTAINERS.PingFromContainer(HTML)
|
||||
CONTAINERS.PingFromContainer(HTML, RAN, CiTestObj)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'IperfFromContainer':
|
||||
CONTAINERS.IperfFromContainer(HTML)
|
||||
CONTAINERS.IperfFromContainer(HTML, RAN)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
else:
|
||||
|
||||
+7
-3
@@ -493,9 +493,9 @@ class RANManagement():
|
||||
conf_file='../ci-scripts/stats_monitor_conf.yaml'
|
||||
if self.eNB_Stats=='yes':
|
||||
if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):
|
||||
mySSH.command('echo $USER; nohup python3 ' + monitor_file + ' ' + conf_file + ' enb 2>&1 > enb_stats_monitor_execution.log &', '\$', 5)
|
||||
mySSH.command('echo $USER; nohup python3 ' + monitor_file + ' ' + conf_file + ' ' + self.testCase_id + ' enb 2>&1 > enb_stats_monitor_execution.log &', '\$', 5)
|
||||
else:
|
||||
mySSH.command('echo $USER; nohup python3 ' + monitor_file + ' ' + conf_file + ' gnb 2>&1 > gnb_stats_monitor_execution.log &', '\$', 5)
|
||||
mySSH.command('echo $USER; nohup python3 ' + monitor_file + ' ' + conf_file + ' ' + self.testCase_id + ' gnb 2>&1 > gnb_stats_monitor_execution.log &', '\$', 5)
|
||||
|
||||
|
||||
|
||||
@@ -671,10 +671,14 @@ class RANManagement():
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
|
||||
mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
|
||||
mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
|
||||
mySSH.command('killall --signal SIGKILL record', '\$', 5)
|
||||
mySSH.close()
|
||||
# if T tracer was run with option 0 (no logs), analyze logs
|
||||
# from textlog, otherwise do normal analysis (e.g., option 2)
|
||||
result = re.search('T_stdout 0', str(self.Initialize_eNB_args))
|
||||
if (result is not None):
|
||||
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
mySSH.command('killall --signal SIGKILL record', '\$', 5)
|
||||
mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5)
|
||||
enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
|
||||
raw_record_file = enbLogFile.replace('.log', '_record.raw')
|
||||
|
||||
@@ -544,6 +544,30 @@ class Dashboard:
|
||||
})
|
||||
editable_mr.save()
|
||||
|
||||
def AWSCleanup(self,mode):
|
||||
#first build MR list from aws S3 bucket
|
||||
if mode != 'report' and mode !='delete':
|
||||
print("incorrect mode for awsclean")
|
||||
return
|
||||
aws_mr_list=[]
|
||||
s3 = boto3.resource('s3')
|
||||
my_bucket = s3.Bucket('oaitestdashboard')
|
||||
for my_bucket_object in my_bucket.objects.all():
|
||||
#MR objects are like MR1407/index.html
|
||||
res=re.search(r'^MR([0-9]+)',my_bucket_object.key)
|
||||
if res!=None:
|
||||
aws_mr_list.append(res.group(1))#store MR number as a string
|
||||
#open MR list from GIt already exists as an attribute of this class self.mr_list
|
||||
#parse aws MR list and delete those MR that are no longer open
|
||||
for aws_mr in aws_mr_list:
|
||||
if aws_mr not in self.mr_list:
|
||||
if mode=="report":
|
||||
print(aws_mr+' can be deleted from AWS S3')
|
||||
else :
|
||||
awspath="MR"+aws_mr+"/"
|
||||
print('deleting ' + aws_mr)
|
||||
my_bucket.objects.filter(Prefix=awspath).delete()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -579,6 +603,10 @@ def main():
|
||||
htmlDash.PostGitNote(mr,commit, args)
|
||||
else:
|
||||
print("Not a Merge Request => this build is for testing/debug purpose, no report to git")
|
||||
elif sys.argv[1]=="awsclean":
|
||||
mode=sys.argv[2]#report or delete
|
||||
htmlDash=Dashboard()
|
||||
htmlDash.AWSCleanup(mode)
|
||||
else:
|
||||
print("Wrong argument at position 1")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ LTE-2x2 : #short name used in the dashboard
|
||||
job : 'RAN-LTE-2x2-Module-OAIEPC' #job name from Jenkins, used in the database
|
||||
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-LTE-2x2-Module-OAIEPC'
|
||||
bench : 'Obelix-N310-OAIEPC-Quectel(nrmodule2)'
|
||||
test : 'TDD, 40MHz, MCS9, 26Mb DL, 7Mb UL'
|
||||
test : 'TM1 + TM2, TDD, 40MHz, MCS9, 26Mb DL, 7Mb UL'
|
||||
NSA-B200 :
|
||||
job : 'RAN-NSA-B200-Module-LTEBOX'
|
||||
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-NSA-B200-Module-LTEBOX'
|
||||
@@ -18,14 +18,9 @@ SA-N310 :
|
||||
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-Module-CN5G'
|
||||
bench : 'Asterix-N310-OAICN5G-Quectel(nrmodule2)'
|
||||
test : 'TDD, 40MHz, 60Mb DL, 3Mb UL'
|
||||
SA-OAIUE-B200 :
|
||||
job : 'RAN-SA-OAIUE-B200-CN5G'
|
||||
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-OAIUE-B200-CN5G/'
|
||||
bench : 'Asterix-N310-OAICN5G-OAIUE-B200'
|
||||
test : 'TDD, 40MHz, Ping, (to be implemented : iperf)'
|
||||
SA-OAIUE-N310 :
|
||||
job : 'RAN-SA-OAIUE-N310-CN5G'
|
||||
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-OAIUE-N310-CN5G/'
|
||||
SA-OAIUE-N310-X300 :
|
||||
job : 'RAN-SA-OAIUE-N310-X300-CN5G'
|
||||
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-OAIUE-N310-X300-CN5G/'
|
||||
bench : 'Asterix-N310-OAICN5G-OAIUE-N310'
|
||||
test : 'TDD, 40MHz, Ping, (to be implemented : iperf)'
|
||||
|
||||
|
||||
+17
-12
@@ -11,6 +11,7 @@ import pickle
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import yaml
|
||||
import os
|
||||
|
||||
|
||||
class StatMonitor():
|
||||
@@ -59,18 +60,21 @@ class StatMonitor():
|
||||
self.d[node_type]['mcs'].append(int(result.group(4)))
|
||||
|
||||
|
||||
def collect(self,node_type):
|
||||
def collect(self,testcase_id,node_type):
|
||||
if node_type=='enb':
|
||||
files = ["L1_stats.log", "MAC_stats.log", "PDCP_stats.log", "RRC_stats.log"]
|
||||
else: #'gnb'
|
||||
files = ["nrL1_stats.log", "nrMAC_stats.log", "nrPDCP_stats.log", "nrRRC_stats.log"]
|
||||
# append each file's contents to another file (prepended with CI-) for
|
||||
# post-mortem/debugging analysis
|
||||
#append each file's contents to another file (prepended with CI-) for debug
|
||||
for f in files:
|
||||
cmd = rf'cat {f} >> CI-{f}'
|
||||
subprocess.Popen(shlex.split(cmd))
|
||||
# join the files for further processing
|
||||
cmd = rf'cat {shlex.join(files)}'
|
||||
if os.path.isfile(f):
|
||||
cmd = 'cat '+ f + ' >> CI-'+testcase_id+'-'+f
|
||||
subprocess.Popen(cmd,shell=True)
|
||||
#join the files for further processing
|
||||
cmd='cat '
|
||||
for f in files:
|
||||
if os.path.isfile(f):
|
||||
cmd += f+' '
|
||||
process=subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE)
|
||||
output = process.stdout.readlines()
|
||||
if node_type=='enb':
|
||||
@@ -79,7 +83,7 @@ class StatMonitor():
|
||||
self.process_gnb(node_type,output)
|
||||
|
||||
|
||||
def graph(self,node_type):
|
||||
def graph(self,testcase_id, node_type):
|
||||
for page in self.d[node_type]['graph']:#work out a set a graphs per page
|
||||
col = 1
|
||||
figure, axis = plt.subplots(len(self.d[node_type]['graph'][page]), col ,figsize=(10, 10))
|
||||
@@ -110,13 +114,14 @@ class StatMonitor():
|
||||
|
||||
plt.tight_layout()
|
||||
#save as png
|
||||
plt.savefig(node_type+'_stats_monitor_'+page+'.png')
|
||||
plt.savefig(node_type+'_stats_monitor_'+testcase_id+'_'+page+'.png')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
cfg_filename = sys.argv[1] #yaml file as metrics config
|
||||
node = sys.argv[2]#enb or gnb
|
||||
testcase_id = sys.argv[2] #test case id to name files accordingly, especially if we have several tests in a sequence
|
||||
node = sys.argv[3]#enb or gnb
|
||||
mon=StatMonitor(cfg_filename)
|
||||
|
||||
#collecting stats when modem process is stopped
|
||||
@@ -124,11 +129,11 @@ if __name__ == "__main__":
|
||||
process=subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)
|
||||
output = process.stdout.readlines()
|
||||
while len(output)!=0 :
|
||||
mon.collect(node)
|
||||
mon.collect(testcase_id,node)
|
||||
process=subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)
|
||||
output = process.stdout.readlines()
|
||||
time.sleep(1)
|
||||
print('Process stopped')
|
||||
with open(node+'_stats_monitor.pickle', 'wb') as handle:
|
||||
pickle.dump(mon.d, handle, protocol=pickle.HIGHEST_PROTOCOL)
|
||||
mon.graph(node)
|
||||
mon.graph(testcase_id, node)
|
||||
|
||||
+9
-10
@@ -21,10 +21,9 @@
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-4glte</htmlTabRef>
|
||||
<htmlTabName>Testing 4G LTE RF sim - Monolithic eNB</htmlTabName>
|
||||
<htmlTabRef>rfsim-4glte-fdd05mhz</htmlTabRef>
|
||||
<htmlTabName>Monolithic eNB - FDD 05MHz</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
000011
|
||||
@@ -46,7 +45,7 @@
|
||||
<testCase id="000011">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy Cassandra Database</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator</yaml_path>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
|
||||
<services>cassandra db_init</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
@@ -66,23 +65,23 @@
|
||||
<testCase id="000012">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator</yaml_path>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
|
||||
<services>oai_hss oai_mme oai_spgwc oai_spgwu trf_gen</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G eNB RF sim</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator</yaml_path>
|
||||
<desc>Deploy OAI 4G eNB RF sim (FDD 05MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
|
||||
<services>enb</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000014">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G NR-UE RF sim</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator</yaml_path>
|
||||
<desc>Deploy OAI 4G NR-UE RF sim (FDD 05MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
|
||||
<services>oai_ue0</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
@@ -124,7 +123,7 @@
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator</yaml_path>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
+3
-3
@@ -21,8 +21,8 @@
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-4glte-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 4G RF - Monolithic eNB</htmlTabName>
|
||||
<htmlTabRef>rfsim-4glte-fdd05mhz-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 4G RF</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
@@ -32,7 +32,7 @@
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator</yaml_path>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-fdd05mhz-noS1</htmlTabRef>
|
||||
<htmlTabName>Monolithic eNB - FDD 05MHz - noS1</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
000013
|
||||
000001
|
||||
000014
|
||||
000002
|
||||
020011
|
||||
020012
|
||||
030011
|
||||
030012
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G eNB RF sim (FDD 05MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path>
|
||||
<services>enb</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000014">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G NR-UE RF sim (FDD 05MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path>
|
||||
<services>oai_ue0</services>
|
||||
<nb_healthy>2</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<container_name>rfsim4g-oai-lte-ue0</container_name>
|
||||
<options>-I oaitun_ue1 -c 20 10.0.1.1</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020012">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping LTE-UE from eNB</desc>
|
||||
<container_name>rfsim4g-oai-enb</container_name>
|
||||
<options>-I oaitun_enb1 -c 20 10.0.1.2</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Downlink</desc>
|
||||
<server_container_name>rfsim4g-oai-lte-ue0</server_container_name>
|
||||
<client_container_name>rfsim4g-oai-enb</client_container_name>
|
||||
<server_options>-B 10.0.1.2 -u -i 1 -s</server_options>
|
||||
<client_options>-B 10.0.1.1 -c 10.0.1.2 -u -i 1 -t 30 -b 2M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030012">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Uplink</desc>
|
||||
<server_container_name>rfsim4g-oai-enb</server_container_name>
|
||||
<client_container_name>rfsim4g-oai-lte-ue0</client_container_name>
|
||||
<server_options>-B 10.0.1.1 -u -i 1 -s</server_options>
|
||||
<client_options>-B 10.0.1.2 -c 10.0.1.1 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-fdd05mhz-nos1-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 4G RF</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,129 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-fdd10mhz</htmlTabRef>
|
||||
<htmlTabName>Monolithic eNB - FDD 10MHz</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
000011
|
||||
000001
|
||||
000012
|
||||
000002
|
||||
000013
|
||||
000001
|
||||
000014
|
||||
000002
|
||||
020011
|
||||
020012
|
||||
030011
|
||||
030012
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy Cassandra Database</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
|
||||
<services>cassandra db_init</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
|
||||
<services>oai_hss oai_mme oai_spgwc oai_spgwu trf_gen</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G eNB RF sim (FDD 10MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
|
||||
<services>enb</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000014">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G NR-UE RF sim (FDD 10MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
|
||||
<services>oai_ue0</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<container_name>rfsim4g-oai-lte-ue0</container_name>
|
||||
<options>-I oaitun_ue1 -c 20 192.168.61.11</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020012">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping LTE-UE from Traffic-Gen</desc>
|
||||
<container_name>rfsim4g-trf-gen</container_name>
|
||||
<options>-c 20 12.0.0.2</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Downlink</desc>
|
||||
<server_container_name>rfsim4g-oai-lte-ue0</server_container_name>
|
||||
<client_container_name>rfsim4g-trf-gen</client_container_name>
|
||||
<server_options>-B 12.0.0.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.0.0.2 -u -i 1 -t 30 -b 2M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030012">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Uplink</desc>
|
||||
<server_container_name>rfsim4g-trf-gen</server_container_name>
|
||||
<client_container_name>rfsim4g-oai-lte-ue0</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-fdd10mhz-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 4G RF</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,129 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-fdd20mhz</htmlTabRef>
|
||||
<htmlTabName>Monolithic eNB - FDD 20MHz</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
000011
|
||||
000001
|
||||
000012
|
||||
000002
|
||||
000013
|
||||
000001
|
||||
000014
|
||||
000002
|
||||
020011
|
||||
020012
|
||||
030011
|
||||
030012
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy Cassandra Database</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
|
||||
<services>cassandra db_init</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
|
||||
<services>oai_hss oai_mme oai_spgwc oai_spgwu trf_gen</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G eNB RF sim (FDD 20MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
|
||||
<services>enb</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000014">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G NR-UE RF sim (FDD 20MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
|
||||
<services>oai_ue0</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<container_name>rfsim4g-oai-lte-ue0</container_name>
|
||||
<options>-I oaitun_ue1 -c 20 192.168.61.11</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020012">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping LTE-UE from Traffic-Gen</desc>
|
||||
<container_name>rfsim4g-trf-gen</container_name>
|
||||
<options>-c 20 12.0.0.2</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Downlink</desc>
|
||||
<server_container_name>rfsim4g-oai-lte-ue0</server_container_name>
|
||||
<client_container_name>rfsim4g-trf-gen</client_container_name>
|
||||
<server_options>-B 12.0.0.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.0.0.2 -u -i 1 -t 30 -b 2M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030012">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Uplink</desc>
|
||||
<server_container_name>rfsim4g-trf-gen</server_container_name>
|
||||
<client_container_name>rfsim4g-oai-lte-ue0</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-fdd20mhz-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 4G RF</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,130 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-tdd05mhz</htmlTabRef>
|
||||
<htmlTabName>Monolithic eNB - TDD 05MHz</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
000011
|
||||
000001
|
||||
000012
|
||||
000002
|
||||
000013
|
||||
000001
|
||||
000014
|
||||
000002
|
||||
020011
|
||||
020012
|
||||
030011
|
||||
030012
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy Cassandra Database</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
|
||||
<services>cassandra db_init</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
|
||||
<services>oai_hss oai_mme oai_spgwc oai_spgwu trf_gen</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G eNB RF sim (TDD 05MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
|
||||
<services>enb</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000014">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 4G NR-UE RF sim (TDD 05MHz)</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
|
||||
<services>oai_ue0</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<container_name>rfsim4g-oai-lte-ue0</container_name>
|
||||
<options>-I oaitun_ue1 -c 20 192.168.61.11</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020012">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping LTE-UE from Traffic-Gen</desc>
|
||||
<container_name>rfsim4g-trf-gen</container_name>
|
||||
<options>-c 20 12.0.0.2</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Downlink</desc>
|
||||
<server_container_name>rfsim4g-oai-lte-ue0</server_container_name>
|
||||
<client_container_name>rfsim4g-trf-gen</client_container_name>
|
||||
<server_options>-B 12.0.0.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.0.0.2 -u -i 1 -t 30 -b 2M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030012">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Uplink</desc>
|
||||
<server_container_name>rfsim4g-trf-gen</server_container_name>
|
||||
<client_container_name>rfsim4g-oai-lte-ue0</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
|
||||
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>rfsim-4glte-tdd05mhz-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 4G RF</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 4G stack</desc>
|
||||
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -36,6 +36,7 @@
|
||||
000002
|
||||
070000
|
||||
070001
|
||||
070002
|
||||
000001
|
||||
010002
|
||||
080001
|
||||
@@ -132,6 +133,16 @@
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 10 --bidir</iperf_args>
|
||||
<direction>BIDIR</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize OAI UE (N310)</desc>
|
||||
<air_interface>nr</air_interface>
|
||||
<Initialize_OAI_UE_args>--sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=192.168.18.241,second_addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
<Initialize_OAI_UE_args>--sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=192.168.18.241,addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
|
||||
@@ -31,10 +31,15 @@
|
||||
010000
|
||||
000001
|
||||
050000
|
||||
000001
|
||||
050001
|
||||
000001
|
||||
070000
|
||||
000001
|
||||
070001
|
||||
000001
|
||||
070002
|
||||
000001
|
||||
010002
|
||||
080000
|
||||
</TestCaseRequestedList>
|
||||
@@ -58,7 +63,7 @@
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --T_stdout 2 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
@@ -83,7 +88,7 @@
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<desc>Ping: 40pings in 40sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 40</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
@@ -121,6 +126,15 @@
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 10 --bidir</iperf_args>
|
||||
<direction>BIDIR</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
|
||||
@@ -22,18 +22,21 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-Tab3</htmlTabRef>
|
||||
<htmlTabName>SA Ping DL UL with QUECTEL</htmlTabName>
|
||||
<htmlTabName>SA 162PRB</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
040000
|
||||
042000
|
||||
000002
|
||||
010000
|
||||
000001
|
||||
050000
|
||||
050001
|
||||
070000
|
||||
070001
|
||||
052000
|
||||
000001
|
||||
072000
|
||||
000001
|
||||
072001
|
||||
000001
|
||||
072002
|
||||
000001
|
||||
010002
|
||||
080000
|
||||
@@ -55,7 +58,7 @@
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="040000">
|
||||
<testCase id="042000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
@@ -81,39 +84,44 @@
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="050000">
|
||||
<testCase id="052000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<desc>Ping: 40pings in 40sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<ping_args>-c 40</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>20</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100pings in 20sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
<testCase id="072000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/140Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 140M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070001">
|
||||
<testCase id="072001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 3M -t 60</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="072002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 10 --bidir</iperf_args>
|
||||
<direction>BIDIR</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -26,28 +26,28 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
040000
|
||||
041000
|
||||
000002
|
||||
010000
|
||||
011000
|
||||
000001
|
||||
050000
|
||||
051000
|
||||
000001
|
||||
070000
|
||||
071000
|
||||
000001
|
||||
070001
|
||||
071001
|
||||
000001
|
||||
070002
|
||||
071002
|
||||
000001
|
||||
070003
|
||||
071003
|
||||
000001
|
||||
070004
|
||||
071004
|
||||
000001
|
||||
010002
|
||||
080000
|
||||
011002
|
||||
081000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010000">
|
||||
<testCase id="011000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
@@ -55,14 +55,14 @@
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="010002">
|
||||
<testCase id="011002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="040000">
|
||||
<testCase id="041000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
@@ -88,9 +88,9 @@
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="050000">
|
||||
<testCase id="051000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<desc>Ping: 40pings in 40sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 40</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
@@ -98,7 +98,7 @@
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="070000">
|
||||
<testCase id="071000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/10Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 10M -t 30</iperf_args>
|
||||
@@ -108,7 +108,7 @@
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070001">
|
||||
<testCase id="071001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30</iperf_args>
|
||||
@@ -118,7 +118,7 @@
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070002">
|
||||
<testCase id="071002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/40Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 40M -t 30</iperf_args>
|
||||
@@ -128,7 +128,7 @@
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070003">
|
||||
<testCase id="071003">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/60Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 60M -t 30</iperf_args>
|
||||
@@ -138,20 +138,20 @@
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070004">
|
||||
<testCase id="071004">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/90Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 90M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<testCase id="081000">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate gNB</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>30</ping_rttavg_threshold>
|
||||
<ping_rttavg_threshold>40</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
@@ -96,14 +96,14 @@
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>30</ping_rttavg_threshold>
|
||||
<ping_rttavg_threshold>40</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="070002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/26Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 26M -t 60</iperf_args>
|
||||
<desc>iperf (DL/1Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 1M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
enb:
|
||||
image: oai-enb:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-enb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.20
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_FDD_MONO: 'yes'
|
||||
RFSIMULATOR: enb
|
||||
ENB_NAME: eNB-rf-sim
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC_LENGTH: 2
|
||||
TAC: 1
|
||||
UTRA_BAND_ID: 7
|
||||
DL_FREQUENCY_IN_MHZ: 2680
|
||||
UL_FREQUENCY_OFFSET_IN_MHZ: 120
|
||||
NID_CELL: 10
|
||||
NB_PRB: 25
|
||||
MME_S1C_IP_ADDRESS: 192.168.61.3
|
||||
ENB_S1C_IF_NAME: eth0
|
||||
ENB_S1C_IP_ADDRESS: 192.168.61.20
|
||||
ENB_S1U_IF_NAME: eth0
|
||||
ENB_S1U_IP_ADDRESS: 192.168.61.20
|
||||
ENB_X2_IP_ADDRESS: 192.168.61.20
|
||||
FLEXRAN_ENABLED: 'no'
|
||||
FLEXRAN_INTERFACE_NAME: eth0
|
||||
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time --noS1
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_ue0:
|
||||
image: oai-lte-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-lte-ue0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.30
|
||||
expose:
|
||||
- "10000"
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
HOSTNAME: oai_ue0
|
||||
RFSIMULATOR: 192.168.61.20
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
SHORT_IMSI: '0100000001'
|
||||
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
|
||||
OPC: 'c42449363bbad02b66d16bc975d77cc1'
|
||||
MSISDN: '001011234561010'
|
||||
HPLMN: 20896
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time --noS1
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
name: rfsim4g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.61.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-public"
|
||||
@@ -0,0 +1,272 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
cassandra:
|
||||
image: cassandra:2.1
|
||||
container_name: rfsim4g-cassandra
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.2
|
||||
environment:
|
||||
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
|
||||
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
|
||||
healthcheck:
|
||||
test: /bin/bash -c "nodetool status"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
db_init:
|
||||
image: cassandra:2.1
|
||||
container_name: rfsim4g-db-init
|
||||
depends_on: [cassandra]
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
max_attempts: 10
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.4
|
||||
volumes:
|
||||
- ../4g_rfsimulator_fdd_05MHz/oai_db.cql:/home/oai_db.cql
|
||||
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
|
||||
|
||||
oai_hss:
|
||||
image: oai-hss:latest
|
||||
container_name: rfsim4g-oai-hss
|
||||
privileged: true
|
||||
depends_on: [cassandra]
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.3
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.2
|
||||
environment:
|
||||
REALM: openairinterface.org
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
PREFIX: /openair-hss/etc
|
||||
cassandra_Server_IP: 192.168.68.2
|
||||
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
|
||||
LTE_K: fec86ba6eb707ed08905757b1bb44b8f
|
||||
APN1: oai.ipv4
|
||||
APN2: internet
|
||||
FIRST_IMSI: 208960100000001
|
||||
NB_USERS: 10
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_hss"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_mme:
|
||||
image: oai-mme:latest
|
||||
container_name: rfsim4g-oai-mme
|
||||
privileged: true
|
||||
depends_on: [oai_hss]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.3
|
||||
environment:
|
||||
REALM: openairinterface.org
|
||||
PREFIX: /openair-mme/etc
|
||||
INSTANCE: 1
|
||||
PID_DIRECTORY: /var/run
|
||||
HSS_IP_ADDR: 192.168.61.2
|
||||
HSS_HOSTNAME: hss
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
HSS_REALM: openairinterface.org
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MME_GID: 32768
|
||||
MME_CODE: 3
|
||||
TAC_0: 1
|
||||
TAC_1: 2
|
||||
TAC_2: 3
|
||||
MME_FQDN: mme.openairinterface.org
|
||||
MME_S6A_IP_ADDR: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S1_MME: eth0
|
||||
MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S11: eth0
|
||||
MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S10: lo
|
||||
MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
|
||||
OUTPUT: CONSOLE
|
||||
SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
|
||||
PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
|
||||
PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
|
||||
MCC_SGW_0: '208'
|
||||
MNC3_SGW_0: '096'
|
||||
TAC_LB_SGW_0: '01'
|
||||
TAC_HB_SGW_0: '00'
|
||||
MCC_MME_0: '208'
|
||||
MNC3_MME_0: '096'
|
||||
TAC_LB_MME_0: '02'
|
||||
TAC_HB_MME_0: '00'
|
||||
MCC_MME_1: '208'
|
||||
MNC3_MME_1: '096'
|
||||
TAC_LB_MME_1: '03'
|
||||
TAC_HB_MME_1: '00'
|
||||
TAC_LB_SGW_TEST_0: '03'
|
||||
TAC_HB_SGW_TEST_0: '00'
|
||||
SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_mme"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwc:
|
||||
image: oai-spgwc:latest
|
||||
privileged: true
|
||||
depends_on: [oai_mme]
|
||||
container_name: rfsim4g-oai-spgwc
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.4
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
SGW_INTERFACE_NAME_FOR_S11: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
|
||||
PUSH_PROTOCOL_OPTION: 'true'
|
||||
APN_NI_1: oai.ipv4
|
||||
APN_NI_2: oai.ipv4_2
|
||||
DEFAULT_APN_NI_1: oai.ipv4
|
||||
UE_IP_ADDRESS_POOL_1: '12.0.0.2 - 12.0.0.254'
|
||||
UE_IP_ADDRESS_POOL_2: '12.1.1.2 - 12.1.1.254'
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC03: '096'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwc"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwu:
|
||||
image: oai-spgwu-tiny:latest
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-spgwu-tiny
|
||||
depends_on: [oai_spgwc]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.5
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
PID_DIRECTORY: /var/run
|
||||
INSTANCE: 1
|
||||
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SGI: eth0
|
||||
SGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
SPGWC0_IP_ADDRESS: 192.168.61.4
|
||||
NETWORK_UE_IP: '12.0.0.0/24'
|
||||
NETWORK_UE_NAT_OPTION: 'yes'
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC03: '096'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwu"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
trf_gen:
|
||||
image: trf-gen:production
|
||||
privileged: true
|
||||
container_name: rfsim4g-trf-gen
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.11
|
||||
entrypoint: /bin/bash -c "ip route add 12.0.0.0/24 via 192.168.61.5 dev eth0; sleep infinity"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.61.5"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
enb:
|
||||
image: oai-enb:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-enb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.20
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_FDD_MONO: 'yes'
|
||||
RFSIMULATOR: enb
|
||||
ENB_NAME: eNB-rf-sim
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC_LENGTH: 2
|
||||
TAC: 1
|
||||
UTRA_BAND_ID: 7
|
||||
DL_FREQUENCY_IN_MHZ: 2680
|
||||
UL_FREQUENCY_OFFSET_IN_MHZ: 120
|
||||
NID_CELL: 10
|
||||
NB_PRB: 50
|
||||
MME_S1C_IP_ADDRESS: 192.168.61.3
|
||||
ENB_S1C_IF_NAME: eth0
|
||||
ENB_S1C_IP_ADDRESS: 192.168.61.20
|
||||
ENB_S1U_IF_NAME: eth0
|
||||
ENB_S1U_IP_ADDRESS: 192.168.61.20
|
||||
ENB_X2_IP_ADDRESS: 192.168.61.20
|
||||
FLEXRAN_ENABLED: 'no'
|
||||
FLEXRAN_INTERFACE_NAME: eth0
|
||||
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_ue0:
|
||||
image: oai-lte-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-lte-ue0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.30
|
||||
expose:
|
||||
- "10000"
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
HOSTNAME: oai_ue0
|
||||
RFSIMULATOR: 192.168.61.20
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
SHORT_IMSI: '0100000001'
|
||||
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
|
||||
OPC: 'c42449363bbad02b66d16bc975d77cc1'
|
||||
MSISDN: '001011234561010'
|
||||
HPLMN: 20896
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 50 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
private_net:
|
||||
name: rfsim4g-oai-private-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-private"
|
||||
public_net:
|
||||
name: rfsim4g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.61.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-public"
|
||||
@@ -0,0 +1,272 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
cassandra:
|
||||
image: cassandra:2.1
|
||||
container_name: rfsim4g-cassandra
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.2
|
||||
environment:
|
||||
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
|
||||
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
|
||||
healthcheck:
|
||||
test: /bin/bash -c "nodetool status"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
db_init:
|
||||
image: cassandra:2.1
|
||||
container_name: rfsim4g-db-init
|
||||
depends_on: [cassandra]
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
max_attempts: 10
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.4
|
||||
volumes:
|
||||
- ../4g_rfsimulator_fdd_05MHz/oai_db.cql:/home/oai_db.cql
|
||||
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
|
||||
|
||||
oai_hss:
|
||||
image: oai-hss:latest
|
||||
container_name: rfsim4g-oai-hss
|
||||
privileged: true
|
||||
depends_on: [cassandra]
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.3
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.2
|
||||
environment:
|
||||
REALM: openairinterface.org
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
PREFIX: /openair-hss/etc
|
||||
cassandra_Server_IP: 192.168.68.2
|
||||
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
|
||||
LTE_K: fec86ba6eb707ed08905757b1bb44b8f
|
||||
APN1: oai.ipv4
|
||||
APN2: internet
|
||||
FIRST_IMSI: 208960100000001
|
||||
NB_USERS: 10
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_hss"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_mme:
|
||||
image: oai-mme:latest
|
||||
container_name: rfsim4g-oai-mme
|
||||
privileged: true
|
||||
depends_on: [oai_hss]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.3
|
||||
environment:
|
||||
REALM: openairinterface.org
|
||||
PREFIX: /openair-mme/etc
|
||||
INSTANCE: 1
|
||||
PID_DIRECTORY: /var/run
|
||||
HSS_IP_ADDR: 192.168.61.2
|
||||
HSS_HOSTNAME: hss
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
HSS_REALM: openairinterface.org
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MME_GID: 32768
|
||||
MME_CODE: 3
|
||||
TAC_0: 1
|
||||
TAC_1: 2
|
||||
TAC_2: 3
|
||||
MME_FQDN: mme.openairinterface.org
|
||||
MME_S6A_IP_ADDR: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S1_MME: eth0
|
||||
MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S11: eth0
|
||||
MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S10: lo
|
||||
MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
|
||||
OUTPUT: CONSOLE
|
||||
SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
|
||||
PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
|
||||
PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
|
||||
MCC_SGW_0: '208'
|
||||
MNC3_SGW_0: '096'
|
||||
TAC_LB_SGW_0: '01'
|
||||
TAC_HB_SGW_0: '00'
|
||||
MCC_MME_0: '208'
|
||||
MNC3_MME_0: '096'
|
||||
TAC_LB_MME_0: '02'
|
||||
TAC_HB_MME_0: '00'
|
||||
MCC_MME_1: '208'
|
||||
MNC3_MME_1: '096'
|
||||
TAC_LB_MME_1: '03'
|
||||
TAC_HB_MME_1: '00'
|
||||
TAC_LB_SGW_TEST_0: '03'
|
||||
TAC_HB_SGW_TEST_0: '00'
|
||||
SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_mme"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwc:
|
||||
image: oai-spgwc:latest
|
||||
privileged: true
|
||||
depends_on: [oai_mme]
|
||||
container_name: rfsim4g-oai-spgwc
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.4
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
SGW_INTERFACE_NAME_FOR_S11: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
|
||||
PUSH_PROTOCOL_OPTION: 'true'
|
||||
APN_NI_1: oai.ipv4
|
||||
APN_NI_2: oai.ipv4_2
|
||||
DEFAULT_APN_NI_1: oai.ipv4
|
||||
UE_IP_ADDRESS_POOL_1: '12.0.0.2 - 12.0.0.254'
|
||||
UE_IP_ADDRESS_POOL_2: '12.1.1.2 - 12.1.1.254'
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC03: '096'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwc"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwu:
|
||||
image: oai-spgwu-tiny:latest
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-spgwu-tiny
|
||||
depends_on: [oai_spgwc]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.5
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
PID_DIRECTORY: /var/run
|
||||
INSTANCE: 1
|
||||
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SGI: eth0
|
||||
SGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
SPGWC0_IP_ADDRESS: 192.168.61.4
|
||||
NETWORK_UE_IP: '12.0.0.0/24'
|
||||
NETWORK_UE_NAT_OPTION: 'yes'
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC03: '096'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwu"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
trf_gen:
|
||||
image: trf-gen:production
|
||||
privileged: true
|
||||
container_name: rfsim4g-trf-gen
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.11
|
||||
entrypoint: /bin/bash -c "ip route add 12.0.0.0/24 via 192.168.61.5 dev eth0; sleep infinity"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.61.5"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
enb:
|
||||
image: oai-enb:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-enb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.20
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_FDD_MONO: 'yes'
|
||||
RFSIMULATOR: enb
|
||||
ENB_NAME: eNB-rf-sim
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC_LENGTH: 2
|
||||
TAC: 1
|
||||
UTRA_BAND_ID: 7
|
||||
DL_FREQUENCY_IN_MHZ: 2680
|
||||
UL_FREQUENCY_OFFSET_IN_MHZ: 120
|
||||
NID_CELL: 10
|
||||
NB_PRB: 100
|
||||
MME_S1C_IP_ADDRESS: 192.168.61.3
|
||||
ENB_S1C_IF_NAME: eth0
|
||||
ENB_S1C_IP_ADDRESS: 192.168.61.20
|
||||
ENB_S1U_IF_NAME: eth0
|
||||
ENB_S1U_IP_ADDRESS: 192.168.61.20
|
||||
ENB_X2_IP_ADDRESS: 192.168.61.20
|
||||
FLEXRAN_ENABLED: 'no'
|
||||
FLEXRAN_INTERFACE_NAME: eth0
|
||||
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_ue0:
|
||||
image: oai-lte-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-lte-ue0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.30
|
||||
expose:
|
||||
- "10000"
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
HOSTNAME: oai_ue0
|
||||
RFSIMULATOR: 192.168.61.20
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
SHORT_IMSI: '0100000001'
|
||||
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
|
||||
OPC: 'c42449363bbad02b66d16bc975d77cc1'
|
||||
MSISDN: '001011234561010'
|
||||
HPLMN: 20896
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 100 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
private_net:
|
||||
name: rfsim4g-oai-private-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-private"
|
||||
public_net:
|
||||
name: rfsim4g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.61.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-public"
|
||||
@@ -0,0 +1,271 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
cassandra:
|
||||
image: cassandra:2.1
|
||||
container_name: rfsim4g-cassandra
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.2
|
||||
environment:
|
||||
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
|
||||
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
|
||||
healthcheck:
|
||||
test: /bin/bash -c "nodetool status"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
db_init:
|
||||
image: cassandra:2.1
|
||||
container_name: rfsim4g-db-init
|
||||
depends_on: [cassandra]
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
max_attempts: 10
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.4
|
||||
volumes:
|
||||
- ../4g_rfsimulator_fdd_05MHz/oai_db.cql:/home/oai_db.cql
|
||||
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
|
||||
|
||||
oai_hss:
|
||||
image: oai-hss:latest
|
||||
container_name: rfsim4g-oai-hss
|
||||
privileged: true
|
||||
depends_on: [cassandra]
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.3
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.2
|
||||
environment:
|
||||
REALM: openairinterface.org
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
PREFIX: /openair-hss/etc
|
||||
cassandra_Server_IP: 192.168.68.2
|
||||
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
|
||||
LTE_K: fec86ba6eb707ed08905757b1bb44b8f
|
||||
APN1: oai.ipv4
|
||||
APN2: internet
|
||||
FIRST_IMSI: 208960100000001
|
||||
NB_USERS: 10
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_hss"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_mme:
|
||||
image: oai-mme:latest
|
||||
container_name: rfsim4g-oai-mme
|
||||
privileged: true
|
||||
depends_on: [oai_hss]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.3
|
||||
environment:
|
||||
REALM: openairinterface.org
|
||||
PREFIX: /openair-mme/etc
|
||||
INSTANCE: 1
|
||||
PID_DIRECTORY: /var/run
|
||||
HSS_IP_ADDR: 192.168.61.2
|
||||
HSS_HOSTNAME: hss
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
HSS_REALM: openairinterface.org
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MME_GID: 32768
|
||||
MME_CODE: 3
|
||||
TAC_0: 1
|
||||
TAC_1: 2
|
||||
TAC_2: 3
|
||||
MME_FQDN: mme.openairinterface.org
|
||||
MME_S6A_IP_ADDR: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S1_MME: eth0
|
||||
MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S11: eth0
|
||||
MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
|
||||
MME_INTERFACE_NAME_FOR_S10: lo
|
||||
MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
|
||||
OUTPUT: CONSOLE
|
||||
SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
|
||||
PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
|
||||
PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
|
||||
MCC_SGW_0: '208'
|
||||
MNC3_SGW_0: '096'
|
||||
TAC_LB_SGW_0: '01'
|
||||
TAC_HB_SGW_0: '00'
|
||||
MCC_MME_0: '208'
|
||||
MNC3_MME_0: '096'
|
||||
TAC_LB_MME_0: '02'
|
||||
TAC_HB_MME_0: '00'
|
||||
MCC_MME_1: '208'
|
||||
MNC3_MME_1: '096'
|
||||
TAC_LB_MME_1: '03'
|
||||
TAC_HB_MME_1: '00'
|
||||
TAC_LB_SGW_TEST_0: '03'
|
||||
TAC_HB_SGW_TEST_0: '00'
|
||||
SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_mme"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwc:
|
||||
image: oai-spgwc:latest
|
||||
privileged: true
|
||||
depends_on: [oai_mme]
|
||||
container_name: rfsim4g-oai-spgwc
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.4
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
SGW_INTERFACE_NAME_FOR_S11: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
|
||||
PUSH_PROTOCOL_OPTION: 'true'
|
||||
APN_NI_1: oai.ipv4
|
||||
APN_NI_2: oai.ipv4_2
|
||||
DEFAULT_APN_NI_1: oai.ipv4
|
||||
UE_IP_ADDRESS_POOL_1: '12.0.0.2 - 12.0.0.254'
|
||||
UE_IP_ADDRESS_POOL_2: '12.1.1.2 - 12.1.1.254'
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC03: '096'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwc"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwu:
|
||||
image: oai-spgwu-tiny:latest
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-spgwu-tiny
|
||||
depends_on: [oai_spgwc]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.5
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
PID_DIRECTORY: /var/run
|
||||
INSTANCE: 1
|
||||
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SGI: eth0
|
||||
SGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
SPGWC0_IP_ADDRESS: 192.168.61.4
|
||||
NETWORK_UE_IP: '12.0.0.0/24'
|
||||
NETWORK_UE_NAT_OPTION: 'yes'
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC03: '096'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwu"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
trf_gen:
|
||||
image: trf-gen:production
|
||||
privileged: true
|
||||
container_name: rfsim4g-trf-gen
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.11
|
||||
entrypoint: /bin/bash -c "ip route add 12.0.0.0/24 via 192.168.61.5 dev eth0; sleep infinity"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.61.5"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
enb:
|
||||
image: oai-enb:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-enb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.20
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_TDD_MONO: 'yes'
|
||||
RFSIMULATOR: enb
|
||||
ENB_NAME: eNB-rf-sim
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC_LENGTH: 2
|
||||
TAC: 1
|
||||
UTRA_BAND_ID: 38
|
||||
DL_FREQUENCY_IN_MHZ: 2605
|
||||
UL_FREQUENCY_OFFSET_IN_MHZ: 0
|
||||
NID_CELL: 10
|
||||
NB_PRB: 25
|
||||
MME_S1C_IP_ADDRESS: 192.168.61.3
|
||||
S1C_IF_NAME: eth0
|
||||
F1_CU_IP_ADDRESS: 192.168.61.20
|
||||
S1U_IF_NAME: eth0
|
||||
F1_CU_IP_ADDRESS: 192.168.61.20
|
||||
FLEXRAN_ENABLED: 'no'
|
||||
FLEXRAN_INTERFACE_NAME: eth0
|
||||
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_ue0:
|
||||
image: oai-lte-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-lte-ue0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.30
|
||||
expose:
|
||||
- "10000"
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
HOSTNAME: oai_ue0
|
||||
RFSIMULATOR: 192.168.61.20
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
SHORT_IMSI: '0100000001'
|
||||
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
|
||||
OPC: 'c42449363bbad02b66d16bc975d77cc1'
|
||||
MSISDN: '001011234561010'
|
||||
HPLMN: 20896
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -T -C 2605000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
private_net:
|
||||
name: rfsim4g-oai-private-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-private"
|
||||
public_net:
|
||||
name: rfsim4g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.61.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-public"
|
||||
@@ -111,7 +111,6 @@ services:
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oai-smf:latest
|
||||
entrypoint: /bin/bash -c "/openair-smf/bin/oai_smf -c /openair-smf/bin/oai-smf.conf -o"
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
@@ -140,12 +139,13 @@ services:
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- DNN_NI0=oai
|
||||
- DNN_NI2=oai.ipv4
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
volumes:
|
||||
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
|
||||
- ./oai-smf.conf:/openair-smf/bin/oai-smf.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
|
||||
interval: 10s
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
SMF =
|
||||
{
|
||||
FQDN = "oai-smf-svc";
|
||||
INSTANCE = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
INTERFACES :
|
||||
{
|
||||
N4 :
|
||||
{
|
||||
# SMF binded interface for N4 communication (UPF)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
};
|
||||
|
||||
SBI :
|
||||
{
|
||||
# SMF binded interface for SBI interface (e.g., communication with AMF, UDM)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
HTTP2_PORT = 9090; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR SMF API VERSION CONFIG HERE
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
# Pool of UE assigned IP addresses
|
||||
# Do not make IP pools overlap
|
||||
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
|
||||
IP_ADDRESS_POOL :
|
||||
{
|
||||
IPV4_LIST = (
|
||||
{RANGE = "12.1.1.2 - 12.1.1.128";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
{RANGE = "12.1.1.129 - 12.1.1.224";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
{RANGE = "10.10.10.2 - 10.10.10.253";} # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
|
||||
);
|
||||
IPV6_LIST = (
|
||||
{PREFIX = "2001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
{PREFIX = "3001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
{PREFIX = "4001:1:2::/64";} # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
);
|
||||
};
|
||||
|
||||
DNN_LIST = (
|
||||
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
|
||||
{DNN_NI = "default"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1},
|
||||
{DNN_NI = "carrier.com"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
|
||||
{DNN_NI = "oai"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1}
|
||||
);
|
||||
|
||||
# DNS address communicated to UEs
|
||||
DEFAULT_DNS_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # YOUR DNS CONFIG HERE
|
||||
|
||||
SUPPORT_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
REGISTER_NRF = "yes"; # Set to yes if SMF resgisters to an NRF
|
||||
DISCOVER_UPF = "yes"; # Set to yes to enable UPF discovery and selection
|
||||
FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # Non standard feature, normally should be set to "no",
|
||||
# but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling
|
||||
USE_LOCAL_SUBSCRIPTION_INFO = "yes"; # Set to yes if SMF uses local subscription information instead of from an UDM
|
||||
USE_FQDN_DNS = "yes"; # Set to yes if AMF/UDM/NRF/UPF will relying on a DNS to resolve FQDN
|
||||
}
|
||||
|
||||
AMF :
|
||||
{
|
||||
IPV4_ADDRESS = "0.0.0.0"; # YOUR AMF CONFIG HERE
|
||||
PORT = 80; # YOUR AMF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR AMF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-amf" # YOUR AMF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UDM :
|
||||
{
|
||||
IPV4_ADDRESS = "127.0.0.1"; # YOUR UDM CONFIG HERE
|
||||
PORT = 80; # YOUR UDM CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "localhost" # YOUR UDM FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.71.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UPF_LIST = (
|
||||
{IPV4_ADDRESS = "192.168.71.134" ; FQDN = "oai-spgwu"} # YOUR UPF CONFIG HERE
|
||||
);
|
||||
|
||||
LOCAL_CONFIGURATION :
|
||||
{
|
||||
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
|
||||
{ NSSAI_SST = 222, NSSAI_SD = "123", DNN = "default", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 7, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"},
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "1", DNN = "oai", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"}
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
This page is only valid for an `Ubuntu18` host.
|
||||
|
||||
**NOTE: this version (2021-10-05) is valid for the `v1.1.0` and `v1.2.0` versions of the `OAI 5G CN`.**
|
||||
**NOTE: this version (2022-01-27) has been updated for the `v1.3.0` version of the `OAI 5G CN`.**
|
||||
|
||||
**TABLE OF CONTENTS**
|
||||
|
||||
@@ -76,9 +76,9 @@ $ docker image tag rdefosseoai/oai-nr-ue:develop oai-nr-ue:develop
|
||||
$ docker logout
|
||||
```
|
||||
|
||||
**CAUTION: 2021/10/05 with the release `v1.2.0` of the `CN5G`, the previous version was not compatible any-more.**
|
||||
**CAUTION: 2022/01/27 with the release `v1.3.0` of the `CN5G`, the previous version was not compatible any-more.**
|
||||
|
||||
**This new version is working for both the `v1.1.0` and `v1.2.0` of the `CN5G`.**
|
||||
**This new version is working only with the `v1.3.0` of the `CN5G`.**
|
||||
|
||||
# 2. Deploy containers #
|
||||
|
||||
|
||||
@@ -111,7 +111,6 @@ services:
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oai-smf:latest
|
||||
entrypoint: /bin/bash -c "/openair-smf/bin/oai_smf -c /openair-smf/bin/oai-smf.conf -o"
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
@@ -140,12 +139,13 @@ services:
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- DNN_NI0=oai
|
||||
- DNN_NI2=oai.ipv4
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
volumes:
|
||||
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
|
||||
- ./oai-smf.conf:/openair-smf/bin/oai-smf.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
|
||||
interval: 10s
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
SMF =
|
||||
{
|
||||
FQDN = "oai-smf-svc";
|
||||
INSTANCE = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
INTERFACES :
|
||||
{
|
||||
N4 :
|
||||
{
|
||||
# SMF binded interface for N4 communication (UPF)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
};
|
||||
|
||||
SBI :
|
||||
{
|
||||
# SMF binded interface for SBI interface (e.g., communication with AMF, UDM)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
HTTP2_PORT = 9090; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR SMF API VERSION CONFIG HERE
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
# Pool of UE assigned IP addresses
|
||||
# Do not make IP pools overlap
|
||||
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
|
||||
IP_ADDRESS_POOL :
|
||||
{
|
||||
IPV4_LIST = (
|
||||
{RANGE = "12.1.1.2 - 12.1.1.128";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
{RANGE = "12.1.1.129 - 12.1.1.224";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
{RANGE = "10.10.10.2 - 10.10.10.253";} # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
|
||||
);
|
||||
IPV6_LIST = (
|
||||
{PREFIX = "2001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
{PREFIX = "3001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
{PREFIX = "4001:1:2::/64";} # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
);
|
||||
};
|
||||
|
||||
DNN_LIST = (
|
||||
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
|
||||
{DNN_NI = "default"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1},
|
||||
{DNN_NI = "carrier.com"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
|
||||
{DNN_NI = "oai"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1}
|
||||
);
|
||||
|
||||
# DNS address communicated to UEs
|
||||
DEFAULT_DNS_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # YOUR DNS CONFIG HERE
|
||||
|
||||
SUPPORT_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
REGISTER_NRF = "yes"; # Set to yes if SMF resgisters to an NRF
|
||||
DISCOVER_UPF = "yes"; # Set to yes to enable UPF discovery and selection
|
||||
FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # Non standard feature, normally should be set to "no",
|
||||
# but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling
|
||||
USE_LOCAL_SUBSCRIPTION_INFO = "yes"; # Set to yes if SMF uses local subscription information instead of from an UDM
|
||||
USE_FQDN_DNS = "yes"; # Set to yes if AMF/UDM/NRF/UPF will relying on a DNS to resolve FQDN
|
||||
}
|
||||
|
||||
AMF :
|
||||
{
|
||||
IPV4_ADDRESS = "0.0.0.0"; # YOUR AMF CONFIG HERE
|
||||
PORT = 80; # YOUR AMF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR AMF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-amf" # YOUR AMF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UDM :
|
||||
{
|
||||
IPV4_ADDRESS = "127.0.0.1"; # YOUR UDM CONFIG HERE
|
||||
PORT = 80; # YOUR UDM CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "localhost" # YOUR UDM FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.71.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UPF_LIST = (
|
||||
{IPV4_ADDRESS = "192.168.71.134" ; FQDN = "oai-spgwu"} # YOUR UPF CONFIG HERE
|
||||
);
|
||||
|
||||
LOCAL_CONFIGURATION :
|
||||
{
|
||||
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
|
||||
{ NSSAI_SST = 222, NSSAI_SD = "123", DNN = "default", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 7, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"},
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "1", DNN = "oai", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"}
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#/*
|
||||
#/*
|
||||
# * 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.
|
||||
@@ -343,8 +343,8 @@ set(CMAKE_CXX_FLAGS
|
||||
|
||||
|
||||
if (SANITIZE_ADDRESS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-common")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libasan -fno-common")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libasan -fno-common")
|
||||
endif ()
|
||||
|
||||
add_definitions("-DASN_DISABLE_OER_SUPPORT")
|
||||
@@ -1710,6 +1710,9 @@ set(PHY_SRC_UE
|
||||
|
||||
set(PHY_NR_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_scrambling.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
)
|
||||
|
||||
set(PHY_NR_SRC
|
||||
@@ -1735,7 +1738,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_csi_rs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/dmrs_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
|
||||
@@ -1758,6 +1760,7 @@ set(PHY_SRC_UE
|
||||
${PHY_SMALLBLOCKSRC}
|
||||
${PHY_NR_CODINGIF}
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/pucch_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/srs_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_uci_tools_common.c
|
||||
)
|
||||
set(PHY_NR_UE_SRC
|
||||
@@ -1779,7 +1782,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sch_dmrs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_prach.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/dci_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/pucch_nr.c
|
||||
@@ -2074,6 +2076,7 @@ set (MAC_NR_SRC
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_primitives.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_phytest.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_uci.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_srs.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_RA.c
|
||||
)
|
||||
|
||||
|
||||
+69
-78
@@ -57,7 +57,7 @@ BUILD_DOXYGEN=0
|
||||
BUILD_COVERITY_SCAN=0
|
||||
T_TRACER="True"
|
||||
DISABLE_HARDWARE_DEPENDENCY="False"
|
||||
CMAKE_BUILD_TYPE=""
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
CMAKE_CMD="$CMAKE"
|
||||
UE_AUTOTEST_TRACE="False"
|
||||
UE_DEBUG_TRACE="False"
|
||||
@@ -585,15 +585,12 @@ function main() {
|
||||
echo_info "3. building the compilation directives ..."
|
||||
|
||||
DIR=$OPENAIR_DIR/cmake_targets
|
||||
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then
|
||||
build_dir=phy_simulators
|
||||
else
|
||||
if [ "$T_TRACER" = "False" ] ; then
|
||||
if [ "$T_TRACER" = "False" ] ; then
|
||||
build_dir=ran_build_noLOG
|
||||
else
|
||||
else
|
||||
build_dir=ran_build
|
||||
fi
|
||||
fi
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$build_dir/build
|
||||
mkdir -p $DIR/$build_dir/build
|
||||
|
||||
@@ -601,84 +598,81 @@ function main() {
|
||||
config_libconfig_shlib=params_libconfig
|
||||
|
||||
# first generate the CMakefile in the right directory
|
||||
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$RU" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" -o "$ittiSIM" = "1" -o "$rfsimNas" = "1" ] ; then
|
||||
# softmodem compilation
|
||||
|
||||
cmake_file=$DIR/$build_dir/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "project (OpenAirInterface)" >> $cmake_file
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
|
||||
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
|
||||
echo "set ( PACKAGE_NAME \"${exec}\")" >> $cmake_file
|
||||
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >> $cmake_file
|
||||
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >> $cmake_file
|
||||
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
|
||||
echo "set ( UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE )" >> $cmake_file
|
||||
echo "set ( UE_DEBUG_TRACE $UE_DEBUG_TRACE )" >> $cmake_file
|
||||
echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file
|
||||
echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file
|
||||
echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file
|
||||
echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file
|
||||
echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
cd $DIR/$build_dir/build
|
||||
eval $CMAKE_CMD
|
||||
|
||||
# softmodem compilation
|
||||
|
||||
cmake_file=$DIR/$build_dir/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "project (OpenAirInterface)" >> $cmake_file
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
|
||||
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
|
||||
echo "set ( PACKAGE_NAME \"${exec}\")" >> $cmake_file
|
||||
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >> $cmake_file
|
||||
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >> $cmake_file
|
||||
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
|
||||
echo "set ( UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE )" >> $cmake_file
|
||||
echo "set ( UE_DEBUG_TRACE $UE_DEBUG_TRACE )" >> $cmake_file
|
||||
echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file
|
||||
echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file
|
||||
echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file
|
||||
echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file
|
||||
echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
cd $DIR/$build_dir/build
|
||||
eval $CMAKE_CMD
|
||||
|
||||
execlist=""
|
||||
if [ "$eNB" = "1" ] ; then
|
||||
execlist=""
|
||||
if [ "$eNB" = "1" ] ; then
|
||||
execlist="$execlist lte-softmodem"
|
||||
fi
|
||||
if [ "$eNBocp" = "1" ] ; then
|
||||
fi
|
||||
if [ "$eNBocp" = "1" ] ; then
|
||||
execlist="$execlist ocp-enb"
|
||||
fi
|
||||
if [ "$gNB" = "1" ] ; then
|
||||
fi
|
||||
if [ "$gNB" = "1" ] ; then
|
||||
execlist="$execlist nr-softmodem"
|
||||
fi
|
||||
if [ "$RU" = "1" ] ; then
|
||||
fi
|
||||
if [ "$RU" = "1" ] ; then
|
||||
execlist="$execlist oairu"
|
||||
fi
|
||||
if [ "$UE" = 1 ] ; then
|
||||
fi
|
||||
if [ "$UE" = 1 ] ; then
|
||||
execlist="$execlist lte-uesoftmodem"
|
||||
fi
|
||||
if [ "$nrUE" = 1 ] ; then
|
||||
fi
|
||||
if [ "$nrUE" = 1 ] ; then
|
||||
execlist="$execlist nr-uesoftmodem"
|
||||
fi
|
||||
|
||||
if [ "$ittiSIM" = "1" ] ; then
|
||||
fi
|
||||
|
||||
if [ "$ittiSIM" = "1" ] ; then
|
||||
execlist="$execlist nr-ittisim"
|
||||
fi
|
||||
|
||||
for f in $execlist ; do
|
||||
fi
|
||||
|
||||
for f in $execlist ; do
|
||||
echo_info "Compiling $f..."
|
||||
compilations \
|
||||
$build_dir $f \
|
||||
$f $dbin/$f.$REL
|
||||
done
|
||||
|
||||
|
||||
# mandatory shared libraries common to UE and (e/g)NB
|
||||
|
||||
if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
|
||||
$build_dir $f \
|
||||
$f $dbin/$f.$REL
|
||||
done
|
||||
|
||||
|
||||
# mandatory shared libraries common to UE and (e/g)NB
|
||||
|
||||
if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
|
||||
echo_info "Building shared libraries common to UE and gNB"
|
||||
|
||||
|
||||
compilations \
|
||||
$build_dir $config_libconfig_shlib \
|
||||
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||
|
||||
compilations \
|
||||
$build_dir $config_libconfig_shlib \
|
||||
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||
|
||||
compilations \
|
||||
$build_dir coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$UE" = 1 ] ; then
|
||||
|
||||
echo_info "Compiling UE specific part"
|
||||
@@ -727,11 +721,8 @@ function main() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then
|
||||
cd $DIR/$build_dir/build
|
||||
eval $CMAKE_CMD
|
||||
fi
|
||||
|
||||
cd $DIR/$build_dir/build
|
||||
|
||||
##################
|
||||
# PHY simulators #
|
||||
##################
|
||||
@@ -742,11 +733,11 @@ function main() {
|
||||
# simlist="ldpctest"
|
||||
for f in $simlist ; do
|
||||
compilations \
|
||||
phy_simulators $f \
|
||||
ran_build $f \
|
||||
$f $dbin/$f.$REL
|
||||
done
|
||||
compilations \
|
||||
phy_simulators coding \
|
||||
ran_build coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
# compilations \
|
||||
# lte-simulators $config_libconfig_shlib \
|
||||
@@ -761,7 +752,7 @@ function main() {
|
||||
simlist="secu_knas_encrypt_eia1 secu_kenb aes128_ctr_encrypt aes128_ctr_decrypt secu_knas_encrypt_eea2 secu_knas secu_knas_encrypt_eea1 kdf aes128_cmac_encrypt secu_knas_encrypt_eia2"
|
||||
for f in $simlist ; do
|
||||
compilations \
|
||||
phy_simulators test_$f \
|
||||
ran_build test_$f \
|
||||
test_$f $dbin/test_$f.$REL
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -135,7 +135,6 @@ clean_all_files() {
|
||||
rm -rf "$dir"/ran_build/build
|
||||
rm -rf "$dir"/ran_build_noLOG/build
|
||||
rm -rf "$dir"/lte-simulators/build
|
||||
rm -rf "$dir"/phy_simulators/build
|
||||
rm -rf "$dir"/nas_sim_tools/build
|
||||
rm -rf "$dir"/oaisim_build_oai/build
|
||||
rm -rf "$dir"/oaisim_build_oai/CMakeLists.txt
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
ran_build/
|
||||
@@ -1,21 +0,0 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project (OpenAirInterface)
|
||||
set ( CMAKE_BUILD_TYPE )
|
||||
set ( CFLAGS_PROCESSOR_USER "" )
|
||||
set ( UE_EXPANSION False )
|
||||
set ( PRE_SCD_THREAD False )
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( RF_BOARD "None")
|
||||
set ( TRANSP_PRO "None")
|
||||
set ( PACKAGE_NAME "")
|
||||
set ( DEADLINE_SCHEDULER "False" )
|
||||
set ( CPU_AFFINITY "False" )
|
||||
set ( T_TRACER True )
|
||||
set ( UE_AUTOTEST_TRACE False )
|
||||
set ( UE_DEBUG_TRACE False )
|
||||
set ( UE_TIMING_TRACE False )
|
||||
set ( USRP_REC_PLAY False )
|
||||
set ( SKIP_SHARED_LIB_FLAG False )
|
||||
set ( PHYSIM True)
|
||||
set ( RU 0)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
@@ -168,7 +168,7 @@ clean_all_files() {
|
||||
rm -rf $dir/log $OPENAIR_DIR/targets/bin/*
|
||||
rm -rf $dir/ran_build $dir/ran_build_noLOG
|
||||
rm -rf $dir/lte-simulators/build
|
||||
rm -rf $dir/phy_simulators/build $dir/nas_sim_tools/build
|
||||
rm -rf $dir/nas_sim_tools/build
|
||||
rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt
|
||||
rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
```C
|
||||
LOG_E(<component>,<format>,<argument>,...)
|
||||
LOG_W(<component>,<format>,<argument>,...)
|
||||
LOG_A(<component>,<format>,<argument>,...)
|
||||
LOG_I(<component>,<format>,<argument>,...)
|
||||
LOG_D(<component>,<format>,<argument>,...)
|
||||
LOG_T(<component>,<format>,<argument>,...)
|
||||
@@ -14,9 +15,10 @@ these macros are used in place of the printf C function. The additionnal ***comp
|
||||
|:---------|:---------------|:---------------|----------------:|
|
||||
| LOG_E | E | 0 | error |
|
||||
| LOG_W | W | 1 | warning |
|
||||
| LOG_I | I | 2 | informational |
|
||||
| LOG_D | D | 3 | debug |
|
||||
| LOG_T | T | 4 | trace |
|
||||
| LOG_A | A | 2 | analysis |
|
||||
| LOG_I | I | 3 | informational |
|
||||
| LOG_D | D | 4 | debug |
|
||||
| LOG_T | T | 5 | trace |
|
||||
|
||||
component list is defined as an `enum` in [log.h](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/LOG/log.h). A new component can be defined by adding an item in this type, it must also be defined in the T tracer [T_messages.txt ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/T/T_messages.txt).
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ All logging facility parameters are defined in the log_config section. Some para
|
||||
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `global_log_level` | `pre-defined string of char` | `info` | Allows printing of messages up to the specified level. Available levels, from lower to higher are `error`,`warn`,`info`,`debug`,`trace` |
|
||||
| `global_log_level` | `pre-defined string of char` | `info` | Allows printing of messages up to the specified level. Available levels, from lower to higher are `error`,`warn`,`analysis`,`info`,`debug`,`trace` |
|
||||
| `global_log_online` | `boolean` | 1 (=true) | If false, all console messages are discarded, whatever their level |
|
||||
| `global_log_options` | `list of pre-defined string of char` | | 3 options can be specified to trigger the information added in the header of the message: `nocolor`, disable color usage in log messages, usefull when redirecting logs to a file, where escape sequences used for color selection can be annoying, `level`, add a one letter level id in the message header (T,D,I,W,E for trace, debug, info, warning, error),`thread`, add the thread name in the message header, `function`, adds the function name, `line_num`, adds the line number, `time` adds the time since process starts|
|
||||
| `global_log_options` | `list of pre-defined string of char` | | 5 options can be specified to trigger the information added in the header of the message: `nocolor`, disable color usage in log messages, usefull when redirecting logs to a file, where escape sequences used for color selection can be annoying, `level`, add a one letter level id in the message header (T,D,I,A,W,E for trace, debug, info, analysis, warning, error),`thread`, add the thread name in the message header, `thread_id`, adds the thread ID in the message header, `function`, adds the function name, `line_num`, adds the line number, `time` adds the time since process starts|
|
||||
|
||||
### Component specific parameters
|
||||
| name | type | default | description |
|
||||
|
||||
+64
-67
@@ -65,6 +65,7 @@ char logmem_filename[1024] = {0};
|
||||
mapping log_level_names[] = {
|
||||
{"error", OAILOG_ERR},
|
||||
{"warn", OAILOG_WARNING},
|
||||
{"analysis", OAILOG_ANALYSIS},
|
||||
{"info", OAILOG_INFO},
|
||||
{"debug", OAILOG_DEBUG},
|
||||
{"trace", OAILOG_TRACE},
|
||||
@@ -78,14 +79,15 @@ mapping log_options[] = {
|
||||
{"line_num", FLAG_FILE_LINE },
|
||||
{"function", FLAG_FUNCT},
|
||||
{"time", FLAG_TIME},
|
||||
{"thread_id", FLAG_THREAD_ID},
|
||||
{NULL,-1}
|
||||
};
|
||||
|
||||
|
||||
mapping log_maskmap[] = LOG_MASKMAP_INIT;
|
||||
|
||||
char *log_level_highlight_start[] = {LOG_RED, LOG_ORANGE, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
|
||||
char *log_level_highlight_end[] = {LOG_RESET,LOG_RESET,LOG_RESET, LOG_RESET,LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
|
||||
char *log_level_highlight_start[] = {LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
|
||||
char *log_level_highlight_end[] = {LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
|
||||
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args);
|
||||
|
||||
|
||||
@@ -501,6 +503,7 @@ int logInit (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <sys/syscall.h>
|
||||
static inline int log_header(log_component_t *c,
|
||||
char *log_buffer,
|
||||
int buffsize,
|
||||
@@ -514,32 +517,45 @@ static inline int log_header(log_component_t *c,
|
||||
char threadname[64];
|
||||
if (flag & FLAG_THREAD ) {
|
||||
threadname[0]='{';
|
||||
if ( pthread_getname_np(pthread_self(), threadname+1,61) != 0)
|
||||
if (pthread_getname_np(pthread_self(), threadname + 1, sizeof(threadname) - 3) != 0)
|
||||
strcpy(threadname+1, "?thread?");
|
||||
strcat(threadname,"}");
|
||||
strcat(threadname,"} ");
|
||||
} else {
|
||||
threadname[0]=0;
|
||||
}
|
||||
|
||||
|
||||
char l[32];
|
||||
if (flag & FLAG_FILE_LINE && flag & FLAG_FUNCT )
|
||||
snprintf(l, sizeof l," (%s:%d) ", func, line);
|
||||
snprintf(l, sizeof l, "(%s:%d) ", func, line);
|
||||
else if (flag & FLAG_FILE_LINE)
|
||||
sprintf(l," (%d) ", line);
|
||||
snprintf(l, sizeof l, "(%d) ", line);
|
||||
else if (flag & FLAG_FUNCT)
|
||||
snprintf(l, sizeof l, "(%s) ", func);
|
||||
else
|
||||
l[0]=0;
|
||||
l[0] = 0;
|
||||
|
||||
char timeString[32];
|
||||
if ( flag & FLAG_TIME ) {
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
snprintf(timeString, sizeof t,"%05.3f",t.tv_sec+t.tv_nsec/1.0e9);
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &t) == -1)
|
||||
abort();
|
||||
snprintf(timeString, sizeof(timeString), "%lu.%06lu ",
|
||||
t.tv_sec,
|
||||
t.tv_nsec / 1000);
|
||||
} else {
|
||||
timeString[0]=0;
|
||||
timeString[0] = 0;
|
||||
}
|
||||
return snprintf(log_buffer, buffsize, "%s%s[%s]%c%s %s ",
|
||||
timeString,
|
||||
|
||||
char threadIdString[32];
|
||||
if (flag & FLAG_THREAD_ID) {
|
||||
snprintf(threadIdString, sizeof(threadIdString), "%08lx ", syscall(__NR_gettid));
|
||||
} else {
|
||||
threadIdString[0] = 0;
|
||||
}
|
||||
return snprintf(log_buffer, buffsize, "%s%s%s[%s] %c %s%s",
|
||||
flag & FLAG_NOCOLOR ? "" : log_level_highlight_start[level],
|
||||
timeString,
|
||||
threadIdString,
|
||||
c->name,
|
||||
flag & FLAG_LEVEL ? g_log->level2string[level] : ' ',
|
||||
l,
|
||||
@@ -547,53 +563,6 @@ static inline int log_header(log_component_t *c,
|
||||
);
|
||||
}
|
||||
|
||||
#if LOG_MINIMAL
|
||||
#include <sys/syscall.h>
|
||||
void logMinimal(int comp, int level, const char *format, ...)
|
||||
{
|
||||
struct timespec ts;
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1)
|
||||
abort();
|
||||
|
||||
char buf[MAX_LOG_TOTAL];
|
||||
int n = snprintf(buf, sizeof(buf), "%lu.%06lu %08lx [%s] %c ",
|
||||
ts.tv_sec,
|
||||
ts.tv_nsec / 1000,
|
||||
syscall(__NR_gettid),
|
||||
g_log->log_component[comp].name,
|
||||
level);
|
||||
if (n < 0 || n >= sizeof(buf))
|
||||
{
|
||||
fprintf(stderr, "%s: n=%d\n", __func__, n);
|
||||
return;
|
||||
}
|
||||
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
int m = vsnprintf(buf + n, sizeof(buf) - n, format, args);
|
||||
va_end(args);
|
||||
|
||||
if (m < 0)
|
||||
{
|
||||
fprintf(stderr, "%s: n=%d m=%d\n", __func__, n, m);
|
||||
return;
|
||||
}
|
||||
|
||||
int len = n + m;
|
||||
if (len > sizeof(buf) - 1)
|
||||
{
|
||||
len = sizeof(buf) - 1;
|
||||
}
|
||||
if (buf[len - 1] != '\n')
|
||||
{
|
||||
buf[len++] = '\n';
|
||||
}
|
||||
|
||||
__attribute__((unused))
|
||||
int unused = write(STDOUT_FILENO, buf, len);
|
||||
}
|
||||
#endif // LOG_MINIMAL
|
||||
|
||||
void logRecord_mt(const char *file,
|
||||
const char *func,
|
||||
int line,
|
||||
@@ -864,7 +833,14 @@ void flush_mem_to_file(void)
|
||||
}
|
||||
}
|
||||
|
||||
char logmem_log_level[NUM_LOG_LEVEL]={'E','W','I','D','T'};
|
||||
const char logmem_log_level[NUM_LOG_LEVEL] = {
|
||||
[OAILOG_ERR] = 'E',
|
||||
[OAILOG_WARNING] = 'W',
|
||||
[OAILOG_ANALYSIS] = 'A',
|
||||
[OAILOG_INFO] = 'I',
|
||||
[OAILOG_DEBUG] = 'D',
|
||||
[OAILOG_TRACE] = 'T',
|
||||
};
|
||||
|
||||
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args)
|
||||
{
|
||||
@@ -878,12 +854,32 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
|
||||
char log_buffer[MAX_LOG_TOTAL];
|
||||
|
||||
// make sure that for log trace the extra info is only printed once, reset when the level changes
|
||||
if (level < OAILOG_TRACE)
|
||||
len += log_header(c, log_buffer, MAX_LOG_TOTAL, file, func, line, level);
|
||||
len += vsnprintf(log_buffer+len, MAX_LOG_TOTAL-len, format, args);
|
||||
if ( !((g_log->flag | c->flag) & FLAG_NOCOLOR) )
|
||||
len+=snprintf(log_buffer+len, MAX_LOG_TOTAL-len, "%s", log_level_highlight_end[level]);
|
||||
|
||||
if (level < OAILOG_TRACE) {
|
||||
int n = log_header(c, log_buffer+len, MAX_LOG_TOTAL, file, func, line, level);
|
||||
if (n > 0) {
|
||||
len += n;
|
||||
if (len > MAX_LOG_TOTAL) {
|
||||
len = MAX_LOG_TOTAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
int n = vsnprintf(log_buffer+len, MAX_LOG_TOTAL-len, format, args);
|
||||
if (n > 0) {
|
||||
len += n;
|
||||
if (len > MAX_LOG_TOTAL) {
|
||||
len = MAX_LOG_TOTAL;
|
||||
}
|
||||
}
|
||||
if ( !((g_log->flag | c->flag) & FLAG_NOCOLOR) ) {
|
||||
int n = snprintf(log_buffer+len, MAX_LOG_TOTAL-len, "%s", log_level_highlight_end[level]);
|
||||
if (n > 0) {
|
||||
len += n;
|
||||
if (len > MAX_LOG_TOTAL) {
|
||||
len = MAX_LOG_TOTAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// OAI printf compatibility
|
||||
if(log_mem_flag==1){
|
||||
if(log_mem_d[log_mem_side].enable_flag==1){
|
||||
@@ -919,6 +915,7 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
|
||||
}
|
||||
}
|
||||
}else{
|
||||
AssertFatal(len >= 0 && len <= MAX_LOG_TOTAL, "Bad len %d\n", len);
|
||||
if (write(fileno(c->stream), log_buffer, len)) {};
|
||||
}
|
||||
}
|
||||
|
||||
+14
-31
@@ -90,11 +90,12 @@ extern "C" {
|
||||
# define OAILOG_DISABLE -1 /*!< \brief disable all LOG messages, cannot be used in LOG macros, use only in LOG module */
|
||||
# define OAILOG_ERR 0 /*!< \brief critical error conditions, impact on "must have" functionalities */
|
||||
# define OAILOG_WARNING 1 /*!< \brief warning conditions, shouldn't happen but doesn't impact "must have" functionalities */
|
||||
# define OAILOG_INFO 2 /*!< \brief informational messages most people don't need, shouldn't impact real-time behavior */
|
||||
# define OAILOG_DEBUG 3 /*!< \brief first level debug-level messages, for developers, may impact real-time behavior */
|
||||
# define OAILOG_TRACE 4 /*!< \brief second level debug-level messages, for developers, likely impact real-time behavior*/
|
||||
# define OAILOG_ANALYSIS 2 /*!< \brief informational messages most people don't need, shouldn't impact real-time behavior */
|
||||
# define OAILOG_INFO 3 /*!< \brief informational messages most people don't need, shouldn't impact real-time behavior */
|
||||
# define OAILOG_DEBUG 4 /*!< \brief first level debug-level messages, for developers, may impact real-time behavior */
|
||||
# define OAILOG_TRACE 5 /*!< \brief second level debug-level messages, for developers, likely impact real-time behavior*/
|
||||
|
||||
#define NUM_LOG_LEVEL 5 /*!< \brief the number of message levels users have with LOG (OAILOG_DISABLE is not available to user as a level, so it is not included)*/
|
||||
#define NUM_LOG_LEVEL 6 /*!< \brief the number of message levels users have with LOG (OAILOG_DISABLE is not available to user as a level, so it is not included)*/
|
||||
/* @}*/
|
||||
|
||||
|
||||
@@ -127,6 +128,7 @@ extern "C" {
|
||||
#define FLAG_FUNCT 0x0020
|
||||
#define FLAG_FILE_LINE 0x0040
|
||||
#define FLAG_TIME 0x0100
|
||||
#define FLAG_THREAD_ID 0x0200
|
||||
#define FLAG_INITIALIZED 0x8000
|
||||
|
||||
#define SET_LOG_OPTION(O) g_log->flag = (g_log->flag | O)
|
||||
@@ -390,7 +392,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
/* optname help paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define LOG_GLOBALPARAMS_DESC { \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[3].name, TYPE_STRING, 0}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS, LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST, 0} \
|
||||
}
|
||||
@@ -408,32 +410,14 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
// debugging macros
|
||||
#define LOG_F LOG_I /* because LOG_F was originaly to dump a message or buffer but is also used as a regular level...., to dump use LOG_DUMPMSG */
|
||||
|
||||
#if LOG_MINIMAL
|
||||
|
||||
void logMinimal(int component, int level, const char *format, ...) __attribute__((format(printf, 3, 4)));
|
||||
# define LOG_E(COMPONENT, ...) do if (1) logMinimal(COMPONENT, 'E', __VA_ARGS__); while (0)
|
||||
# define LOG_W(COMPONENT, ...) do if (1) logMinimal(COMPONENT, 'W', __VA_ARGS__); while (0)
|
||||
# define LOG_A(COMPONENT, ...) do if (1) logMinimal(COMPONENT, 'A', __VA_ARGS__); while (0) /* logs intended for analysis */
|
||||
# define LOG_I(COMPONENT, ...) do if (1) logMinimal(COMPONENT, 'I', __VA_ARGS__); while (0)
|
||||
# define LOG_D(COMPONENT, ...) do if (0) logMinimal(COMPONENT, 'D', __VA_ARGS__); while (0)
|
||||
# define LOG_T(COMPONENT, ...) do if (0) logMinimal(COMPONENT, 'T', __VA_ARGS__); while (0)
|
||||
|
||||
# define LOG_M(FILE, VECTOR, DATA, LEN, DEC, FORMAT) ((void) 0)
|
||||
# define LOG_DUMPFLAG(D) 0
|
||||
# define LOG_DEBUGFLAG(D) 0
|
||||
# define LOG_DUMPMSG(C, B, S, X...) ((void) 0)
|
||||
# define VLOG(C, L, F, ARGS) ((void) 0)
|
||||
|
||||
#else // LOG_MINIMAL
|
||||
|
||||
# if T_TRACER
|
||||
/* per component, level dependent macros */
|
||||
# define LOG_E(c, x...) do { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} } while (0)
|
||||
# define LOG_W(c, x...) do { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)); if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x);} } while (0)
|
||||
# define LOG_A LOG_I
|
||||
# define LOG_I(c, x...) do { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} } while (0)
|
||||
# define LOG_D(c, x...) do { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} } while (0)
|
||||
# define LOG_T(c, x...) do { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} } while (0)
|
||||
# define LOG_E(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_A(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
|
||||
# define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0)
|
||||
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
|
||||
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
||||
@@ -449,8 +433,8 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
|
||||
# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0)
|
||||
# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0)
|
||||
# define LOG_A(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} while (0)
|
||||
# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0)
|
||||
# define LOG_A LOG_I
|
||||
# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0)
|
||||
# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0)
|
||||
# define VLOG(c,l, f, args) do { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ; } while (0)
|
||||
@@ -464,7 +448,6 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
# define LOG_VAR(A,B) A B
|
||||
# define T_ACTIVE(a) (0)
|
||||
# endif /* T_TRACER */
|
||||
#endif // LOG_MINIMAL
|
||||
|
||||
/* avoid warnings for variables only used in LOG macro's but set outside debug section */
|
||||
#define GCC_NOTUSED __attribute__((unused))
|
||||
|
||||
@@ -93,6 +93,14 @@ ID = GNB_PHY_PUCCH_PUSCH_IQ
|
||||
DESC = gNodeB input data in the frequency domain for a slot where some PUCCH or PUSCH detection was done
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : buffer,rxdataF
|
||||
ID = GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE
|
||||
DESC = gNodeB channel estimation in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_t
|
||||
ID = GNB_PHY_UL_TIME_CHANNEL_ESTIMATE
|
||||
DESC = gNodeB channel estimation in the time domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_t
|
||||
ID = GNB_PHY_PRACH_INPUT_SIGNAL
|
||||
DESC = gNodeB input data in the time domain for slots with PRACH detection
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
|
||||
+124
-7
@@ -4,15 +4,28 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "handler.h"
|
||||
#include "config.h"
|
||||
#include "logger/logger.h"
|
||||
#include "view/view.h"
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
#include "openair_logo.h"
|
||||
|
||||
int ue_id[65536];
|
||||
int next_ue_id;
|
||||
|
||||
typedef struct {
|
||||
widget *pucch_pusch_iq_plot;
|
||||
widget *ul_freq_estimate_ue_xy_plot;
|
||||
widget *ul_time_estimate_ue_xy_plot;
|
||||
widget *current_ue_label;
|
||||
widget *current_ue_button;
|
||||
widget *prev_ue_button;
|
||||
widget *next_ue_button;
|
||||
logger *pucch_pusch_iq_logger;
|
||||
logger *ul_freq_estimate_ue_logger;
|
||||
logger *ul_time_estimate_ue_logger;
|
||||
} gnb_gui;
|
||||
|
||||
typedef struct {
|
||||
@@ -21,6 +34,7 @@ typedef struct {
|
||||
int nevents;
|
||||
pthread_mutex_t lock;
|
||||
gnb_gui *e;
|
||||
int ue; /* what UE is displayed in the UE specific views */
|
||||
void *database;
|
||||
} gnb_data;
|
||||
|
||||
@@ -69,34 +83,133 @@ static void *gui_thread(void *_g)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database,
|
||||
gnb_data *ed)
|
||||
static void set_current_ue(gui *g, gnb_data *e, int ue)
|
||||
{
|
||||
char s[256];
|
||||
|
||||
sprintf(s, "[UE %d] ", ue);
|
||||
label_set_text(g, e->e->current_ue_label, s);
|
||||
|
||||
sprintf(s, "GNB_PHY_PUCCH_PUSCH_IQ [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->pucch_pusch_iq_plot, s);
|
||||
|
||||
sprintf(s, "UL channel estimation in frequency domain [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->ul_freq_estimate_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "UL channel estimation in time domain [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->ul_time_estimate_ue_xy_plot, s);
|
||||
}
|
||||
|
||||
void reset_ue_ids(void)
|
||||
{
|
||||
int i;
|
||||
printf("resetting known UEs\n");
|
||||
for (i = 0; i < 65536; i++) ue_id[i] = -1;
|
||||
ue_id[65535] = 0;
|
||||
ue_id[65534] = 1; /* HACK: to be removed */
|
||||
ue_id[2] = 2; /* this supposes RA RNTI = 2, very openair specific */
|
||||
next_ue_id = 0;
|
||||
}
|
||||
|
||||
static void click(void *private, gui *g, char *notification, widget *w, void *notification_data)
|
||||
{
|
||||
int *d = notification_data;
|
||||
int button = d[0];
|
||||
gnb_data *ed = private;
|
||||
gnb_gui *e = ed->e;
|
||||
int ue = ed->ue;
|
||||
int do_reset = 0;
|
||||
|
||||
if (button != 1) return;
|
||||
if (w == e->prev_ue_button) { ue--; if (ue < 0) ue = 0; }
|
||||
if (w == e->next_ue_button) ue++;
|
||||
if (w == e->current_ue_button) do_reset = 1;
|
||||
|
||||
if (pthread_mutex_lock(&ed->lock)) abort();
|
||||
if (do_reset) reset_ue_ids();
|
||||
if (ue != ed->ue) {
|
||||
set_current_ue(g, ed, ue);
|
||||
ed->ue = ue;
|
||||
}
|
||||
if (pthread_mutex_unlock(&ed->lock)) abort();
|
||||
}
|
||||
|
||||
static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database, gnb_data *ed)
|
||||
{
|
||||
widget *main_window;
|
||||
widget *top_container;
|
||||
widget *line;
|
||||
widget *col;
|
||||
widget *logo;
|
||||
widget *w;
|
||||
widget *w2;
|
||||
logger *l;
|
||||
view *v;
|
||||
|
||||
main_window = new_toplevel_window(g, 500, 300, "gNB tracer");
|
||||
|
||||
main_window = new_toplevel_window(g, 1500, 230, "gNB tracer");
|
||||
top_container = new_container(g, VERTICAL);
|
||||
widget_add_child(g, main_window, top_container, -1);
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
logo = new_image(g, openair_logo_png, openair_logo_png_len);
|
||||
|
||||
/* logo + prev/next UE buttons */
|
||||
col = new_container(g, VERTICAL);
|
||||
widget_add_child(g, col, logo, -1);
|
||||
w = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, col, w, -1);
|
||||
w2 = new_label(g, "");
|
||||
widget_add_child(g, w, w2, -1);
|
||||
label_set_clickable(g, w2, 1);
|
||||
e->current_ue_button = w2;
|
||||
e->current_ue_label = w2;
|
||||
w2 = new_label(g, " [prev UE] ");
|
||||
widget_add_child(g, w, w2, -1);
|
||||
label_set_clickable(g, w2, 1);
|
||||
e->prev_ue_button = w2;
|
||||
w2 = new_label(g, " [next UE] ");
|
||||
widget_add_child(g, w, w2, -1);
|
||||
label_set_clickable(g, w2, 1);
|
||||
e->next_ue_button = w2;
|
||||
widget_add_child(g, line, col, -1);
|
||||
|
||||
/* PUCCH/PUSCH IQ data */
|
||||
w = new_xy_plot(g, 55, 55, "", 50);
|
||||
w = new_xy_plot(g, 200, 200, "", 10);
|
||||
e->pucch_pusch_iq_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, -1000, 1000, -1000, 1000);
|
||||
xy_plot_set_title(g, w, "rxdataF");
|
||||
l = new_iqlog_full(h, database, "GNB_PHY_PUCCH_PUSCH_IQ", "rxdataF");
|
||||
v = new_view_xy(300*12*14,10,g,w,new_color(g,"#000"),XY_FORCED_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->pucch_pusch_iq_logger = l;
|
||||
|
||||
/* UL channel estimation in frequency domain */
|
||||
w = new_xy_plot(g, 490, 200, "", 50);
|
||||
e->ul_freq_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", "subframe", "chest_t");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_freq_estimate_ue_logger = l;
|
||||
|
||||
/* UL channel estimation in time domain */
|
||||
w = new_xy_plot(g, 490, 200, "", 50);
|
||||
e->ul_time_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", "subframe", "chest_t");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_time_estimate_ue_logger = l;
|
||||
|
||||
set_current_ue(g, ed, ed->ue);
|
||||
register_notifier(g, "click", e->current_ue_button, click, ed);
|
||||
register_notifier(g, "click", e->prev_ue_button, click, ed);
|
||||
register_notifier(g, "click", e->next_ue_button, click, ed);
|
||||
}
|
||||
|
||||
int main(int n, char **v)
|
||||
@@ -136,7 +249,11 @@ int main(int n, char **v)
|
||||
h = new_handler(database);
|
||||
|
||||
on_off(database, "GNB_PHY_PUCCH_PUSCH_IQ", is_on, 1);
|
||||
on_off(database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", is_on, 1);
|
||||
on_off(database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", is_on, 1);
|
||||
|
||||
gnb_data.ue = 0;
|
||||
gnb_data.e = ⪚
|
||||
gnb_data.database = database;
|
||||
gnb_data.socket = -1;
|
||||
gnb_data.is_on = is_on;
|
||||
|
||||
@@ -396,6 +396,7 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
||||
{
|
||||
database_event_format f;
|
||||
int i;
|
||||
|
||||
d->ul_rnti = -1;
|
||||
d->ul_frame = -1;
|
||||
d->ul_subframe = -1;
|
||||
|
||||
@@ -500,6 +500,12 @@ int get_subband_size(int NPRB,int size) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// from start symbol index and nb or symbols to symbol occupation bitmap in a slot
|
||||
uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols) {
|
||||
return ((1<<nrOfSymbols)-1)<<startSymbolIndex;
|
||||
}
|
||||
|
||||
int get_SLIV(uint8_t S, uint8_t L) {
|
||||
return ( (uint16_t)(((L-1)<=7)? (14*(L-1)+S) : (14*(15-L)+(13-S))) );
|
||||
}
|
||||
|
||||
@@ -78,7 +78,9 @@ uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx);
|
||||
int get_subband_size(int NPRB,int size);
|
||||
void SLIV2SL(int SLIV,int *S,int *L);
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports);
|
||||
uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols);
|
||||
int get_nb_periods_per_frame(uint8_t tdd_period);
|
||||
long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
@@ -106,12 +106,13 @@
|
||||
{"phy_proc", &(UE->phy_proc[0]),0,RX_NB_TH},\
|
||||
{"phy_proc_rx", &(UE-> phy_proc_rx[0]),0,RX_NB_TH},\
|
||||
{"phy_proc_tx", &(UE->phy_proc_tx),0,1},\
|
||||
{"ue_ul_indication_stats", &(UE->ue_ul_indication_stats),0,1},\
|
||||
{"ofdm_mod_stats", &(UE->ofdm_mod_stats),0,1},\
|
||||
{"ulsch_encoding_stats", &(UE->ulsch_encoding_stats),0,1},\
|
||||
{"ulsch_modulation_stats", &(UE->ulsch_modulation_stats),0,1},\
|
||||
{"ulsch_segmentation_stats", &(UE->ulsch_segmentation_stats),0,1},\
|
||||
{"ulsch_rate_matching_stats", &(UE->ulsch_rate_matching_stats),0,1},\
|
||||
{"ulsch_turbo_encoding_stats", &(UE->ulsch_turbo_encoding_stats),0,1},\
|
||||
{"ulsch_ldpc_encoding_stats", &(UE->ulsch_ldpc_encoding_stats),0,1},\
|
||||
{"ulsch_interleaving_stats", &(UE->ulsch_interleaving_stats),0,1},\
|
||||
{"ulsch_multiplexing_stats", &(UE->ulsch_multiplexing_stats),0,1},\
|
||||
{"generic_stat", &(UE->generic_stat),0,1},\
|
||||
@@ -123,12 +124,12 @@
|
||||
{"dlsch_f...timation_stats", &(UE->dlsch_freq_offset_estimation_stats),0,1},\
|
||||
{"dlsch_demodulation_stats", &(UE->dlsch_demodulation_stats),0,1},\
|
||||
{"dlsch_rate_unmatching_stats", &(UE->dlsch_rate_unmatching_stats),0,1},\
|
||||
{"dlsch_turbo_decoding_stats", &(UE->dlsch_turbo_decoding_stats),0,1},\
|
||||
{"dlsch_ldpc_decoding_stats", &(UE->dlsch_ldpc_decoding_stats),0,1},\
|
||||
{"dlsch_deinterleaving_stats", &(UE->dlsch_deinterleaving_stats),0,1},\
|
||||
{"dlsch_llr_stats", &(UE->dlsch_llr_stats),0,1},\
|
||||
{"dlsch_unscrambling_stats", &(UE->dlsch_unscrambling_stats),0,1},\
|
||||
{"dlsch_rate_matching_stats", &(UE->dlsch_rate_matching_stats),0,1},\
|
||||
{"dlsch_turbo_encoding_stats", &(UE->dlsch_turbo_encoding_stats),0,1},\
|
||||
{"dlsch_ldpc_encoding_stats", &(UE->dlsch_ldpc_encoding_stats),0,1},\
|
||||
{"dlsch_interleaving_stats", &(UE->dlsch_interleaving_stats),0,1},\
|
||||
{"dlsch_tc_init_stats", &(UE->dlsch_tc_init_stats),0,1},\
|
||||
{"dlsch_tc_alpha_stats", &(UE->dlsch_tc_alpha_stats),0,1},\
|
||||
@@ -146,6 +147,7 @@
|
||||
{"ue_front_end_stat", &(UE->ue_front_end_stat[0]),0,RX_NB_TH},\
|
||||
{"ue_front_end_per_slot_stat", &(UE->ue_front_end_per_slot_stat[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||
{"pdcch_procedures_stat", &(UE->pdcch_procedures_stat[0]),0,RX_NB_TH},\
|
||||
{"rx_pdsch_stats", &(UE->rx_pdsch_stats), 0, 1}, \
|
||||
{"pdsch_procedures_stat", &(UE->pdsch_procedures_stat[0]),0,RX_NB_TH},\
|
||||
{"pdsch_procedures_per_slot_stat", &(UE->pdsch_procedures_per_slot_stat[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||
{"dlsch_procedures_stat", &(UE->dlsch_procedures_stat[0]),0,RX_NB_TH},\
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ cd cmake_targets/
|
||||
./build_oai -I --phy_simulators
|
||||
```
|
||||
|
||||
After completing the build, the binaries are available in the cmake_targets/phy_simulators/build directory.
|
||||
After completing the build, the binaries are available in the cmake_targets/ran_build/build directory.
|
||||
A copy is also available in the target/bin directory, with all binaries suffixed by the 3GPP release number, today **.Rel15**.
|
||||
|
||||
|
||||
|
||||
+17
-8
@@ -294,6 +294,10 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
* NR-PUCCH
|
||||
- Format 0 (2 bits, for ACK/NACK and SR)
|
||||
- Format 2 (up to 11 bits, mainly for CSI feedback)
|
||||
* NR-SRS
|
||||
- SRS signal reception
|
||||
- Channel estimation (with T tracer real time monitoring)
|
||||
- Power noise estimation
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
@@ -322,6 +326,8 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
- phy-test scheduler (fixed allocation)
|
||||
- regular scheduler with dynamic allocation
|
||||
- HARQ procedures for uplink
|
||||
- Scheduler procedures for SRS reception
|
||||
- Periodic SRS reception
|
||||
- MAC procedures to handle CSI measurement report
|
||||
- evalution of RSRP report
|
||||
- evaluation of CQI report
|
||||
@@ -433,11 +439,12 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
- Format 0 (2 bits for ACK/NACK and SR)
|
||||
- Format 2 (up to 64 bits, mainly for CSI feedback)
|
||||
- Format 1, 3 and 4 present but old code never dested (need restructuring before verification)
|
||||
* NR-PRACH
|
||||
* NR-SRS
|
||||
- Generation of sequence at PHY
|
||||
- SRS signal transmission
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* NR-SRS
|
||||
- Old code never dested (need restructuring before verification)
|
||||
* SS-RSRP
|
||||
* SS-RSRP
|
||||
- RSRP measured on synchronization SSB (ok only for single SSB)
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
@@ -452,21 +459,21 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
## NR UE Higher Layers ##
|
||||
|
||||
**UE MAC**
|
||||
* Minimum system information (MSI)
|
||||
* Minimum system information (MSI)
|
||||
- MIB processing
|
||||
- Scheduling of system information block 1 (SIB1) reception
|
||||
* Random access procedure (needs improvement, there is still not a clear separation between MAC and PHY)
|
||||
* Random access procedure (needs improvement, there is still not a clear separation between MAC and PHY)
|
||||
- Mapping SSBs to multiple ROs
|
||||
- Scheduling of PRACH
|
||||
- Processing of RAR
|
||||
- Transmission and re-transmission of Msg3
|
||||
- Msg4 and contention resolution
|
||||
* DCI processing
|
||||
* DCI processing
|
||||
- format 10 (RA-RNTI, C-RNTI, SI-RNTI, TC-RNTI)
|
||||
- format 00 (C-RNTI, TC-RNTI)
|
||||
- format 11 (C-RNTI)
|
||||
- format 01 (C-RNTI)
|
||||
* UCI processing
|
||||
* UCI processing
|
||||
- ACK/NACK processing
|
||||
- Triggering periodic SR
|
||||
- CSI measurement reporting (SSB RSRP only)
|
||||
@@ -475,6 +482,8 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
- HARQ procedures
|
||||
* ULSCH scheduler
|
||||
- Configuration of fapi PDU according to DCI
|
||||
* Scheduler procedures for SRS transmission
|
||||
- Periodic SRS transmission
|
||||
|
||||
|
||||
**UE RLC**
|
||||
|
||||
@@ -85,10 +85,10 @@ COPY --from=phy-sim-build \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/libexslt.so.0 \
|
||||
/lib64/libxslt.so.1 \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libSIMU.so \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libldpc.so \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libldpc_orig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||
/usr/local/lib/
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
@@ -306,6 +306,7 @@ static void dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output) {
|
||||
stroff += print_meas_log(&gNB->ul_indication_stats, "UL Indication", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->ulsch_decoding_stats, "PUSCH decoding", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->schedule_response_stats, "Schedule Response",NULL,NULL, output+stroff);
|
||||
if (ru->feprx) stroff += print_meas_log(&ru->ofdm_demod_stats,"feprx",NULL,NULL, output+stroff);
|
||||
|
||||
if (ru->feptx_ofdm) {
|
||||
@@ -342,6 +343,7 @@ void *nrL1_stats_thread(void *param) {
|
||||
reset_meas(&gNB->ul_indication_stats);
|
||||
reset_meas(&gNB->rx_pusch_stats);
|
||||
reset_meas(&gNB->ulsch_decoding_stats);
|
||||
reset_meas(&gNB->schedule_response_stats);
|
||||
|
||||
while (!oai_exit) {
|
||||
sleep(1);
|
||||
@@ -411,8 +413,8 @@ void init_gNB_Tpool(int inst) {
|
||||
// ULSCH decoding threadpool
|
||||
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
|
||||
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
LOG_I(PHY,"Number of threads requested in config file: %d, Number of threads available on this machine: %d\n",gNB->pusch_proc_threads,numCPU);
|
||||
int threadCnt = min(numCPU, gNB->pusch_proc_threads);
|
||||
LOG_I(PHY,"Number of threads requested in config file: %d, Number of threads available on this machine: %d\n",gNB->thread_pool_size,numCPU);
|
||||
int threadCnt = min(numCPU, gNB->thread_pool_size);
|
||||
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
|
||||
char pool[80];
|
||||
sprintf(pool,"-1");
|
||||
@@ -442,7 +444,7 @@ void init_gNB_Tpool(int inst) {
|
||||
initNotifiedFIFO(gNB->L1_tx_out);
|
||||
|
||||
// we create 2 threads for L1 tx processing
|
||||
for (int i=0; i < 1; i++) {
|
||||
for (int i=0; i < 2; i++) {
|
||||
notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t),0,gNB->L1_tx_out,tx_func);
|
||||
processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx);
|
||||
init_DLSCH_struct(gNB, msgDataTx);
|
||||
|
||||
+52
-4
@@ -106,6 +106,49 @@ queue_t nr_rach_ind_queue;
|
||||
|
||||
static void *NRUE_phy_stub_standalone_pnf_task(void *arg);
|
||||
|
||||
static int dump_L1_UE_meas_stats(PHY_VARS_NR_UE *ue, char *output, int max_len)
|
||||
{
|
||||
int stroff = 0;
|
||||
stroff += print_meas_log(&ue->phy_proc_tx, "L1 TX processing", NULL, NULL, output);
|
||||
stroff += print_meas_log(&ue->ulsch_encoding_stats, "ULSCH encoding", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->phy_proc_rx[0], "L1 RX processing t0", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->phy_proc_rx[1], "L1 RX processing t1", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->ue_ul_indication_stats, "UL Indication", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->rx_pdsch_stats, "PDSCH receiver", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_decoding_stats[0], "PDSCH decoding t0", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_decoding_stats[1], "PDSCH decoding t1", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_deinterleaving_stats, " -> Deinterleive", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_rate_unmatching_stats, " -> Rate Unmatch", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_ldpc_decoding_stats, " -> LDPC Decode", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_unscrambling_stats, "PDSCH unscrambling", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_rx_pdcch_stats, "PDCCH handling", NULL, NULL, output + stroff);
|
||||
return stroff;
|
||||
}
|
||||
|
||||
static void *nrL1_UE_stats_thread(void *param)
|
||||
{
|
||||
PHY_VARS_NR_UE *ue = (PHY_VARS_NR_UE *) param;
|
||||
const int max_len = 16384;
|
||||
char output[max_len];
|
||||
char filename[30];
|
||||
snprintf(filename, 29, "nrL1_UE_stats-%d.log", ue->Mod_id);
|
||||
filename[29] = 0;
|
||||
FILE *fd = fopen(filename, "w");
|
||||
AssertFatal(fd != NULL, "Cannot open %s\n", filename);
|
||||
|
||||
while (!oai_exit) {
|
||||
sleep(1);
|
||||
const int len = dump_L1_UE_meas_stats(ue, output, max_len);
|
||||
AssertFatal(len < max_len, "exceeded length\n");
|
||||
fwrite(output, len + 1, 1, fd); // + 1 for terminating NULL byte
|
||||
fflush(fd);
|
||||
fseek(fd, 0, SEEK_SET);
|
||||
}
|
||||
fclose(fd);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
|
||||
uint8_t UE_id,
|
||||
uint8_t abstraction_flag)
|
||||
@@ -595,7 +638,7 @@ static void UE_synch(void *arg) {
|
||||
uint64_t dl_carrier, ul_carrier;
|
||||
nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier);
|
||||
|
||||
if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, get_nrUE_params()->nr_dlsch_parallel) == 0) {
|
||||
if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa) == 0) {
|
||||
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
|
||||
hw_slot_offset = ((UE->rx_offset<<1) / UE->frame_parms.samples_per_subframe * UE->frame_parms.slots_per_subframe) +
|
||||
round((float)((UE->rx_offset<<1) % UE->frame_parms.samples_per_subframe)/UE->frame_parms.samples_per_slot0);
|
||||
@@ -668,6 +711,7 @@ void processSlotTX(void *arg) {
|
||||
// trigger L2 to run ue_scheduler thru IF module
|
||||
// [TODO] mapping right after NR initial sync
|
||||
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
|
||||
start_meas(&UE->ue_ul_indication_stats);
|
||||
nr_uplink_indication_t ul_indication;
|
||||
memset((void*)&ul_indication, 0, sizeof(ul_indication));
|
||||
|
||||
@@ -682,6 +726,7 @@ void processSlotTX(void *arg) {
|
||||
ul_indication.ue_sched_mode = rxtxD->ue_sched_mode;
|
||||
|
||||
UE->if_inst->ul_indication(&ul_indication);
|
||||
stop_meas(&UE->ue_ul_indication_stats);
|
||||
}
|
||||
|
||||
if ((UE->mode != loop_through_memory) && (rxtxD->ue_sched_mode != NOT_PUSCH)) {
|
||||
@@ -733,15 +778,16 @@ void processSlotRX(void *arg) {
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0);
|
||||
pdcp_run(&ctxt);
|
||||
}
|
||||
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
|
||||
rxtxD->ue_sched_mode = NOT_PUSCH;
|
||||
processSlotTX(rxtxD);
|
||||
|
||||
// Wait for PUSCH processing to finish
|
||||
notifiedFIFO_elt_t *res;
|
||||
res = pullTpool(&rxtxD->txFifo,&(get_nrUE_params()->Tpool));
|
||||
delNotifiedFIFO_elt(res);
|
||||
|
||||
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
|
||||
rxtxD->ue_sched_mode = NOT_PUSCH;
|
||||
processSlotTX(rxtxD);
|
||||
|
||||
} else {
|
||||
rxtxD->ue_sched_mode = SCHED_ALL;
|
||||
processSlotTX(rxtxD);
|
||||
@@ -1166,6 +1212,8 @@ void init_NR_UE_threads(int nb_inst) {
|
||||
|
||||
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
|
||||
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
|
||||
pthread_t stat_pthread;
|
||||
threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, "L1_UE_stats", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -422,11 +422,11 @@ int main( int argc, char **argv ) {
|
||||
get_options (); //Command-line options specific for NRUE
|
||||
|
||||
get_common_options(SOFTMODEM_5GUE_BIT);
|
||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
||||
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
|
||||
#if T_TRACER
|
||||
T_Config_Init();
|
||||
#endif
|
||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
||||
//randominit (0);
|
||||
set_taus_seed (0);
|
||||
|
||||
|
||||
@@ -1122,11 +1122,11 @@ int pnf_phy_ul_dci_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
|
||||
proc = &gNB->proc.L1_proc;
|
||||
|
||||
if (req->numPdus > 0) {
|
||||
if (req->ul_dci_pdu_list[req->numPdus-1].PDUType == 0) { // copy only the last PDU (PHY can have only one UL PDCCH pdu)
|
||||
msgTx->ul_pdcch_pdu = req->ul_dci_pdu_list[req->numPdus-1]; // copy the last pdu
|
||||
}
|
||||
else {
|
||||
LOG_E(PHY,"[PNF] UL_DCI_REQ sfn_slot:%d PDU[%d] - unknown pdu type:%d\n", NFAPI_SFNSLOT2DEC(req->SFN, req->Slot), req->numPdus-1, req->ul_dci_pdu_list[req->numPdus-1].PDUType);
|
||||
for (int i=0; i<req->numPdus; i++) {
|
||||
if (req->ul_dci_pdu_list[i].PDUType == NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE) // only possible value 0: PDCCH PDU
|
||||
msgTx->ul_pdcch_pdu[i] = req->ul_dci_pdu_list[i];
|
||||
else
|
||||
LOG_E(PHY,"[PNF] UL_DCI_REQ sfn_slot:%d PDU[%d] - unknown pdu type:%d\n", NFAPI_SFNSLOT2DEC(req->SFN, req->Slot), req->numPdus-1, req->ul_dci_pdu_list[req->numPdus-1].PDUType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1207,8 +1207,7 @@ int pnf_phy_dl_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
|
||||
processingData_L1tx_t *msgTx = (processingData_L1tx_t *)NotifiedFifoData(res);
|
||||
|
||||
if (dl_tti_pdu_list[i].PDUType == NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE) {
|
||||
// we trust the scheduler sends only one PDCCH PDU per slot
|
||||
msgTx->pdcch_pdu = dl_tti_pdu_list[i].pdcch_pdu; // fills the last received PDCCH PDU
|
||||
msgTx->pdcch_pdu[i] = dl_tti_pdu_list[i].pdcch_pdu; // copies all the received PDCCH PDUs
|
||||
}
|
||||
else if (dl_tti_pdu_list[i].PDUType == NFAPI_NR_DL_TTI_SSB_PDU_TYPE) {
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PDU:%d BCH: pdu_index:%u pdu_length:%d sdu_length:%d BCH_SDU:%x,%x,%x\n", __FUNCTION__, i, pdu_index, bch_pdu->bch_pdu_rel8.length, tx_request_pdu[sfn][sf][pdu_index]->segments[0].segment_length, sdu[0], sdu[1], sdu[2]);
|
||||
|
||||
@@ -339,7 +339,33 @@ typedef struct
|
||||
} nfapi_nr_ue_pusch_pdu_t;
|
||||
|
||||
typedef struct {
|
||||
} fapi_nr_ul_srs_parms_v4;
|
||||
|
||||
typedef struct {
|
||||
uint16_t rnti; // UE RNTI, Value: 1->65535
|
||||
uint32_t handle; // An opaque handling returned in the SRS.indication
|
||||
uint16_t bwp_size; // Bandwidth part size [3GPP TS 38.213, sec 12]. Number of contiguous PRBs allocated to the BWP, Value: 1->275
|
||||
uint16_t bwp_start; // Bandwidth part start RB index from reference CRB [3GPP TS 38.213, sec 12], Value: 0->274
|
||||
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
|
||||
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
|
||||
uint8_t num_ant_ports; // Number of antenna ports N_SRS_ap [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 port, 1 = 2 ports, 2 = 4 ports
|
||||
uint8_t num_symbols; // Number of symbols N_SRS_symb [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 symbol, 1 = 2 symbols, 2 = 4 symbols
|
||||
uint8_t num_repetitions; // Repetition factor R [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 = 1, 1 = 2, 2 = 4
|
||||
uint8_t time_start_position; // Starting position in the time domain l_0 [3GPP TS 38.211, Sec 6.4.1.4.1], Note: the MAC undertakes the translation from startPosition to l_0, Value: 0 --> 13
|
||||
uint8_t config_index; // SRS bandwidth config index C_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 63
|
||||
uint16_t sequence_id; // SRS sequence ID n_SRS_ID [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 1023
|
||||
uint8_t bandwidth_index; // SRS bandwidth index B_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||
uint8_t comb_size; // Transmission comb size K_TC [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 = comb size 2, 1 = comb size 4, 2 = comb size 8 (Rel16)
|
||||
uint8_t comb_offset; // Transmission comb offset K'_TC[3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 1 (combSize = 0), Value: 0 --> 3 (combSize = 1), Value: 0 --> 7 (combSize = 2)
|
||||
uint8_t cyclic_shift; // Cyclic shift n_CS_SRS [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 7 (combSize = 0), Value: 0 --> 11 (combSize = 1), Value: 0 --> 5 (combSize = 2)
|
||||
uint8_t frequency_position; // Frequency domain position n_RRC [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 67
|
||||
uint16_t frequency_shift; // Frequency domain shift n_shift [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 268
|
||||
uint8_t frequency_hopping; // Frequency hopping b_hop [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||
uint8_t group_or_sequence_hopping; // Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRSResource IE), Value: 0 = No hopping, 1 = Group hopping groupOrSequenceHopping, 2 = Sequence hopping
|
||||
uint8_t resource_type; // Type of SRS resource allocation [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0: aperiodic, 1: semi-persistent, 2: periodic
|
||||
uint16_t t_srs; // SRS-Periodicity in slots [3GPP TS 38.211, Sec 6.4.1.4.4], Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
|
||||
uint16_t t_offset; // Slot offset value [3GPP TS 38.211, Sec 6.4.1.4.3], Value:0->2559
|
||||
nfapi_nr_ue_ul_beamforming_t beamforming;
|
||||
} fapi_nr_ul_config_srs_pdu;
|
||||
|
||||
typedef struct {
|
||||
@@ -348,7 +374,7 @@ typedef struct {
|
||||
fapi_nr_ul_config_prach_pdu prach_config_pdu;
|
||||
fapi_nr_ul_config_pucch_pdu pucch_config_pdu;
|
||||
nfapi_nr_ue_pusch_pdu_t pusch_config_pdu;
|
||||
fapi_nr_ul_config_srs_pdu srs_config_pdu;
|
||||
fapi_nr_ul_config_srs_pdu srs_config_pdu;
|
||||
};
|
||||
} fapi_nr_ul_config_request_pdu_t;
|
||||
|
||||
|
||||
@@ -1312,7 +1312,7 @@ typedef struct
|
||||
uint8_t comb_offset;//Transmission comb offset 𝑘 ̄ TC [TS38.211, Sec 6.4.1.4.3] Value: 0 → 1 (combSize = 0) Value: 0 → 3 (combSize = 1)
|
||||
uint8_t cyclic_shift;
|
||||
uint8_t frequency_position;
|
||||
uint8_t frequency_shift;
|
||||
uint16_t frequency_shift;
|
||||
uint8_t frequency_hopping;
|
||||
uint8_t group_or_sequence_hopping;//Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRS-Resource
|
||||
uint8_t resource_type;//Type of SRS resource allocation
|
||||
@@ -1402,9 +1402,6 @@ typedef struct
|
||||
} nfapi_nr_ul_dci_request_t;
|
||||
*/
|
||||
|
||||
// normally one PDU per coreset per BWP
|
||||
#define NFAPI_NR_MAX_UL_DCI_PDUS 4
|
||||
|
||||
typedef struct {
|
||||
/// only possible value 0: PDCCH PDU
|
||||
uint16_t PDUType;
|
||||
@@ -1418,7 +1415,7 @@ typedef struct {
|
||||
uint16_t SFN;
|
||||
uint16_t Slot;
|
||||
uint8_t numPdus;
|
||||
nfapi_nr_ul_dci_request_pdus_t ul_dci_pdu_list[NFAPI_NR_MAX_UL_DCI_PDUS];
|
||||
nfapi_nr_ul_dci_request_pdus_t ul_dci_pdu_list[NFAPI_NR_MAX_NB_CORESETS];
|
||||
} nfapi_nr_ul_dci_request_t;
|
||||
|
||||
//3.4.5 slot_errors
|
||||
|
||||
@@ -263,8 +263,8 @@ static uint8_t pack_nr_pnf_config_request(void *msg, uint8_t **ppWritePackedMsg,
|
||||
|
||||
static uint8_t pack_pnf_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config) {
|
||||
nfapi_pnf_config_request_t *pNfapiMsg = (nfapi_pnf_config_request_t *)msg;
|
||||
return (pack_tlv(NFAPI_PNF_PHY_RF_TAG, &pNfapiMsg->pnf_phy_rf_config, ppWritePackedMsg, end, &pack_pnf_phy_rf_config_value) &&
|
||||
push8(pNfapiMsg->num_tlvs,ppWritePackedMsg,end) &&
|
||||
return (push8(pNfapiMsg->num_tlvs,ppWritePackedMsg,end) &&
|
||||
pack_tlv(NFAPI_PNF_PHY_RF_TAG, &pNfapiMsg->pnf_phy_rf_config, ppWritePackedMsg, end, &pack_pnf_phy_rf_config_value) &&
|
||||
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config));
|
||||
}
|
||||
|
||||
@@ -697,8 +697,7 @@ static uint8_t pack_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_
|
||||
pack_tlv(NFAPI_NFAPI_NMM_GSM_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_gsm_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) &&
|
||||
pack_tlv(NFAPI_NFAPI_NMM_UMTS_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_umts_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) &&
|
||||
pack_tlv(NFAPI_NFAPI_NMM_LTE_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_lte_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) &&
|
||||
pack_tlv(NFAPI_NFAPI_NMM_UPLINK_RSSI_SUPPORTED_TAG, &(pNfapiMsg->nfapi_config.nmm_uplink_rssi_supported), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) );
|
||||
pack_tlv(NFAPI_NFAPI_NMM_UPLINK_RSSI_SUPPORTED_TAG, &(pNfapiMsg->nfapi_config.nmm_uplink_rssi_supported), ppWritePackedMsg, end, &pack_uint8_tlv_value));
|
||||
}
|
||||
|
||||
|
||||
@@ -724,47 +723,50 @@ static uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uin
|
||||
pack_tlv(NFAPI_NR_CONFIG_UL_K0_TAG, &(pNfapiMsg->carrier_config.ul_k0[1]), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_UPLINK_BANDWIDTH_TAG, &(pNfapiMsg->carrier_config.uplink_bandwidth), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_UPLINK_FREQUENCY_TAG, &(pNfapiMsg->carrier_config.uplink_frequency), ppWritePackedMsg, end, &pack_uint32_tlv_value) &&
|
||||
|
||||
pack_tlv(NFAPI_NR_CONFIG_FREQUENCY_SHIFT_7P5KHZ_TAG, &(pNfapiMsg->carrier_config.frequency_shift_7p5khz), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
|
||||
pack_tlv(NFAPI_NR_CONFIG_FRAME_DUPLEX_TYPE_TAG, &(pNfapiMsg->cell_config.frame_duplex_type), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PHY_CELL_ID_TAG, &(pNfapiMsg->cell_config.phy_cell_id), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
|
||||
pack_tlv(NFAPI_NR_CONFIG_PHY_CELL_ID_TAG, &(pNfapiMsg->cell_config.phy_cell_id), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_MULTIPLE_CARRIERS_IN_A_BAND_TAG, &(pNfapiMsg->prach_config.prach_multiple_carriers_in_a_band), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_CONFIG_INDEX_TAG, &(pNfapiMsg->prach_config.prach_ConfigurationIndex), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_NUM_PRACH_FD_OCCASIONS_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_SEQUENCE_LENGTH_TAG, &(pNfapiMsg->prach_config.prach_sequence_length), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_RESTRICTED_SET_CONFIG_TAG, &(pNfapiMsg->prach_config.restricted_set_config), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SSB_PER_RACH_TAG, &(pNfapiMsg->prach_config.ssb_per_rach), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_SUB_C_SPACING_TAG, &(pNfapiMsg->prach_config.prach_sub_c_spacing), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].prach_root_sequence_index), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_K1_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].k1), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_ZERO_CORR_CONF_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].prach_zero_corr_conf), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_SUB_C_SPACING_TAG, &(pNfapiMsg->prach_config.prach_sub_c_spacing), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].prach_root_sequence_index), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_K1_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].k1), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_PRACH_ZERO_CORR_CONF_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].prach_zero_corr_conf), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_NUM_ROOT_SEQUENCES_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].num_root_sequences), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
|
||||
|
||||
pack_tlv(NFAPI_NR_CONFIG_SCS_COMMON_TAG, &(pNfapiMsg->ssb_config.scs_common), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_BCH_PAYLOAD_TAG, &(pNfapiMsg->ssb_config.bch_payload), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SS_PBCH_POWER_TAG, &(pNfapiMsg->ssb_config.ss_pbch_power), ppWritePackedMsg, end, &pack_uint32_tlv_value) &&
|
||||
|
||||
pack_tlv(NFAPI_NR_CONFIG_BETA_PSS_TAG, &(pNfapiMsg->ssb_table.beta_pss), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_MIB_TAG, &(pNfapiMsg->ssb_table.MIB), ppWritePackedMsg, end, &pack_uint32_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SSB_MASK_TAG, &(pNfapiMsg->ssb_table.ssb_mask_list[0].ssb_mask), ppWritePackedMsg, end, &pack_uint32_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SSB_MASK_TAG, &(pNfapiMsg->ssb_table.ssb_mask_list[1].ssb_mask), ppWritePackedMsg, end, &pack_uint32_tlv_value) &&
|
||||
|
||||
// TODO: Not sure what's going on, ssb_mask_list[1] packing below seems to match unpack, but is causing problems
|
||||
// pack_tlv(NFAPI_NR_CONFIG_SSB_MASK_TAG, &(pNfapiMsg->ssb_table.ssb_mask_list[1].ssb_mask), ppWritePackedMsg, end, &pack_uint32_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_BEAM_ID_TAG, &(pNfapiMsg->ssb_table.ssb_beam_id_list[0].beam_id), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG, &(pNfapiMsg->ssb_table.ssb_offset_point_a), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SSB_PERIOD_TAG, &(pNfapiMsg->ssb_table.ssb_period), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG, &(pNfapiMsg->ssb_table.ssb_subcarrier_offset), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_SS_PBCH_MULTIPLE_CARRIERS_IN_A_BAND_TAG, &(pNfapiMsg->ssb_table.ss_pbch_multiple_carriers_in_a_band), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_CONFIG_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG, &(pNfapiMsg->ssb_table.multiple_cells_ss_pbch_in_a_carrier), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
|
||||
pack_tlv(NFAPI_NR_CONFIG_TDD_PERIOD_TAG, &(pNfapiMsg->tdd_table.tdd_period), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv4), ppWritePackedMsg, end, &pack_ipv4_address_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv6), ppWritePackedMsg, end, &pack_ipv6_address_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_port), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_address_ipv4), ppWritePackedMsg, end, &pack_ipv4_address_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_address_ipv6), ppWritePackedMsg, end, &pack_ipv6_address_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_VNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_port), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
//pack_tlv(NFAPI_NR_NFAPI_RF_BANDS_TAG, &(pNfapiMsg->nfapi_config.rf_bands), ppWritePackedMsg, end, &pack_rf_bands_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG, &(pNfapiMsg->nfapi_config.timing_info_mode), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG, &(pNfapiMsg->nfapi_config.timing_info_period), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv4), ppWritePackedMsg, end, &pack_ipv4_address_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv6), ppWritePackedMsg, end, &pack_ipv6_address_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_port), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_TIMING_WINDOW_TAG, &(pNfapiMsg->nfapi_config.timing_window), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
//pack_tlv(NFAPI_NR_NFAPI_UPLINK_UES_PER_SUBFRAME_TAG, &(pNfapiMsg->nfapi_config.ul_ue_per_sf), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
|
||||
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) );
|
||||
pack_tlv(NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG, &(pNfapiMsg->nfapi_config.timing_info_mode), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
|
||||
pack_tlv(NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG, &(pNfapiMsg->nfapi_config.timing_info_period), ppWritePackedMsg, end, &pack_uint8_tlv_value));
|
||||
}
|
||||
|
||||
static uint8_t pack_nr_config_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config) {
|
||||
@@ -775,7 +777,7 @@ static uint8_t pack_nr_config_response(void *msg, uint8_t **ppWritePackedMsg, ui
|
||||
|
||||
static uint8_t pack_config_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config) {
|
||||
nfapi_config_response_t *pNfapiMsg = (nfapi_config_response_t *)msg;
|
||||
return ( push8(pNfapiMsg->error_code, ppWritePackedMsg, end) &&
|
||||
return ( push32(pNfapiMsg->error_code, ppWritePackedMsg, end) &&
|
||||
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) );
|
||||
}
|
||||
|
||||
@@ -1346,7 +1348,8 @@ static uint8_t unpack_pnf_config_request(uint8_t **ppReadPackedMsg, uint8_t *end
|
||||
unpack_tlv_t unpack_fns[] = {
|
||||
{ NFAPI_PNF_PHY_RF_TAG, &pNfapiMsg->pnf_phy_rf_config, &unpack_pnf_phy_rf_config_value},
|
||||
};
|
||||
return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension);
|
||||
return (pull8(ppReadPackedMsg, &pNfapiMsg->num_tlvs, end) &&
|
||||
unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension));
|
||||
}
|
||||
|
||||
|
||||
@@ -1722,13 +1725,14 @@ static uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end,
|
||||
for(int i=0;i<40;i++)
|
||||
pNfapiMsg->tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list = (nfapi_nr_max_num_of_symbol_per_slot_t*) malloc(14*sizeof(nfapi_nr_max_num_of_symbol_per_slot_t));
|
||||
|
||||
pNfapiMsg->prach_config.num_prach_fd_occasions_list=(nfapi_nr_num_prach_fd_occasions_t *) malloc(sizeof(nfapi_nr_num_prach_fd_occasions_t));
|
||||
|
||||
for(int i = 0; i < 40; i++){ //unpacking tdd slot config
|
||||
for(int symbol = 0; symbol<14;symbol++){
|
||||
pull8(ppReadPackedMsg,&pNfapiMsg->tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list[symbol].slot_config.value, end);
|
||||
}
|
||||
}
|
||||
pNfapiMsg->prach_config.num_prach_fd_occasions_list=(nfapi_nr_num_prach_fd_occasions_t *) malloc(sizeof(nfapi_nr_num_prach_fd_occasions_t));
|
||||
|
||||
unpack_tlv_t unpack_fns[] =
|
||||
{
|
||||
{ NFAPI_NR_CONFIG_DL_BANDWIDTH_TAG, &(pNfapiMsg->carrier_config.dl_bandwidth), &unpack_uint16_tlv_value},
|
||||
@@ -1741,8 +1745,13 @@ static uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end,
|
||||
{ NFAPI_NR_CONFIG_UL_K0_TAG, &(pNfapiMsg->carrier_config.ul_k0[1]), &unpack_uint16_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_UPLINK_BANDWIDTH_TAG, &(pNfapiMsg->carrier_config.uplink_bandwidth), &unpack_uint16_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_UPLINK_FREQUENCY_TAG, &(pNfapiMsg->carrier_config.uplink_frequency), &unpack_uint32_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_FREQUENCY_SHIFT_7P5KHZ_TAG, &(pNfapiMsg->carrier_config.frequency_shift_7p5khz), &unpack_uint8_tlv_value},
|
||||
|
||||
{ NFAPI_NR_CONFIG_FRAME_DUPLEX_TYPE_TAG, &(pNfapiMsg->cell_config.frame_duplex_type), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_PHY_CELL_ID_TAG, &(pNfapiMsg->cell_config.phy_cell_id), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_PHY_CELL_ID_TAG, &(pNfapiMsg->cell_config.phy_cell_id), &unpack_uint16_tlv_value},
|
||||
|
||||
{ NFAPI_NR_CONFIG_PRACH_MULTIPLE_CARRIERS_IN_A_BAND_TAG, &(pNfapiMsg->prach_config.prach_multiple_carriers_in_a_band), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_PRACH_CONFIG_INDEX_TAG, &(pNfapiMsg->prach_config.prach_ConfigurationIndex), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_NUM_PRACH_FD_OCCASIONS_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_PRACH_SEQUENCE_LENGTH_TAG, &(pNfapiMsg->prach_config.prach_sequence_length), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_RESTRICTED_SET_CONFIG_TAG, &(pNfapiMsg->prach_config.restricted_set_config), &unpack_uint8_tlv_value},
|
||||
@@ -1754,24 +1763,32 @@ static uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end,
|
||||
{ NFAPI_NR_CONFIG_NUM_ROOT_SEQUENCES_TAG, &(pNfapiMsg->prach_config.num_prach_fd_occasions_list[0].num_root_sequences), &unpack_uint8_tlv_value},
|
||||
|
||||
{ NFAPI_NR_CONFIG_SCS_COMMON_TAG, &(pNfapiMsg->ssb_config.scs_common), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_BCH_PAYLOAD_TAG, &(pNfapiMsg->ssb_config.bch_payload), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_SS_PBCH_POWER_TAG, &(pNfapiMsg->ssb_config.ss_pbch_power), &unpack_uint32_tlv_value},
|
||||
|
||||
{ NFAPI_NR_CONFIG_BETA_PSS_TAG, &(pNfapiMsg->ssb_table.beta_pss), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_MIB_TAG, &(pNfapiMsg->ssb_table.MIB), &unpack_uint32_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_SSB_MASK_TAG, &(pNfapiMsg->ssb_table.ssb_mask_list[0].ssb_mask), &unpack_uint32_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_SSB_MASK_TAG, &(pNfapiMsg->ssb_table.ssb_mask_list[1].ssb_mask), &unpack_uint32_tlv_value},
|
||||
|
||||
// TODO: Not sure what's going on, ssb_mask_list[1] unpacking below seems to match pack, but is causing problems
|
||||
// { NFAPI_NR_CONFIG_SSB_MASK_TAG, &(pNfapiMsg->ssb_table.ssb_mask_list[1].ssb_mask), &unpack_uint32_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_BEAM_ID_TAG, &(pNfapiMsg->ssb_table.ssb_beam_id_list[0].beam_id), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG, &(pNfapiMsg->ssb_table.ssb_offset_point_a), &unpack_uint16_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_SSB_PERIOD_TAG, &(pNfapiMsg->ssb_table.ssb_period), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG, &(pNfapiMsg->ssb_table.ssb_subcarrier_offset), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_SS_PBCH_MULTIPLE_CARRIERS_IN_A_BAND_TAG, &(pNfapiMsg->ssb_table.ss_pbch_multiple_carriers_in_a_band), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_CONFIG_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG, &(pNfapiMsg->ssb_table.multiple_cells_ss_pbch_in_a_carrier), &unpack_uint8_tlv_value},
|
||||
|
||||
{ NFAPI_NR_CONFIG_TDD_PERIOD_TAG, &(pNfapiMsg->tdd_table.tdd_period), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv6), &unpack_ipv6_address_value},
|
||||
{ NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_port), &unpack_uint16_tlv_value},
|
||||
|
||||
{ NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_address_ipv4), &unpack_ipv4_address_value},
|
||||
{ NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_address_ipv6), &unpack_ipv6_address_value},
|
||||
{ NFAPI_NR_NFAPI_P7_VNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_port), &unpack_uint16_tlv_value},
|
||||
{ NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv4), &unpack_ipv4_address_value},
|
||||
{ NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv6), &unpack_ipv6_address_value},
|
||||
{ NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_port), &unpack_uint16_tlv_value},
|
||||
{ NFAPI_NR_NFAPI_TIMING_WINDOW_TAG, &(pNfapiMsg->nfapi_config.timing_window), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG, &(pNfapiMsg->nfapi_config.timing_info_mode), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG, &(pNfapiMsg->nfapi_config.timing_info_period), &unpack_uint8_tlv_value},
|
||||
{ NFAPI_NR_NFAPI_TIMING_WINDOW_TAG, &(pNfapiMsg->nfapi_config.timing_window), &unpack_uint8_tlv_value},
|
||||
};
|
||||
|
||||
return ( pull8(ppReadPackedMsg, &pNfapiMsg->num_tlv, end) &&
|
||||
|
||||
@@ -4548,7 +4548,7 @@ static uint8_t unpack_ul_tti_request_srs_pdu(void *tlv, uint8_t **ppReadPackedMs
|
||||
pull8(ppReadPackedMsg, &srs_pdu->comb_offset, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->cyclic_shift, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->frequency_position, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->frequency_shift, end) &&
|
||||
pull16(ppReadPackedMsg, &srs_pdu->frequency_shift, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->frequency_hopping, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->group_or_sequence_hopping, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->resource_type, end) &&
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#include "coding_defs.h"
|
||||
#include "assertions.h"
|
||||
#if USE_INTEL_CRC
|
||||
#if USE_INTEL_CRC
|
||||
#include "crc.h"
|
||||
#endif
|
||||
/*ref 36-212 v8.6.0 , pp 8-9 */
|
||||
@@ -159,7 +159,7 @@ unsigned int crc24a (unsigned char * inptr,
|
||||
if ( bitlen % 8 || !USE_INTEL_CRC ) {
|
||||
unsigned int crc = 0;
|
||||
int resbit= (bitlen % 8);
|
||||
|
||||
|
||||
while (octetlen-- > 0) {
|
||||
// printf("crc24a: in %x => crc %x\n",crc,*inptr);
|
||||
crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)];
|
||||
@@ -192,7 +192,7 @@ unsigned int crc24b (unsigned char * inptr,
|
||||
int bitlen)
|
||||
{
|
||||
int octetlen = bitlen / 8; /* Change in octets */
|
||||
|
||||
|
||||
if ( bitlen % 8 || !USE_INTEL_CRC ) {
|
||||
unsigned int crc = 0;
|
||||
int resbit = (bitlen % 8);
|
||||
|
||||
@@ -405,7 +405,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z;
|
||||
|
||||
#ifdef RM_DEBUG
|
||||
printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d\n", E, F, Foffset,ind, Ncb, rvidx);
|
||||
printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d, Ilbrm %d\n", E, F, Foffset,ind, Ncb, rvidx, Ilbrm);
|
||||
#endif
|
||||
|
||||
if (Foffset > E) {
|
||||
@@ -502,7 +502,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
|
||||
}
|
||||
|
||||
#ifdef RM_DEBUG
|
||||
printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d\n", clear, E, ind, Ncb, rvidx);
|
||||
printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d, Ilbrm %d\n", clear, E, ind, Ncb, rvidx, Ilbrm);
|
||||
#endif
|
||||
|
||||
if (clear==1) memset(w,0,Ncb*sizeof(int16_t));
|
||||
|
||||
@@ -206,6 +206,27 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
nr_init_csi_rs(gNB, cfg->cell_config.phy_cell_id.value);
|
||||
|
||||
for (int id=0; id<NUMBER_OF_NR_SRS_MAX; id++) {
|
||||
gNB->nr_srs_info[id] = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
|
||||
gNB->nr_srs_info[id]->sc_list = (uint16_t *) malloc16_clear(6*fp->N_RB_UL*sizeof(uint16_t));
|
||||
gNB->nr_srs_info[id]->srs_generated_signal = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->noise_power = (uint32_t*)malloc16_clear(sizeof(uint32_t));
|
||||
gNB->nr_srs_info[id]->srs_received_signal = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_ls_estimated_channel = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_freq = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time_shifted = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
for (i=0;i<Prx;i++){
|
||||
gNB->nr_srs_info[id]->srs_received_signal[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_ls_estimated_channel[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_freq[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time_shifted[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
}
|
||||
}
|
||||
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
|
||||
/* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */
|
||||
generate_lowpapr_typ1_refsig_sequences(SHRT_MAX);
|
||||
|
||||
@@ -557,6 +578,12 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
|
||||
AssertFatal(gNB->pucch[i]!=NULL,"Can't initialize pucch %d \n", i);
|
||||
}
|
||||
|
||||
for (int i=0; i<NUMBER_OF_NR_SRS_MAX; i++) {
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffers for SRS %d/%d\n",i,NUMBER_OF_NR_SRS_MAX);
|
||||
gNB->srs[i] = new_gNB_srs();
|
||||
AssertFatal(gNB->srs[i]!=NULL,"Can't initialize srs %d \n", i);
|
||||
}
|
||||
|
||||
for (int i=0; i<gNB->number_of_nr_ulsch_max; i++) {
|
||||
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH %d/%d\n",i,gNB->number_of_nr_ulsch_max);
|
||||
|
||||
@@ -20,28 +20,19 @@
|
||||
*/
|
||||
|
||||
#include "phy_init.h"
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
//#include "SIMULATION/TOOLS/sim.h"
|
||||
/*#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"*/
|
||||
#include "openair1/PHY/defs_RU.h"
|
||||
#include "openair1/PHY/impl_defs_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
//#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/NR_REFSIG/pss_nr.h"
|
||||
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
|
||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include <openair1/PHY/MODULATION/nr_modulation.h>
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
|
||||
#if 0
|
||||
void phy_config_harq_ue(module_id_t Mod_id,
|
||||
@@ -140,6 +131,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
NR_UE_PBCH **const pbch_vars = ue->pbch_vars;
|
||||
NR_UE_PRACH **const prach_vars = ue->prach_vars;
|
||||
int i,j,k,l,slot,symb;
|
||||
|
||||
NR_UE_SRS **const srs_vars = ue->srs_vars;
|
||||
|
||||
int gNB_id;
|
||||
int th_id;
|
||||
uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
|
||||
@@ -326,6 +320,25 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
|
||||
prach_vars[gNB_id] = (NR_UE_PRACH *)malloc16_clear(sizeof(NR_UE_PRACH));
|
||||
pbch_vars[gNB_id] = (NR_UE_PBCH *)malloc16_clear(sizeof(NR_UE_PBCH));
|
||||
srs_vars[gNB_id] = (NR_UE_SRS *)malloc16_clear(sizeof(NR_UE_SRS));
|
||||
|
||||
srs_vars[gNB_id]->active = false;
|
||||
ue->nr_srs_info = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
|
||||
ue->nr_srs_info->sc_list = (uint16_t *) malloc16_clear(6*fp->N_RB_UL*sizeof(uint16_t));
|
||||
ue->nr_srs_info->srs_generated_signal = (int32_t *) malloc16_clear( (2*(fp->samples_per_frame)+2048)*sizeof(int32_t) );
|
||||
ue->nr_srs_info->noise_power = (uint32_t*)malloc16_clear(sizeof(uint32_t));
|
||||
ue->nr_srs_info->srs_received_signal = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_ls_estimated_channel = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_estimated_channel_freq = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_estimated_channel_time = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_estimated_channel_time_shifted = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
ue->nr_srs_info->srs_received_signal[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_ls_estimated_channel[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_estimated_channel_freq[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_estimated_channel_time[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_estimated_channel_time_shifted[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
}
|
||||
|
||||
if (abstraction_flag == 0) {
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
@@ -542,6 +555,7 @@ void init_N_TA_offset(PHY_VARS_NR_UE *ue){
|
||||
void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
crcTableInit();
|
||||
init_scrambling_luts();
|
||||
load_dftslib();
|
||||
init_context_synchro_nr(frame_parms);
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
@@ -553,6 +567,5 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
|
||||
//generate_16qam_table();
|
||||
//generate_RIV_tables();
|
||||
//init_unscrambling_lut();
|
||||
//init_scrambling_lut();
|
||||
//set_taus_seed(1328);
|
||||
}
|
||||
|
||||
@@ -44,14 +44,13 @@ void pcfich_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int16_t *d)
|
||||
{
|
||||
|
||||
uint32_t i;
|
||||
uint8_t reset;
|
||||
uint32_t x1=0, x2=0, s=0;
|
||||
uint8_t reset = 1;
|
||||
uint32_t x1 = 0; // x1 is set in lte_gold_generic
|
||||
uint32_t s = 0;
|
||||
|
||||
reset = 1;
|
||||
x2 = ((((2*frame_parms->Nid_cell)+1)*(1+subframe))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
|
||||
uint32_t x2 = ((((2*frame_parms->Nid_cell)+1)*(1+subframe))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
|
||||
|
||||
for (i=0; i<32; i++) {
|
||||
for (uint32_t i=0; i<32; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
//printf("lte_gold[%d]=%x\n",i,s);
|
||||
|
||||
@@ -36,10 +36,46 @@
|
||||
|
||||
//#define DEBUG_CH
|
||||
//#define DEBUG_PUSCH
|
||||
//#define SRS_DEBUG
|
||||
|
||||
#define NO_INTERP 1
|
||||
#define dBc(x,y) (dB_fixed(((int32_t)(x))*(x) + ((int32_t)(y))*(y)))
|
||||
|
||||
void freq2time(uint16_t ofdm_symbol_size,
|
||||
int16_t *freq_signal,
|
||||
int16_t *time_signal) {
|
||||
|
||||
switch (ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft(IDFT_128, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 256:
|
||||
idft(IDFT_256, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 512:
|
||||
idft(IDFT_512, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 1024:
|
||||
idft(IDFT_1024, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 1536:
|
||||
idft(IDFT_1536, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 2048:
|
||||
idft(IDFT_2048, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 4096:
|
||||
idft(IDFT_4096, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 8192:
|
||||
idft(IDFT_8192, freq_signal, time_signal, 1);
|
||||
break;
|
||||
default:
|
||||
idft(IDFT_512, freq_signal, time_signal, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
unsigned char Ns,
|
||||
unsigned short p,
|
||||
@@ -273,10 +309,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
ch,
|
||||
ul_ch,
|
||||
8);
|
||||
|
||||
|
||||
//for (int i= 0; i<16; i++)
|
||||
//printf("ul_ch addr %p %d\n", ul_ch+i, *(ul_ch+i));
|
||||
|
||||
|
||||
pil += 2;
|
||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(soffset+symbol_offset+nushift+re_offset)];
|
||||
@@ -898,63 +934,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
#endif
|
||||
|
||||
// Convert to time domain
|
||||
|
||||
switch (gNB->frame_parms.ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft(IDFT_128,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft(IDFT_256,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft(IDFT_512,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft(IDFT_1024,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft(IDFT_1536,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft(IDFT_2048,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
idft(IDFT_4096,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
idft(IDFT_8192,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
default:
|
||||
idft(IDFT_512,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
}
|
||||
|
||||
freq2time(gNB->frame_parms.ofdm_symbol_size,
|
||||
(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx]);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CH
|
||||
@@ -1091,3 +1073,178 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
}// last symbol check
|
||||
}//Antenna loop
|
||||
}
|
||||
|
||||
uint32_t calc_power(uint16_t *x, uint32_t size) {
|
||||
uint64_t sum_x = 0;
|
||||
uint64_t sum_x2 = 0;
|
||||
for(int k = 0; k<size; k++) {
|
||||
sum_x = sum_x + x[k];
|
||||
sum_x2 = sum_x2 + x[k]*x[k];
|
||||
}
|
||||
return sum_x2/size - (sum_x/size)*(sum_x/size);
|
||||
}
|
||||
|
||||
int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t *srs_generated_signal,
|
||||
int32_t **srs_received_signal,
|
||||
int32_t **srs_estimated_channel_freq,
|
||||
int32_t **srs_estimated_channel_time,
|
||||
int32_t **srs_estimated_channel_time_shifted,
|
||||
uint32_t *noise_power) {
|
||||
|
||||
if(nr_srs_info->sc_list_length == 0) {
|
||||
LOG_E(NR_PHY, "(%d.%d) nr_srs_info was not generated yet!\n", frame, slot);
|
||||
return -1;
|
||||
}
|
||||
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
int32_t **srs_ls_estimated_channel = nr_srs_info->srs_ls_estimated_channel;
|
||||
|
||||
uint16_t noise_real[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
uint16_t noise_imag[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
|
||||
int16_t ls_estimated[2];
|
||||
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
|
||||
memset(srs_ls_estimated_channel[ant], 0, frame_parms->ofdm_symbol_size*(1<<srs_pdu->num_symbols)*sizeof(int32_t));
|
||||
memset(srs_estimated_channel_freq[ant], 0, frame_parms->ofdm_symbol_size*(1<<srs_pdu->num_symbols)*sizeof(int32_t));
|
||||
|
||||
int16_t *srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[0]];
|
||||
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
|
||||
int16_t generated_real = srs_generated_signal[nr_srs_info->sc_list[sc_idx]] & 0xFFFF;
|
||||
int16_t generated_imag = (srs_generated_signal[nr_srs_info->sc_list[sc_idx]] >> 16) & 0xFFFF;
|
||||
|
||||
int16_t received_real = srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]] & 0xFFFF;
|
||||
int16_t received_imag = (srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]] >> 16) & 0xFFFF;
|
||||
|
||||
// We know that nr_srs_info->srs_generated_signal_bits bits are enough to represent the generated_real and generated_imag.
|
||||
// So we only need a nr_srs_info->srs_generated_signal_bits shift to ensure that the result fits into 16 bits.
|
||||
ls_estimated[0] = (int16_t)(((int32_t)generated_real*received_real + (int32_t)generated_imag*received_imag)>>nr_srs_info->srs_generated_signal_bits);
|
||||
ls_estimated[1] = (int16_t)(((int32_t)generated_real*received_imag - (int32_t)generated_imag*received_real)>>nr_srs_info->srs_generated_signal_bits);
|
||||
srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]] = ls_estimated[0] + (((int32_t)ls_estimated[1] << 16) & 0xFFFF0000);
|
||||
|
||||
// Channel interpolation
|
||||
if(srs_pdu->comb_size == 0) {
|
||||
if(sc_idx == 0) { // First subcarrier case
|
||||
// filt8_start is {12288,8192,4096,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt8_start, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if(nr_srs_info->sc_list[sc_idx] < nr_srs_info->sc_list[sc_idx - 1]) { // Start of OFDM symbol case
|
||||
// filt8_start is {12288,8192,4096,0,0,0,0,0}
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx + 2]] - sizeof(uint64_t);
|
||||
multadd_real_vector_complex_scalar(filt8_start, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if((sc_idx < (nr_srs_info->sc_list_length - 1) && nr_srs_info->sc_list[sc_idx + 1] < nr_srs_info->sc_list[sc_idx])
|
||||
|| (sc_idx == (nr_srs_info->sc_list_length - 1))) { // End of OFDM symbol or last subcarrier cases
|
||||
// filt8_end is {4096,8192,12288,16384,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt8_end, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if(sc_idx%2 == 1) { // 1st middle case
|
||||
// filt8_middle2 is {4096,8192,8192,8192,4096,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt8_middle2, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if(sc_idx%2 == 0) { // 2nd middle case
|
||||
// filt8_middle4 is {0,0,4096,8192,8192,8192,4096,0}
|
||||
multadd_real_vector_complex_scalar(filt8_middle4, ls_estimated, srs_estimated_channel16, 8);
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]];
|
||||
}
|
||||
} else {
|
||||
if(sc_idx == 0) { // First subcarrier case
|
||||
// filt16_start is {12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_start, ls_estimated, srs_estimated_channel16, 16);
|
||||
} else if(nr_srs_info->sc_list[sc_idx] < nr_srs_info->sc_list[sc_idx - 1]) { // Start of OFDM symbol case
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx + 1]] - sizeof(uint64_t);
|
||||
// filt16_start is {12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_start, ls_estimated, srs_estimated_channel16, 16);
|
||||
} else if((sc_idx < (nr_srs_info->sc_list_length - 1) && nr_srs_info->sc_list[sc_idx + 1] < nr_srs_info->sc_list[sc_idx])
|
||||
|| (sc_idx == (nr_srs_info->sc_list_length - 1))) { // End of OFDM symbol or last subcarrier cases
|
||||
// filt16_end is {4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_end, ls_estimated, srs_estimated_channel16, 16);
|
||||
} else { // Middle case
|
||||
// filt16_middle4 is {4096,8192,8192,8192,8192,8192,8192,8192,4096,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_middle4, ls_estimated, srs_estimated_channel16, 16);
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]];
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12;
|
||||
int subcarrier_log = nr_srs_info->sc_list[sc_idx]-subcarrier_offset;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if(sc_idx == 0) {
|
||||
LOG_I(NR_PHY,"______________________________ Rx antenna %i _______________________________\n", ant);
|
||||
}
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,":::::::::::::::::::::::::::::::::::: %i ::::::::::::::::::::::::::::::::::::\n", subcarrier_log/12);
|
||||
LOG_I(NR_PHY,"\t __genRe________genIm__|____rxRe_________rxIm__|____lsRe________lsIm_\n");
|
||||
}
|
||||
LOG_I(NR_PHY,"(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
|
||||
subcarrier_log,
|
||||
generated_real, generated_imag,
|
||||
received_real, received_imag,
|
||||
ls_estimated[0], ls_estimated[1]);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Compute noise
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
noise_real[ant*nr_srs_info->sc_list_length + sc_idx] = abs((int16_t)((srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]]-srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]]) & 0xFFFF));
|
||||
noise_imag[ant*nr_srs_info->sc_list_length + sc_idx] = abs((int16_t)(((srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]]-srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]]) >> 16) & 0xFFFF));
|
||||
}
|
||||
|
||||
// Convert to time domain
|
||||
freq2time(gNB->frame_parms.ofdm_symbol_size,
|
||||
(int16_t*) srs_estimated_channel_freq[ant],
|
||||
(int16_t*) srs_estimated_channel_time[ant]);
|
||||
|
||||
memcpy(&srs_estimated_channel_time_shifted[ant][0],
|
||||
&srs_estimated_channel_time[ant][gNB->frame_parms.ofdm_symbol_size>>1],
|
||||
(gNB->frame_parms.ofdm_symbol_size>>1)*sizeof(int32_t));
|
||||
|
||||
memcpy(&srs_estimated_channel_time_shifted[ant][gNB->frame_parms.ofdm_symbol_size>>1],
|
||||
&srs_estimated_channel_time[ant][0],
|
||||
(gNB->frame_parms.ofdm_symbol_size>>1)*sizeof(int32_t));
|
||||
}
|
||||
|
||||
*noise_power = calc_power(noise_real,frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length)
|
||||
+ calc_power(noise_imag,frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length);
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12;
|
||||
uint8_t R = srs_pdu->comb_size == 0 ? 2 : 4;
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
int subcarrier_log = nr_srs_info->sc_list[sc_idx]-subcarrier_offset;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if(sc_idx == 0) {
|
||||
LOG_I(NR_PHY,"______________________________ Rx antenna %i _______________________________\n", ant);
|
||||
}
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,":::::::::::::::::::::::::::::::::::: %i ::::::::::::::::::::::::::::::::::::\n", subcarrier_log/12);
|
||||
LOG_I(NR_PHY,"\t __lsRe__________lsIm__|____intRe_______intIm__|____noiRe_______noiIm_\n");
|
||||
}
|
||||
for(int r = 0; r<R; r++) {
|
||||
LOG_I(NR_PHY,"(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
|
||||
subcarrier_log+r,
|
||||
(int16_t)(srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]+r]&0xFFFF),
|
||||
(int16_t)((srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]+r]>>16)&0xFFFF),
|
||||
(int16_t)(srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]+r]&0xFFFF),
|
||||
(int16_t)((srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]+r]>>16)&0xFFFF),
|
||||
noise_real[ant*nr_srs_info->sc_list_length+sc_idx],
|
||||
noise_imag[ant*nr_srs_info->sc_list_length+sc_idx]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
LOG_I(NR_PHY,"noise_power = %u\n", *noise_power);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -62,4 +62,16 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
uint8_t nr_tti_rx,
|
||||
unsigned char symbol,
|
||||
uint32_t nb_re_pusch);
|
||||
|
||||
int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t *srs_generated_signal,
|
||||
int32_t **srs_received_signal,
|
||||
int32_t **srs_estimated_channel_freq,
|
||||
int32_t **srs_estimated_channel_time,
|
||||
int32_t **srs_estimated_channel_time_shifted,
|
||||
uint32_t *noise_power);
|
||||
#endif
|
||||
|
||||
@@ -108,22 +108,22 @@ EXTERN const char phi_M_ZC_6[6*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 */
|
||||
/* 0 */ -3, -1, 3, 3, -1, -3,
|
||||
/* 1 */ -3, 3, -1, -1, 3, -3,
|
||||
/* 2 */ -3, -3, -3, 3, 1, -3,
|
||||
/* 3 */ 1, 1, 1, 3, -1, -3,
|
||||
/* 4 */ 1, 1, 1, -3, -1, 3,
|
||||
/* 5 */ -3, 1, -1, -3, -3, -3,
|
||||
/* 6 */ -3, 1, 3, -3, -3, -3,
|
||||
/* 7 */ -3, -1, 1, -3, 1, -1,
|
||||
/* 8 */ -3, -1, -3, 1, -3, -3,
|
||||
/* 9 */ -3, -3, 1, -3, 3, -3,
|
||||
/* 0 */ -3, -1, 3, 3, -1, -3,
|
||||
/* 1 */ -3, 3, -1, -1, 3, -3,
|
||||
/* 2 */ -3, -3, -3, 3, 1, -3,
|
||||
/* 3 */ 1, 1, 1, 3, -1, -3,
|
||||
/* 4 */ 1, 1, 1, -3, -1, 3,
|
||||
/* 5 */ -3, 1, -1, -3, -3, -3,
|
||||
/* 6 */ -3, 1, 3, -3, -3, -3,
|
||||
/* 7 */ -3, -1, 1, -3, 1, -1,
|
||||
/* 8 */ -3, -1, -3, 1, -3, -3,
|
||||
/* 9 */ -3, -3, 1, -3, 3, -3,
|
||||
/* 10 */ -3, 1, 3, 1, -3, -3,
|
||||
/* 11 */ -3, -1, -3, 1, 1, -3,
|
||||
/* 12 */ 1, 1, 3, -1, -3, 3,
|
||||
/* 13 */ 1, 1, 3, 3, -1, 3,
|
||||
/* 14 */ 1, 1, 1, -3, 3, -1,
|
||||
/* 15 */ -1, 1, 1, -1, 3, -3,
|
||||
/* 15 */ 1, 1, 1, -1, 3, -3,
|
||||
/* 16 */ -3, -1, -1, -1, 3, -1,
|
||||
/* 17 */ -3, -3, -1, 1, -1, -3,
|
||||
/* 18 */ -3, -3, -3, 1, -3, -1,
|
||||
@@ -146,36 +146,36 @@ EXTERN const char phi_M_ZC_12[12*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
|
||||
/* 0 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
|
||||
/* 1 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
|
||||
/* 2 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
|
||||
/* 3 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
|
||||
/* 4 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
|
||||
/* 5 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
|
||||
/* 6 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
|
||||
/* 7 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
|
||||
/* 8 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
|
||||
/* 9 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
|
||||
/* 10 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
|
||||
/* 11 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
|
||||
/* 12 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
|
||||
/* 13 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
|
||||
/* 14 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
|
||||
/* 15 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
|
||||
/* 16 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
|
||||
/* 17 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
|
||||
/* 18 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
|
||||
/* 0 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
|
||||
/* 1 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
|
||||
/* 2 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
|
||||
/* 3 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
|
||||
/* 4 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
|
||||
/* 5 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
|
||||
/* 6 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
|
||||
/* 7 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
|
||||
/* 8 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
|
||||
/* 9 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
|
||||
/* 10 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
|
||||
/* 11 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
|
||||
/* 12 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
|
||||
/* 13 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
|
||||
/* 14 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
|
||||
/* 15 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
|
||||
/* 16 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
|
||||
/* 17 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
|
||||
/* 18 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
|
||||
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
|
||||
/* 20 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
|
||||
/* 21 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
|
||||
/* 22 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
|
||||
/* 23 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
|
||||
/* 24 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
|
||||
/* 25 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
|
||||
/* 26 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
|
||||
/* 27 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
|
||||
/* 28 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
|
||||
/* 29 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
|
||||
/* 20 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
|
||||
/* 21 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
|
||||
/* 22 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
|
||||
/* 23 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
|
||||
/* 24 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
|
||||
/* 25 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
|
||||
/* 26 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
|
||||
/* 27 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
|
||||
/* 28 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
|
||||
/* 29 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
|
||||
}
|
||||
#endif
|
||||
;
|
||||
@@ -185,36 +185,36 @@ EXTERN const char phi_M_ZC_18[18*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
|
||||
/* 0 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
|
||||
/* 1 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
|
||||
/* 2 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
|
||||
/* 3 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
|
||||
/* 4 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
|
||||
/* 5 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
|
||||
/* 6 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
|
||||
/* 7 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
|
||||
/* 8 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
|
||||
/* 9 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
|
||||
/* 10 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
|
||||
/* 11 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
|
||||
/* 12 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
|
||||
/* 13 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
|
||||
/* 14 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
|
||||
/* 15 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
|
||||
/* 16 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
|
||||
/* 17 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
|
||||
/* 18 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
|
||||
/* 19 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
|
||||
/* 20 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
|
||||
/* 21 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
|
||||
/* 22 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
|
||||
/* 23 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
|
||||
/* 24 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
|
||||
/* 25 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
|
||||
/* 26 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
|
||||
/* 27 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
|
||||
/* 0 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
|
||||
/* 1 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
|
||||
/* 2 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
|
||||
/* 3 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
|
||||
/* 4 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
|
||||
/* 5 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
|
||||
/* 6 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
|
||||
/* 7 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
|
||||
/* 8 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
|
||||
/* 9 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
|
||||
/* 10 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
|
||||
/* 11 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
|
||||
/* 12 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
|
||||
/* 13 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
|
||||
/* 14 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
|
||||
/* 15 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
|
||||
/* 16 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
|
||||
/* 17 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
|
||||
/* 18 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
|
||||
/* 19 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
|
||||
/* 20 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
|
||||
/* 21 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
|
||||
/* 22 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
|
||||
/* 23 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
|
||||
/* 24 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
|
||||
/* 25 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
|
||||
/* 26 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
|
||||
/* 27 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
|
||||
/* 28 */ -1, -3, 1, -3, -3, -3, 1, 1, 3, 3, -3, 3, 3, -3, -1, 3, -3, 1,
|
||||
/* 29 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
|
||||
/* 29 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
|
||||
}
|
||||
#endif
|
||||
;
|
||||
@@ -224,36 +224,36 @@ EXTERN const char phi_M_ZC_24[24*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
|
||||
/* 0 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
|
||||
/* 1 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
|
||||
/* 2 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
|
||||
/* 3 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
|
||||
/* 4 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
|
||||
/* 5 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
|
||||
/* 6 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
|
||||
/* 7 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
|
||||
/* 8 */ -3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
|
||||
/* 9 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
|
||||
/* 10 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
|
||||
/* 11 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
|
||||
/* 12 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
|
||||
/* 13 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
|
||||
/* 14 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
|
||||
/* 15 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
|
||||
/* 16 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
|
||||
/* 17 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
|
||||
/* 18 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
|
||||
/* 19 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
|
||||
/* 20 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
|
||||
/* 21 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
|
||||
/* 22 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
|
||||
/* 23 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
|
||||
/* 24 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
|
||||
/* 25 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
|
||||
/* 26 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
|
||||
/* 27 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
|
||||
/* 28 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
|
||||
/* 29 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
|
||||
/* 0 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
|
||||
/* 1 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
|
||||
/* 2 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
|
||||
/* 3 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
|
||||
/* 4 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
|
||||
/* 5 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
|
||||
/* 6 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
|
||||
/* 7 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
|
||||
/* 8 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
|
||||
/* 9 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
|
||||
/* 10 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
|
||||
/* 11 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
|
||||
/* 12 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
|
||||
/* 13 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
|
||||
/* 14 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
|
||||
/* 15 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
|
||||
/* 16 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
|
||||
/* 17 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
|
||||
/* 18 */ 3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
|
||||
/* 19 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
|
||||
/* 20 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
|
||||
/* 21 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
|
||||
/* 22 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
|
||||
/* 23 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
|
||||
/* 24 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
|
||||
/* 25 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
|
||||
/* 26 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
|
||||
/* 27 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
|
||||
/* 28 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
|
||||
/* 29 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
|
||||
}
|
||||
#endif
|
||||
;
|
||||
|
||||
@@ -35,7 +35,7 @@ void nr_generate_csi_rs(PHY_VARS_gNB *gNB,
|
||||
|
||||
NR_DL_FRAME_PARMS frame_parms=gNB->frame_parms;
|
||||
int32_t **txdataF = gNB->common_vars.txdataF;
|
||||
int txdataF_offset = (slot%2)*frame_parms.samples_per_slot_wCP;
|
||||
int txdataF_offset = slot*frame_parms.samples_per_slot_wCP;
|
||||
uint32_t **gold_csi_rs = gNB->nr_gold_csi_rs[slot];
|
||||
//*8(max allocation per RB)*2(QPSK))
|
||||
int csi_rs_length = frame_parms.N_RB_DL<<4;
|
||||
|
||||
@@ -66,12 +66,11 @@ void nr_pdcch_scrambling(uint32_t *in,
|
||||
}
|
||||
}
|
||||
|
||||
void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
NR_DL_FRAME_PARMS *frame_parms) {
|
||||
void nr_generate_dci(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
NR_DL_FRAME_PARMS *frame_parms) {
|
||||
|
||||
int16_t mod_dmrs[NR_MAX_CSET_DURATION][NR_MAX_PDCCH_DMRS_LENGTH>>1] __attribute__((aligned(16))); // 3 for the max coreset duration
|
||||
uint16_t cset_start_sc;
|
||||
@@ -84,7 +83,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
int n_rb;
|
||||
|
||||
// compute rb_offset and n_prb based on frequency allocation
|
||||
nr_fill_cce_list(gNB,0,pdcch_pdu_rel15);
|
||||
nr_cce_t cce_list[MAX_DCI_CORESET][NR_MAX_PDCCH_AGG_LEVEL];
|
||||
nr_fill_cce_list(cce_list,0,pdcch_pdu_rel15);
|
||||
get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset);
|
||||
cset_start_sc = frame_parms->first_carrier_offset + (pdcch_pdu_rel15->BWPStart + rb_offset) * NR_NB_SC_PER_RB;
|
||||
|
||||
@@ -175,7 +175,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
int reg_list_order[NR_MAX_PDCCH_AGG_LEVEL] = {};
|
||||
for (int p = 0; p < NR_MAX_PDCCH_AGG_LEVEL; p++) {
|
||||
for(int p2 = 0; p2 < dci_pdu->AggregationLevel; p2++) {
|
||||
if(gNB->cce_list[d][p2].reg_list[0].reg_idx == p * NR_NB_REG_PER_CCE) {
|
||||
if(cce_list[d][p2].reg_list[0].reg_idx == p * NR_NB_REG_PER_CCE) {
|
||||
reg_list_order[reg_list_index] = p2;
|
||||
reg_list_index++;
|
||||
break;
|
||||
@@ -191,7 +191,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) {
|
||||
|
||||
k = cset_start_sc + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].start_sc_idx;
|
||||
k = cset_start_sc + cce_list[d][cce_idx].reg_list[reg_in_cce_idx].start_sc_idx;
|
||||
|
||||
if (k >= frame_parms->ofdm_symbol_size)
|
||||
k -= frame_parms->ofdm_symbol_size;
|
||||
@@ -200,9 +200,9 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
|
||||
// dmrs index depends on reference point for k according to 38.211 7.4.1.3.2
|
||||
if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG)
|
||||
dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx) * 3;
|
||||
dmrs_idx = (cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx) * 3;
|
||||
else
|
||||
dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx + rb_offset) * 3;
|
||||
dmrs_idx = (cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx + rb_offset) * 3;
|
||||
|
||||
k_prime = 0;
|
||||
|
||||
@@ -250,21 +250,16 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
} // for (int d=0;d<pdcch_pdu_rel15->numDlDci;d++)
|
||||
}
|
||||
|
||||
void nr_generate_dci_top(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
nfapi_nr_dl_tti_pdcch_pdu *ul_dci_pdu,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
NR_DL_FRAME_PARMS *frame_parms) {
|
||||
void nr_generate_dci_top(processingData_L1tx_t *msgTx,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
NR_DL_FRAME_PARMS *frame_parms) {
|
||||
|
||||
AssertFatal(pdcch_pdu!=NULL || ul_dci_pdu!=NULL,"At least one pointer has to be !NULL\n");
|
||||
for (int i=0; i<msgTx->num_ul_pdcch; i++)
|
||||
nr_generate_dci(&msgTx->ul_pdcch_pdu[i].pdcch_pdu.pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms);
|
||||
for (int i=0; i<msgTx->num_dl_pdcch; i++)
|
||||
nr_generate_dci(&msgTx->pdcch_pdu[i].pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms);
|
||||
|
||||
if (pdcch_pdu) {
|
||||
nr_generate_dci(gNB,&pdcch_pdu->pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms);
|
||||
}
|
||||
if (ul_dci_pdu) {
|
||||
nr_generate_dci(gNB,&ul_dci_pdu->pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,13 +29,11 @@ uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format,
|
||||
nfapi_nr_rnti_type_e rnti_type,
|
||||
uint16_t N_RB);
|
||||
|
||||
void nr_generate_dci_top(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
nfapi_nr_dl_tti_pdcch_pdu *ul_pdcch_pdu,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
NR_DL_FRAME_PARMS *frame_parms);
|
||||
void nr_generate_dci_top(processingData_L1tx_t *msgTx,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
NR_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void nr_pdcch_scrambling(uint32_t *in,
|
||||
uint32_t size,
|
||||
@@ -57,6 +55,6 @@ void nr_fill_ul_dci(PHY_VARS_gNB *gNB,
|
||||
int slot,
|
||||
nfapi_nr_ul_dci_request_pdus_t *pdcch_pdu);
|
||||
|
||||
void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m,nfapi_nr_dl_tti_pdcch_pdu_rel15_t *);
|
||||
void nr_fill_cce_list(nr_cce_t cce_list[MAX_DCI_CORESET][NR_MAX_PDCCH_AGG_LEVEL], uint8_t m,nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15);
|
||||
|
||||
#endif //__PHY_NR_TRANSPORT_DCI__H
|
||||
|
||||
@@ -119,7 +119,7 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint16_t n_shift, uint8_t m) {
|
||||
|
||||
*/
|
||||
|
||||
void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15) {
|
||||
void nr_fill_cce_list(nr_cce_t cce_list[MAX_DCI_CORESET][NR_MAX_PDCCH_AGG_LEVEL], uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15) {
|
||||
|
||||
nr_cce_t* cce;
|
||||
nr_reg_t* reg;
|
||||
@@ -156,7 +156,7 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r
|
||||
|
||||
if (pdcch_pdu_rel15->dci_pdu[d].RNTI != 0xFFFF) LOG_D(PHY, "CCE list generation for candidate %d: bundle size %d ilv size %d CceIndex %d\n", m, bsize, R, pdcch_pdu_rel15->dci_pdu[d].CceIndex);
|
||||
for (uint8_t cce_idx=0; cce_idx<L; cce_idx++) {
|
||||
cce = &gNB->cce_list[d][cce_idx];
|
||||
cce = &cce_list[d][cce_idx];
|
||||
cce->cce_idx = pdcch_pdu_rel15->dci_pdu[d].CceIndex + cce_idx;
|
||||
LOG_D(PHY, "cce_idx %d\n", cce->cce_idx);
|
||||
|
||||
|
||||
@@ -47,70 +47,11 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out) {
|
||||
|
||||
uint8_t reset, b_idx;
|
||||
uint32_t x1, x2, s=0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 1);
|
||||
reset = 1;
|
||||
x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
|
||||
for (int i=0; i<size; i++) {
|
||||
b_idx = i&0x1f;
|
||||
if (b_idx==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
if (i)
|
||||
out++;
|
||||
}
|
||||
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx;
|
||||
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 0);
|
||||
uint32_t* out)
|
||||
{
|
||||
nr_codeword_scrambling(in, size, q, Nid, n_RNTI, out);
|
||||
}
|
||||
|
||||
void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out) {
|
||||
|
||||
uint32_t x1, x2, s=0,in32;
|
||||
|
||||
x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
|
||||
s=lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
#if defined(__AVX2__)
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
in32=_mm256_movemask_epi8(_mm256_slli_epi16(((__m256i*)in)[i],7));
|
||||
out[i]=(in32^s);
|
||||
//printf("in[%d] %x => %x\n",i,in32,out[i]);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
#elif defined(__SSE4__)
|
||||
_m128i *in128;
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
in128=&((__m128i*)in)[i<<1];
|
||||
((uint16_t*)&in32)[0] = _mm128_movemask_epi8(_mm256_slli_epi16(in128[0],7));
|
||||
((uint16_t*)&in32)[1] = _mm128_movemask_epi8(_mm256_slli_epi16(in128[1],7));
|
||||
out[i]=(in32^s);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
//#elsif defined(__arm__) || defined(__aarch64)
|
||||
|
||||
#else
|
||||
nr_pdsch_codeword_scrambling(in,
|
||||
size,
|
||||
q,
|
||||
Nid,
|
||||
n_RNTI,
|
||||
out);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
int frame,
|
||||
int slot) {
|
||||
@@ -182,12 +123,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * rel15->nrOfLayers] __attribute__((aligned(32)));
|
||||
bzero(output,rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * rel15->nrOfLayers);
|
||||
start_meas(dlsch_encoding_stats);
|
||||
nr_dlsch_encoding(gNB,
|
||||
harq->pdu, frame, slot, dlsch, frame_parms, output,
|
||||
tinput,tprep,tparity,toutput,
|
||||
dlsch_rate_matching_stats,
|
||||
dlsch_interleaving_stats,
|
||||
dlsch_segmentation_stats);
|
||||
|
||||
if (nr_dlsch_encoding(gNB,
|
||||
harq->pdu, frame, slot, dlsch, frame_parms,output,tinput,tprep,tparity,toutput,
|
||||
dlsch_rate_matching_stats,
|
||||
dlsch_interleaving_stats,
|
||||
dlsch_segmentation_stats) == -1)
|
||||
return;
|
||||
stop_meas(dlsch_encoding_stats);
|
||||
#ifdef DEBUG_DLSCH
|
||||
printf("PDSCH encoding:\nPayload:\n");
|
||||
@@ -212,12 +154,12 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
||||
memset((void*)scrambled_output[q], 0, (encoded_length>>5)*sizeof(uint32_t));
|
||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
||||
nr_pdsch_codeword_scrambling_optim(output,
|
||||
encoded_length,
|
||||
q,
|
||||
rel15->dataScramblingId,
|
||||
rel15->rnti,
|
||||
scrambled_output[q]);
|
||||
nr_pdsch_codeword_scrambling(output,
|
||||
encoded_length,
|
||||
q,
|
||||
rel15->dataScramblingId,
|
||||
rel15->rnti,
|
||||
scrambled_output[q]);
|
||||
|
||||
stop_meas(dlsch_scrambling_stats);
|
||||
#ifdef DEBUG_DLSCH
|
||||
@@ -275,10 +217,10 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
if (start_sc >= frame_parms->ofdm_symbol_size)
|
||||
start_sc -= frame_parms->ofdm_symbol_size;
|
||||
|
||||
int txdataF_offset = (slot%2)*frame_parms->samples_per_slot_wCP;
|
||||
int txdataF_offset = slot*frame_parms->samples_per_slot_wCP;
|
||||
int16_t **txdataF_precoding = (int16_t **)malloc16(rel15->nrOfLayers*sizeof(int16_t *));
|
||||
for (int layer = 0; layer<rel15->nrOfLayers; layer++)
|
||||
txdataF_precoding[layer] = (int16_t *)malloc16(2*2*14*frame_parms->ofdm_symbol_size*sizeof(int16_t));
|
||||
txdataF_precoding[layer] = (int16_t *)malloc16(2*14*frame_parms->ofdm_symbol_size*sizeof(int16_t));
|
||||
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\tnb_re %d,nb_layers %d)\n",
|
||||
@@ -377,12 +319,12 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
/* Map DMRS Symbol */
|
||||
if ( (dmrs_symbol_map & (1 << l)) &&
|
||||
(k == ((start_sc+get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type))%(frame_parms->ofdm_symbol_size)))) {
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[dmrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[(dmrs_idx<<1) + 1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[dmrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 ] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[(dmrs_idx<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("dmrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
||||
dmrs_idx, l, k, k_prime, n, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
dmrs_idx, l, k, k_prime, n, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1]);
|
||||
#endif
|
||||
dmrs_idx++;
|
||||
k_prime++;
|
||||
@@ -390,8 +332,8 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
n+=(k_prime)?0:1;
|
||||
}
|
||||
else if(is_ptrs_re){
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("ptrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d, mod_ptrs: %d %d\n",
|
||||
ptrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
@@ -401,19 +343,19 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
/* Map DATA Symbol */
|
||||
else if( ptrs_symbol || allowed_xlsch_re_in_dmrs_symbol(k,start_sc,frame_parms->ofdm_symbol_size,rel15->numDmrsCdmGrpsNoData,dmrs_Type)) {
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (amp * tx_layers[ap][m<<1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (amp * tx_layers[ap][(m<<1) + 1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = (amp * tx_layers[ap][m<<1]) >> 15;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (amp * tx_layers[ap][(m<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
m, l, k, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1]);
|
||||
#endif
|
||||
m++;
|
||||
}
|
||||
/* mute RE */
|
||||
else {
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
|
||||
}
|
||||
if (++k >= frame_parms->ofdm_symbol_size)
|
||||
k -= frame_parms->ofdm_symbol_size;
|
||||
@@ -429,7 +371,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
// fix the alignment issues later, use 64-bit SIMD below instead of 128.
|
||||
if (0/*(frame_parms->N_RB_DL&1)==0*/) {
|
||||
__m128i *txF=(__m128i*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+start_sc+txdataF_offset)<<1)];
|
||||
__m128i *txF=(__m128i*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+start_sc)<<1)];
|
||||
|
||||
__m128i *txl = (__m128i*)&tx_layers[ap][m<<1];
|
||||
__m128i amp128=_mm_set1_epi16(amp);
|
||||
@@ -438,7 +380,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
} //RE loop, first part
|
||||
m+=upper_limit;
|
||||
if (remaining_re > 0) {
|
||||
txF = (__m128i*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+txdataF_offset)<<1)];
|
||||
txF = (__m128i*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size)<<1)];
|
||||
txl = (__m128i*)&tx_layers[ap][m<<1];
|
||||
for (int i=0; i<(remaining_re>>2); i++) {
|
||||
txF[i] = _mm_mulhrs_epi16(amp128,txl[i]);
|
||||
@@ -446,7 +388,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
}
|
||||
else {
|
||||
__m64 *txF=(__m64*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+start_sc+txdataF_offset)<<1)];
|
||||
__m64 *txF=(__m64*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+start_sc)<<1)];
|
||||
|
||||
__m64 *txl = (__m64*)&tx_layers[ap][m<<1];
|
||||
__m64 amp64=_mm_set1_pi16(amp);
|
||||
@@ -456,31 +398,31 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
if ((i&1) > 0)
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, start_sc+(i>>1), txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1) + 1 + (2*txdataF_offset)]);
|
||||
m, l, start_sc+(i>>1), txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1)],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1) + 1]);
|
||||
#endif
|
||||
/* handle this, mute RE */
|
||||
/*else {
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
|
||||
}*/
|
||||
} //RE loop, first part
|
||||
m+=upper_limit;
|
||||
if (remaining_re > 0) {
|
||||
txF = (__m64*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+txdataF_offset)<<1)];
|
||||
txF = (__m64*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size)<<1)];
|
||||
txl = (__m64*)&tx_layers[ap][m<<1];
|
||||
for (int i=0; i<(remaining_re>>1); i++) {
|
||||
txF[i] = _mm_mulhrs_pi16(amp64,txl[i]);
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
if ((i&1) > 0)
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, i>>1, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) + 1 + (2*txdataF_offset)]);
|
||||
m, l, i>>1, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) ],
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) + 1]);
|
||||
#endif
|
||||
/* handle this, mute RE */
|
||||
/*else {
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = 0;
|
||||
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
|
||||
}*/
|
||||
} //RE loop, second part
|
||||
} //
|
||||
@@ -517,7 +459,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
if (pmi == 0) {//unitary Precoding
|
||||
if(ap<rel15->nrOfLayers)
|
||||
memcpy((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + txdataF_offset + k],
|
||||
(void*)&txdataF_precoding[ap][2*(l*frame_parms->ofdm_symbol_size + txdataF_offset+ k)],
|
||||
(void*)&txdataF_precoding[ap][2*(l*frame_parms->ofdm_symbol_size + k)],
|
||||
NR_NB_SC_PER_RB*sizeof(int32_t));
|
||||
else
|
||||
memset((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + txdataF_offset + k],
|
||||
@@ -558,7 +500,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
for (int i=0; i<NR_NB_SC_PER_RB; i++) {
|
||||
int32_t re_offset = l*frame_parms->ofdm_symbol_size + k;
|
||||
int32_t precodatatx_F = nr_layer_precoder(txdataF_precoding, W_prec, rel15->nrOfLayers, re_offset+txdataF_offset);
|
||||
int32_t precodatatx_F = nr_layer_precoder(txdataF_precoding, W_prec, rel15->nrOfLayers, re_offset);
|
||||
((int16_t*)txdataF[ap])[(re_offset<<1) + (2*txdataF_offset)] = ((int16_t *) &precodatatx_F)[0];
|
||||
((int16_t*)txdataF[ap])[(re_offset<<1) + 1 + (2*txdataF_offset)] = ((int16_t *) &precodatatx_F)[1];
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
|
||||
@@ -110,7 +110,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
a_segments = a_segments/273 +1;
|
||||
}
|
||||
|
||||
uint16_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
uint32_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
NR_gNB_DLSCH_t *dlsch = malloc16(sizeof(NR_gNB_DLSCH_t));
|
||||
AssertFatal(dlsch, "cannot allocate dlsch\n");
|
||||
bzero(dlsch,sizeof(NR_gNB_DLSCH_t));
|
||||
@@ -262,7 +262,7 @@ void ldpc8blocks( void *p) {
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
|
||||
for (int i =0; i<16; i++)
|
||||
printf("output ratematching e[%d]= %d r_offset %u\n", i,harq->e[i+r_offset], r_offset);
|
||||
printf("output ratematching e[%d]= %d r_offset %u\n", i,e[i], r_offset);
|
||||
|
||||
#endif
|
||||
nr_interleaving_ldpc(E,
|
||||
@@ -384,11 +384,11 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
//d_tmp[r] = &harq->d[r][0];
|
||||
//channel_input[r] = &harq->d[r][0];
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
LOG_D(PHY,"Encoder: B %d F %d \n",harq->B, impp->F);
|
||||
LOG_D(PHY,"Encoder: B %d F %d \n",harq->B, impp.F);
|
||||
LOG_D(PHY,"start ldpc encoder segment %d/%d\n",r,impp.n_segments);
|
||||
LOG_D(PHY,"input %d %d %d %d %d \n", harq->c[r][0], harq->c[r][1], harq->c[r][2],harq->c[r][3], harq->c[r][4]);
|
||||
|
||||
for (int cnt =0 ; cnt < 22*(*Zc)/8; cnt ++) {
|
||||
for (int cnt =0 ; cnt < 22*(*impp.Zc)/8; cnt ++) {
|
||||
LOG_D(PHY,"%d ", harq->c[r][cnt]);
|
||||
}
|
||||
|
||||
@@ -419,6 +419,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
notifiedFIFO_elt_t *req=pullTpool(&nf, gNB->threadPool);
|
||||
delNotifiedFIFO_elt(req);
|
||||
nbJobs--;
|
||||
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
return 0;
|
||||
|
||||
@@ -219,8 +219,7 @@ void nr_init_pbch_interleaver(uint8_t *interleaver) {
|
||||
*(interleaver+i) = *(nr_pbch_payload_interleaving_pattern+j_ssb++);
|
||||
}
|
||||
|
||||
int nr_generate_pbch(NR_gNB_PBCH *pbch,
|
||||
nfapi_nr_dl_tti_ssb_pdu *ssb_pdu,
|
||||
int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu,
|
||||
uint8_t *interleaver,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
@@ -239,6 +238,8 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
|
||||
uint64_t a_reversed=0;
|
||||
LOG_D(PHY, "PBCH generation started\n");
|
||||
///Payload generation
|
||||
NR_gNB_PBCH m_pbch;
|
||||
NR_gNB_PBCH *pbch = &m_pbch;
|
||||
memset((void *)pbch, 0, sizeof(NR_gNB_PBCH));
|
||||
pbch->pbch_a=0;
|
||||
uint8_t ssb_index = ssb_pdu->ssb_pdu_rel15.SsbBlockIndex;
|
||||
|
||||
@@ -24,55 +24,47 @@
|
||||
|
||||
//#define NR_PSS_DEBUG
|
||||
|
||||
int nr_generate_pss( int16_t *d_pss,
|
||||
int32_t *txdataF,
|
||||
int nr_generate_pss( int32_t *txdataF,
|
||||
int16_t amp,
|
||||
uint8_t ssb_start_symbol,
|
||||
nfapi_nr_config_request_scf_t* config,
|
||||
NR_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
int i,k,l,m;
|
||||
int16_t a;
|
||||
int16_t x[NR_PSS_LENGTH];
|
||||
const int x_initial[7] = {0, 1, 1 , 0, 1, 1, 1};
|
||||
|
||||
uint8_t Nid2 = config->cell_config.phy_cell_id.value % 3;
|
||||
|
||||
/// Sequence generation
|
||||
for (i=0; i < 7; i++)
|
||||
for (int i=0; i < 7; i++)
|
||||
x[i] = x_initial[i];
|
||||
|
||||
for (i=0; i < (NR_PSS_LENGTH - 7); i++) {
|
||||
for (int i=0; i < (NR_PSS_LENGTH - 7); i++) {
|
||||
x[i+7] = (x[i + 4] + x[i]) %2;
|
||||
}
|
||||
|
||||
for (i=0; i < NR_PSS_LENGTH; i++) {
|
||||
m = (i + 43*Nid2)%(NR_PSS_LENGTH);
|
||||
d_pss[i] = (1 - 2*x[m]) * 23170;
|
||||
}
|
||||
|
||||
#ifdef NR_PSS_DEBUG
|
||||
write_output("d_pss.m", "d_pss", (void*)d_pss, NR_PSS_LENGTH, 1, 0);
|
||||
printf("PSS: ofdm_symbol_size %d, first_carrier_offset %d\n",frame_parms->ofdm_symbol_size,frame_parms->first_carrier_offset);
|
||||
#endif
|
||||
|
||||
/// Resource mapping
|
||||
a = amp;
|
||||
|
||||
// PSS occupies a predefined position (subcarriers 56-182, symbol 0) within the SSB block starting from
|
||||
k = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier + 56; //and
|
||||
if (k>= frame_parms->ofdm_symbol_size) k-=frame_parms->ofdm_symbol_size;
|
||||
// PSS occupies a predefined position (subcarriers 56-182, symbol 0) within the SSB block starting from
|
||||
int k = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier + 56; //and
|
||||
if (k>= frame_parms->ofdm_symbol_size) k-=frame_parms->ofdm_symbol_size;
|
||||
|
||||
l = ssb_start_symbol;
|
||||
int l = ssb_start_symbol;
|
||||
|
||||
for (m = 0; m < NR_PSS_LENGTH; m++) {
|
||||
// printf("pss: writing position k %d / %d\n",k,frame_parms->ofdm_symbol_size);
|
||||
((int16_t*)txdataF)[2*(l*frame_parms->ofdm_symbol_size + k)] = (a * d_pss[m]) >> 15;
|
||||
k++;
|
||||
uint8_t Nid2 = config->cell_config.phy_cell_id.value % 3;
|
||||
for (int i = 0; i < NR_PSS_LENGTH; i++) {
|
||||
int m = (i + 43*Nid2)%(NR_PSS_LENGTH);
|
||||
int16_t d_pss = (1 - 2*x[m]) * 23170;
|
||||
// printf("pss: writing position k %d / %d\n",k,frame_parms->ofdm_symbol_size);
|
||||
((int16_t*)txdataF)[2*(l*frame_parms->ofdm_symbol_size + k)] = (((int16_t)amp) * d_pss) >> 15;
|
||||
k++;
|
||||
|
||||
if (k >= frame_parms->ofdm_symbol_size)
|
||||
k-=frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if (k >= frame_parms->ofdm_symbol_size)
|
||||
k-=frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
|
||||
#ifdef NR_PSS_DEBUG
|
||||
LOG_M("pss_0.m", "pss_0",
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "nr_transport_common_proto.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
void nr_codeword_scrambling(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out)
|
||||
{
|
||||
uint32_t x1;
|
||||
uint32_t x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
uint32_t s = 0;
|
||||
|
||||
#if defined(__AVX2__)
|
||||
s=lte_gold_generic(&x1, &x2, 1);
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
__m256i c = ((__m256i*)in)[i];
|
||||
uint32_t in32 = _mm256_movemask_epi8(_mm256_slli_epi16(c,7));
|
||||
out[i]=(in32^s);
|
||||
//printf("in[%d] %x => %x\n",i,in32,out[i]);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
#elif defined(__SSE4__)
|
||||
s=lte_gold_generic(&x1, &x2, 1);
|
||||
__m128i *in128;
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
in128=&((__m128i*)in)[i<<1];
|
||||
uint32_t in32;
|
||||
((uint16_t*)&in32)[0] = _mm_movemask_epi8(_mm_slli_epi16(in128[0],7));
|
||||
((uint16_t*)&in32)[1] = _mm_movemask_epi8(_mm_slli_epi16(in128[1],7));
|
||||
out[i]=(in32^s);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
//#elsif defined(__arm__) || defined(__aarch64)
|
||||
#else
|
||||
uint8_t reset = 1;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 1);
|
||||
for (int i = 0; i < size; i++) {
|
||||
const uint8_t b_idx = i&0x1f;
|
||||
if (b_idx==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
if (i)
|
||||
out++;
|
||||
}
|
||||
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx;
|
||||
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void nr_codeword_unscrambling(int16_t* llr, uint32_t size, uint8_t q, uint32_t Nid, uint32_t n_RNTI)
|
||||
{
|
||||
uint32_t x1;
|
||||
uint32_t x2 = (n_RNTI << 15) + (q << 14) + Nid;
|
||||
uint32_t s = 0;
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
uint8_t *s8=(uint8_t *)&s;
|
||||
__m128i *llr128 = (__m128i*)llr;
|
||||
s = lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
for (int i = 0, j = 0; i < ((size >> 5) + ((size & 0x1f) > 0 ? 1 : 0)); i++, j += 4) {
|
||||
llr128[j] = _mm_mullo_epi16(llr128[j],byte2m128i[s8[0]]);
|
||||
llr128[j+1] = _mm_mullo_epi16(llr128[j+1],byte2m128i[s8[1]]);
|
||||
llr128[j+2] = _mm_mullo_epi16(llr128[j+2],byte2m128i[s8[2]]);
|
||||
llr128[j+3] = _mm_mullo_epi16(llr128[j+3],byte2m128i[s8[3]]);
|
||||
s = lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
#else
|
||||
uint8_t reset = 1;
|
||||
|
||||
for (uint32_t i=0; i<size; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
}
|
||||
if (((s>>(i&0x1f))&1)==1)
|
||||
llr[i] = -llr[i];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -23,42 +23,34 @@
|
||||
|
||||
//#define NR_SSS_DEBUG
|
||||
|
||||
int nr_generate_sss( int16_t *d_sss,
|
||||
int32_t *txdataF,
|
||||
int nr_generate_sss( int32_t *txdataF,
|
||||
int16_t amp,
|
||||
uint8_t ssb_start_symbol,
|
||||
nfapi_nr_config_request_scf_t* config,
|
||||
NR_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
int i,k,l;
|
||||
int m0, m1;
|
||||
int Nid, Nid1, Nid2;
|
||||
//int16_t a;
|
||||
int16_t x0[NR_SSS_LENGTH], x1[NR_SSS_LENGTH];
|
||||
int16_t x0[NR_SSS_LENGTH];
|
||||
int16_t x1[NR_SSS_LENGTH];
|
||||
const int x0_initial[7] = { 1, 0, 0, 0, 0, 0, 0 };
|
||||
const int x1_initial[7] = { 1, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
/// Sequence generation
|
||||
Nid = config->cell_config.phy_cell_id.value;
|
||||
Nid2 = Nid % 3;
|
||||
Nid1 = (Nid - Nid2)/3;
|
||||
int Nid = config->cell_config.phy_cell_id.value;
|
||||
int Nid2 = Nid % 3;
|
||||
int Nid1 = (Nid - Nid2)/3;
|
||||
|
||||
for ( i=0 ; i < 7 ; i++) {
|
||||
for (int i=0; i < 7; i++) {
|
||||
x0[i] = x0_initial[i];
|
||||
x1[i] = x1_initial[i];
|
||||
}
|
||||
|
||||
for ( i=0 ; i < NR_SSS_LENGTH - 7 ; i++) {
|
||||
for (int i=0; i < NR_SSS_LENGTH - 7; i++) {
|
||||
x0[i+7] = (x0[i + 4] + x0[i]) % 2;
|
||||
x1[i+7] = (x1[i + 1] + x1[i]) % 2;
|
||||
}
|
||||
|
||||
m0 = 15*(Nid1/112) + (5*Nid2);
|
||||
m1 = Nid1 % 112;
|
||||
|
||||
for (i = 0; i < NR_SSS_LENGTH ; i++) {
|
||||
d_sss[i] = (1 - 2*x0[(i + m0) % NR_SSS_LENGTH] ) * (1 - 2*x1[(i + m1) % NR_SSS_LENGTH] ) * 23170;
|
||||
}
|
||||
int m0 = 15*(Nid1/112) + (5*Nid2);
|
||||
int m1 = Nid1 % 112;
|
||||
|
||||
#ifdef NR_SSS_DEBUG
|
||||
write_output("d_sss.m", "d_sss", (void*)d_sss, NR_SSS_LENGTH, 1, 1);
|
||||
@@ -66,17 +58,18 @@ int nr_generate_sss( int16_t *d_sss,
|
||||
|
||||
/// Resource mapping
|
||||
|
||||
// SSS occupies a predefined position (subcarriers 56-182, symbol 2) within the SSB block starting from
|
||||
k = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier + 56; //and
|
||||
l = ssb_start_symbol + 2;
|
||||
// SSS occupies a predefined position (subcarriers 56-182, symbol 2) within the SSB block starting from
|
||||
int k = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier + 56; //and
|
||||
int l = ssb_start_symbol + 2;
|
||||
|
||||
for (int m = 0; m < NR_SSS_LENGTH; m++) {
|
||||
((int16_t*)txdataF)[2*(l*frame_parms->ofdm_symbol_size + k)] = (amp * d_sss[m]) >> 15;
|
||||
k++;
|
||||
for (int i = 0; i < NR_SSS_LENGTH; i++) {
|
||||
int16_t d_sss = (1 - 2*x0[(i + m0) % NR_SSS_LENGTH] ) * (1 - 2*x1[(i + m1) % NR_SSS_LENGTH] ) * 23170;
|
||||
((int16_t*)txdataF)[2*(l*frame_parms->ofdm_symbol_size + k)] = (((int16_t)amp) * d_sss) >> 15;
|
||||
k++;
|
||||
|
||||
if (k >= frame_parms->ofdm_symbol_size)
|
||||
k-=frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if (k >= frame_parms->ofdm_symbol_size)
|
||||
k-=frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
#ifdef NR_SSS_DEBUG
|
||||
// write_output("sss_0.m", "sss_0", (void*)txdataF[0][l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 1);
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user