Commit 75304e1e authored by Sakthivel Velumani's avatar Sakthivel Velumani

Merge branch 'develop' into prb_based_dl_channel_estimation

parents 0d6b9a99 dedfdd43
...@@ -30,8 +30,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { ...@@ -30,8 +30,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
} }
} }
def doFlexranCtrlTest = false
// Location of the executor node // Location of the executor node
def nodeExecutor = params.nodeExecutor def nodeExecutor = params.nodeExecutor
...@@ -66,9 +64,6 @@ pipeline { ...@@ -66,9 +64,6 @@ pipeline {
echo "Platform is ${env.TESTPLATFORM_OWNER}" echo "Platform is ${env.TESTPLATFORM_OWNER}"
} }
if (params.FlexRanRtcGitLabRepository_Credentials != null) {
doFlexranCtrlTest = true
}
if (fileExists("flexran")) { if (fileExists("flexran")) {
sh "rm -Rf flexran > /dev/null 2>&1" sh "rm -Rf flexran > /dev/null 2>&1"
} }
...@@ -141,15 +136,13 @@ pipeline { ...@@ -141,15 +136,13 @@ pipeline {
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow // For the moment, there is no fail criteria. Just a notification of number of files that do not follow
sh "./ci-scripts/checkCodingFormattingRules.sh" sh "./ci-scripts/checkCodingFormattingRules.sh"
} }
if (doFlexranCtrlTest && doMandatoryTests) { // With Mosaic 5G being part of OSA and making all it's repositories public
// No need to pass credentials to clone flexran-rtc
if (doMandatoryTests) {
sh "mkdir flexran" sh "mkdir flexran"
dir ('flexran') { dir ('flexran') {
withCredentials([ sh "git clone https://gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.FlexRanRtcGitLabRepository_Credentials}", usernameVariable: 'git_username', passwordVariable: 'git_password']
]) {
sh "git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
sh "git checkout develop >> ../git_clone.log 2>&1" sh "git checkout develop >> ../git_clone.log 2>&1"
}
sh "zip -r -qq flexran.zip ." sh "zip -r -qq flexran.zip ."
} }
} }
...@@ -315,7 +308,7 @@ pipeline { ...@@ -315,7 +308,7 @@ pipeline {
stages { stages {
stage ("Build Flexran Controller") { stage ("Build Flexran Controller") {
when { when {
expression {doFlexranCtrlTest && doMandatoryTests} expression {doMandatoryTests}
} }
steps { steps {
lock (vmResource) { lock (vmResource) {
......
...@@ -33,10 +33,9 @@ def buildStageStatus = true ...@@ -33,10 +33,9 @@ def buildStageStatus = true
// Name of the test stage // Name of the test stage
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone resource // Name of the phone/server resource
def ciSmartPhonesResource1 = params.SmartPhonesResource1 def ciSmartPhonesResource1 = params.SmartPhonesResource1
def ciSmartPhonesResource2 = params.SmartPhonesResource2 def ciSmartPhonesResource2 = params.SmartPhonesResource2
def ciSmartPhonesResource3 = params.SmartPhonesResource3
// Global Parameters. Normally they should be populated when the master job // Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters // triggers the slave job with parameters
...@@ -53,7 +52,7 @@ pipeline { ...@@ -53,7 +52,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource3]], resource: ciSmartPhonesResource1) lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
} }
stages { stages {
stage("Build Init") { stage("Build Init") {
...@@ -85,9 +84,6 @@ pipeline { ...@@ -85,9 +84,6 @@ pipeline {
if (params.SmartPhonesResource2 == null) { if (params.SmartPhonesResource2 == null) {
allParametersPresent = false allParametersPresent = false
} }
if (params.SmartPhonesResource3== null) {
allParametersPresent = false
}
// 1st eNB parameters // 1st eNB parameters
if (params.eNB_IPAddress == null) { if (params.eNB_IPAddress == null) {
allParametersPresent = false allParametersPresent = false
......
...@@ -36,7 +36,7 @@ pipeline { ...@@ -36,7 +36,7 @@ pipeline {
stage ("Launcher") { stage ("Launcher") {
steps { steps {
script { script {
//retrieve MR that are opened nd with tag READY_TO_BE_MERGED //retrieve MR that are opened nd with tag NSA
MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true ' MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true '
echo "List of selected MR:\n${MR_LIST}" echo "List of selected MR:\n${MR_LIST}"
def MR_ARRAY = MR_LIST.split('\n') def MR_ARRAY = MR_LIST.split('\n')
...@@ -48,21 +48,30 @@ pipeline { ...@@ -48,21 +48,30 @@ pipeline {
COMMIT_ID=COMMIT_ID.trim() COMMIT_ID=COMMIT_ID.trim()
echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}" echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
//calling NSA sub job //calling NSA sub job
build job: "RAN-CI-NSA-B210-N310-ModuleUE", wait : false, propagate : false, parameters: [ build job: "RAN-NSA-Mini-Module", wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
]
//calling Benetel sub job
build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
] ]
//calling NSA long sub job
// build job: "RAN-NSA-Mini-Module-Long", wait : true, propagate : false, parameters: [
// string(name: 'eNB_MR', value: String.valueOf(MR)),
// string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
// string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
// string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
// booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
// ]
//calling NSA attach/detach job
// build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : true, propagate : false, parameters: [
// string(name: 'eNB_MR', value: String.valueOf(MR)),
// string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
// string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
// string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
// booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
// ]
} }
} }
} }
......
...@@ -76,8 +76,8 @@ then ...@@ -76,8 +76,8 @@ then
do do
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true` IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true` IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE || true` IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true` IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h" || true`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ] if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
...@@ -197,8 +197,8 @@ do ...@@ -197,8 +197,8 @@ do
then then
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true` IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true` IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE || true` IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true`
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true` IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h" || true`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ] if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
......
...@@ -8,7 +8,7 @@ idefix: ...@@ -8,7 +8,7 @@ idefix:
WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup
DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
PLMN : 22201 PLMN : 22201
UENetwork : enxb22a941dbf00 UENetwork : wwan0
HostIPAddress : 192.168.18.188 HostIPAddress : 192.168.18.188
HostUsername : oaicicd HostUsername : oaicicd
HostPassword : oaicicd HostPassword : oaicicd
......
...@@ -150,6 +150,8 @@ class Containerize(): ...@@ -150,6 +150,8 @@ class Containerize():
imageNames.append(('oai-nr-ue', 'nrUE')) imageNames.append(('oai-nr-ue', 'nrUE'))
if self.host == 'Red Hat': if self.host == 'Red Hat':
imageNames.append(('oai-physim', 'phySim')) imageNames.append(('oai-physim', 'phySim'))
if self.host == 'Ubuntu':
imageNames.append(('oai-lte-ru', 'lteRU'))
if len(imageNames) == 0: if len(imageNames) == 0:
imageNames.append(('oai-enb', 'eNB')) imageNames.append(('oai-enb', 'eNB'))
......
# * 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
# */
#---------------------------------------------------------------------
#
# Required Python Version
# Python 3.x
#
#---------------------------------------------------------------------
#USAGE:
# log=Log_Mgt(IPAddress,Password,Path)
# log.LogRotation()
import re
import subprocess
import logging
import math
class Log_Mgt:
def __init__(self,IPAddress,Password,Path):
self.IPAddress=IPAddress
self.Password=Password
self.path=Path
#-----------------$
#PRIVATE# Methods$
#-----------------$
def __CheckAvailSpace(self):
HOST=self.IPAddress
COMMAND="df "+ self.path
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
result = ssh.stdout.readlines()
s=result[1].decode('utf-8').rstrip()#result[1] is the second line with the results we are looking for
tmp=s.split()
return tmp[3] #return avail space from the line
def __GetOldestFile(self):
HOST=self.IPAddress
COMMAND="ls -rtl "+ self.path #-rtl will bring oldest file on top
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
result = ssh.stdout.readlines()
s=result[1].decode('utf-8').rstrip()
tmp=s.split()
return tmp[8]#return filename from the line
def __AvgSize(self):
HOST=self.IPAddress
COMMAND="ls -rtl "+ self.path
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
result = ssh.stdout.readlines()
total_size=0
for i in range(1,len(result)):
s=result[i].decode('utf-8').rstrip()
tmp=s.split()
total_size+=int(tmp[4]) #get filesize
return math.floor(total_size/(len(result)-1)) #compute average file/artifact size
#-----------------$
#PUBLIC Methods$
#-----------------$
def LogRotation(self):
avail_space =int(self.__CheckAvailSpace())*1000 #avail space in target folder, initially displayed in Gb
avg_size=self.__AvgSize() #average size of artifacts in the target folder
logging.debug("Avail Space : " + str(avail_space) + " / Artifact Avg Size : " + str(avg_size))
if avail_space < 2*avg_size: #reserved space is 2x artifact file ; oldest file will be deleted
oldestfile=self.__GetOldestFile()
HOST=self.IPAddress
COMMAND="echo " + self.Password + " | sudo -S rm "+ self.path + "/" + oldestfile
logging.debug(COMMAND)
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
else:
logging.debug("Still some space left for artifacts storage")
...@@ -37,7 +37,10 @@ import time ...@@ -37,7 +37,10 @@ import time
import re import re
import subprocess import subprocess
from datetime import datetime
#for log rotation mgt
import cls_log_mgt
class Module_UE: class Module_UE:
...@@ -48,6 +51,7 @@ class Module_UE: ...@@ -48,6 +51,7 @@ class Module_UE:
self.UEIPAddress = "" self.UEIPAddress = ""
#dictionary linking command names and related module scripts #dictionary linking command names and related module scripts
self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts
self.ue_trace=''
...@@ -72,9 +76,10 @@ class Module_UE: ...@@ -72,9 +76,10 @@ class Module_UE:
logging.debug('Starting ' + self.Process['Name']) logging.debug('Starting ' + self.Process['Name'])
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
mySSH.command('echo ' + self.HostPassword + ' | sudo -S ' + self.Process['Cmd'] + ' &','\$',5) mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S ' + self.Process['Cmd'] + ' &','\$',5)
mySSH.close() mySSH.close()
#checking the process #checking the process
time.sleep(5)
HOST=self.HostIPAddress HOST=self.HostIPAddress
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep " COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
logging.debug(COMMAND) logging.debug(COMMAND)
...@@ -101,7 +106,7 @@ class Module_UE: ...@@ -101,7 +106,7 @@ class Module_UE:
def GetModuleIPAddress(self): def GetModuleIPAddress(self):
HOST=self.HostIPAddress HOST=self.HostIPAddress
response= [] response= []
tentative = 10 tentative = 3
while (len(response)==0) and (tentative>0): while (len(response)==0) and (tentative>0):
COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork
logging.debug(COMMAND) logging.debug(COMMAND)
...@@ -126,7 +131,45 @@ class Module_UE: ...@@ -126,7 +131,45 @@ class Module_UE:
logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m') logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
return -1 return -1
def EnableTrace(self):
if self.ue_trace=="yes":
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
#delete old artifacts
mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5)
#start Trace, artifact is created in home dir
mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5)
mySSH.close()
def DisableTrace(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal=SIGINT *QLog*', '\$',5)
mySSH.close()
def DisableCM(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal SIGKILL *'+self.Process['Name']+'*', '\$', 5)
mySSH.close()
def LogCollect(self):
if self.ue_trace=="yes":
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
#archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix
now=datetime.now()
now_string = now.strftime("%Y%m%d-%H%M")
source='ci_qlog'
destination='/media/usb-drive/ci_qlogs/ci_qlog_'+now_string+'.zip'
#qlog artifact is zipped into the target folder
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10)
mySSH.close()
#post action : log cleaning to make sure enough space is reserved for the next run
Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/media/usb-drive/ci_qlogs")
Log_Mgt.LogRotation()
else:
destination=""
return destination
This diff is collapsed.
...@@ -24,10 +24,6 @@ gNBs = ...@@ -24,10 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
#pusch_TargetSNRx10 = 200;
#pucch_TargetSNRx10 = 200;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -235,6 +231,8 @@ MACRLCs = ( ...@@ -235,6 +231,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -244,7 +244,7 @@ MACRLCs = ( ...@@ -244,7 +244,7 @@ MACRLCs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
worker_config = "ENABLE"; worker_config = "WORKER_ENABLE";
} }
); );
...@@ -260,11 +260,11 @@ RUs = ( ...@@ -260,11 +260,11 @@ RUs = (
local_rf = "yes" local_rf = "yes"
nb_tx = 1 nb_tx = 1
nb_rx = 1 nb_rx = 1
att_tx = 0 att_tx = 3
att_rx = 0; att_rx = 0;
bands = [7]; bands = [7];
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 118; max_rxgain = 115;
eNB_instances = [0]; eNB_instances = [0];
# clock_src = "external"; # clock_src = "external";
} }
......
...@@ -24,8 +24,6 @@ gNBs = ...@@ -24,8 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 0; ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -231,6 +229,8 @@ MACRLCs = ( ...@@ -231,6 +229,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 1; ulsch_max_slots_inactivity = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
This diff is collapsed.
...@@ -243,7 +243,7 @@ RUs = ( ...@@ -243,7 +243,7 @@ RUs = (
## beamforming 4x4 matrix: ## beamforming 4x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"; sdr_addrs = "addr=192.168.30.2,mgmt_addr=192.168.30.2,second_addr=192.168.50.2";
clock_src = "external"; clock_src = "external";
} }
); );
......
...@@ -23,9 +23,6 @@ gNBs = ...@@ -23,9 +23,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -120,13 +117,13 @@ gNBs = ...@@ -120,13 +117,13 @@ gNBs =
# 0=unrestricted, 1=restricted type A, 2=restricted type B # 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0, restrictedSetConfig = 0,
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4
initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPk2_2 = 7; # used for Msg.3 during RA
initialULBWPmappingType_2 = 1; initialULBWPmappingType_2 = 1;
...@@ -228,6 +225,8 @@ MACRLCs = ( ...@@ -228,6 +225,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
...@@ -245,11 +244,11 @@ RUs = ( ...@@ -245,11 +244,11 @@ RUs = (
local_rf = "yes" local_rf = "yes"
nb_tx = 1 nb_tx = 1
nb_rx = 1 nb_rx = 1
att_tx = 0 att_tx = 3
att_rx = 0; att_rx = 0;
bands = [7]; bands = [7];
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 114; max_rxgain = 111;
eNB_instances = [0]; eNB_instances = [0];
# clock_src = "external"; # clock_src = "external";
} }
......
...@@ -23,9 +23,6 @@ gNBs = ...@@ -23,9 +23,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -235,6 +232,8 @@ MACRLCs = ( ...@@ -235,6 +232,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -260,8 +260,8 @@ NETWORK_CONTROLLER : ...@@ -260,8 +260,8 @@ NETWORK_CONTROLLER :
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
}; };
log_config : log_config :
{ {
global_log_level ="info"; global_log_level ="info";
global_log_verbosity ="medium"; global_log_verbosity ="medium";
hw_log_level ="info"; hw_log_level ="info";
...@@ -276,4 +276,4 @@ NETWORK_CONTROLLER : ...@@ -276,4 +276,4 @@ NETWORK_CONTROLLER :
pdcp_log_verbosity ="medium"; pdcp_log_verbosity ="medium";
rrc_log_level ="info"; rrc_log_level ="info";
rrc_log_verbosity ="medium"; rrc_log_verbosity ="medium";
}; };
...@@ -10,15 +10,15 @@ ColNames : ...@@ -10,15 +10,15 @@ ColNames :
Ref : Ref :
feprx : 60.0 feprx : 60.0
feptx_prec : 8.0 feptx_prec : 8.0
feptx_ofdm : 85.0 feptx_ofdm : 50.0
feptx_total : 75.0 feptx_total : 75.0
L1 Tx processing : 300.0 L1 Tx processing : 300.0
DLSCH encoding : 230.0 DLSCH encoding : 230.0
L1 Rx processing : 175.0 L1 Rx processing : 175.0
PUSCH inner-receiver : 100.0 PUSCH inner-receiver : 100.0
PUSCH decoding : 140.0 PUSCH decoding : 140.0
DL & UL scheduling timing stats : 15.0 DL & UL scheduling timing stats : 37.0
UL Indication : 20.0 UL Indication : 38.0
Threshold : Threshold :
feprx : 1.25 feprx : 1.25
feptx_prec : 1.25 feptx_prec : 1.25
......
...@@ -62,6 +62,7 @@ class EPCManagement(): ...@@ -62,6 +62,7 @@ class EPCManagement():
self.PcapFileName = '' self.PcapFileName = ''
self.testCase_id = '' self.testCase_id = ''
self.MmeIPAddress = '' self.MmeIPAddress = ''
self.AmfIPAddress = ''
self.containerPrefix = 'prod' self.containerPrefix = 'prod'
self.mmeConfFile = 'mme.conf' self.mmeConfFile = 'mme.conf'
self.yamlPath = '' self.yamlPath = ''
...@@ -211,6 +212,37 @@ class EPCManagement(): ...@@ -211,6 +212,37 @@ class EPCManagement():
mySSH.close() mySSH.close()
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
def Initialize5GCN(self, HTML):
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
sys.exit('Insufficient EPC Parameters')
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('ltebox', self.Type, re.IGNORECASE):
logging.debug('Using the sabox simulated HSS')
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('cd /opt/hss_sim0609', '\$', 5)
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss.log', '\$', 5)
mySSH.command('echo ' + self.Password + ' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_5g_hss ./start_5g_hss"', '\$', 5)
logging.debug('Using the sabox')
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_sabox', '\$', 5)
else:
logging.error('This option should not occur!')
mySSH.close()
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
def SetAmfIPAddress(self):
# Not an error if we don't need an 5GCN
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
return
if self.IPAddress == 'none':
return
if re.match('ltebox', self.Type, re.IGNORECASE):
self.MmeIPAddress = self.IPAddress
def CheckHSSProcess(self, status_queue): def CheckHSSProcess(self, status_queue):
try: try:
mySSH = SSH.SSHConnection() mySSH = SSH.SSHConnection()
...@@ -251,11 +283,11 @@ class EPCManagement(): ...@@ -251,11 +283,11 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE): elif re.match('OAI', self.Type, re.IGNORECASE):
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore()) result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
elif re.match('ltebox', self.Type, re.IGNORECASE): elif re.match('ltebox', self.Type, re.IGNORECASE):
result = re.search('mme', mySSH.getBefore()) result = re.search('mme|amf', mySSH.getBefore())
else: else:
logging.error('This should not happen!') logging.error('This should not happen!')
if result is None: if result is None:
logging.debug('\u001B[1;37;41m MME Process Not Found! \u001B[0m') logging.debug('\u001B[1;37;41m MME|AMF Process Not Found! \u001B[0m')
status_queue.put(CONST.MME_PROCESS_FAILED) status_queue.put(CONST.MME_PROCESS_FAILED)
else: else:
status_queue.put(CONST.MME_PROCESS_OK) status_queue.put(CONST.MME_PROCESS_OK)
...@@ -281,11 +313,11 @@ class EPCManagement(): ...@@ -281,11 +313,11 @@ class EPCManagement():
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore()) result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
elif re.match('ltebox', self.Type, re.IGNORECASE): elif re.match('ltebox', self.Type, re.IGNORECASE):
mySSH.command('stdbuf -o0 ps -aux | grep --color=never xGw | grep -v grep', '\$', 5) mySSH.command('stdbuf -o0 ps -aux | grep --color=never xGw | grep -v grep', '\$', 5)
result = re.search('xGw', mySSH.getBefore()) result = re.search('xGw|upf', mySSH.getBefore())
else: else:
logging.error('This should not happen!') logging.error('This should not happen!')
if result is None: if result is None:
logging.debug('\u001B[1;37;41m SPGW Process Not Found! \u001B[0m') logging.debug('\u001B[1;37;41m SPGW|UPF Process Not Found! \u001B[0m')
status_queue.put(CONST.SPGW_PROCESS_FAILED) status_queue.put(CONST.SPGW_PROCESS_FAILED)
else: else:
status_queue.put(CONST.SPGW_PROCESS_OK) status_queue.put(CONST.SPGW_PROCESS_OK)
...@@ -322,7 +354,7 @@ class EPCManagement(): ...@@ -322,7 +354,7 @@ class EPCManagement():
mySSH.command('cd ' + self.SourceCodePath, '\$', 5) mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
mySSH.command('cd scripts', '\$', 5) mySSH.command('cd scripts', '\$', 5)
time.sleep(1) time.sleep(1)
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL hss_sim', '\$', 5) mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_hss -X quit', '\$', 5)
else: else:
logging.error('This should not happen!') logging.error('This should not happen!')
mySSH.close() mySSH.close()
...@@ -397,6 +429,22 @@ class EPCManagement(): ...@@ -397,6 +429,22 @@ class EPCManagement():
mySSH.close() mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
def Terminate5GCN(self, HTML):
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('ltebox', self.Type, re.IGNORECASE):
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_sabox', '\$', 5)
time.sleep(1)
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
mySSH.command('cd scripts', '\$', 5)
time.sleep(1)
mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_5g_hss -X quit', '\$', 5)
else:
logging.error('This should not happen!')
mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
def DeployEpc(self, HTML): def DeployEpc(self, HTML):
logging.debug('Trying to deploy') logging.debug('Trying to deploy')
if not re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE): if not re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
...@@ -597,7 +645,7 @@ class EPCManagement(): ...@@ -597,7 +645,7 @@ class EPCManagement():
mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5) mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5)
elif re.match('ltebox', self.Type, re.IGNORECASE): elif re.match('ltebox', self.Type, re.IGNORECASE):
mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5) mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5)
mySSH.command('zip mme.log.zip mmeLog.0 s1apcLog.0 s1apsLog.0 s11cLog.0 libLog.0 s1apCodecLog.0', '\$', 60) mySSH.command('zip mme.log.zip mmeLog.0 s1apcLog.0 s1apsLog.0 s11cLog.0 libLog.0 s1apCodecLog.0 amfLog.0 ngapcLog.0 ngapcommonLog.0 ngapsLog.0', '\$', 60)
else: else:
logging.error('This option should not occur!') logging.error('This option should not occur!')
mySSH.close() mySSH.close()
...@@ -625,8 +673,8 @@ class EPCManagement(): ...@@ -625,8 +673,8 @@ class EPCManagement():
mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60) mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60)
mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5) mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5)
elif re.match('ltebox', self.Type, re.IGNORECASE): elif re.match('ltebox', self.Type, re.IGNORECASE):
mySSH.command('cp /opt/ltebox/var/log/xGwLog.0 .', '\$', 5) mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5)
mySSH.command('zip spgw.log.zip xGwLog.0', '\$', 60) mySSH.command('zip spgw.log.zip xGwLog.0 upfLog.0', '\$', 60)
else: else:
logging.error('This option should not occur!') logging.error('This option should not occur!')
mySSH.close() mySSH.close()
......
...@@ -152,6 +152,7 @@ def GetParametersFromXML(action): ...@@ -152,6 +152,7 @@ def GetParametersFromXML(action):
RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId
elif action == 'Initialize_eNB': elif action == 'Initialize_eNB':
RAN.eNB_Trace=test.findtext('eNB_Trace')
RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args') RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args')
eNB_instance=test.findtext('eNB_instance') eNB_instance=test.findtext('eNB_instance')
if (eNB_instance is None): if (eNB_instance is None):
...@@ -196,6 +197,7 @@ def GetParametersFromXML(action): ...@@ -196,6 +197,7 @@ def GetParametersFromXML(action):
elif action == 'Initialize_UE': elif action == 'Initialize_UE':
ue_id = test.findtext('id') ue_id = test.findtext('id')
CiTestObj.ue_trace=test.findtext('UE_Trace')#temporary variable, to be passed to Module_UE in Initialize_UE call
if (ue_id is None): if (ue_id is None):
CiTestObj.ue_id = "" CiTestObj.ue_id = ""
else: else:
...@@ -209,12 +211,25 @@ def GetParametersFromXML(action): ...@@ -209,12 +211,25 @@ def GetParametersFromXML(action):
CiTestObj.ue_id = ue_id CiTestObj.ue_id = ue_id
elif action == 'Attach_UE': elif action == 'Attach_UE':
ue_id = test.findtext('id')
if (ue_id is None):
CiTestObj.ue_id = ""
else:
CiTestObj.ue_id = ue_id
nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach') nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach')
if (nbMaxUEtoAttach is None): if (nbMaxUEtoAttach is None):
CiTestObj.nbMaxUEtoAttach = -1 CiTestObj.nbMaxUEtoAttach = -1
else: else:
CiTestObj.nbMaxUEtoAttach = int(nbMaxUEtoAttach) CiTestObj.nbMaxUEtoAttach = int(nbMaxUEtoAttach)
elif action == 'Terminate_UE':
ue_id = test.findtext('id')
if (ue_id is None):
CiTestObj.ue_id = ""
else:
CiTestObj.ue_id = ue_id
elif action == 'CheckStatusUE': elif action == 'CheckStatusUE':
expectedNBUE = test.findtext('expectedNbOfConnectedUEs') expectedNBUE = test.findtext('expectedNbOfConnectedUEs')
if (expectedNBUE is None): if (expectedNBUE is None):
...@@ -468,13 +483,13 @@ elif re.match('^TerminateUE$', mode, re.IGNORECASE): ...@@ -468,13 +483,13 @@ elif re.match('^TerminateUE$', mode, re.IGNORECASE):
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
signal.signal(signal.SIGUSR1, receive_signal) signal.signal(signal.SIGUSR1, receive_signal)
CiTestObj.TerminateUE(HTML,COTS_UE) CiTestObj.TerminateUE(HTML,COTS_UE,InfraUE,CiTestObj.ue_trace)
elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE): elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
if CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '': if CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '':
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
signal.signal(signal.SIGUSR1, receive_signal) signal.signal(signal.SIGUSR1, receive_signal)
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC) CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
elif re.match('^TerminateHSS$', mode, re.IGNORECASE): elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '': if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
...@@ -644,6 +659,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -644,6 +659,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'): if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'):
CiTestObj.CheckFlexranCtrlInstallation(RAN,EPC,CONTAINERS) CiTestObj.CheckFlexranCtrlInstallation(RAN,EPC,CONTAINERS)
EPC.SetMmeIPAddress() EPC.SetMmeIPAddress()
EPC.SetAmfIPAddress()
#get the list of tests to be done #get the list of tests to be done
todo_tests=[] todo_tests=[]
...@@ -713,11 +729,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -713,11 +729,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Terminate_eNB': elif action == 'Terminate_eNB':
RAN.TerminateeNB(HTML, EPC) RAN.TerminateeNB(HTML, EPC)
elif action == 'Initialize_UE': elif action == 'Initialize_UE':
CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE) CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE, CiTestObj.ue_trace)
elif action == 'Terminate_UE': elif action == 'Terminate_UE':
CiTestObj.TerminateUE(HTML,COTS_UE) CiTestObj.TerminateUE(HTML,COTS_UE, InfraUE, CiTestObj.ue_trace)
elif action == 'Attach_UE': elif action == 'Attach_UE':
CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE) CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'Detach_UE': elif action == 'Detach_UE':
CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE,InfraUE) CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'DataDisable_UE': elif action == 'DataDisable_UE':
...@@ -725,23 +741,23 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -725,23 +741,23 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'DataEnable_UE': elif action == 'DataEnable_UE':
CiTestObj.DataEnableUE(HTML) CiTestObj.DataEnableUE(HTML)
elif action == 'CheckStatusUE': elif action == 'CheckStatusUE':
CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE) CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'Build_OAI_UE': elif action == 'Build_OAI_UE':
CiTestObj.BuildOAIUE(HTML) CiTestObj.BuildOAIUE(HTML)
elif action == 'Initialize_OAI_UE': elif action == 'Initialize_OAI_UE':
CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE) CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'Terminate_OAI_UE': elif action == 'Terminate_OAI_UE':
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC) CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
elif action == 'Initialize_CatM_module': elif action == 'Initialize_CatM_module':
CiTestObj.InitializeCatM(HTML) CiTestObj.InitializeCatM(HTML)
elif action == 'Terminate_CatM_module': elif action == 'Terminate_CatM_module':
CiTestObj.TerminateCatM(HTML) CiTestObj.TerminateCatM(HTML)
elif action == 'Attach_CatM_module': elif action == 'Attach_CatM_module':
CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC) CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC,InfraUE)
elif action == 'Detach_CatM_module': elif action == 'Detach_CatM_module':
CiTestObj.TerminateCatM(HTML) CiTestObj.TerminateCatM(HTML)
elif action == 'Ping_CatM_module': elif action == 'Ping_CatM_module':
CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC) CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC,InfraUE)
elif action == 'Ping': elif action == 'Ping':
CiTestObj.Ping(HTML,RAN,EPC,COTS_UE, InfraUE) CiTestObj.Ping(HTML,RAN,EPC,COTS_UE, InfraUE)
elif action == 'Iperf': elif action == 'Iperf':
...@@ -760,6 +776,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -760,6 +776,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
EPC.InitializeSPGW(HTML) EPC.InitializeSPGW(HTML)
elif action == 'Terminate_SPGW': elif action == 'Terminate_SPGW':
EPC.TerminateSPGW(HTML) EPC.TerminateSPGW(HTML)
elif action == 'Initialize_5GCN':
EPC.Initialize5GCN(HTML)
elif action == 'Terminate_5GCN':
EPC.Terminate5GCN(HTML)
elif action == 'Deploy_EPC': elif action == 'Deploy_EPC':
EPC.DeployEpc(HTML) EPC.DeployEpc(HTML)
elif action == 'Undeploy_EPC': elif action == 'Undeploy_EPC':
......
...@@ -93,6 +93,7 @@ class RANManagement(): ...@@ -93,6 +93,7 @@ class RANManagement():
self.epcPcapFile = '' self.epcPcapFile = ''
self.runtime_stats= '' self.runtime_stats= ''
self.datalog_rt_stats={} self.datalog_rt_stats={}
self.eNB_Trace = '' #if 'yes', Tshark will be launched at initialization
...@@ -344,6 +345,22 @@ class RANManagement(): ...@@ -344,6 +345,22 @@ class RANManagement():
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' ' + self.Initialize_eNB_args, 'KO', self.pStatus) HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' ' + self.Initialize_eNB_args, 'KO', self.pStatus)
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
sys.exit(1) sys.exit(1)
#Get pcap on S1 and X2 eNB interface, if enabled in the xml
#will not work for gNB at this stage
if ((self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb')) and self.eNB_Trace=='yes':
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"', '\$', 5)
result = re.search('interfaceToUse=(?P<eth_interface>[a-zA-Z0-9\-\_]+)done', mySSH.getBefore())
if result is not None:
eth_interface = result.group('eth_interface')
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + '\u001B[0m')
pcapfile = 'enb_' + self.testCase_id + '_s1x2log.pcap'
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -f /tmp/' + pcapfile , '\$', 5)
mySSH.command('echo $USER; nohup sudo -E tshark -i ' + eth_interface + ' -w /tmp/' + pcapfile + ' 2>&1 &','\$', 5)
mySSH.close()
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB # If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
result = re.search('T_stdout', str(self.Initialize_eNB_args)) result = re.search('T_stdout', str(self.Initialize_eNB_args))
if (result is not None): if (result is not None):
...@@ -579,6 +596,10 @@ class RANManagement(): ...@@ -579,6 +596,10 @@ class RANManagement():
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true', '\$', 5) mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true', '\$', 5)
time.sleep(5) time.sleep(5)
mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
#stopping tshark (valid if eNB and enabled in xml, will not harm otherwise)
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
time.sleep(1)
mySSH.close() mySSH.close()
# If tracer options is on, stopping tshark on EPC side # If tracer options is on, stopping tshark on EPC side
result = re.search('T_stdout', str(self.Initialize_eNB_args)) result = re.search('T_stdout', str(self.Initialize_eNB_args))
...@@ -597,6 +618,7 @@ class RANManagement(): ...@@ -597,6 +618,7 @@ class RANManagement():
mySSH.close() mySSH.close()
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m') logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
mySSH.open(lIpAddr, lUserName, lPassWord) mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('killall --signal SIGKILL record', '\$', 5)
mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5) mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5)
enbLogFile = self.eNBLogFiles[int(self.eNB_instance)] enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
raw_record_file = enbLogFile.replace('.log', '_record.raw') raw_record_file = enbLogFile.replace('.log', '_record.raw')
...@@ -650,9 +672,10 @@ class RANManagement(): ...@@ -650,9 +672,10 @@ class RANManagement():
mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5) mySSH.command('cd cmake_targets', '\$', 5)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*_s1x2log.pcap .','\$',20)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log', '\$', 60) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 60)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt', '\$', 5) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 5)
mySSH.close() mySSH.close()
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML): def AnalyzeLogFile_eNB(self, eNBlogFile, HTML):
...@@ -707,6 +730,8 @@ class RANManagement(): ...@@ -707,6 +730,8 @@ class RANManagement():
real_time_stats = {} real_time_stats = {}
#count "problem receiving samples" msg #count "problem receiving samples" msg
pb_receiving_samples_cnt = 0 pb_receiving_samples_cnt = 0
#count "removing UE" msg
removing_ue = 0
#NSA specific log markers #NSA specific log markers
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []} nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
...@@ -903,6 +928,10 @@ class RANManagement(): ...@@ -903,6 +928,10 @@ class RANManagement():
result = re.search('\[PHY\]\s+problem receiving samples', str(line)) result = re.search('\[PHY\]\s+problem receiving samples', str(line))
if result is not None: if result is not None:
pb_receiving_samples_cnt += 1 pb_receiving_samples_cnt += 1
#count "Removing UE" msg
result = re.search('\[MAC\]\s+Removing UE', str(line))
if result is not None:
removing_ue += 1
#nsa markers logging #nsa markers logging
for k in nsa_markers: for k in nsa_markers:
...@@ -992,6 +1021,11 @@ class RANManagement(): ...@@ -992,6 +1021,11 @@ class RANManagement():
htmleNBFailureMsg += statMsg htmleNBFailureMsg += statMsg
else: else:
#Removing UE log
statMsg = '[MAC] Removing UE msg count = '+str(removing_ue)
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
#nsa markers #nsa markers
statMsg = 'logfile line count = ' + str(line_cnt) statMsg = 'logfile line count = ' + str(line_cnt)
htmlMsg = statMsg+'\n' htmlMsg = statMsg+'\n'
......
...@@ -748,6 +748,82 @@ function report_test { ...@@ -748,6 +748,82 @@ function report_test {
echo " <th>Statistics</th>" >> ./test_simulator_results.html echo " <th>Statistics</th>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html echo " </tr>" >> ./test_simulator_results.html
#SA
EPC_CONFIGS=("noS1")
TRANS_MODES=("tdd")
FR_MODE=("SA")
BW_CASES=(106)
for CN_CONFIG in ${EPC_CONFIGS[@]}
do
for TMODE in ${TRANS_MODES[@]}
do
for BW in ${BW_CASES[@]}
do
echo " <tr bgcolor = \"#8FBC8F\" >" >> ./test_simulator_results.html
if [[ $CN_CONFIG =~ .*wS1.* ]]
then
echo " <td align = \"center\" colspan = 4 >Test with EPC (aka withS1): ${TMODE} -- ${BW}PRB -- ${FR_MODE}</td>" >> ./test_simulator_results.html
else
echo " <td align = \"center\" colspan = 4 >Test without EPC (aka noS1): ${TMODE} -- ${BW}PRB -- ${FR_MODE}</td>" >> ./test_simulator_results.html
fi
echo " </tr>" >> ./test_simulator_results.html
#SA test (--sa option)
SA_ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_gnb_sa_test.log
SA_UE_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_ue_sa_test.log
if [ -f $RA_ENB_LOG ] && [ -f $RA_UE_LOG ]
then
#get rid of full path
NAME_ENB=`echo $SA_ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
NAME_UE=`echo $SA_UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
echo " <tr>" >> ./test_simulator_results.html
echo " <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
echo " <td>Check if SA proc succeeded</td>" >> ./test_simulator_results.html
RRC_CHECK=`egrep -c "Received rrcSetupComplete" $SA_ENB_LOG`
CBRA_CHECK=`egrep -c "Received Ack of RA-Msg4\. CBRA procedure succeeded" $SA_ENB_LOG`
SIB1_CHECK=`egrep -c "SIB1 decoded" $SA_UE_LOG`
if [ $RRC_CHECK -gt 0 ] && [ $CBRA_CHECK -gt 0 ] && [ $SIB1_CHECK -gt 0 ]
then
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
else
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
fi
echo " <td><pre>" >> ./test_simulator_results.html
if [ $RRC_CHECK -gt 0 ]
then
echo "<font color = \"blue\">- Received rrcSetupComplete OK</font>" >> ./test_simulator_results.html
else
echo "<font color = \"red\"><b>- Received rrcSetupComplete KO</b></font>" >> ./test_simulator_results.html
fi
if [ $CBRA_CHECK -gt 0 ]
then
echo "<font color = \"blue\">- CBRA procedure succeeded OK</font>" >> ./test_simulator_results.html
else
echo "<font color = \"red\"><b>- CBRA procedure succeeded KO</b></font>" >> ./test_simulator_results.html
fi
if [ $SIB1_CHECK -gt 0 ]
then
echo "<font color = \"blue\">- SIB1 decoded OK</font>" >> ./test_simulator_results.html
else
echo "<font color = \"red\"><b>- SIB1 decoded KO</b></font>" >> ./test_simulator_results.html
fi
echo " </pre></td>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html
fi
done
done
done
EPC_CONFIGS=("noS1") EPC_CONFIGS=("noS1")
TRANS_MODES=("tdd") TRANS_MODES=("tdd")
FR_MODE=("FR2") FR_MODE=("FR2")
......
This diff is collapsed.
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
- Terminate_MME - Terminate_MME
- Initialize_SPGW - Initialize_SPGW
- Terminate_SPGW - Terminate_SPGW
- Initialize_5GCN
- Terminate_5GCN
- Initialize_CatM_module - Initialize_CatM_module
- Terminate_CatM_module - Terminate_CatM_module
- Attach_CatM_module - Attach_CatM_module
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<testCase id="010101"> <testCase id="010101">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build eNB (USRP)</desc> <desc>Build eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
</testCase> </testCase>
</testCaseList> </testCaseList>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<testCase id="010101"> <testCase id="010101">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build eNB (USRP)</desc> <desc>Build eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
</testCase> </testCase>
</testCaseList> </testCaseList>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<testCase id="010101"> <testCase id="010101">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build eNB (USRP)</desc> <desc>Build eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
</testCase> </testCase>
</testCaseList> </testCaseList>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<testCase id="010101"> <testCase id="010101">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build eNB (USRP)</desc> <desc>Build eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
</testCase> </testCase>
</testCaseList> </testCaseList>
...@@ -24,21 +24,21 @@ ...@@ -24,21 +24,21 @@
<htmlTabRef>TEST-NSA-FR1-TM1</htmlTabRef> <htmlTabRef>TEST-NSA-FR1-TM1</htmlTabRef>
<htmlTabName>NSA Ping DL UL with QUECTEL</htmlTabName> <htmlTabName>NSA Ping DL UL with QUECTEL</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>3</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030000 030000
040000 040000
000002 000002
010000 010000
000001
050000 050000
050001 050001
000001 000001
070000 070000
000001 000001
070000 070001
000001 000001
010002 010002
000001
080001 080001
080000 080000
</TestCaseRequestedList> </TestCaseRequestedList>
...@@ -48,12 +48,13 @@ ...@@ -48,12 +48,13 @@
<class>Initialize_UE</class> <class>Initialize_UE</class>
<desc>Initialize Quectel</desc> <desc>Initialize Quectel</desc>
<id>idefix</id> <id>idefix</id>
<UE_Trace>yes</UE_Trace>
</testCase> </testCase>
<testCase id="010002"> <testCase id="010002">
<class>Detach_UE</class> <class>Terminate_UE</class>
<desc>Detach UE</desc> <desc>Terminate Quectel</desc>
<id>idefix</id> <id>idefix</id>
</testCase> </testCase>
...@@ -65,13 +66,14 @@ ...@@ -65,13 +66,14 @@
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId> <eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface> <air_interface>lte</air_interface>
<eNB_Trace>yes</eNB_Trace>
</testCase> </testCase>
<testCase id="040000"> <testCase id="040000">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize gNB</desc> <desc>Initialize gNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf -q</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q</Initialize_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface> <air_interface>nr</air_interface>
...@@ -109,7 +111,7 @@ ...@@ -109,7 +111,7 @@
<testCase id="070000"> <testCase id="070000">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc> <desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 20M -t 60 -i 1</iperf_args> <iperf_args>-u -b 20M -t 60</iperf_args>
<direction>DL</direction> <direction>DL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold> <iperf_packetloss_threshold>50</iperf_packetloss_threshold>
...@@ -119,7 +121,7 @@ ...@@ -119,7 +121,7 @@
<testCase id="070001"> <testCase id="070001">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc> <desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 3M -t 60 -i 1</iperf_args> <iperf_args>-u -b 3M -t 60</iperf_args>
<direction>UL</direction> <direction>UL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold> <iperf_packetloss_threshold>50</iperf_packetloss_threshold>
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>TEST-NSA-FR1-TM1</htmlTabRef>
<htmlTabName>NSA Ping Attach Detach with QUECTEL</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
030000
040000
000002
010000
000001
050000
000001
010004
000001
010003
000001
050000
000001
010004
000001
010003
000001
050000
000001
010002
080001
080000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>Initialize_UE</class>
<desc>Initialize Quectel</desc>
<id>idefix</id>
<UE_Trace>yes</UE_Trace>
</testCase>
<testCase id="010002">
<class>Terminate_UE</class>
<desc>Terminate Quectel</desc>
<id>idefix</id>
</testCase>
<testCase id="010003">
<class>Attach_UE</class>
<desc>Attach Quectel</desc>
<id>idefix</id>
</testCase>
<testCase id="010004">
<class>Detach_UE</class>
<desc>Detach Quectel</desc>
<id>idefix</id>
</testCase>
<testCase id="030000">
<class>Initialize_eNB</class>
<desc>Initialize eNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
<eNB_Trace>yes</eNB_Trace>
</testCase>
<testCase id="040000">
<class>Initialize_eNB</class>
<desc>Initialize gNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050000">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="070000">
<class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 20M -t 60</iperf_args>
<direction>DL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="070001">
<class>Iperf</class>
<desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 3M -t 60</iperf_args>
<direction>UL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="080000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
</testCase>
<testCase id="080001">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>TEST-NSA-FR1-TM1</htmlTabRef>
<htmlTabName>NSA Ping DL UL with QUECTEL (Longer)</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
030000
040000
000002
010000
000001
050000
050001
000001
070000
000001
070001
000001
010002
080001
080000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>Initialize_UE</class>
<desc>Initialize Quectel</desc>
<id>idefix</id>
</testCase>
<testCase id="010002">
<class>Terminate_UE</class>
<desc>Terminate Quectel</desc>
<id>idefix</id>
</testCase>
<testCase id="030000">
<class>Initialize_eNB</class>
<desc>Initialize eNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
<eNB_Trace>yes</eNB_Trace>
</testCase>
<testCase id="040000">
<class>Initialize_eNB</class>
<desc>Initialize gNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050000">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="070000">
<class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(600 sec)(single-ue profile)</desc>
<iperf_args>-u -b 20M -t 600</iperf_args>
<direction>DL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="070001">
<class>Iperf</class>
<desc>iperf (UL/3Mbps/UDP)(600 sec)(single-ue profile)</desc>
<iperf_args>-u -b 3M -t 600</iperf_args>
<direction>UL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="080000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
</testCase>
<testCase id="080001">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
</testCaseList>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<testCase id="010101"> <testCase id="010101">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build eNB (USRP -- Ethernet Fronthaul)</desc> <desc>Build eNB (USRP -- Ethernet Fronthaul)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
</testCase> </testCase>
</testCaseList> </testCaseList>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<testCase id="010101"> <testCase id="010101">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build eNB (USRP -- Ethernet Fronthaul)</desc> <desc>Build eNB (USRP -- Ethernet Fronthaul)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
</testCase> </testCase>
</testCaseList> </testCaseList>
<!--
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>cn5g-closure</htmlTabRef>
<htmlTabName>CN5G-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
060000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="060000">
<class>Terminate_5GCN</class>
<desc>Terminate 5G Core</desc>
</testCase>
</testCaseList>
<!--
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>cn5g-start-tab</htmlTabRef>
<htmlTabName>CN5G-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
000100
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000100">
<class>Initialize_5GCN</class>
<desc>Initialize 5G Core</desc>
</testCase>
</testCaseList>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<testCase id="010102"> <testCase id="010102">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build Slave eNB (USRP)</desc> <desc>Build Slave eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
</testCase> </testCase>
......
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:
- ./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:develop-2021-06-14
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:production
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:develop-2021-06-14
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:develop-2021-06-14
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
flexran_rtc:
image: flexran-rtc:production
privileged: true
container_name: rfsim4g-flexran-rtc
networks:
public_net:
ipv4_address: 192.168.61.10
healthcheck:
test: /bin/bash -c "pgrep rt_controller"
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: 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
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
networks:
private_net:
name: rfsim4g-oai-private-net
ipam:
config:
- subnet: 192.168.68.0/26
public_net:
name: rfsim4g-oai-public-net
ipam:
config:
- subnet: 192.168.61.0/26
CREATE KEYSPACE IF NOT EXISTS vhss WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '1'};
CREATE TABLE IF NOT EXISTS vhss.users_imsi (
imsi text PRIMARY KEY,
access_restriction int,
idmmeidentity int,
imei text,
imei_sv text,
key text,
lipa_permissions text,
mme_cap int,
mmehost text,
mmeidentity_idmmeidentity int,
mmerealm text,
ms_ps_status text,
msisdn bigint,
niddvalidity text,
nir_dest_host text,
nir_dest_realm text,
opc text,
pgw_id int,
rand text,
rfsp_index varint,
sqn bigint,
subscription_data text,
ue_reachability varint,
urrp_mme varint,
user_identifier text,
visited_plmnid text);
CREATE TABLE IF NOT EXISTS vhss.msisdn_imsi (
msisdn bigint PRIMARY KEY,
imsi text
);
CREATE TABLE IF NOT EXISTS vhss.global_ids (
table_name text PRIMARY KEY,
id counter);
CREATE TABLE IF NOT EXISTS vhss.mmeidentity_host (
mmehost text PRIMARY KEY,
idmmeidentity int,
mmerealm text,
ue_reachability varint,
mmeisdn text);
CREATE TABLE IF NOT EXISTS vhss.mmeidentity (
idmmeidentity int PRIMARY KEY,
mmehost text,
mmerealm text,
ue_reachability varint,
mmeisdn text);
CREATE TABLE IF NOT EXISTS vhss.events (
scef_id text,
scef_ref_id bigint,
extid text,
monitoring_event_configuration text,
monitoring_type int,
msisdn bigint,
user_identifier text,
primary key (scef_id, scef_ref_id)
);
CREATE TABLE IF NOT EXISTS vhss.events_msisdn (
msisdn bigint,
scef_id text,
scef_ref_id bigint,
primary key (msisdn, scef_id, scef_ref_id)
);
CREATE TABLE IF NOT EXISTS vhss.events_extid (
extid text,
scef_id text,
scef_ref_id bigint,
primary key (extid, scef_id, scef_ref_id)
);
CREATE TABLE IF NOT EXISTS vhss.extid (
extid text primary key
);
CREATE TABLE IF NOT EXISTS vhss.extid_imsi (
extid text,
imsi text,
primary key (extid, imsi)
);
CREATE TABLE IF NOT EXISTS vhss.extid_imsi_xref (
imsi text,
extid text,
primary key (imsi, extid)
);
This diff is collapsed.
...@@ -1101,7 +1101,9 @@ ...@@ -1101,7 +1101,9 @@
(Test16: 11 PTRS, 0 Interpolated Symbols), (Test16: 11 PTRS, 0 Interpolated Symbols),
(Test17: Mapping type A, 2 DMRS Symbols), (Test17: Mapping type A, 2 DMRS Symbols),
(Test18: Mapping type A, 3 DMRS Symbols), (Test18: Mapping type A, 3 DMRS Symbols),
(Test19: Mapping type B, 4 DMRS Symbols)</desc> (Test19: Mapping type B, 4 DMRS Symbols),
(Test20: 4x4 MIMO, 1 Layer),
(Test21: 4x4 MIMO, 2 Layers)</desc>
<pre_compile_prog></pre_compile_prog> <pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog> <compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args> --phy_simulators -c </compile_prog_args> <compile_prog_args> --phy_simulators -c </compile_prog_args>
...@@ -1126,8 +1128,10 @@ ...@@ -1126,8 +1128,10 @@
-n100 -s5 -T 2 0 4 -n100 -s5 -T 2 0 4
-n100 -s2 -U 2 0 1 -n100 -s2 -U 2 0 1
-n100 -s2 -U 2 0 2 -n100 -s2 -U 2 0 2
-n100 -s2 -U 2 1 3</main_exec_args> -n100 -s2 -U 2 1 3
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19</tags> -n10 -s20 -U 3 0 0 2 -gR -x1 -y4 -z4
-n10 -s20 -U 3 0 0 2 -gR -x2 -y4 -z4</main_exec_args>
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19 nr_dlsim.test20 nr_dlsim.test21</tags>
<search_expr_true>PDSCH test OK</search_expr_true> <search_expr_true>PDSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns> <nruns>3</nruns>
...@@ -1314,11 +1318,11 @@ ...@@ -1314,11 +1318,11 @@
-n100 -s5 -T 2 1 2 -U 2 0 2 -n100 -s5 -T 2 1 2 -U 2 0 2
-n100 -s5 -T 2 2 2 -U 2 1 2 -n100 -s5 -T 2 2 2 -U 2 1 2
-n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3 -n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3
-n100 -s2 -Z -n100 -s5 -Z
-n100 -s2 -Z -r75 -n100 -s5 -Z -r75
-n100 -s2 -Z -r216 -R217 -n50 -s5 -Z -r216 -R217
-n100 -s2 -Z -r270 -R273 -n50 -s5 -Z -r270 -R273
-n100 -s2 -Z -U 2 0 2 -n100 -s5 -Z -U 2 0 2
-n100 -m16 -s10 -z2</main_exec_args> -n100 -m16 -s10 -z2</main_exec_args>
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8 nr_ulsim.test9 nr_ulsim.test10 nr_ulsim.test11 nr_ulsim.test12 nr_ulsim.test13 nr_ulsim.test14 nr_ulsim.test15</tags> <tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8 nr_ulsim.test9 nr_ulsim.test10 nr_ulsim.test11 nr_ulsim.test12 nr_ulsim.test13 nr_ulsim.test14 nr_ulsim.test15</tags>
......
...@@ -273,6 +273,7 @@ function main() { ...@@ -273,6 +273,7 @@ function main() {
--nrUE) --nrUE)
RU=0 RU=0
nrUE=1 nrUE=1
rfsimNas=1
NR="True" NR="True"
echo_info "Will compile NR UE" echo_info "Will compile NR UE"
shift;; shift;;
...@@ -604,7 +605,7 @@ function main() { ...@@ -604,7 +605,7 @@ function main() {
config_libconfig_shlib=params_libconfig config_libconfig_shlib=params_libconfig
# first generate the CMakefile in the right directory # 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" ] ; then 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 # softmodem compilation
......
...@@ -154,21 +154,13 @@ install_protobuf_from_source(){ ...@@ -154,21 +154,13 @@ install_protobuf_from_source(){
cd /tmp || exit cd /tmp || exit
echo "Downloading protobuf" echo "Downloading protobuf"
#rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1 #rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1
#wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz #wget https://github.com/protocolbuffers/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner #tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
#cd protobuf-2.6.1/ #cd protobuf-2.6.1/
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0 rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz wget --tries=3 --retry-connrefused https://github.com/protocolbuffers/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $(id -u) --group $(id -g) --no-same-owner tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner "$USER" --group "$(groups | cut -d" " -f1)" --no-same-owner
cd protobuf-3.3.0/ cd protobuf-3.3.0/ || exit
else
export LD_LIBRARY_PATH=/usr/local/lib #protoc needs to know where toclook for shared libs
rm -rf /tmp/protobuf
git clone --depth=1 --branch=v3.3.0 https://github.com/protocolbuffers/protobuf.git /tmp/protobuf
cd /tmp/protobuf
git submodule update --init --recursive
./autogen.sh
fi
./configure ./configure
echo "Compiling protobuf" echo "Compiling protobuf"
make -j"$(nproc)" make -j"$(nproc)"
...@@ -339,6 +331,10 @@ check_install_ubuntu_packages() { ...@@ -339,6 +331,10 @@ check_install_ubuntu_packages() {
$SUDO apt install -y software-properties-common $SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in case "$(get_distribution_release)" in
"ubuntu20.04") "ubuntu20.04")
specific_packages="libtasn1-6-dev libgnutls28-dev iproute2 libconfig-dev"
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
;;
"ubuntu21.04") "ubuntu21.04")
specific_packages="libtasn1-6-dev libgnutls28-dev iproute2 libconfig-dev" specific_packages="libtasn1-6-dev libgnutls28-dev iproute2 libconfig-dev"
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu" LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
......
...@@ -256,14 +256,14 @@ install_protobuf_from_source(){ ...@@ -256,14 +256,14 @@ install_protobuf_from_source(){
cd /tmp cd /tmp
echo "Downloading protobuf" echo "Downloading protobuf"
#rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1 #rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1
#wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz #wget https://github.com/protocolbuffers/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner #tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
#cd protobuf-2.6.1/ #cd protobuf-2.6.1/
if [ $IS_CONTAINER -eq 0 ] if [ $IS_CONTAINER -eq 0 ]
then then
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0 rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz wget --tries=3 --retry-connrefused https://github.com/protocolbuffers/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $(id -u) --group $(id -g) --no-same-owner tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $(id -u) --group $(id -g) --no-same-owner
cd protobuf-3.3.0/ cd protobuf-3.3.0/
else else
......
#!/bin/bash
for i in $(seq 1 $1);
do
let table=1000+$i
echo "sudo ip route add 10.0.1.0/24 dev oaitun_ue$i table $table"
sudo ip route add 10.0.1.0/24 dev oaitun_ue$i table $table
echo "sudo ip route add default via 10.0.1.1 dev oaitun_ue$i table $table"
sudo ip route add default via 10.0.1.1 dev oaitun_ue$i table $table
let octet=$i+1
echo "sudo ip rule add from 10.0.1.$octet table $table"
sudo ip rule add from 10.0.1.$octet table $table
done
...@@ -211,7 +211,7 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) ...@@ -211,7 +211,7 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
while (c > 0 ) { while (c > 0 ) {
char *oneargv = strdup(config_get_if()->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */ char *oneargv = strdup(config_get_if()->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */
if(!oneargv) abort();
/* first check help options, either --help, -h or --help_<section> */ /* first check help options, either --help, -h or --help_<section> */
if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) { if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) {
char *tokctx = NULL; char *tokctx = NULL;
......
...@@ -460,7 +460,7 @@ int logInit (void) ...@@ -460,7 +460,7 @@ int logInit (void)
register_log_component("LOCALIZE","log",LOCALIZE); register_log_component("LOCALIZE","log",LOCALIZE);
register_log_component("NAS","log",NAS); register_log_component("NAS","log",NAS);
register_log_component("UDP","",UDP_); register_log_component("UDP","",UDP_);
register_log_component("GTPV1U","",GTPU); register_log_component("GTPU","",GTPU);
register_log_component("S1AP","",S1AP); register_log_component("S1AP","",S1AP);
register_log_component("F1AP","",F1AP); register_log_component("F1AP","",F1AP);
register_log_component("M2AP","",M2AP); register_log_component("M2AP","",M2AP);
......
...@@ -434,6 +434,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int ...@@ -434,6 +434,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
# define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format, 0);} while(0) # define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format, 0);} while(0)
# define LOG_VAR(A,B) A B # define LOG_VAR(A,B) A B
# define T_ACTIVE(a) (0)
# endif /* T_TRACER */ # endif /* T_TRACER */
/* avoid warnings for variables only used in LOG macro's but set outside debug section */ /* avoid warnings for variables only used in LOG macro's but set outside debug section */
#define GCC_NOTUSED __attribute__((unused)) #define GCC_NOTUSED __attribute__((unused))
......
#ifndef T_TRACER
int T_stdout; int T_stdout;
#endif
void exit_function(const char *file, const char *function, const int line, const char *s) { void exit_function(const char *file, const char *function, const int line, const char *s) {
} }
...@@ -111,8 +111,6 @@ const size_t nr_bandtable_size = sizeof(nr_bandtable) / sizeof(nr_bandentry_t); ...@@ -111,8 +111,6 @@ const size_t nr_bandtable_size = sizeof(nr_bandtable) / sizeof(nr_bandentry_t);
int NRRIV2BW(int locationAndBandwidth,int N_RB) { int NRRIV2BW(int locationAndBandwidth,int N_RB) {
int tmp = locationAndBandwidth/N_RB; int tmp = locationAndBandwidth/N_RB;
int tmp2 = locationAndBandwidth%N_RB; int tmp2 = locationAndBandwidth%N_RB;
if (tmp <= ((N_RB>>1)+1) && (tmp+tmp2)<N_RB) return(tmp+1); if (tmp <= ((N_RB>>1)+1) && (tmp+tmp2)<N_RB) return(tmp+1);
else return(N_RB+1-tmp); else return(N_RB+1-tmp);
...@@ -121,8 +119,6 @@ int NRRIV2BW(int locationAndBandwidth,int N_RB) { ...@@ -121,8 +119,6 @@ int NRRIV2BW(int locationAndBandwidth,int N_RB) {
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB) { int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB) {
int tmp = locationAndBandwidth/N_RB; int tmp = locationAndBandwidth/N_RB;
int tmp2 = locationAndBandwidth%N_RB; int tmp2 = locationAndBandwidth%N_RB;
if (tmp <= ((N_RB>>1)+1) && (tmp+tmp2)<N_RB) return(tmp2); if (tmp <= ((N_RB>>1)+1) && (tmp+tmp2)<N_RB) return(tmp2);
else return(N_RB-1-tmp2); else return(N_RB-1-tmp2);
} }
......
...@@ -136,7 +136,7 @@ extern "C" { ...@@ -136,7 +136,7 @@ extern "C" {
LOG_E(TMR,"Queue for %s task contains %ld messages\n", itti_get_task_name(destination_task_id), s ); LOG_E(TMR,"Queue for %s task contains %ld messages\n", itti_get_task_name(destination_task_id), s );
if ( s > 50 ) if ( s > 50 )
LOG_I(TMR,"Queue for %s task size: %ld\n",itti_get_task_name(destination_task_id), s+1); LOG_I(TMR,"Queue for %s task size: %ld (last message %s)\n",itti_get_task_name(destination_task_id), s+1,ITTI_MSG_NAME(message));
t->message_queue.insert(t->message_queue.begin(), message); t->message_queue.insert(t->message_queue.begin(), message);
eventfd_t sem_counter = 1; eventfd_t sem_counter = 1;
......
...@@ -346,6 +346,7 @@ void *rrc_enb_process_msg(void *); ...@@ -346,6 +346,7 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_GNB_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RRC_GNB_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL) TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL)
#define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc }, #define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc },
......
...@@ -96,6 +96,54 @@ static void read_pipe(int p, char *b, int size) { ...@@ -96,6 +96,54 @@ static void read_pipe(int p, char *b, int size) {
} }
} }
static int baseRunTimeCommand(char* cmd, size_t cmdSize) {
FILE *fp;
size_t retSize = 0;
fp = popen(cmd, "r");
if(fp) {
memset(cmd, 0, cmdSize);
retSize = fread(cmd, 1, cmdSize, fp);
fclose(fp);
} else {
LOG_D(HW,"%s:%d:%s: Cannot open %s\n", __FILE__, __LINE__, __FUNCTION__, cmd);
}
if (retSize == 0) {
return 0;
}
return atoi(cmd);
}
int checkIfFedoraDistribution(void) {
char cmd[200];
memset(cmd, 0, 200);
sprintf(cmd, "cat /etc/os-release | grep ID_LIKE | grep -ic fedora || true");
return baseRunTimeCommand(cmd, 200);
}
int checkIfGenericKernelOnFedora(void) {
char cmd[200];
memset(cmd, 0, 200);
sprintf(cmd, "uname -a | grep -c rt || true");
return (1 - baseRunTimeCommand(cmd, 200));
}
int checkIfInsideContainer(void) {
char cmd[200];
int res = 0;
memset(cmd, 0, 200);
sprintf(cmd, "cat /proc/self/cgroup | egrep -c 'libpod|podman|kubepods' || true");
res = baseRunTimeCommand(cmd, 200);
if (res > 0)
return 1;
else
return 0;
}
/********************************************************************/ /********************************************************************/
/* background process */ /* background process */
/********************************************************************/ /********************************************************************/
...@@ -200,12 +248,19 @@ void start_background_system(void) { ...@@ -200,12 +248,19 @@ void start_background_system(void) {
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){
pthread_attr_t attr; pthread_attr_t attr;
int ret; int ret;
int settingPriority = 1;
ret=pthread_attr_init(&attr); ret=pthread_attr_init(&attr);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
ret=pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); ret=pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
if (checkIfFedoraDistribution())
if (checkIfGenericKernelOnFedora())
if (checkIfInsideContainer())
settingPriority = 0;
if (settingPriority) {
ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI); ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
if(priority<sched_get_priority_min(SCHED_OAI) || priority>sched_get_priority_max(SCHED_FIFO)) { if(priority<sched_get_priority_min(SCHED_OAI) || priority>sched_get_priority_max(SCHED_FIFO)) {
...@@ -223,6 +278,8 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, ...@@ -223,6 +278,8 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
sparam.sched_priority = priority; sparam.sched_priority = priority;
ret=pthread_attr_setschedparam(&attr, &sparam); ret=pthread_attr_setschedparam(&attr, &sparam);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
}
ret=pthread_create(t, &attr, func, param); ret=pthread_create(t, &attr, func, param);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
......
...@@ -58,6 +58,14 @@ void thread_top_init(char *thread_name, ...@@ -58,6 +58,14 @@ void thread_top_init(char *thread_name,
uint64_t deadline, uint64_t deadline,
uint64_t period); uint64_t period);
/****************************************************
* Functions to check system at runtime.
****************************************************/
int checkIfFedoraDistribution(void);
int checkIfGenericKernelOnFedora(void);
int checkIfInsideContainer(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
extern "C" { extern "C" {
#endif #endif
#define sizeofArray(a) (sizeof(a)/sizeof(*(a)))
void *calloc_or_fail(size_t size); void *calloc_or_fail(size_t size);
void *malloc_or_fail(size_t size); void *malloc_or_fail(size_t size);
......
...@@ -238,7 +238,7 @@ MACRLCs = ( ...@@ -238,7 +238,7 @@ MACRLCs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa"; parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa";
worker_config = "ENABLE"; worker_config = "WORKER_ENABLE";
} }
); );
......
...@@ -257,7 +257,7 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -257,7 +257,7 @@ The following features are valid for the gNB and the 5G-NR UE.
* FDD * FDD
* Normal CP * Normal CP
* 30 kHz subcarrier spacing * 30 kHz subcarrier spacing
* Bandwidths up to 80MHz (217 Physical Resource Blocks) * Bandwidths: 10, 20, 40, 80, 100MHz (273 Physical Resource Blocks)
* Intermediate downlink and uplink frequencies to interface with IF equipment * Intermediate downlink and uplink frequencies to interface with IF equipment
* Single antenna port (single beam) * Single antenna port (single beam)
* Slot format: 14 OFDM symbols in UL or DL * Slot format: 14 OFDM symbols in UL or DL
...@@ -277,10 +277,20 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -277,10 +277,20 @@ The following features are valid for the gNB and the 5G-NR UE.
- user-specific search space configured by RRC - user-specific search space configured by RRC
- DCI formats: 00, 10 (01 and 11 **under integration**) - DCI formats: 00, 10 (01 and 11 **under integration**)
* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1 - PDSCH mapping type A and B
- PDSCH mapping type A - DMRS configuration type 1 and 2
* NR-CSI Generation of sequence at PHY (**under integration**) - Single and multiple DMRS symbols
- PTRS support
- Support for 1, 2 and 4 TX antennas
- Support for up to 2 layers (currently limited to DMRS configuration type 2)
* NR-CSIRS Generation of sequence at PHY
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- PUSCH mapping type A and B
- DMRS configuration type 1 and 2
- Single and multiple DMRS symbols
- PTRS support
- Support for 1 RX antenna
- Support for 1 layer
* NR-PUCCH * NR-PUCCH
- Format 0 (2 bits, mainly for ACK/NACK) - Format 0 (2 bits, mainly for ACK/NACK)
- Format 2 (up to 64 bits, mainly for CSI feedback) - Format 2 (up to 64 bits, mainly for CSI feedback)
...@@ -309,6 +319,7 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -309,6 +319,7 @@ The following features are valid for the gNB and the 5G-NR UE.
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU - MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
- Scheduler procedures for SIB1 - Scheduler procedures for SIB1
- Scheduler procedures for RA - Scheduler procedures for RA
- Scheduler procedures for CSI-RS
- MAC downlink scheduler (fixed allocations) - MAC downlink scheduler (fixed allocations)
- MAC header generation (including timing advance) - MAC header generation (including timing advance)
- ACK / NACK handling and HARQ procedures for downlink - ACK / NACK handling and HARQ procedures for downlink
...@@ -320,27 +331,32 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -320,27 +331,32 @@ The following features are valid for the gNB and the 5G-NR UE.
- Creates TUN interface to PDCP to inject and receive user-place traffic - Creates TUN interface to PDCP to inject and receive user-place traffic
- Will only work with OAI gNB configured in the same mode - Will only work with OAI gNB configured in the same mode
## UE PHY Layer ## ## NR UE PHY Layer ##
* Initial synchronization * Initial synchronization
* Time tracking based on PBCH DMRS * Time tracking based on PBCH DMRS
* Time tracking based on PBCH DMRS
* Frequency offset estimation * Frequency offset estimation
* PBCH RX
* PDCCH RX
* PDSCH RX, including a first version of dual stream receiver for PDSCH
* 30KHz SCS for FR1 and 120 KHz SCS for FR2 * 30KHz SCS for FR1 and 120 KHz SCS for FR2
* Generation of NR-PSS/NR-SSS * Reception of NR-PSS/NR-SSS
* NR-PBCH supports multiple SSBs and flexible periodicity * NR-PBCH supports multiple SSBs and flexible periodicity
* Generation of NR-PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc) * Reception of NR-PDCCH for SIB1 (including reception of DCI, polar decoding, de-scrambling, de-modulation, RB de-mapping, etc)
- common search space configured by MIB - common search space configured by MIB
- user-specific search space configured by RRC - user-specific search space configured by RRC
- DCI formats: 00, 10 (01 and 11 **under integration**) - DCI formats: 00, 10 (01 and 11 **under integration**)
* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * Reception of NR-PDSCH (including Segmentation, LDPC decoding, rate de-matching, de-scrambling, de-modulation, RB de-mapping, etc).
- Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1 - PDSCH mapping type A and B
- PDSCH mapping type A - DMRS configuration type 1 and 2
* NR-CSI Generation of sequence at PHY (**under integration**) - Single and multiple DMRS symbols
- PTRS support
- Support for 1, 2 and 4 RX antennas
- Support for up to 2 layers (currently limited to DMRS configuration type 2)
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- PUSCH mapping type A and B
- DMRS configuration type 1 and 2
- Single and multiple DMRS symbols
- PTRS support
- Support for 1 TX antenna
- Support for 1 layer
* NR-PUCCH * NR-PUCCH
- Format 0 (2 bits, mainly for ACK/NACK) - Format 0 (2 bits, mainly for ACK/NACK)
- Format 2 (up to 64 bits, mainly for CSI feedback) - Format 2 (up to 64 bits, mainly for CSI feedback)
...@@ -351,7 +367,7 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -351,7 +367,7 @@ The following features are valid for the gNB and the 5G-NR UE.
* Encoder and decoder for short block * Encoder and decoder for short block
## UE Higher Layers ## ## NR UE Higher Layers ##
**UE MAC** **UE MAC**
* Minimum system information (MSI) * Minimum system information (MSI)
......
...@@ -134,22 +134,24 @@ With the RF simulator (on the same machine): ...@@ -134,22 +134,24 @@ With the RF simulator (on the same machine):
## SA setup with OAI ## SA setup with OAI
The sa flag is used to run gNB in standalone mode. Currently OAI in NR standalone mode transmits and receives SIB1 and triggers the RA procedure for initial access. The sa flag is used to run gNB in standalone mode.
In order to run gNB in standalone mode, the following flag is needed at gNB: In order to run gNB and UE in standalone mode, the following flag is needed:
`--sa` `--sa`
### Run OAI in sa mode At the gNB the --sa flag does the following:
- The RRC encodes SIB1 according to the configuration file and transmits it through NR-BCCH-DL-SCH.
At the gNB the --sa flag does the following
- it reads the RRC configuration from the configuration file
- it encodes the RRCConfiguration and the RBconfig message and stores them in the binary files rbconfig.raw and reconfig.raw
- the RRC encodes SIB1 according the configuration file and transmits it through PDSCH
At the UE the --sa flag will: At the UE the --sa flag will:
- Read the binary files rbconfig.raw and reconfig.raw from the current directory (a different directory can be specified with the flag --rrc_config_path) and process them - Decode SIB1 and starts the 5G NR Initial Access Procedure for SA:
- After the successful decoding of a SIB1 at RRC, the UE will start the 5G NR Initial Access Procedure by triggering the RA procedure. 1) 5G-NR RRC Connection Setup
2) NAS Authentication and Security
3) 5G-NR AS Security Procedure
4) 5G-NR RRC Reconfiguration
5) Start Downlink and Uplink Data Transfer
### Run OAI in SA mode
From the `cmake_targets/ran_build/build` folder: From the `cmake_targets/ran_build/build` folder:
...@@ -159,13 +161,13 @@ gNB on machine 1: ...@@ -159,13 +161,13 @@ gNB on machine 1:
UE on machine 2: UE on machine 2:
`sudo ./nr-uesoftmodem --rrc_config_path . --sa` `sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --sa`
With the RF simulator (on the same machine): With the RF simulator (on the same machine):
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa` `sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa`
`sudo ./nr-uesoftmodem --rrc_config_path . --rfsim --sa` `sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa`
## IF setup with OAI ## IF setup with OAI
......
# OAI 5G SA tutorial [Under construction]
In the following tutorial we describe how to deploy configure and test the two SA OAI setups:
- SA setup with OAI gNB and COTS UE
- SA setup with OAI gNB and OAI UE
The operating system and hardware requirements to support OAI 5G NR are described [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/5g-nr-development-and-setup).
# 1. SA setup with COTS UE
At the moment of writing this document interoperability with the following COTS UE devices is being tested:
- [Quectel RM500Q-GL](https://www.quectel.com/product/5g-rm500q-gl/)
- [Simcom SIMCOM8200EA](https://www.simcom.com/product/SIM8200G.html)
- Huawei Mate 30 Pro
End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using the Quectel module and Huawei Mate 30 pro and partially validated with SIMCOM module. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with:
- [OAI CN](https://openairinterface.org/oai-5g-core-network-project/)
- Nokia SA Box
- [Free CN](https://www.free5gc.org/)
## 1.1 gNB build and configuration
At the moment of writing this document, most of the code to support the SA setup is not merged into develop branch yet, but it is accessible through the following branches:
- NR_SA_F1AP_5GRECORDS
- develop-NR_SA_F1AP_5GRECORDS (up-to-date with latest develop branch)
To build the gNB executable:
```bash
cd cmake_targets
./build_oai -I -w USRP #For OAI first time installation only to install software dependencies
./build_oai --gNB -w USRP
```
A reference configuration file for the gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop-NR_SA_F1AP_5GRECORDS/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf).
In the following, we highlight the fields of the file that have to be configured according to the configuration and interfaces of the Core Network. First, the PLMN section has to be filled with the proper values that match the configuration of the AMF and the UE USIM.
```bash
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({
mcc = 208;
mnc = 99;
mnc_length = 2;
snssaiList = (
{
sst = 1;
sd = 0x1; // 0 false, else true
},
{
sst = 1;
sd = 0x112233; // 0 false, else true
}
);
});
```
Then, the source and destination IP interfaces for the communication with
the Core Network also need to be set as shown below.
```bash
////////// MME parameters:
amf_ip_address = ( { ipv4 = "192.168.70.132";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24";
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
```
In the first part (*amf_ip_address*) we specify the IP of the AMF and in the second part (*NETWORK_INTERFACES*) we specify the gNB local interface with AMF (N2 interface) and the UPF (N3 interface).
### **gNB configuration in CU/DU split mode**
For the configuration of the gNB in CU and DU blocks the following sample configuration files are provided for the CU and DU entities respectively.
......
At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface have been validated. The integration of *F1-U* over gtp-u for the support of data plane traffic is ongoing.
## 1.2 OAI 5G Core Network installation and configuration
The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using docker compose can be found [here](https://gitlab.eurecom.fr/oai/cn5g). Below are some complementary instructions which can be useful for the deployment.
## 1.3 Execution of SA scenario
After having configured the gNB, we can start the individual components in the following sequence:
- Launch Core Network
- Launch gNB
- Launch COTS UE (disable airplane mode)
The execution command to start the gNB (in monolithic mode) is the following:
```bash
cd cmake_targets/ran_build/build
sudo ./nr-softmodem -E --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
```
# 2. SA Setup with OAI UE
The SA setup with OAI UE has been validated with RFSIMULATOR for the moment. The control plane for the successful UE registration and PDU Session establishment has been verified with OAI and Nokia SA Box CNs. User-plane traffic validation after the establishment of the 5G connection is still pending for this setup.
In the following, we provide the instructions on how to build, configure and execute this SA setup.
## 2.1 Build and configuration
To build the gNB and OAI UE executables:
```bash
cd cmake_targets
./build_oai -I #For OAI first time installation only to install software dependencies
./build_oai --gNB --nrUE -w SIMU
```
The gNB configuration can be performed according to what is described in section 1.1, using the same reference configuration file as with the RF scenario.
### NAS configuration for the OAI UE
At the moment, the NAS configuration parameters of the OAI UE are hardcoded in ***openair3/NAS/NR_UE/nr_nas_msg_sim.c***. More specifically:
- The SUCI (*Subscription Concealed Identifier*) corresponding to default IMSI 2089900007487 is hardcoded in functions *generateRegistrationRequest()* and *generateIdentityResponse()* through the following lines:
```bash
mm_msg->registration_request.fgsmobileidentity.suci.typeofidentity = FGS_MOBILE_IDENTITY_SUCI;
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit1 = 9;
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit2 = 9;
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit3 = 0xf;
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit1 = 2;
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit2 = 0;
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit3 = 8;
mm_msg->registration_request.fgsmobileidentity.suci.schemeoutput = 0x4778;
```
- USIM_API_K and OPc keys are hardcoded at the beginning of the file:
```bash
// USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f
uint8_t k[16] = {0xfe, 0xc8, 0x6b, 0xa6, 0xeb, 0x70, 0x7e, 0xd0, 0x89, 0x05, 0x75, 0x7b, 0x1b, 0xb4, 0x4b, 0x8f};
// OPC: c4 24 49 36 3b ba d0 2b 66 d1 6b c9 75 d7 7c c1
const uint8_t opc[16] = {0xc4, 0x24, 0x49, 0x36, 0x3b, 0xba, 0xd0, 0x2b, 0x66, 0xd1, 0x6b, 0xc9, 0x75, 0xd7, 0x7c, 0xc1};
```
- The NSSAI (*Network Slice Assistance Information*) and DNN (*Data Network Name*) are hardcoded in function *generatePduSessionEstablishRequest()*
```bash
uint8_t nssai[]={1,0,0,1}; //Corresponding to SST:1, SD:1
uint8_t dnn[4]={0x4,0x6f,0x61,0x69}; //Corresponding to dnn:"oai"
```
For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network.
Hardcoding of the USIM information will soon be substituted with parsing those parameters from a configuration file.
## 2.2 Execution of SA scenario
The order of starting the different components should be the same as the one described in section 1.3.
- To launch the gNB:
```bash
sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa
```
- To launch the OAI UE:
```bash
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod
```
The IP address at the execution command of the OAI UE corresponds to the target IP of the gNB host that the RFSIMULATOR at the UE will connect to. In the above example, we assume that the gNB and UE are running on the same host so the specified address (127.0.0.1) is the one of the loopback interface.
...@@ -44,6 +44,7 @@ Our code might not work with all 5G phones yet, but we are constantly improving ...@@ -44,6 +44,7 @@ Our code might not work with all 5G phones yet, but we are constantly improving
* Oppo Reno 5G * Oppo Reno 5G
* Samsung A90 5G * Samsung A90 5G
* Samsung A42 5G
* Google Pixel 5G (note1) * Google Pixel 5G (note1)
* Simcom SIMCOM8200EA * Simcom SIMCOM8200EA
* Quectel RM500Q-GL * Quectel RM500Q-GL
......
...@@ -238,7 +238,7 @@ MACRLCs = ( ...@@ -238,7 +238,7 @@ MACRLCs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa"; parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa";
worker_config = "ENABLE"; worker_config = "WORKER_ENABLE";
} }
); );
......
...@@ -60,6 +60,7 @@ RUN apt-get update && \ ...@@ -60,6 +60,7 @@ RUN apt-get update && \
net-tools \ net-tools \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
# At time of writing, it is 3.14 # At time of writing, it is 3.14
......
#/*
# * 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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for RHEL8
#
#---------------------------------------------------------------------
FROM ran-build:latest AS ru-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --RU --ninja -w USRP --verbose-ci
RUN yum install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru
ENV TZ=Europe/Paris
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
tzdata \
atlas \
net-tools \
iputils \
iproute && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-lte-ru/bin
COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
# Copying from the ran-build image the USRP needed packages
COPY --from=ru-build /lib64/libconfig.so.9 /lib64
COPY --from=ru-build /lib64/libblas.so.3 /lib64
COPY --from=ru-build /lib64/liblapack.so.3 /lib64
COPY --from=ru-build /lib64/liblapacke.so.3 /lib64
COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_program_options.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_serialization.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_thread.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
ldconfig
# Copy the relevant configuration files for RRU
WORKDIR /opt/oai-lte-ru/etc
COPY --from=ru-build /oai-ran/docker/etc/rru* ./
WORKDIR /opt/oai-lte-ru
ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
#/*
# * 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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
#
#---------------------------------------------------------------------
FROM ran-build:latest AS ru-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --RU --ninja -w USRP --verbose-ci
RUN apt-get install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM ubuntu:bionic as oai-lte-ru
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
tzdata \
software-properties-common \
libblas3 \
libatlas3-base \
libconfig9 \
net-tools \
iputils-ping \
iproute2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \
libusb-1.0-0 \
libuhd003 \
uhd-host && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-lte-ru/bin
COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
ldconfig
# Copy the relevant configuration files for RRU
WORKDIR /opt/oai-lte-ru/etc
COPY --from=ru-build /oai-ran/docker/etc/rru* ./
WORKDIR /opt/oai-lte-ru
ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
...@@ -61,6 +61,7 @@ RUN apt-get update && \ ...@@ -61,6 +61,7 @@ RUN apt-get update && \
net-tools \ net-tools \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
# At time of writing, it is 3.14 # At time of writing, it is 3.14
......
...@@ -11,6 +11,8 @@ if [[ -v USE_FDD_DU ]]; then ln -s $PREFIX/etc/du.fdd.conf $PREFIX/etc/enb.conf; ...@@ -11,6 +11,8 @@ if [[ -v USE_FDD_DU ]]; then ln -s $PREFIX/etc/du.fdd.conf $PREFIX/etc/enb.conf;
if [[ -v USE_FDD_MONO ]]; then ln -s $PREFIX/etc/enb.fdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_FDD_MONO ]]; then ln -s $PREFIX/etc/enb.fdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_TDD_MONO ]]; then ln -s $PREFIX/etc/enb.tdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_TDD_MONO ]]; then ln -s $PREFIX/etc/enb.tdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_FDD_FAPI_RCC ]]; then ln -s $PREFIX/etc/rcc.nfapi.fdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_FDD_FAPI_RCC ]]; then ln -s $PREFIX/etc/rcc.nfapi.fdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_FDD_IF4P5_RCC ]]; then ln -s $PREFIX/etc/rcc.if4p5.fdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_TDD_IF4P5_RCC ]]; then ln -s $PREFIX/etc/rcc.if4p5.tdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/enb.conf; fi
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
dest_dir: docker/etc dest_dir: docker/etc
- configurations: - configurations:
- filePrefix: cu - filePrefix: cu.band7.tm1.25PRB
outputfilename: "cu.fdd.conf" outputfilename: "cu.fdd.conf"
config: config:
- key: Active_eNBs - key: Active_eNBs
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
- key: ENB_IPV4_ADDRESS_FOR_X2C - key: ENB_IPV4_ADDRESS_FOR_X2C
env: "@F1_CU_IP_ADDRESS@" env: "@F1_CU_IP_ADDRESS@"
- filePrefix: du - filePrefix: du.band7.tm1.25PRB
outputfilename: "du.fdd.conf" outputfilename: "du.fdd.conf"
config: config:
- key: Active_eNBs - key: Active_eNBs
...@@ -248,3 +248,89 @@ ...@@ -248,3 +248,89 @@
- key: ENB_IPV4_ADDRESS_FOR_X2C - key: ENB_IPV4_ADDRESS_FOR_X2C
env: "@F1_CU_IP_ADDRESS@" env: "@F1_CU_IP_ADDRESS@"
- filePrefix: "rcc.band7.tm1.if4p5.lo.25PRB"
outputfilename: "rcc.if4p5.fdd.conf"
config:
- key: Active_eNBs
env: "@ENB_NAME@"
- key: eNB_name
env: "@ENB_NAME@"
- key: plmn_list
env:
mcc: "@MCC@"
mnc: "@MNC@"
mnc_length: "@MNC_LENGTH@"
- key: tracking_area_code
env: "@TAC@"
- key: eutra_band
env: "@UTRA_BAND_ID@"
- key: downlink_frequency
env: "@DL_FREQUENCY_IN_MHZ@000000"
- key: uplink_frequency_offset
env: "@UL_FREQUENCY_OFFSET_IN_MHZ@000000"
- key: Nid_cell
env: "@NID_CELL@"
- key: N_RB_DL
env: "@NB_PRB@"
- key: ipv4
env: "@MME_S1C_IP_ADDRESS@"
- key: ENB_INTERFACE_NAME_FOR_S1_MME
env: "@RCC_IF_NAME@"
- key: ENB_IPV4_ADDRESS_FOR_S1_MME
env: "@RCC_S1C_IP_ADDRESS@"
- key: ENB_INTERFACE_NAME_FOR_S1U
env: "@RCC_IF_NAME@"
- key: ENB_IPV4_ADDRESS_FOR_S1U
env: "@RCC_IP_ADDRESS@"
- key: ENB_IPV4_ADDRESS_FOR_X2C
env: "@RCC_IP_ADDRESS@"
- key: local_if_name
env: "@IF4P5_IF_NAME@"
- key: remote_address
env: "@IF4P5_RRU_IP_ADDRESS@"
- key: local_address
env: "@IF4P5_RCC_IP_ADDRESS@"
- filePrefix: "rcc.band40.tm1.25PRB"
outputfilename: "rcc.if4p5.tdd.conf"
config:
- key: Active_eNBs
env: "@ENB_NAME@"
- key: eNB_name
env: "@ENB_NAME@"
- key: plmn_list
env:
mcc: "@MCC@"
mnc: "@MNC@"
mnc_length: "@MNC_LENGTH@"
- key: tracking_area_code
env: "@TAC@"
- key: eutra_band
env: "@UTRA_BAND_ID@"
- key: downlink_frequency
env: "@DL_FREQUENCY_IN_MHZ@000000"
- key: uplink_frequency_offset
env: "@UL_FREQUENCY_OFFSET_IN_MHZ@000000"
- key: Nid_cell
env: "@NID_CELL@"
- key: N_RB_DL
env: "@NB_PRB@"
- key: ipv4
env: "@MME_S1C_IP_ADDRESS@"
- key: ENB_INTERFACE_NAME_FOR_S1_MME
env: "@RCC_IF_NAME@"
- key: ENB_IPV4_ADDRESS_FOR_S1_MME
env: "@RCC_S1C_IP_ADDRESS@"
- key: ENB_INTERFACE_NAME_FOR_S1U
env: "@RCC_IF_NAME@"
- key: ENB_IPV4_ADDRESS_FOR_S1U
env: "@RCC_IP_ADDRESS@"
- key: ENB_IPV4_ADDRESS_FOR_X2C
env: "@RCC_IP_ADDRESS@"
- key: local_if_name
env: "@IF4P5_IF_NAME@"
- key: remote_address
env: "@IF4P5_RRU_IP_ADDRESS@"
- key: local_address
env: "@IF4P5_RCC_IP_ADDRESS@"
...@@ -39,20 +39,24 @@ def main(): ...@@ -39,20 +39,24 @@ def main():
for config in data[1]["configurations"]: for config in data[1]["configurations"]:
filePrefix = config["filePrefix"] filePrefix = config["filePrefix"]
outputfilename = config["outputfilename"] outputfilename = config["outputfilename"]
print('================================================')
print('filePrefix = ' + filePrefix) print('filePrefix = ' + filePrefix)
print('outputfilename = ' + outputfilename) print('outputfilename = ' + outputfilename)
for inputfile in dir: for inputfile in dir:
if inputfile.find(filePrefix) >=0: if inputfile.find(filePrefix) >=0:
prefix_outputfile = {"cu": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', prefix_outputfile = {"cu.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"du": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.fdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "rru.fdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.if4p5.lo.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band40.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}' "ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
} }
print('inputfile = ' + inputfile)
if filePrefix in prefix_outputfile: if filePrefix in prefix_outputfile:
outputfile1 = prefix_outputfile[filePrefix] outputfile1 = prefix_outputfile[filePrefix]
......
#!/bin/bash
set -euo pipefail
PREFIX=/opt/oai-lte-ru
# Based another env var, pick one template to use
if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/rru.conf; fi
if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/rru.conf; fi
# Only this template will be manipulated
CONFIG_FILES=`ls $PREFIX/etc/rru.conf || true`
for c in ${CONFIG_FILES}; do
# grep variable names (format: ${VAR}) from template to be rendered
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
# create sed expressions for substituting each occurrence of ${VAR}
# with the value of the environment variable "VAR"
EXPRESSIONS=""
for v in ${VARS}; do
NEW_VAR=`echo $v | sed -e "s#@##g"`
if [[ "${!NEW_VAR}x" == "x" ]]; then
echo "Error: Environment variable '${NEW_VAR}' is not set." \
"Config file '$(basename $c)' requires all of $VARS."
exit 1
fi
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
done
EXPRESSIONS="${EXPRESSIONS#';'}"
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
done
# Load the USRP binaries
if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
fi
echo "=================================="
echo "== Starting eNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
done
for word in ${USE_ADDITIONAL_OPTIONS}; do
new_args+=("$word")
done
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "$@"
exec "$@"
fi
...@@ -73,7 +73,6 @@ int sync_var=-1; //!< protected by mutex \ref sync_mutex. ...@@ -73,7 +73,6 @@ int sync_var=-1; //!< protected by mutex \ref sync_mutex.
int config_sync_var=-1; int config_sync_var=-1;
volatile int oai_exit = 0; volatile int oai_exit = 0;
double cpuf; double cpuf;
msc_interface_t msc_interface;
THREAD_STRUCT thread_struct; THREAD_STRUCT thread_struct;
uint16_t sf_ahead=4; uint16_t sf_ahead=4;
...@@ -86,6 +85,7 @@ char * split73_config; ...@@ -86,6 +85,7 @@ char * split73_config;
int split73; int split73;
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB]= {0}; AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB]= {0};
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB]= {0}; AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB]= {0};
uint8_t proto_agent_flag = 0;
void flexran_agent_slice_update(mid_t module_idP) { void flexran_agent_slice_update(mid_t module_idP) {
} }
int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p){ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p){
......
...@@ -87,6 +87,8 @@ ...@@ -87,6 +87,8 @@
#include "nfapi/oai_integration/vendor_ext.h" #include "nfapi/oai_integration/vendor_ext.h"
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include <nfapi/oai_integration/nfapi_pnf.h> #include <nfapi/oai_integration/nfapi_pnf.h>
#include <openair1/PHY/NR_TRANSPORT/nr_ulsch.h>
#include <PHY/NR_ESTIMATION/nr_ul_estimation.h>
//#define DEBUG_THREADS 1 //#define DEBUG_THREADS 1
//#define USRP_DEBUG 1 //#define USRP_DEBUG 1
...@@ -348,6 +350,22 @@ static void *process_stats_thread(void *param) { ...@@ -348,6 +350,22 @@ static void *process_stats_thread(void *param) {
return(NULL); return(NULL);
} }
void *nrL1_stats_thread(void *param) {
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
wait_sync("L1_stats_thread");
FILE *fd;
while (!oai_exit) {
sleep(1);
fd=fopen("nrL1_stats.log","w");
AssertFatal(fd!=NULL,"Cannot open nrL1_stats.log\n");
dump_nr_I0_stats(fd,gNB);
dump_pusch_stats(fd,gNB);
// nr_dump_uci_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx);
fclose(fd);
}
return(NULL);
}
void init_gNB_Tpool(int inst) { void init_gNB_Tpool(int inst) {
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
gNB = RC.gNB[inst]; gNB = RC.gNB[inst];
...@@ -366,6 +384,7 @@ void init_gNB_Tpool(int inst) { ...@@ -366,6 +384,7 @@ void init_gNB_Tpool(int inst) {
sprintf(ul_pool+2+s_offset,",-1"); sprintf(ul_pool+2+s_offset,",-1");
s_offset += 3; s_offset += 3;
} }
if (getenv("noThreads")) strcpy(ul_pool, "n");
initTpool(ul_pool, gNB->threadPool, false); initTpool(ul_pool, gNB->threadPool, false);
// ULSCH decoder result FIFO // ULSCH decoder result FIFO
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
...@@ -384,7 +403,9 @@ void init_gNB_Tpool(int inst) { ...@@ -384,7 +403,9 @@ void init_gNB_Tpool(int inst) {
initNotifiedFIFO(gNB->resp_RU_tx); initNotifiedFIFO(gNB->resp_RU_tx);
// Stats measurement thread // Stats measurement thread
if(opp_enabled == 1) threadCreate(&proc->L1_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW); if(opp_enabled == 1) threadCreate(&proc->process_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW);
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
} }
......
...@@ -24,14 +24,8 @@ ...@@ -24,14 +24,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sched.h> #include <sched.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <signal.h>
#include <execinfo.h>
#include <getopt.h>
#include <sys/sysinfo.h> #include <sys/sysinfo.h>
#include <math.h> #include <math.h>
...@@ -39,7 +33,6 @@ ...@@ -39,7 +33,6 @@
#include "common/utils/assertions.h" #include "common/utils/assertions.h"
#include "common/utils/system.h" #include "common/utils/system.h"
#include "msc.h"
#include "../../ARCH/COMMON/common_lib.h" #include "../../ARCH/COMMON/common_lib.h"
#include "../../ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "../../ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
...@@ -50,20 +43,15 @@ ...@@ -50,20 +43,15 @@
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs_nr_common.h" #include "PHY/defs_nr_common.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
#include "SCHED/sched_eNB.h"
#include "SCHED_NR/sched_nr.h" #include "SCHED_NR/sched_nr.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/phy_interface.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "enb_config.h"
#include <executables/softmodem-common.h> #include <executables/softmodem-common.h>
#ifdef SMBV #ifdef SMBV
...@@ -758,7 +746,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { ...@@ -758,7 +746,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
// currently we switch beams every 10 slots (should = 1 TDD period in FR2) and we take the beam index of the first symbol of the first slot of this period // currently we switch beams every 10 slots (should = 1 TDD period in FR2) and we take the beam index of the first symbol of the first slot of this period
int beam=0; int beam=0;
if (slot%10==0) { if (slot%10==0) {
if (ru->common.beam_id[0][slot*fp->symbols_per_slot] < 8) { if ( ru->common.beam_id && (ru->common.beam_id[0][slot*fp->symbols_per_slot] < 8)) {
beam = ru->common.beam_id[0][slot*fp->symbols_per_slot] | 8; beam = ru->common.beam_id[0][slot*fp->symbols_per_slot] | 8;
} }
} }
...@@ -904,6 +892,18 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { ...@@ -904,6 +892,18 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
cfg->tx_bw = 80e6; cfg->tx_bw = 80e6;
cfg->rx_bw = 80e6; cfg->rx_bw = 80e6;
} }
break;
case 133 :
if (fp->threequarter_fs) {
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",N_RB);
}
else {
cfg->sample_rate=61.44e6;
cfg->samples_per_frame = 614400;
cfg->tx_bw = 50e6;
cfg->rx_bw = 50e6;
}
break; break;
case 106: case 106:
if (fp->threequarter_fs) { if (fp->threequarter_fs) {
...@@ -1948,37 +1948,39 @@ static void NRRCconfig_RU(void) ...@@ -1948,37 +1948,39 @@ static void NRRCconfig_RU(void)
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) { if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) {
if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) {
RC.ru[j]->openair0_cfg.clock_source = internal; RC.ru[j]->openair0_cfg.clock_source = internal;
LOG_D(PHY, "RU clock source set as internal\n"); LOG_I(PHY, "RU clock source set as internal\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "external") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "external") == 0) {
RC.ru[j]->openair0_cfg.clock_source = external; RC.ru[j]->openair0_cfg.clock_source = external;
LOG_D(PHY, "RU clock source set as external\n"); LOG_I(PHY, "RU clock source set as external\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "gpsdo") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "gpsdo") == 0) {
RC.ru[j]->openair0_cfg.clock_source = gpsdo; RC.ru[j]->openair0_cfg.clock_source = gpsdo;
LOG_D(PHY, "RU clock source set as gpsdo\n"); LOG_I(PHY, "RU clock source set as gpsdo\n");
} else { } else {
LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
} }
} }
else { else {
RC.ru[j]->openair0_cfg.clock_source = unset; LOG_I(PHY,"Setting clock source to internal\n");
RC.ru[j]->openair0_cfg.clock_source = internal;
} }
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) { if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) {
if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) {
RC.ru[j]->openair0_cfg.time_source = internal; RC.ru[j]->openair0_cfg.time_source = internal;
LOG_D(PHY, "RU time source set as internal\n"); LOG_I(PHY, "RU time source set as internal\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) {
RC.ru[j]->openair0_cfg.time_source = external; RC.ru[j]->openair0_cfg.time_source = external;
LOG_D(PHY, "RU time source set as external\n"); LOG_I(PHY, "RU time source set as external\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) {
RC.ru[j]->openair0_cfg.time_source = gpsdo; RC.ru[j]->openair0_cfg.time_source = gpsdo;
LOG_D(PHY, "RU time source set as gpsdo\n"); LOG_I(PHY, "RU time source set as gpsdo\n");
} else { } else {
LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
} }
} }
else { else {
RC.ru[j]->openair0_cfg.time_source = unset; LOG_I(PHY,"Setting time source to internal\n");
RC.ru[j]->openair0_cfg.time_source = internal;
} }
if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
...@@ -2059,6 +2061,7 @@ static void NRRCconfig_RU(void) ...@@ -2059,6 +2061,7 @@ static void NRRCconfig_RU(void)
RC.ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr); RC.ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr);
RC.ru[j]->if_frequency = *(RUParamList.paramarray[j][RU_IF_FREQUENCY].u64ptr); RC.ru[j]->if_frequency = *(RUParamList.paramarray[j][RU_IF_FREQUENCY].u64ptr);
RC.ru[j]->if_freq_offset = *(RUParamList.paramarray[j][RU_IF_FREQ_OFFSET].iptr); RC.ru[j]->if_freq_offset = *(RUParamList.paramarray[j][RU_IF_FREQ_OFFSET].iptr);
RC.ru[j]->do_precoding = *(RUParamList.paramarray[j][RU_DO_PRECODING].iptr);
if (config_isparamset(RUParamList.paramarray[j], RU_BF_WEIGHTS_LIST_IDX)) { if (config_isparamset(RUParamList.paramarray[j], RU_BF_WEIGHTS_LIST_IDX)) {
RC.ru[j]->nb_bfw = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].numelt; RC.ru[j]->nb_bfw = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].numelt;
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n" #define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
#define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n" #define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
#define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n" #define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n"
#define CONFIG_HLP_DLNL_PHYTEST "Set the downlink nrOfLayers for PHYTEST mode\n"
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n" #define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n" #define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n" #define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
......
...@@ -98,7 +98,6 @@ pthread_cond_t sync_cond; ...@@ -98,7 +98,6 @@ pthread_cond_t sync_cond;
pthread_mutex_t sync_mutex; pthread_mutex_t sync_mutex;
int sync_var=-1; //!< protected by mutex \ref sync_mutex. int sync_var=-1; //!< protected by mutex \ref sync_mutex.
int config_sync_var=-1; int config_sync_var=-1;
msc_interface_t msc_interface;
volatile int start_gNB = 0; volatile int start_gNB = 0;
volatile int oai_exit = 0; volatile int oai_exit = 0;
...@@ -165,6 +164,8 @@ uint32_t timing_advance = 0; ...@@ -165,6 +164,8 @@ uint32_t timing_advance = 0;
uint64_t num_missed_slots=0; // counter for the number of missed slots uint64_t num_missed_slots=0; // counter for the number of missed slots
#include <executables/split_headers.h> #include <executables/split_headers.h>
#include <SIMULATION/ETH_TRANSPORT/proto.h>
int split73=0; int split73=0;
void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) { void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) {
AssertFatal(false, "Must not be called in this context\n"); AssertFatal(false, "Must not be called in this context\n");
...@@ -344,7 +345,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -344,7 +345,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0 && get_softmodem_params()->sa==0)) { if (AMF_MODE_ENABLED) {
if (gnb_nb > 0) { if (gnb_nb > 0) {
/* /*
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
...@@ -369,25 +370,31 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -369,25 +370,31 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
if (itti_create_task (TASK_GTPV1_U, &gtpv1u_gNB_task, NULL) < 0) { /*if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n"); LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1; return -1;
}*/
} }
} }
}
if (gnb_nb > 0) { if (gnb_nb > 0) {
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) { if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
LOG_E(GNB_APP, "Create task for gNB APP failed\n"); LOG_E(GNB_APP, "Create task for gNB APP failed\n");
return -1; return -1;
} }
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) { if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n"); LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n");
return -1; return -1;
} }
//Use check on x2ap to consider the NSA scenario and check on AMF_MODE_ENABLED for the SA scenario
if(is_x2ap_enabled() || AMF_MODE_ENABLED){
if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1;
}
}
} }
return 0; return 0;
...@@ -623,33 +630,36 @@ static void wait_nfapi_init(char *thread_name) { ...@@ -623,33 +630,36 @@ static void wait_nfapi_init(char *thread_name) {
} }
void init_pdcp(void) { void init_pdcp(void) {
//if (!NODE_IS_DU(RC.rrc[0]->node_type)) { if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
pdcp_layer_init(); // pdcp_layer_init();
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1) { if (IS_SOFTMODEM_NOS1) {
printf("IS_SOFTMODEM_NOS1 option enabled \n"); printf("IS_SOFTMODEM_NOS1 option enabled \n");
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ; pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
} }
pdcp_module_init(pdcp_initmask); pdcp_module_init(pdcp_initmask);
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) { if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
LOG_I(PDCP, "node is CU, pdcp send rlc_data_req by proto_agent \n");
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req); pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
} else {*/ } else {
LOG_I(PDCP, "node is gNB \n");
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req); pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind); pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
//} }
/*} else { } else {
LOG_I(PDCP, "node is DU, rlc send pdcp_data_ind by proto_agent \n");
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind); pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
}*/ }
} }
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
int ru_id, CC_id = 0; int ru_id, CC_id = 0;
start_background_system(); start_background_system();
///static configuration for NR at the moment ///static configuration for NR at the moment
...@@ -675,8 +685,8 @@ int main( int argc, char **argv ) ...@@ -675,8 +685,8 @@ int main( int argc, char **argv )
} }
openair0_cfg[0].threequarter_fs = threequarter_fs; openair0_cfg[0].threequarter_fs = threequarter_fs;
AMF_MODE_ENABLED = !IS_SOFTMODEM_NOS1; //!get_softmodem_params()->phy_test; AMF_MODE_ENABLED = get_softmodem_params()->sa;
NGAP_CONF_MODE = !IS_SOFTMODEM_NOS1; //!get_softmodem_params()->phy_test; NGAP_CONF_MODE = get_softmodem_params()->sa;
if (get_softmodem_params()->do_ra) if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n"); AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
...@@ -717,15 +727,11 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -717,15 +727,11 @@ if(!IS_SOFTMODEM_NOS1)
#endif #endif
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
if(IS_SOFTMODEM_NOS1)
init_pdcp();
if (RC.nb_nr_L1_inst > 0) if (RC.nb_nr_L1_inst > 0)
RCconfig_NR_L1(); RCconfig_NR_L1();
if (RC.nb_nr_inst > 0) {
// don't create if node doesn't connect to RRC/S1/GTP // don't create if node doesn't connect to RRC/S1/GTP
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n"); AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
}
/* Start the agent. If it is turned off in the configuration, it won't start */ /* Start the agent. If it is turned off in the configuration, it won't start */
/* /*
...@@ -806,6 +812,7 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -806,6 +812,7 @@ if(!IS_SOFTMODEM_NOS1)
wait_nfapi_init("main?"); wait_nfapi_init("main?");
} }
if (RC.nb_nr_L1_inst > 0) {
printf("wait RUs\n"); printf("wait RUs\n");
wait_RUs(); wait_RUs();
printf("ALL RUs READY!\n"); printf("ALL RUs READY!\n");
...@@ -836,6 +843,7 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -836,6 +843,7 @@ if(!IS_SOFTMODEM_NOS1)
sync_var=0; sync_var=0;
pthread_cond_broadcast(&sync_cond); pthread_cond_broadcast(&sync_cond);
pthread_mutex_unlock(&sync_mutex); pthread_mutex_unlock(&sync_mutex);
}
printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__); printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
end_configmodule(); end_configmodule();
printf("Called end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__); printf("Called end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
...@@ -873,7 +881,10 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -873,7 +881,10 @@ if(!IS_SOFTMODEM_NOS1)
printf("stopping MODEM threads\n"); printf("stopping MODEM threads\n");
// cleanup // cleanup
stop_gNB(NB_gNB_INST); stop_gNB(NB_gNB_INST);
if (RC.nb_nr_L1_inst > 0) {
stop_RU(NB_RU); stop_RU(NB_RU);
}
/* release memory used by the RU/gNB threads (incomplete), after all /* release memory used by the RU/gNB threads (incomplete), after all
* threads have been stopped (they partially use the same memory) */ * threads have been stopped (they partially use the same memory) */
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \ {"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \ {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
{"m" , CONFIG_HLP_DLMCS_PHYTEST,0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \ {"m" , CONFIG_HLP_DLMCS_PHYTEST,0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"l" , CONFIG_HLP_DLNL_PHYTEST,0, uptr:&target_dl_Nl, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS_PHYTEST,0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \ {"t" , CONFIG_HLP_ULMCS_PHYTEST,0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"M" , CONFIG_HLP_DLBW_PHYTEST,0, uptr:&target_dl_bw, defintval:0, TYPE_UINT, 0}, \ {"M" , CONFIG_HLP_DLBW_PHYTEST,0, uptr:&target_dl_bw, defintval:0, TYPE_UINT, 0}, \
{"T" , CONFIG_HLP_ULBW_PHYTEST,0, uptr:&target_ul_bw, defintval:0, TYPE_UINT, 0}, \ {"T" , CONFIG_HLP_ULBW_PHYTEST,0, uptr:&target_ul_bw, defintval:0, TYPE_UINT, 0}, \
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
#include "threads_t.h" #include "threads_t.h"
extern threads_t threads; extern threads_t threads;
extern uint32_t target_dl_mcs; extern uint32_t target_dl_mcs;
extern uint32_t target_dl_Nl;
extern uint32_t target_ul_mcs; extern uint32_t target_ul_mcs;
extern uint32_t target_dl_bw; extern uint32_t target_dl_bw;
extern uint32_t target_ul_bw; extern uint32_t target_ul_bw;
......
...@@ -290,6 +290,7 @@ void processSlotTX(void *arg) { ...@@ -290,6 +290,7 @@ void processSlotTX(void *arg) {
int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx); int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx);
uint8_t gNB_id = 0; uint8_t gNB_id = 0;
LOG_D(PHY,"%d.%d => slot type %d\n",proc->frame_tx,proc->nr_slot_tx,tx_slot_type);
if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){ if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){
// trigger L2 to run ue_scheduler thru IF module // trigger L2 to run ue_scheduler thru IF module
...@@ -343,7 +344,7 @@ void processSlotRX(void *arg) { ...@@ -343,7 +344,7 @@ void processSlotRX(void *arg) {
LOG_D(PHY, "In %s: slot %d, time %lu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc()-a)/3500); LOG_D(PHY, "In %s: slot %d, time %lu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc()-a)/3500);
#endif #endif
if(IS_SOFTMODEM_NOS1){ if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa){
NR_UE_MAC_INST_t *mac = get_mac_inst(0); NR_UE_MAC_INST_t *mac = get_mac_inst(0);
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0);
...@@ -607,7 +608,7 @@ void *UE_thread(void *arg) { ...@@ -607,7 +608,7 @@ void *UE_thread(void *arg) {
thread_idx = absolute_slot % NR_RX_NB_TH; thread_idx = absolute_slot % NR_RX_NB_TH;
int slot_nr = absolute_slot % nb_slot_frame; int slot_nr = absolute_slot % nb_slot_frame;
notifiedFIFO_elt_t *msgToPush; notifiedFIFO_elt_t *msgToPush;
AssertFatal((msgToPush=pullTpool(&freeBlocks,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure"); AssertFatal((msgToPush=pullNotifiedFIFO_nothreadSafe(&freeBlocks)) != NULL,"chained list failure");
nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush); nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
curMsg->UE=UE; curMsg->UE=UE;
// update thread index for received subframe // update thread index for received subframe
...@@ -714,7 +715,13 @@ void *UE_thread(void *arg) { ...@@ -714,7 +715,13 @@ void *UE_thread(void *arg) {
if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) { if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) {
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots; uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
int nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
int nrofUplinkSlots = 0;
if (mac->scc_SIB)
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
else if (mac->scc)
nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSlots != 0); uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSlots != 0);
uint8_t first_tx_slot = tdd_period - num_UL_slots; uint8_t first_tx_slot = tdd_period - num_UL_slots;
......
...@@ -86,8 +86,9 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -86,8 +86,9 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "executables/thread-common.h" #include "executables/thread-common.h"
#include "nr_nas_msg_sim.h"
extern const char *duplex_mode[]; extern const char *duplex_mode[];
msc_interface_t msc_interface;
THREAD_STRUCT thread_struct; THREAD_STRUCT thread_struct;
nrUE_params_t nrUE_params; nrUE_params_t nrUE_params;
...@@ -150,8 +151,9 @@ int transmission_mode = 1; ...@@ -150,8 +151,9 @@ int transmission_mode = 1;
int numerology = 0; int numerology = 0;
int oaisim_flag = 0; int oaisim_flag = 0;
int emulate_rf = 0; int emulate_rf = 0;
uint32_t N_RB_DL = 106;
char uecap_xer[1024],uecap_xer_in=0; char uecap_xer_in = 0;
char uecap_xer[1024];
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed /* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
* this is very hackish - find a proper solution * this is very hackish - find a proper solution
...@@ -191,7 +193,10 @@ int create_tasks_nrue(uint32_t ue_nb) { ...@@ -191,7 +193,10 @@ int create_tasks_nrue(uint32_t ue_nb) {
LOG_E(NR_RRC, "Create task for RRC UE failed\n"); LOG_E(NR_RRC, "Create task for RRC UE failed\n");
return -1; return -1;
} }
if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) {
LOG_E(NR_RRC, "Create task for NAS UE failed\n");
return -1;
}
} }
itti_wait_ready(0); itti_wait_ready(0);
...@@ -328,8 +333,9 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){ ...@@ -328,8 +333,9 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
LOG_I(PHY, "Set UE frame_type %d\n", fp->frame_type); LOG_I(PHY, "Set UE frame_type %d\n", fp->frame_type);
} }
LOG_I(PHY, "Set UE N_RB_DL %d\n", fp->N_RB_DL); fp->N_RB_DL = N_RB_DL;
LOG_I(PHY, "Set UE N_RB_DL %d\n", N_RB_DL);
LOG_I(PHY, "Set UE nb_rx_antenna %d, nb_tx_antenna %d, threequarter_fs %d\n", fp->nb_antennas_rx, fp->nb_antennas_tx, fp->threequarter_fs); LOG_I(PHY, "Set UE nb_rx_antenna %d, nb_tx_antenna %d, threequarter_fs %d\n", fp->nb_antennas_rx, fp->nb_antennas_tx, fp->threequarter_fs);
fp->ofdm_offset_divisor = nrUE_params.ofdm_offset_divisor; fp->ofdm_offset_divisor = nrUE_params.ofdm_offset_divisor;
...@@ -357,8 +363,8 @@ void init_openair0(void) { ...@@ -357,8 +363,8 @@ void init_openair0(void) {
openair0_cfg[card].num_rb_dl = frame_parms->N_RB_DL; openair0_cfg[card].num_rb_dl = frame_parms->N_RB_DL;
openair0_cfg[card].clock_source = get_softmodem_params()->clock_source; openair0_cfg[card].clock_source = get_softmodem_params()->clock_source;
openair0_cfg[card].time_source = get_softmodem_params()->timing_source; openair0_cfg[card].time_source = get_softmodem_params()->timing_source;
openair0_cfg[card].tx_num_channels = min(2, frame_parms->nb_antennas_tx); openair0_cfg[card].tx_num_channels = min(4, frame_parms->nb_antennas_tx);
openair0_cfg[card].rx_num_channels = min(2, frame_parms->nb_antennas_rx); openair0_cfg[card].rx_num_channels = min(4, frame_parms->nb_antennas_rx);
LOG_I(PHY, "HW: Configuring card %d, sample_rate %f, tx/rx num_channels %d/%d, duplex_mode %s\n", LOG_I(PHY, "HW: Configuring card %d, sample_rate %f, tx/rx num_channels %d/%d, duplex_mode %s\n",
card, card,
...@@ -393,10 +399,10 @@ void init_pdcp(void) { ...@@ -393,10 +399,10 @@ void init_pdcp(void) {
} }
pdcp_layer_init(); pdcp_layer_init();
nr_DRB_preconfiguration();*/ nr_DRB_preconfiguration();*/
pdcp_layer_init();
pdcp_module_init(pdcp_initmask); pdcp_module_init(pdcp_initmask);
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req); pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind); pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
LOG_I(PDCP, "Before getting out from init_pdcp() \n");
} }
// Stupid function addition because UE itti messages queues definition is common with eNB // Stupid function addition because UE itti messages queues definition is common with eNB
...@@ -448,7 +454,7 @@ int main( int argc, char **argv ) { ...@@ -448,7 +454,7 @@ int main( int argc, char **argv ) {
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
init_NR_UE(1,rrc_config_path); init_NR_UE(1,rrc_config_path);
if(IS_SOFTMODEM_NOS1) if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa)
init_pdcp(); init_pdcp();
NB_UE_INST=1; NB_UE_INST=1;
...@@ -476,8 +482,22 @@ int main( int argc, char **argv ) { ...@@ -476,8 +482,22 @@ int main( int argc, char **argv ) {
mac->if_module->phy_config_request(&mac->phy_config); mac->if_module->phy_config_request(&mac->phy_config);
fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config; fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config;
if (get_softmodem_params()->sa) { // set frame config to initial values from command line and assume that the SSB is centered on the grid
nrUE_config->ssb_config.scs_common = get_softmodem_params()->numerology;
nrUE_config->carrier_config.dl_grid_size[nrUE_config->ssb_config.scs_common] = UE[CC_id]->frame_parms.N_RB_DL;
nrUE_config->carrier_config.ul_grid_size[nrUE_config->ssb_config.scs_common] = UE[CC_id]->frame_parms.N_RB_DL;
nrUE_config->carrier_config.dl_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000;
nrUE_config->carrier_config.uplink_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000;
nrUE_config->ssb_table.ssb_offset_point_a = (UE[CC_id]->frame_parms.N_RB_DL - 20)>>1;
// Initialize values, will be updated upon SIB1 reception
nrUE_config->cell_config.frame_duplex_type = TDD;
nrUE_config->ssb_table.ssb_mask_list[0].ssb_mask = 0xFFFFFFFF;
nrUE_config->ssb_table.ssb_period = 1;
}
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]); nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config,
mac->scc == NULL ? 78 : *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
init_symbol_rotation(&UE[CC_id]->frame_parms); init_symbol_rotation(&UE[CC_id]->frame_parms);
init_timeshift_rotation(&UE[CC_id]->frame_parms); init_timeshift_rotation(&UE[CC_id]->frame_parms);
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(UE->UE_scan_carrier), defintval:0, TYPE_INT, 0}, \ {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(UE->UE_scan_carrier), defintval:0, TYPE_INT, 0}, \
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \ {"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ {"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(fp->N_RB_DL), defintval:25, TYPE_UINT, 0}, \ {"r" , CONFIG_HLP_PRB, 0, uptr:&(N_RB_DL), defuintval:160, TYPE_UINT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \ {"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \ {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
......
...@@ -86,6 +86,7 @@ extern "C" ...@@ -86,6 +86,7 @@ extern "C"
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n" #define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n" #define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
#define CONFIG_HLP_BAND "band index\n"
#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n" #define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n"
#define CONFIG_HLP_PARALLEL_CMD "three config for level of parallelism 'PARALLEL_SINGLE_THREAD', 'PARALLEL_RU_L1_SPLIT', or 'PARALLEL_RU_L1_TRX_SPLIT'\n" #define CONFIG_HLP_PARALLEL_CMD "three config for level of parallelism 'PARALLEL_SINGLE_THREAD', 'PARALLEL_RU_L1_SPLIT', or 'PARALLEL_RU_L1_TRX_SPLIT'\n"
#define CONFIG_HLP_WORKER_CMD "two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'\n" #define CONFIG_HLP_WORKER_CMD "two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'\n"
...@@ -112,6 +113,7 @@ extern "C" ...@@ -112,6 +113,7 @@ extern "C"
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag #define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
#define CHAIN_OFFSET softmodem_params.chain_offset #define CHAIN_OFFSET softmodem_params.chain_offset
#define NUMEROLOGY softmodem_params.numerology #define NUMEROLOGY softmodem_params.numerology
#define BAND softmodem_params.band
#define EMULATE_RF softmodem_params.emulate_rf #define EMULATE_RF softmodem_params.emulate_rf
#define CLOCK_SOURCE softmodem_params.clock_source #define CLOCK_SOURCE softmodem_params.clock_source
#define TIMING_SOURCE softmodem_params.timing_source #define TIMING_SOURCE softmodem_params.timing_source
...@@ -127,7 +129,7 @@ extern "C" ...@@ -127,7 +129,7 @@ extern "C"
extern int usrp_tx_thread; extern int usrp_tx_thread;
#define CMDLINE_PARAMS_DESC { \ #define CMDLINE_PARAMS_DESC { \
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\ {"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\ {"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)}, \
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \ {"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \ {"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \ {"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \
...@@ -137,12 +139,13 @@ extern int usrp_tx_thread; ...@@ -137,12 +139,13 @@ extern int usrp_tx_thread;
{"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \ {"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \ {"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \ {"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \ {"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:3619200000, TYPE_UINT64, 0}, \
{"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \ {"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \ {"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \ {"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:0, TYPE_INT, 0}, \ {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:1, TYPE_INT, 0}, \
{"band" , CONFIG_HLP_BAND, PARAMFLAG_BOOL, iptr:&BAND, defintval:78, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&EMULATE_RF, defintval:0, TYPE_INT, 0}, \ {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&EMULATE_RF, defintval:0, TYPE_INT, 0}, \
{"parallel-config", CONFIG_HLP_PARALLEL_CMD, 0, strptr:(char **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \ {"parallel-config", CONFIG_HLP_PARALLEL_CMD, 0, strptr:(char **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \ {"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
...@@ -239,6 +242,7 @@ typedef struct { ...@@ -239,6 +242,7 @@ typedef struct {
int single_thread_flag; //eNodeB only int single_thread_flag; //eNodeB only
int chain_offset; int chain_offset;
int numerology; int numerology;
int band;
unsigned int start_msc; unsigned int start_msc;
uint32_t clock_source; uint32_t clock_source;
uint32_t timing_source; uint32_t timing_source;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
/// RX_IND /// RX_IND
#define FAPI_NR_RX_PDU_TYPE_MIB 0x01 #define FAPI_NR_RX_PDU_TYPE_SSB 0x01
#define FAPI_NR_RX_PDU_TYPE_SIB 0x02 #define FAPI_NR_RX_PDU_TYPE_SIB 0x02
#define FAPI_NR_RX_PDU_TYPE_DLSCH 0x03 #define FAPI_NR_RX_PDU_TYPE_DLSCH 0x03
#define FAPI_NR_DCI_IND 0x04 #define FAPI_NR_DCI_IND 0x04
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
#define FAPI_NR_DL_CONFIG_TYPE_DLSCH 0x02 #define FAPI_NR_DL_CONFIG_TYPE_DLSCH 0x02
#define FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH 0x03 #define FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH 0x03
#define FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH 0x04 #define FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH 0x04
#define FAPI_NR_DL_CONFIG_TYPE_P_DLSCH 0x05
#define FAPI_NR_DL_CONFIG_TYPES 0x05
#define FAPI_NR_CCE_REG_MAPPING_TYPE_INTERLEAVED 0x01 #define FAPI_NR_CCE_REG_MAPPING_TYPE_INTERLEAVED 0x01
#define FAPI_NR_CCE_REG_MAPPING_TYPE_NON_INTERLEAVED 0x02 #define FAPI_NR_CCE_REG_MAPPING_TYPE_NON_INTERLEAVED 0x02
...@@ -59,6 +61,6 @@ ...@@ -59,6 +61,6 @@
#define FAPI_NR_UL_CONFIG_TYPE_PUCCH 0x02 #define FAPI_NR_UL_CONFIG_TYPE_PUCCH 0x02
#define FAPI_NR_UL_CONFIG_TYPE_PUSCH 0x03 #define FAPI_NR_UL_CONFIG_TYPE_PUSCH 0x03
#define FAPI_NR_UL_CONFIG_TYPE_SRS 0x04 #define FAPI_NR_UL_CONFIG_TYPE_SRS 0x04
#define FAPI_NR_UL_CONFIG_TYPES 0x04
#endif #endif
...@@ -111,8 +111,8 @@ typedef struct { ...@@ -111,8 +111,8 @@ typedef struct {
uint8_t ssb_index; uint8_t ssb_index;
uint8_t ssb_length; uint8_t ssb_length;
uint16_t cell_id; uint16_t cell_id;
uint16_t ssb_start_subcarrier;
} fapi_nr_mib_pdu_t; } fapi_nr_ssb_pdu_t;
typedef struct { typedef struct {
uint32_t pdu_length; uint32_t pdu_length;
...@@ -124,7 +124,7 @@ typedef struct { ...@@ -124,7 +124,7 @@ typedef struct {
uint8_t pdu_type; uint8_t pdu_type;
union { union {
fapi_nr_pdsch_pdu_t pdsch_pdu; fapi_nr_pdsch_pdu_t pdsch_pdu;
fapi_nr_mib_pdu_t mib_pdu; fapi_nr_ssb_pdu_t ssb_pdu;
fapi_nr_sib_pdu_t sib_pdu; fapi_nr_sib_pdu_t sib_pdu;
}; };
} fapi_nr_rx_indication_body_t; } fapi_nr_rx_indication_body_t;
......
...@@ -1571,8 +1571,7 @@ typedef struct ...@@ -1571,8 +1571,7 @@ typedef struct
{ {
uint8_t csi_part1_crc; uint8_t csi_part1_crc;
uint16_t csi_part1_bit_len; uint16_t csi_part1_bit_len;
//! fixme uint8_t* csi_part1_payload;
uint8_t* csi_part1_payload;//uint8_t[ceil(csiPart1BitLen/8)]
} nfapi_nr_csi_part1_pdu_t; } nfapi_nr_csi_part1_pdu_t;
...@@ -1581,8 +1580,7 @@ typedef struct ...@@ -1581,8 +1580,7 @@ typedef struct
{ {
uint8_t csi_part2_crc; uint8_t csi_part2_crc;
uint16_t csi_part2_bit_len; uint16_t csi_part2_bit_len;
//! fixme uint8_t* csi_part2_payload;
uint8_t* csi_part2_payload;//uint8_t[ceil(csiPart2BitLen/8)]
} nfapi_nr_csi_part2_pdu_t; } nfapi_nr_csi_part2_pdu_t;
//table 3-63 //table 3-63
......
...@@ -227,16 +227,14 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -227,16 +227,14 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
} }
} }
nr_init_csi_rs(gNB, cfg->cell_config.phy_cell_id.value);
/* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */ /* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */
generate_lowpapr_typ1_refsig_sequences(SHRT_MAX); generate_lowpapr_typ1_refsig_sequences(SHRT_MAX);
nr_init_csi_rs(gNB, 0); // TODO scramblingID currently hardcoded to 0, to be taken from higher layer parameter scramblingID when implemented
/// Transport init necessary for NR synchro /// Transport init necessary for NR synchro
init_nr_transport(gNB); init_nr_transport(gNB);
gNB->first_run_I0_measurements = 1; gNB->first_run_I0_measurements = 1;
common_vars->rxdata = (int32_t **)malloc16(Prx*sizeof(int32_t*)); common_vars->rxdata = (int32_t **)malloc16(Prx*sizeof(int32_t*));
...@@ -598,27 +596,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB) { ...@@ -598,27 +596,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
exit(-1); exit(-1);
} }
/*
LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i);
// [hna] added here for RT implementation
uint8_t harq_pid = 0;
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu;
// --------- setting rel15_ul parameters ----------
rel15_ul->rnti = 0x1234;
rel15_ul->ulsch_pdu_rel15.start_rb = 0;
rel15_ul->ulsch_pdu_rel15.number_rbs = 50;
rel15_ul->ulsch_pdu_rel15.start_symbol = 2;
rel15_ul->ulsch_pdu_rel15.number_symbols = 12;
rel15_ul->ulsch_pdu_rel15.length_dmrs = gNB->dmrs_UplinkConfig.pusch_maxLength;
rel15_ul->ulsch_pdu_rel15.Qm = 2;
rel15_ul->ulsch_pdu_rel15.R = 679;
rel15_ul->ulsch_pdu_rel15.mcs = 9;
rel15_ul->ulsch_pdu_rel15.rv = 0;
rel15_ul->ulsch_pdu_rel15.n_layers = 1;
///////////////////////////////////////////////////
*/
} }
} }
......
...@@ -121,8 +121,9 @@ int nr_phy_init_RU(RU_t *ru) { ...@@ -121,8 +121,9 @@ int nr_phy_init_RU(RU_t *ru) {
AssertFatal(ru->num_gNB <= NUMBER_OF_gNB_MAX,"gNB instances %d > %d\n", AssertFatal(ru->num_gNB <= NUMBER_OF_gNB_MAX,"gNB instances %d > %d\n",
ru->num_gNB,NUMBER_OF_gNB_MAX); ru->num_gNB,NUMBER_OF_gNB_MAX);
LOG_E(PHY,"[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB); LOG_I(PHY,"[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB);
if (ru->do_precoding == 1) {
int beam_count = 0; int beam_count = 0;
if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1 if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1
for (p=0;p<ru->nb_log_antennas;p++) { for (p=0;p<ru->nb_log_antennas;p++) {
...@@ -131,15 +132,16 @@ int nr_phy_init_RU(RU_t *ru) { ...@@ -131,15 +132,16 @@ int nr_phy_init_RU(RU_t *ru) {
} }
AssertFatal(ru->nb_bfw==(beam_count*ru->nb_tx),"Number of beam weights from config file is %d while the expected number is %d",ru->nb_bfw,(beam_count*ru->nb_tx)); AssertFatal(ru->nb_bfw==(beam_count*ru->nb_tx),"Number of beam weights from config file is %d while the expected number is %d",ru->nb_bfw,(beam_count*ru->nb_tx));
int l_ind = 0;
for (i=0; i<ru->num_gNB; i++) { for (i=0; i<ru->num_gNB; i++) {
int l_ind = 0;
for (p=0;p<ru->nb_log_antennas;p++) { for (p=0;p<ru->nb_log_antennas;p++) {
//if ((fp->L_ssb >> (63-p)) & 0x01) { //if ((fp->L_ssb >> (63-p)) & 0x01) {
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*)); ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
for (j=0; j<ru->nb_tx; j++) { for (j=0; j<ru->nb_tx; j++) {
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t)); ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
AssertFatal(ru->bw_list[i],"ru->bw_list[%d] is null\n",i);
for (re=0; re<fp->ofdm_symbol_size; re++) for (re=0; re<fp->ofdm_symbol_size; re++)
ru->beam_weights[i][p][j][re] = ru->bw_list[j][l_ind]; ru->beam_weights[i][p][j][re] = ru->bw_list[i][l_ind];
//printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j); //printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j);
l_ind++; l_ind++;
} // for j } // for j
...@@ -153,6 +155,7 @@ int nr_phy_init_RU(RU_t *ru) { ...@@ -153,6 +155,7 @@ int nr_phy_init_RU(RU_t *ru) {
ru->common.beam_id[i] = (uint8_t*)malloc16_clear(fp->symbols_per_slot*fp->slots_per_frame*sizeof(uint8_t)); ru->common.beam_id[i] = (uint8_t*)malloc16_clear(fp->symbols_per_slot*fp->slots_per_frame*sizeof(uint8_t));
memset(ru->common.beam_id[i],255,fp->symbols_per_slot*fp->slots_per_frame); memset(ru->common.beam_id[i],255,fp->symbols_per_slot*fp->slots_per_frame);
} }
}
} // !=IF5 } // !=IF5
ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_subframe_wCP ); ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_subframe_wCP );
......
...@@ -143,8 +143,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -143,8 +143,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
int n_scid; int n_scid;
abstraction_flag = 0; abstraction_flag = 0;
// dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig;
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
LOG_I(PHY, "Initializing UE vars (abstraction %u) for gNB TXant %u, UE RXant %u\n", abstraction_flag, fp->nb_antennas_tx, fp->nb_antennas_rx); LOG_I(PHY, "Initializing UE vars (abstraction %u) for gNB TXant %u, UE RXant %u\n", abstraction_flag, fp->nb_antennas_tx, fp->nb_antennas_rx);
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_gNB_INST); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_gNB_INST);
phy_init_nr_top(ue); phy_init_nr_top(ue);
...@@ -188,29 +186,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -188,29 +186,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
/////////////////////////PUSCH DMRS init///////////////////////// /////////////////////////PUSCH DMRS init/////////////////////////
/////////// ///////////
// default values until overwritten by RRCConnectionReconfiguration
for (i=0; i<MAX_NR_OF_UL_ALLOCATIONS; i++) {
ue->pusch_config.pusch_TimeDomainResourceAllocation[i] = (PUSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(PUSCH_TimeDomainResourceAllocation_t));
ue->pusch_config.pusch_TimeDomainResourceAllocation[i]->mappingType = typeB;
}
for (i=0;i<MAX_NR_OF_DL_ALLOCATIONS;i++){
ue->PDSCH_Config.pdsch_TimeDomainResourceAllocation[i] = (PDSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(PDSCH_TimeDomainResourceAllocation_t));
ue->PDSCH_Config.pdsch_TimeDomainResourceAllocation[i]->mappingType = typeA;
}
//------------- config DMRS parameters--------------//
// dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1;
// dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
// dmrs_Uplink_Config->pusch_maxLength = pusch_len1;
//-------------------------------------------------//
ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1;
ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = pdsch_dmrs_pos0;
ue->dmrs_DownlinkConfig.pdsch_maxLength = pdsch_len1;
//-------------------------------------------------//
ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***)); ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***));
pusch_dmrs = ue->nr_gold_pusch_dmrs; pusch_dmrs = ue->nr_gold_pusch_dmrs;
n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization
...@@ -468,9 +443,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -468,9 +443,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
else else
ue->pdsch_config_dedicated->p_a = dB0; ue->pdsch_config_dedicated->p_a = dB0;
// set channel estimation to do linear interpolation in time
ue->high_speed_flag = 1;
ue->ch_est_alpha = 24576;
// enable MIB/SIB decoding by default // enable MIB/SIB decoding by default
ue->decode_MIB = 1; ue->decode_MIB = 1;
ue->decode_SIB = 1; ue->decode_SIB = 1;
......
...@@ -264,6 +264,9 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, ...@@ -264,6 +264,9 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
uint64_t dl_bw_khz = (12*config->carrier_config.dl_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common); uint64_t dl_bw_khz = (12*config->carrier_config.dl_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common);
fp->dl_CarrierFreq = ((dl_bw_khz>>1) + config->carrier_config.dl_frequency)*1000 ; fp->dl_CarrierFreq = ((dl_bw_khz>>1) + config->carrier_config.dl_frequency)*1000 ;
LOG_D(PHY,"dl_bw_kHz %lu\n",dl_bw_khz);
LOG_D(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq);
uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common); uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common);
fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ; fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ;
...@@ -277,7 +280,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, ...@@ -277,7 +280,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
LOG_I(PHY, "Initializing frame parms: DL frequency %lu Hz, UL frequency %lu Hz: band %d, uldl offset %d Hz\n", fp->dl_CarrierFreq, fp->ul_CarrierFreq, fp->nr_band, uplink_frequency_offset); LOG_I(PHY, "Initializing frame parms: DL frequency %lu Hz, UL frequency %lu Hz: band %d, uldl offset %d Hz\n", fp->dl_CarrierFreq, fp->ul_CarrierFreq, fp->nr_band, uplink_frequency_offset);
AssertFatal(fp->frame_type==config->cell_config.frame_duplex_type, "Invalid duplex type in config request file for band %d\n", fp->nr_band); AssertFatal(fp->frame_type==config->cell_config.frame_duplex_type, "Invalid duplex type (frame_type %d,cell_config.frame_duplex_type %d) in config request file for band %d\n", fp->frame_type,config->cell_config.frame_duplex_type,fp->nr_band);
AssertFatal(fp->ul_CarrierFreq == (fp->dl_CarrierFreq + uplink_frequency_offset), "Disagreement in uplink frequency for band %d: ul_CarrierFreq = %lu Hz vs expected %lu Hz\n", fp->nr_band, fp->ul_CarrierFreq, fp->dl_CarrierFreq + uplink_frequency_offset); AssertFatal(fp->ul_CarrierFreq == (fp->dl_CarrierFreq + uplink_frequency_offset), "Disagreement in uplink frequency for band %d: ul_CarrierFreq = %lu Hz vs expected %lu Hz\n", fp->nr_band, fp->ul_CarrierFreq, fp->dl_CarrierFreq + uplink_frequency_offset);
......
...@@ -35,7 +35,7 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32 ...@@ -35,7 +35,7 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
#define SCALE 0x3FFF #define SCALE 0x3FFF
static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; //static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
extern unsigned short dftsizes[34]; extern unsigned short dftsizes[34];
extern int16_t *ul_ref_sigs_rx[30][2][34]; extern int16_t *ul_ref_sigs_rx[30][2][34];
......
...@@ -61,12 +61,17 @@ int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { ...@@ -61,12 +61,17 @@ int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
if (eNB->dlsch[i][0] == NULL) continue; if (eNB->dlsch[i][0] == NULL) continue;
LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index); LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index);
if (type == SEARCH_EXIST_RA) {
if (eNB->dlsch[i][0]->rnti==rnti) return i;
} else {
if ((eNB->dlsch[i][0]->harq_mask >0) && if ((eNB->dlsch[i][0]->harq_mask >0) &&
(eNB->dlsch[i][0]->rnti==rnti)) return i; (eNB->dlsch[i][0]->rnti==rnti)) return i;
else if ((eNB->dlsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i; else if ((eNB->dlsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i;
} }
if (type == SEARCH_EXIST) }
if (type == SEARCH_EXIST_RA || type == SEARCH_EXIST)
return -1; return -1;
if (first_free_index != -1) if (first_free_index != -1)
...@@ -83,12 +88,16 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { ...@@ -83,12 +88,16 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
for (int i=0; i<NUMBER_OF_ULSCH_MAX; i++) { for (int i=0; i<NUMBER_OF_ULSCH_MAX; i++) {
if (eNB->ulsch[i]==NULL) continue; if (eNB->ulsch[i]==NULL) continue;
if (type == SEARCH_EXIST_RA) {
if (eNB->ulsch[i]->rnti == rnti) return i;
} else {
if ((eNB->ulsch[i]->harq_mask >0) && if ((eNB->ulsch[i]->harq_mask >0) &&
(eNB->ulsch[i]->rnti==rnti)) return i; (eNB->ulsch[i]->rnti==rnti)) return i;
else if ((eNB->ulsch[i]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i; else if ((eNB->ulsch[i]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i;
} }
}
if (type == SEARCH_EXIST) if (type == SEARCH_EXIST_RA || type == SEARCH_EXIST)
return -1; return -1;
if (first_free_index != -1) if (first_free_index != -1)
......
...@@ -982,7 +982,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -982,7 +982,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
break; break;
} else if (first_uci_stats == NULL && eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i]; } else if (first_uci_stats == NULL && eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i];
if (uci_stats == NULL) { uci_stats=first_uci_stats; uci_stats->rnti = eNB->uci_vars[UCI_id].rnti;} if (uci_stats == NULL) {
if (first_uci_stats == NULL) {
LOG_E(PHY,"first_uci_stats is NULL\n");
return -1;
}
uci_stats=first_uci_stats;
uci_stats->rnti = eNB->uci_vars[UCI_id].rnti;
}
AssertFatal(uci_stats!=NULL,"No stat index found\n"); AssertFatal(uci_stats!=NULL,"No stat index found\n");
uci_stats->frame = frame; uci_stats->frame = frame;
......
...@@ -65,22 +65,6 @@ ...@@ -65,22 +65,6 @@
#define MAX_NUM_CHANNEL_BITS (14*1200*6) // 14 symbols, 1200 REs, 12 bits/RE #define MAX_NUM_CHANNEL_BITS (14*1200*6) // 14 symbols, 1200 REs, 12 bits/RE
#define MAX_NUM_RE (14*1200) #define MAX_NUM_RE (14*1200)
#if !defined(SI_RNTI)
#define SI_RNTI (rnti_t)0xffff
#define SI_RNTI_MBMS (rnti_t)0xfff9
#endif
#if !defined(M_RNTI)
#define M_RNTI (rnti_t)0xfffd
#endif
#if !defined(P_RNTI)
#define P_RNTI (rnti_t)0xfffe
#endif
#if !defined(CBA_RNTI)
#define CBA_RNTI (rnti_t)0xfff4
#endif
#if !defined(C_RNTI)
#define C_RNTI (rnti_t)0x1234
#endif
// These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211 // These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211
//1 layer //1 layer
#define PMI_2A_11 0 #define PMI_2A_11 0
...@@ -93,7 +77,8 @@ ...@@ -93,7 +77,8 @@
#define PMI_2A_R1_1j 2 #define PMI_2A_R1_1j 2
typedef enum { SEARCH_EXIST=0, typedef enum { SEARCH_EXIST=0,
SEARCH_EXIST_OR_FREE SEARCH_EXIST_OR_FREE,
SEARCH_EXIST_RA
} find_type_t; } find_type_t;
typedef enum { typedef enum {
......
...@@ -220,16 +220,19 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, ...@@ -220,16 +220,19 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
memset(&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int32_t)); memset(&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int32_t));
int16_t *rxdata_ptr; int16_t *rxdata_ptr;
rx_offset%=frame_length_samples*2;
if (frame_length_samples - rx_offset < frame_parms->ofdm_symbol_size) { if (rx_offset+frame_parms->ofdm_symbol_size > frame_length_samples*2 ) {
// rxdata is 2 frames len
// we have to wrap on the end
memcpy((void *)&tmp_dft_in[0], memcpy((void *)&tmp_dft_in[0],
(void *)&common_vars->rxdata[aa][rx_offset], (void *)&common_vars->rxdata[aa][rx_offset],
(frame_length_samples - rx_offset) * sizeof(int32_t)); (frame_length_samples*2 - rx_offset) * sizeof(int32_t));
memcpy((void *)&tmp_dft_in[frame_length_samples - rx_offset], memcpy((void *)&tmp_dft_in[frame_length_samples*2 - rx_offset],
(void *)&common_vars->rxdata[aa][0], (void *)&common_vars->rxdata[aa][0],
(frame_parms->ofdm_symbol_size - (frame_length_samples - rx_offset)) * sizeof(int32_t)); (frame_parms->ofdm_symbol_size - (frame_length_samples*2 - rx_offset)) * sizeof(int32_t));
rxdata_ptr = (int16_t *)&tmp_dft_in[0]; rxdata_ptr = (int16_t *)tmp_dft_in;
} else if ((rx_offset & 7) != 0) { } else if ((rx_offset & 7) != 0) {
...@@ -237,7 +240,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, ...@@ -237,7 +240,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
memcpy((void *)&tmp_dft_in[0], memcpy((void *)&tmp_dft_in[0],
(void *)&common_vars->rxdata[aa][rx_offset], (void *)&common_vars->rxdata[aa][rx_offset],
frame_parms->ofdm_symbol_size * sizeof(int32_t)); frame_parms->ofdm_symbol_size * sizeof(int32_t));
rxdata_ptr = (int16_t *)&tmp_dft_in[0]; rxdata_ptr = (int16_t *)tmp_dft_in;
} else { } else {
...@@ -318,7 +321,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms, ...@@ -318,7 +321,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
memcpy((void *)&tmp_dft_in[sample_offset - rxdata_offset], memcpy((void *)&tmp_dft_in[sample_offset - rxdata_offset],
(void *)&rxdata[0], (void *)&rxdata[0],
(frame_parms->ofdm_symbol_size - sample_offset + rxdata_offset) * sizeof(int32_t)); (frame_parms->ofdm_symbol_size - sample_offset + rxdata_offset) * sizeof(int32_t));
rxdata_ptr = (int16_t *)&tmp_dft_in[0]; rxdata_ptr = (int16_t *)tmp_dft_in;
} else if (((rxdata_offset - sample_offset) & 7) != 0) { } else if (((rxdata_offset - sample_offset) & 7) != 0) {
...@@ -326,7 +329,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms, ...@@ -326,7 +329,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
memcpy((void *)&tmp_dft_in[0], memcpy((void *)&tmp_dft_in[0],
(void *)&rxdata[rxdata_offset - sample_offset], (void *)&rxdata[rxdata_offset - sample_offset],
(frame_parms->ofdm_symbol_size) * sizeof(int32_t)); (frame_parms->ofdm_symbol_size) * sizeof(int32_t));
rxdata_ptr = (int16_t *)&tmp_dft_in[0]; rxdata_ptr = (int16_t *)tmp_dft_in;
} else { } else {
......
...@@ -82,7 +82,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, ...@@ -82,7 +82,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
uint16_t nb_rb_pusch = pusch_pdu->rb_size; uint16_t nb_rb_pusch = pusch_pdu->rb_size;
#ifdef DEBUG_CH #ifdef DEBUG_CH
LOG_D(PHY, "In %s: ch_offset %d, symbol_offset %d OFDM size %d, Ns = %d, k = %d symbol %d\n", LOG_I(PHY, "In %s: ch_offset %d, symbol_offset %d OFDM size %d, Ns = %d, k = %d symbol %d\n",
__FUNCTION__, __FUNCTION__,
ch_offset, ch_offset,
symbol_offset, symbol_offset,
......
...@@ -47,7 +47,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, ...@@ -47,7 +47,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
unsigned short bwp_start_subcarrier, unsigned short bwp_start_subcarrier,
nfapi_nr_pusch_pdu_t *pusch_pdu); nfapi_nr_pusch_pdu_t *pusch_pdu);
void gNB_I0_measurements(PHY_VARS_gNB *gNB); void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb);
void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol); void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol);
......
This diff is collapsed.
...@@ -145,7 +145,7 @@ void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid) ...@@ -145,7 +145,7 @@ void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid)
reset = 1; reset = 1;
x2 = ((1<<10) * (fp->symbols_per_slot*slot+symb+1) * ((Nid<<1)+1) + (Nid)); x2 = ((1<<10) * (fp->symbols_per_slot*slot+symb+1) * ((Nid<<1)+1) + (Nid));
for (uint32_t n=0; n<NR_MAX_PDCCH_DMRS_INIT_LENGTH_DWORD; n++) { for (uint32_t n=0; n<NR_MAX_CSI_RS_INIT_LENGTH_DWORD; n++) {
csi_rs[slot][symb][n] = lte_gold_generic(&x1, &x2, reset); csi_rs[slot][symb][n] = lte_gold_generic(&x1, &x2, reset);
reset = 0; reset = 0;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment