diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index ba5ce49e8d86889b77280bf3fb715a4f0139b21f..e60651393513bab12e18fafe7b9174f89dbecd29 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -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('/') diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 9d2c75363d0e33d629024425e0f6201552126a1c..05bac18900cc67d6b528f02f916052b36cec7480 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2045,6 +2045,35 @@ class OaiCiTest(): else: return -2 + + def Iperf_analyzeV2BIDIR(self, lock, UE_IPAddress, device_id, statusQueue,server_filename,client_filename): + #server file is unused for the moment + if (not os.path.isfile(client_filename)): + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from client log') + return + report=[] + report_msg='Client Report:\n' + with open(client_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 client log') + + + 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,14 +2371,19 @@ 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 @@ -2363,7 +2397,7 @@ class OaiCiTest(): #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) + 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 + '\"' SSH.command(cmd,'\$',int(iperf_time)*5.0) @@ -2382,7 +2416,7 @@ 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 + '\"' SSH.command(cmd,'\$',5) @@ -2407,6 +2441,38 @@ class OaiCiTest(): SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 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 side EPC + SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) + server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + + iperf_cmd = 'echo $USER; nohup /usr/local/bin/iperf3 -s 2>&1 > ' + server_filename + cmd = 'docker exec -d 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) + client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + 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) + 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, '.') + #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") @@ -2472,6 +2538,30 @@ 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 side EPC + SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) + server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + 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) + client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + 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") diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index e825b2f7bd694b3abdeb3d7c7c69024ebf65ada5..33792f6ca4cb2c57f6179c1460ef43f3d2b0d183 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -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() diff --git a/ci-scripts/main.py b/ci-scripts/main.py index d8cad1c96224bd963ea128cba0690fe34fa8144c..43772fb655f3b65bce5a8abd2b115d7e64077272 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -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: diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index baf3a007251fd3aef8aa5829fa52eb5d6bf92b1e..da20998297faa91d02a3be634ff3fc3f05790dba 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -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) diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index 864e31fc1f6fafaa15113985276fc710b76ca4a9..1b65c7af4f0b78d2b8b2c1680857bf9ef7362e0f 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -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") diff --git a/ci-scripts/ran_dashboard/ran_dashboard_cfg.yaml b/ci-scripts/ran_dashboard/ran_dashboard_cfg.yaml index 144fcd25a5ec986a048776cb78caed86c6340487..8b311cf6ac09050bebbdd530ed4e15585347e0b5 100644 --- a/ci-scripts/ran_dashboard/ran_dashboard_cfg.yaml +++ b/ci-scripts/ran_dashboard/ran_dashboard_cfg.yaml @@ -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)' diff --git a/ci-scripts/stats_monitor.py b/ci-scripts/stats_monitor.py index e732325fa1d1061121a3188f332044e121bd8fce..d7cad7ae554b7aa427030c569b3bf3ac31db79af 100755 --- a/ci-scripts/stats_monitor.py +++ b/ci-scripts/stats_monitor.py @@ -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) diff --git a/ci-scripts/xml_files/container_4g_rfsim.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml similarity index 87% rename from ci-scripts/xml_files/container_4g_rfsim.xml rename to ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml index 2466f55800e6d3b7f21358f4a3a6318fb3777e5b..fd254f185677c81ee189f636dbef00b7eb3bbf21 100644 --- a/ci-scripts/xml_files/container_4g_rfsim.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml similarity index 87% rename from ci-scripts/xml_files/container_4g_rfsim_down.xml rename to ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml index 651447a9ca480f40e9b0e3ede56da36ed92feb04..1c3b1d5a7c3b37cd901258d110cae313c14069a4 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ff9461b9361d490d8574d0a89034444449db4c0 --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml new file mode 100644 index 0000000000000000000000000000000000000000..6db1dfd9de73d167e0c58424c650cdf7dd867fc4 --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml new file mode 100644 index 0000000000000000000000000000000000000000..f00e277c36f3bb7e91ad96f4737c895017323967 --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d03d56ff4ce72c2031c96fc6781ba8118ecaa32 --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml new file mode 100644 index 0000000000000000000000000000000000000000..52e1ac7de18ee874300c685e2c0ae62282556e81 --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml new file mode 100644 index 0000000000000000000000000000000000000000..0a721c5091697d0e2eba6daeed239b34f4dfc9bf --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml new file mode 100644 index 0000000000000000000000000000000000000000..cdaee430efc3c092a5cfd60cb95e94d10c0c7975 --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml @@ -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> diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml new file mode 100644 index 0000000000000000000000000000000000000000..7e27bac73c4200339e1cf94e06a568150a5c130c --- /dev/null +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml @@ -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> diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 55f6f4376ea275760a7c41aa5e7856a5c1860548..574286fbc26e7fc068f2f10a3cd66329331063d0 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -37,6 +37,8 @@ 070003 070002 000001 + 070002 + 000001 050000 050001 010002 @@ -155,6 +157,14 @@ <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>idefix</id> + <iperf_profile>single-ue</iperf_profile> + </testCase> <testCase id="080000"> <class>Terminate_eNB</class> diff --git a/ci-scripts/xml_files/fr1_sa_quectel.xml b/ci-scripts/xml_files/fr1_sa_quectel.xml index 28c6b2e9e011efb64958659d141519cfbcc0c30e..8b0fc3b54131b992a5b7d0ddde20e580cf3d3cd3 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel.xml @@ -34,6 +34,7 @@ 050001 070000 070001 + 070002 000001 010002 080000 @@ -121,6 +122,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> diff --git a/ci-scripts/yaml_files/4g_rfsimulator/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md similarity index 100% rename from ci-scripts/yaml_files/4g_rfsimulator/README.md rename to ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md diff --git a/ci-scripts/yaml_files/4g_rfsimulator/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml similarity index 100% rename from ci-scripts/yaml_files/4g_rfsimulator/docker-compose.yml rename to ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml diff --git a/ci-scripts/yaml_files/4g_rfsimulator/oai_db.cql b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/oai_db.cql similarity index 100% rename from ci-scripts/yaml_files/4g_rfsimulator/oai_db.cql rename to ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/oai_db.cql diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..6e3916b8ca71af1828a977282d5457c14441472b --- /dev/null +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml @@ -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" diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..4c1ceb424a09e08d3d5d5a316500fb7efda90f9e --- /dev/null +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml @@ -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" diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..4a61181afbb620fa64d839e3b82fac5291eddfc5 --- /dev/null +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml @@ -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" diff --git a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3424780791e5b1efaf468781bb99b698fade02e0 --- /dev/null +++ b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml @@ -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" diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index f2eda66fc0e02e128b014f106185f37ea5e34baa..7160a526200d6f4ca2d106e5179e8a08fdcce518 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -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") diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 68aef48c6bec0f27ed08f45f42d62f8ce8ee10a4..92bcfd88e2e577e27b3d481321e770e1b6d8ed8b 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -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 - - execlist="" - if [ "$eNB" = "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 + + 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 diff --git a/cmake_targets/install_external_packages.ubuntu20 b/cmake_targets/install_external_packages.ubuntu20 index 33e558a2349d80ca898a72d02defa4bac319f995..e58f5c9bb16ec52c5ede52a01a0eda26f402fe72 100755 --- a/cmake_targets/install_external_packages.ubuntu20 +++ b/cmake_targets/install_external_packages.ubuntu20 @@ -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 diff --git a/cmake_targets/phy_simulators b/cmake_targets/phy_simulators new file mode 120000 index 0000000000000000000000000000000000000000..2a12e92f3e9e3938cd869184ab1b8d3f78aa1240 --- /dev/null +++ b/cmake_targets/phy_simulators @@ -0,0 +1 @@ +ran_build/ \ No newline at end of file diff --git a/cmake_targets/phy_simulators/CMakeLists.txt b/cmake_targets/phy_simulators/CMakeLists.txt deleted file mode 100755 index f8c659959f36a6558a2cf76f3c8a6ac1676a9be0..0000000000000000000000000000000000000000 --- a/cmake_targets/phy_simulators/CMakeLists.txt +++ /dev/null @@ -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) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 1df7808b0f7db55b6bc500fa725dfc154f49169a..ec5de6a0d1b4272afafefd37d1a177338e81b95c 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -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 } diff --git a/doc/BUILD.md b/doc/BUILD.md index 40b63ac697587fd2d4348dfeeb8e480ad3bd4cdf..852a2486595740315eb6b6427c43f40e514969a3 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -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**. diff --git a/docker/Dockerfile.phySim.rhel8.2 b/docker/Dockerfile.phySim.rhel8.2 index 141a80cb50d80052e41cafdaf18415e8e5080bd6..9f4b27ec0e4255a4b2bb4938fd67359e561a4e6f 100644 --- a/docker/Dockerfile.phySim.rhel8.2 +++ b/docker/Dockerfile.phySim.rhel8.2 @@ -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 diff --git a/openair1/PHY/NR_TRANSPORT/nr_csi_rs.c b/openair1/PHY/NR_TRANSPORT/nr_csi_rs.c index ac0eac8a79c32683ba95053da38336183f95727f..4f5baacc34e0fc1c8af47aeff418882a5132ea96 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_csi_rs.c +++ b/openair1/PHY/NR_TRANSPORT/nr_csi_rs.c @@ -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]; int16_t mod_csi[frame_parms.symbols_per_slot][NR_MAX_CSI_RS_LENGTH>>1] __attribute__((aligned(16)));; uint16_t b = csi_params.freq_domain; diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index b776d442241e54f934aad514b8127836ebbd6dcb..2a24a9568f552ded9ed2dfa51532c453bfd732f0 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -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,17 +250,17 @@ 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, - processingData_L1tx_t *msgTx, + +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) { for (int i=0; i<msgTx->num_ul_pdcch; i++) - nr_generate_dci(gNB,&msgTx->ul_pdcch_pdu[i].pdcch_pdu.pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms); + 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(gNB,&msgTx->pdcch_pdu[i].pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms); + nr_generate_dci(&msgTx->pdcch_pdu[i].pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms); } diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.h b/openair1/PHY/NR_TRANSPORT/nr_dci.h index 0077bd2f38c9ad51a39214a131e6b75459c7478d..bdc8509d12a2768b033370bede1b0da97b589c90 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.h +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.h @@ -29,8 +29,7 @@ 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, - processingData_L1tx_t *msgTx, +void nr_generate_dci_top(processingData_L1tx_t *msgTx, uint32_t **gold_pdcch_dmrs, int32_t *txdataF, int16_t amp, @@ -56,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 diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c index 167504544355c042c1290c0b586077aa20f7bcfb..8d5eb4a66072ca56684ebee75c12cc2f69c07a47 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c @@ -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); diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 9bbc61d4b60f5075b186bd7d78b0603cc285d57e..2e8813cbd200635abec186fcf385bae4d45799b8 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -276,7 +276,7 @@ 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; #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", @@ -375,12 +375,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++; @@ -388,8 +388,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)], @@ -399,19 +399,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; @@ -427,7 +427,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); @@ -436,7 +436,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]); @@ -444,7 +444,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); @@ -454,31 +454,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 } // @@ -515,7 +515,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], @@ -556,7 +556,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 diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index a4cec432de30d4b2805db685964b7dc7a52b137d..bf5edccb1bedccc6098d19d256bcd2b891cefdce 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -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; diff --git a/openair1/PHY/NR_TRANSPORT/nr_pss.c b/openair1/PHY/NR_TRANSPORT/nr_pss.c index 535ce991438c9ed3220cd7a94eb851ef019e39aa..44f74f123053e439aba305c8e0b893684269fa0f 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pss.c @@ -24,8 +24,7 @@ //#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, @@ -33,6 +32,7 @@ int nr_generate_pss( int16_t *d_pss, { int i,k,l,m; int16_t a; + int16_t d_pss[NR_PSS_LENGTH]; int16_t x[NR_PSS_LENGTH]; const int x_initial[7] = {0, 1, 1 , 0, 1, 1, 1}; diff --git a/openair1/PHY/NR_TRANSPORT/nr_sss.c b/openair1/PHY/NR_TRANSPORT/nr_sss.c index de92237f6caf2b45cb325da09b0b550a08c83b81..12f89ba36fdf222f0787334b5bc9d61f6f1fe9dc 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_sss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_sss.c @@ -23,8 +23,7 @@ //#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, @@ -34,6 +33,7 @@ int nr_generate_sss( int16_t *d_sss, int m0, m1; int Nid, Nid1, Nid2; //int16_t a; + int16_t d_sss[NR_SSS_LENGTH]; int16_t x0[NR_SSS_LENGTH], 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 }; diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index 4fed3a468febf4ce41809d33765d3c17f8abb8a3..5cc246fd29d6260354c3a1cd7e5349240ffdb5d9 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -44,8 +44,7 @@ @param @returns 0 on success */ -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, @@ -57,8 +56,7 @@ int nr_generate_pss(int16_t *d_pss, @param @returns 0 on success */ -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, @@ -83,8 +81,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, @param @returns 0 on success */ -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, diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c index 5286fe878061b72a04e059ef4ed060e2eacd754e..33071e40704a9d582075299175465b87c1298c81 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c @@ -463,7 +463,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,1); harq_process->TBS = pusch_pdu->pusch_data.tb_size; - harq_process->round = nr_rv_round_map[pusch_pdu->pusch_data.rv_index]; + harq_process->round = nr_rv_to_round(pusch_pdu->pusch_data.rv_index); harq_process->new_rx = false; // flag to indicate if this is a new reception for this harq (initialized to false) if (harq_process->round == 0) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 95c451fa1a1b5a6085aa700e3deb161008fa8410..7360eff4941cc8a847c4a8906fe6e26aa60902d3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -271,7 +271,6 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool //LOG_D(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n", // phy_vars_ue->Mod_id, frame, nr_slot_rx, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round); harq_process->ack = 0; - harq_process->round++; if (harq_process->round >= dlsch->Mlimit) { harq_process->status = SCH_IDLE; harq_process->round = 0; diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 6f308615842c65819decb397b8254115d930660f..af0b9be320949f0bb2e91bfce21177db89bbbf93 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -753,7 +753,6 @@ typedef struct PHY_VARS_gNB_s { // nfapi_nr_ul_dci_request_pdus_t *ul_dci_pdu; uint16_t num_pdsch_rnti[80]; NR_gNB_PBCH pbch; - nr_cce_t cce_list[MAX_DCI_CORESET][NR_MAX_PDCCH_AGG_LEVEL]; NR_gNB_COMMON common_vars; NR_gNB_PRACH prach_vars; NR_gNB_PUSCH *pusch_vars[NUMBER_OF_NR_ULSCH_MAX]; @@ -776,9 +775,6 @@ typedef struct PHY_VARS_gNB_s { // PUCCH0 Look-up table for cyclic-shifts NR_gNB_PUCCH0_LUT_t pucch0_lut; - /// NR synchronization sequences - int16_t d_pss[NR_PSS_LENGTH]; - int16_t d_sss[NR_SSS_LENGTH]; /// PBCH DMRS sequence uint32_t nr_gold_pbch_dmrs[2][64][NR_PBCH_DMRS_LENGTH_DWORD]; diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index c385d323e3b51e4deddd9a9e5606d8f3c045e00b..979b98e536eb654b5234e1909cc9d8651a358e41 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -113,7 +113,16 @@ #define NR_NB_TH_SLOT 2 extern const uint8_t nr_rv_round_map[4]; -extern const uint8_t nr_rv_round_map_ue[4]; + +static inline +uint8_t nr_rv_to_round(uint8_t rv) +{ + for (uint8_t round = 0; round < 4; round++) { + if (nr_rv_round_map[round] == rv) + return round; + } + return 0; +} typedef enum { NR_MU_0=0, diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 3f4c2f71fb24b063ad5a0e6e834bf33a6e3c0103..4d3174007a62d7895fbe92f32ceb4bc6c1ed6c34 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -155,7 +155,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) { int aa = 0;//physical antenna number int ret = 0; int ofdm_mask_full = (1<<(ru->nb_tx*2))-1; - int txdataF_offset = ((tti_tx%2)*fp->samples_per_slot_wCP); + int txdataF_offset = (tti_tx*fp->samples_per_slot_wCP); if (nr_slot_select(cfg,frame_tx,slot) == NR_UPLINK_SLOT) return; for (aa=0; aa<ru->nb_tx; aa++) memset(ru->common.txdataF[aa],0,fp->samples_per_slot_wCP*sizeof(int32_t)); @@ -300,7 +300,7 @@ static void *nr_feptx_thread(void *param) { ofdm_mask_full = (1<<(ru->nb_tx*2))-1; if(ru->num_gNB != 0){ - txdataF_offset = ((slot%2)*fp->samples_per_slot_wCP); + txdataF_offset = (slot*fp->samples_per_slot_wCP); ////////////precoding//////////// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 1); @@ -464,7 +464,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) { int32_t ***bw; int i=0; int slot_tx = tti_tx; - int txdataF_offset = ((tti_tx%2)*fp->samples_per_slot_wCP); + int txdataF_offset = (tti_tx*fp->samples_per_slot_wCP); start_meas(&ru->precoding_stats); AssertFatal(ru->nb_log_antennas > 0,"ru->nb_log_antennas is 0!\n"); diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 6ff7bbea0087032ad593054ab6e67565e9b0407c..e1f951ca7da62b251acea402f4ec416cc27afa71 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -74,7 +74,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ int **txdataF = gNB->common_vars.txdataF; uint8_t ssb_index, n_hf; uint16_t ssb_start_symbol; - int txdataF_offset = (slot%2)*fp->samples_per_slot_wCP; + int txdataF_offset = slot*fp->samples_per_slot_wCP; uint16_t slots_per_hf = (fp->slots_per_frame)>>1; if (slot<slots_per_hf) @@ -91,8 +91,8 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ nr_set_ssb_first_subcarrier(cfg, fp); // setting the first subcarrier LOG_D(PHY,"SS TX: frame %d, slot %d, start_symbol %d\n",frame,slot, ssb_start_symbol); - nr_generate_pss(gNB->d_pss, &txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); - nr_generate_sss(gNB->d_sss, &txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); + nr_generate_pss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); + nr_generate_sss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); if (cfg->carrier_config.num_tx_ant.value <= 4) nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); @@ -114,8 +114,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ gNB->common_vars.beam_id[0][slot*fp->symbols_per_slot+j] = cfg->ssb_table.ssb_beam_id_list[ssb_index].beam_id.value; } - nr_generate_pbch(&gNB->pbch, - &ssb_pdu, + nr_generate_pbch(&ssb_pdu, gNB->nr_pbch_interleaver, &txdataF[0][txdataF_offset], AMP, @@ -134,7 +133,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; int offset = gNB->CC_id; - int txdataF_offset = (slot%2)*fp->samples_per_slot_wCP; + int txdataF_offset = slot*fp->samples_per_slot_wCP; if ((cfg->cell_config.frame_duplex_type.value == TDD) && (nr_slot_select(cfg,frame,slot) == NR_UPLINK_SLOT)) return; @@ -167,8 +166,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX,1); - nr_generate_dci_top(gNB, - msgTx, + nr_generate_dci_top(msgTx, gNB->nr_gold_pdcch_dmrs[slot], &gNB->common_vars.txdataF[0][txdataF_offset], AMP, fp); diff --git a/openair1/SCHED_NR_UE/harq_nr.c b/openair1/SCHED_NR_UE/harq_nr.c index 5b651319347a74f407c3f4538e38059319e52e5c..4d92509d48e4985d31793b1eaf392c4a056d5742 100644 --- a/openair1/SCHED_NR_UE/harq_nr.c +++ b/openair1/SCHED_NR_UE/harq_nr.c @@ -349,7 +349,7 @@ void downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int ndi, int dl_harq->DCINdi = ndi; break; case 1: - dl_harq->round = 2; + dl_harq->round = 3; dl_harq->status = ACTIVE; dl_harq->first_rx = 0; if (dl_harq->DCINdi != ndi) { @@ -373,7 +373,7 @@ void downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int ndi, int dl_harq->status = SCH_IDLE; break; case 3: - dl_harq->round = 3; + dl_harq->round = 2; dl_harq->status = ACTIVE; dl_harq->first_rx = 0; if (dl_harq->DCINdi != ndi) { diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index b0ad4b4a83fa44e1dfe8b850a2ddabe2f54a3d60..a7575728ca2b15e709a74a9b747ec049525d8fc2 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -78,8 +78,6 @@ fifo_dump_emos_UE emos_dump_UE; char nr_mode_string[NUM_UE_MODE][20] = {"NOT SYNCHED","PRACH","RAR","RA_WAIT_CR", "PUSCH", "RESYNCH"}; -const uint8_t nr_rv_round_map_ue[4] = {0, 2, 1, 3}; - #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706) extern uint64_t downlink_frequency[MAX_NUM_CCs][4]; #endif diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index ff07422c6b7041d8cd90f571f63793966c634d05..ee1eca1e060a0ffeebd35595a4e8799fc2c1ff62 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -59,8 +59,7 @@ double cpuf; //uint8_t nfapi_mode = 0; uint16_t NB_UE_INST = 1; -uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; -uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3}; +uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1}; // needed for some functions PHY_VARS_NR_UE *PHY_vars_UE_g[1][1] = { { NULL } }; diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 308f7f4741c6098cb360ff5ad5eb4ba6f4b48b17..891951460c2c4ad55f79ef4cd65c5710c2bd77ce 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1102,7 +1102,7 @@ int main(int argc, char **argv) else phy_procedures_gNB_TX(msgDataTx,frame,slot,1); - int txdataF_offset = (slot%2) * frame_parms->samples_per_slot_wCP; + int txdataF_offset = slot * frame_parms->samples_per_slot_wCP; if (n_trials==1) { LOG_M("txsigF0.m","txsF0=", &gNB->common_vars.txdataF[0][txdataF_offset+2*frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size,1,1); diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 2413a86912fa10ca9dd8b02a1644b19e7cc2c740..8baaf624162b8a660c26c531e32b013cbe58b0f4 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -63,8 +63,7 @@ uint16_t NB_UE_INST = 1; // needed for some functions openair0_config_t openair0_cfg[MAX_CARDS]; -uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; -uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3}; +uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1}; uint64_t get_softmodem_optmask(void) {return 0;} softmodem_params_t *get_softmodem_params(void) {return 0;} diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 213924e5fd7425509d75ebacf387afb594ea32ef..d07469a4b79e87cc63f6c38c05ceaab3fdc953af 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -56,8 +56,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; double cpuf; //uint8_t nfapi_mode = 0; uint16_t NB_UE_INST = 1; -uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; -uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3}; +uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1}; // needed for some functions PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={{NULL}}; diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index 94aea36a670ce960ffcc663080cb48473813b31d..931a63a77e3aae6d3f74a04de84c4ce03c2bb31a 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -56,8 +56,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {} -uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; -uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3}; +uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1}; double cpuf; //uint8_t nfapi_mode = 0; diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index ac991ae940cb82a91ff8c51981f6b9de1e6c5853..fe994dafe3427d3f26f56fd78e63d5406877767a 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -244,7 +244,6 @@ nrUE_params_t *get_nrUE_params(void) { // needed for some functions uint16_t n_rnti = 0x1234; openair0_config_t openair0_cfg[MAX_CARDS]; -//const uint8_t nr_rv_round_map[4] = {0, 2, 1, 3}; channel_desc_t *UE2gNB[NUMBER_OF_UE_MAX][NUMBER_OF_gNB_MAX]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 0a7a3e3399d9fbae8a78b416389e64c39c27aa2e..798e38cedba7f973712226f1a2ccb960f02ed7f0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -55,6 +55,7 @@ #include <errno.h> #include <string.h> +const uint8_t nr_rv_round_map[4] = { 0, 2, 3, 1 }; uint16_t nr_pdcch_order_table[6] = { 31, 31, 511, 2047, 2047, 8191 }; uint8_t vnf_first_sched_entry = 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 30e1d2cc3d61a8f253b091a08e48da3a6f975d0c..accb347533ebaeb15152e161ce3fd6d7dadb8034 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -53,7 +53,6 @@ //#define UL_HARQ_PRINT extern RAN_CONTEXT_t RC; -const uint8_t nr_rv_round_map[4] = {0, 2, 3, 1}; //#define ENABLE_MAC_PAYLOAD_DEBUG 1 //uint8_t mac_pdu[MAX_NR_DLSCH_PAYLOAD_BYTES]; diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index bc209afd02ecd3c1d85a26aec2493240898baa9e..f910ff68d45fcfc1616ed31c92d408676baaa2ea 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2180,7 +2180,8 @@ nr_rrc_ue_establish_srb2( NULL, radioBearerConfig->drb_ToAddModList, NULL, - 0, + NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm + | (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4), NULL, NULL, kUPenc,