Merge remote-tracking branch 'origin/develop' into nr-dl-mimo-2layer

This commit is contained in:
Thomas Schlichter
2021-05-21 08:38:14 +02:00
90 changed files with 1049 additions and 1309 deletions
@@ -0,0 +1,304 @@
#!/bin/groovy
/*
* 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
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
// Name of the phone resource
def ciSmartPhonesResource1 = params.SmartPhonesResource1
def ciSmartPhonesResource2 = params.SmartPhonesResource2
// Global Parameters. Populated when the master job
// triggers the slave job with parameters
def eNB_Repository = "https://gitlab.eurecom.fr/oai/openairinterface5g.git"
def eNB_Branch = "develop"
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch = "develop"
def eNB_MR = "develop"
pipeline {
agent {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
}
stages {
stage("Build Init") {
steps {
script {
//retrieve latest commit ID from branch
latest_commit_from_branch= sh returnStdout: true, script: 'git log -1 origin/${eNB_Branch} | grep commit'
echo "Branch ${eNB_Branch}"
echo "${latest_commit_from_branch}"
tmp=latest_commit_from_branch.split()
echo "${tmp}"
eNB_CommitID = tmp[1]
echo "eNB_CommitID ${eNB_CommitID}"
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Commit : ${eNB_CommitID}"
}
}
}
stage ("Verify Parameters") {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.SmartPhonesResource1 == null) {
allParametersPresent = false
}
if (params.SmartPhonesResource2 == null) {
allParametersPresent = false
}
// 1st eNB parameters
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
// 2nd eNB parameters
if (params.eNB1_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB1_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB1_Credentials == null) {
allParametersPresent = false
}
// 3rd eNB parameters
if (params.eNB2_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB2_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB2_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
//if (params.eNB_CommitID == null) {
// eNB_CommitID = env.GIT_COMMIT
//} else {
// eNB_CommitID = params.eNB_CommitID
//}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_AllowMergeRequestProcess!= null) {
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
if (params.EPC_IPAddress == null) {
allParametersPresent = false
}
if (params.EPC_Type == null) {
allParametersPresent = false
}
if (params.EPC_SourceCodePath == null) {
allParametersPresent = false
}
if (params.EPC_Credentials == null) {
allParametersPresent = false
}
if (params.ADB_IPAddress == null) {
allParametersPresent = false
}
if (params.ADB_Credentials == null) {
allParametersPresent = false
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (eNB - Build)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (eNB - Run)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
}
if(fileExists("ci-scripts/test_results.html")) {
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
archiveArtifacts "test_results-${JOB_NAME}.html"
}
}
}
}
}
}
}
post {
always {
script {
if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) {
echo "Archiving Jenkins console log"
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
}
}
}
}
}
}
}
+1 -1
View File
@@ -37,7 +37,7 @@ pipeline {
steps { steps {
script { script {
//retrieve MR that are opened nd with tag READY_TO_BE_MERGED //retrieve MR that are opened nd with tag READY_TO_BE_MERGED
MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&milestone=REVIEW_COMPLETED_AND_APPROVED" | 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')
//for every selected MR, retrieve the branch name and the latest commit //for every selected MR, retrieve the branch name and the latest commit
+1 -1
View File
@@ -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 : wwan0 UENetwork : enxb22a941dbf00
HostIPAddress : 192.168.18.188 HostIPAddress : 192.168.18.188
HostUsername : oaicicd HostUsername : oaicicd
HostPassword : oaicicd HostPassword : oaicicd
+2 -2
View File
@@ -162,7 +162,7 @@ class Containerize():
# on RedHat/CentOS .git extension is mandatory # on RedHat/CentOS .git extension is mandatory
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None: if result is not None:
full_ran_repo_name = self.ranRepository full_ran_repo_name = self.ranRepository.replace('git/', 'git')
else: else:
full_ran_repo_name = self.ranRepository + '.git' full_ran_repo_name = self.ranRepository + '.git'
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
@@ -176,7 +176,7 @@ class Containerize():
mySSH.command('mkdir -p cmake_targets/log', '\$', 5) mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.ranCommitID != '': if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
# if the branch is not develop, then it is a merge request and we need to do # if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should already been checked earlier # the potential merge. Note that merge conflicts should already been checked earlier
imageTag = 'develop' imageTag = 'develop'
+1 -1
View File
@@ -91,7 +91,7 @@ class Module_UE:
def Command(self,cmd): def Command(self,cmd):
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 python3 ' + self.cmd_dict[cmd],'\$',5) mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.cmd_dict[cmd],'\$',10)
time.sleep(5) time.sleep(5)
logging.debug("Module "+ cmd) logging.debug("Module "+ cmd)
mySSH.close() mySSH.close()
+29 -22
View File
@@ -177,7 +177,7 @@ class OaiCiTest():
ue_prefix = '' ue_prefix = ''
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None: if result is not None:
full_ran_repo_name = self.ranRepository full_ran_repo_name = self.ranRepository.replace('git/', 'git')
else: else:
full_ran_repo_name = self.ranRepository + '.git' full_ran_repo_name = self.ranRepository + '.git'
SSH.command('mkdir -p ' + self.UESourceCodePath, '\$', 5) SSH.command('mkdir -p ' + self.UESourceCodePath, '\$', 5)
@@ -220,7 +220,7 @@ class OaiCiTest():
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.ranCommitID != '': if self.ranCommitID != '':
SSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) SSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
# if the branch is not develop, then it is a merge request and we need to do # if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should already been checked earlier # the potential merge. Note that merge conflicts should already been checked earlier
if self.ranAllowMerge: if self.ranAllowMerge:
@@ -392,7 +392,6 @@ class OaiCiTest():
status=Module_UE.GetModuleIPAddress() status=Module_UE.GetModuleIPAddress()
if status==0: if status==0:
HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK)
self.UEIPAddresses.append(Module_UE.UEIPAddress)
logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress)
else: #status==-1 failed to retrieve IP address else: #status==-1 failed to retrieve IP address
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE)
@@ -422,13 +421,13 @@ class OaiCiTest():
SSH = sshconnection.SSHConnection() SSH = sshconnection.SSHConnection()
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword) SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
# b2xx_fx3_utils reset procedure # b2xx_fx3_utils reset procedure
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60) SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90)
result = re.search('type: b200', SSH.getBefore()) result = re.search('type: b200', SSH.getBefore())
if result is not None: if result is not None:
logging.debug('Found a B2xx device --> resetting it') logging.debug('Found a B2xx device --> resetting it')
SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10) SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
# Reloading FGPA bin firmware # Reloading FGPA bin firmware
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60) SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90)
result = re.search('type: n3xx', str(SSH.getBefore())) result = re.search('type: n3xx', str(SSH.getBefore()))
if result is not None: if result is not None:
logging.debug('Found a N3xx device --> resetting it') logging.debug('Found a N3xx device --> resetting it')
@@ -1513,7 +1512,8 @@ class OaiCiTest():
SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5) SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
else: #launch from Module else: #launch from Module
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'ping -I ' + UE_IPAddress + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' #ping from module NIC rather than IP address to make sure round trip is over the air
cmd = 'ping -I ' + Module_UE.UENetwork + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',int(ping_time[0])*1.5) SSH.command(cmd,'\$',int(ping_time[0])*1.5)
#copy the ping log file to have it locally for analysis (ping stats) #copy the ping log file to have it locally for analysis (ping stats)
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
@@ -1732,10 +1732,10 @@ class OaiCiTest():
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return return
else: else:
self.UEIPAddresses=[]
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
Module_UE.GetModuleIPAddress() Module_UE.GetModuleIPAddress()
if Module_UE.UEIPAddress not in self.UEIPAddresses: self.UEIPAddresses.append(Module_UE.UEIPAddress)
self.UEIPAddresses.append(Module_UE.UEIPAddress)
logging.debug(self.UEIPAddresses) logging.debug(self.UEIPAddresses)
multi_jobs = [] multi_jobs = []
i = 0 i = 0
@@ -1957,7 +1957,7 @@ class OaiCiTest():
if type==0: if type==0:
result = re.search('(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(?P<lostPack>[0-9]+)/ +(?P<sentPack>[0-9]+)', str(line)) result = re.search('(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(?P<lostPack>[0-9]+)/ +(?P<sentPack>[0-9]+)', str(line))
else: else:
result = re.search('^\[ 3\].+ +(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(?P<lostPack>[0-9]+)\/(?P<sentPack>[0-9]+)', str(line)) result = re.search('^\[ \d\].+ +(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(?P<lostPack>[0-9]+)\/(?P<sentPack>[0-9]+)', str(line))
if result is not None: if result is not None:
bitrate = result.group('bitrate') bitrate = result.group('bitrate')
@@ -2203,13 +2203,16 @@ class OaiCiTest():
logging.debug("Iperf for Module in DL mode detected") logging.debug("Iperf for Module in DL mode detected")
#server side UE #server side UE
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5)
cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
#client side EPC #client side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5)
cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',int(iperf_time)*5.0) SSH.command(cmd,'\$',int(iperf_time)*5.0)
#copy the 2 resulting files locally #copy the 2 resulting files locally
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
@@ -2217,23 +2220,27 @@ class OaiCiTest():
filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)
elif self.iperf_direction=="UL": elif self.iperf_direction=="UL":#does not work at the moment
logging.debug("Iperf for Module in UL mode detected") logging.debug("Iperf for Module in UL mode detected")
#server side EPC #server side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
cmd = 'echo $USER; nohup iperf -s -i 1 -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5)
#client side UE #client side UE
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',int(iperf_time)*5.0) SSH.command(cmd,'\$',5)
SSH.command('/opt/iperf-2.0.10/iperf -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0)
#copy the 2 resulting files locally #copy the 2 resulting files locally
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
#send for analysis #send for analysis
filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)
else : else :
logging.debug("Incorrect or missing IPERF direction in XML") logging.debug("Incorrect or missing IPERF direction in XML")
@@ -2597,10 +2604,10 @@ class OaiCiTest():
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return return
else: #is a module else: #is a module
self.UEIPAddresses=[]
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
Module_UE.GetModuleIPAddress() Module_UE.GetModuleIPAddress()
if Module_UE.UEIPAddress not in self.UEIPAddresses: self.UEIPAddresses.append(Module_UE.UEIPAddress)
self.UEIPAddresses.append(Module_UE.UEIPAddress)
@@ -3402,7 +3409,7 @@ class OaiCiTest():
UhdVersion = result.group('uhd_version') UhdVersion = result.group('uhd_version')
logging.debug('UHD Version is: ' + UhdVersion) logging.debug('UHD Version is: ' + UhdVersion)
HTML.UhdVersion[idx]=UhdVersion HTML.UhdVersion[idx]=UhdVersion
SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 60) SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 90)
usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore()) usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore())
count = 0 count = 0
for board in usrp_boards: for board in usrp_boards:
+191 -191
View File
@@ -1,191 +1,191 @@
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more # * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with # * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership. # * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under # * 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 # * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License. # * except in compliance with the License.
# * You may obtain a copy of the License at # * You may obtain a copy of the License at
# * # *
# * http://www.openairinterface.org/?page_id=698 # * http://www.openairinterface.org/?page_id=698
# * # *
# * Unless required by applicable law or agreed to in writing, software # * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, # * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and # * See the License for the specific language governing permissions and
# * limitations under the License. # * limitations under the License.
# *------------------------------------------------------------------------------- # *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance: # * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org # * contact@openairinterface.org
# */ # */
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE # Python for CI of OAI-eNB + COTS-UE
# #
# Required Python Version # Required Python Version
# Python 3.x # Python 3.x
# #
# Required Python Package # Required Python Package
# pexpect # pexpect
#--------------------------------------------------------------------- #---------------------------------------------------------------------
#to use logging.info() #to use logging.info()
import logging import logging
#to create a SSH object locally in the methods #to create a SSH object locally in the methods
import sshconnection import sshconnection
#to update the HTML object #to update the HTML object
import html import html
from multiprocessing import SimpleQueue from multiprocessing import SimpleQueue
#for log folder maintenance #for log folder maintenance
import os import os
class PhySim: class PhySim:
def __init__(self): def __init__(self):
self.buildargs = "" self.buildargs = ""
self.runargs = "" self.runargs = ""
self.eNBIpAddr = "" self.eNBIpAddr = ""
self.eNBUserName = "" self.eNBUserName = ""
self.eNBPassWord = "" self.eNBPassWord = ""
self.eNBSourceCodePath = "" self.eNBSourceCodePath = ""
self.ranRepository = "" self.ranRepository = ""
self.ranBranch = "" self.ranBranch = ""
self.ranCommitID= "" self.ranCommitID= ""
self.ranAllowMerge= "" self.ranAllowMerge= ""
self.ranTargetBranch= "" self.ranTargetBranch= ""
self.exitStatus=0 self.exitStatus=0
self.forced_workspace_cleanup=False self.forced_workspace_cleanup=False
#private attributes #private attributes
self.__workSpacePath='' self.__workSpacePath=''
self.__buildLogFile='compile_phy_sim.log' self.__buildLogFile='compile_phy_sim.log'
self.__runLogFile='' self.__runLogFile=''
self.__runResults=[] self.__runResults=[]
self.__runLogPath='phy_sim_logs' self.__runLogPath='phy_sim_logs'
#----------------- #-----------------
#PRIVATE Methods #PRIVATE Methods
#----------------- #-----------------
def __CheckResults_PhySim(self,HTML,CONST,testcase_id): def __CheckResults_PhySim(self,HTML,CONST,testcase_id):
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
#retrieve run log file and store it locally$ #retrieve run log file and store it locally$
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.') mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.')
mySSH.close() mySSH.close()
#parse results looking for Encoding and Decoding mean values #parse results looking for Encoding and Decoding mean values
self.__runResults=[] self.__runResults=[]
with open(self.__runLogFile) as f: with open(self.__runLogFile) as f:
for line in f: for line in f:
if 'mean' in line: if 'mean' in line:
self.__runResults.append(line) self.__runResults.append(line)
#the values are appended for each mean value (2), so we take these 2 values from the list #the values are appended for each mean value (2), so we take these 2 values from the list
info=self.__runResults[0]+self.__runResults[1] info=self.__runResults[0]+self.__runResults[1]
#once parsed move the local logfile to its folder for tidiness #once parsed move the local logfile to its folder for tidiness
os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.') os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
#updating the HTML with results #updating the HTML with results
html_cell = '<pre style="background-color:white">' + info + '</pre>' html_cell = '<pre style="background-color:white">' + info + '</pre>'
html_queue=SimpleQueue() html_queue=SimpleQueue()
html_queue.put(html_cell) html_queue.put(html_cell)
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue) HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
return HTML return HTML
def __CheckBuild_PhySim(self, HTML, CONST): def __CheckBuild_PhySim(self, HTML, CONST):
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
#retrieve compile log file and store it locally #retrieve compile log file and store it locally
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.') mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.')
#delete older run log file #delete older run log file
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5) mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
mySSH.close() mySSH.close()
#check build result from local compile log file #check build result from local compile log file
buildStatus=False buildStatus=False
with open(self.__buildLogFile) as f: with open(self.__buildLogFile) as f:
#nr_prachsim is the last compile step #nr_prachsim is the last compile step
if 'nr_prachsim compiled' in f.read(): if 'nr_prachsim compiled' in f.read():
buildStatus=True buildStatus=True
#update HTML based on build status #update HTML based on build status
if buildStatus: if buildStatus:
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'LDPC') HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'LDPC')
self.exitStatus=0 self.exitStatus=0
else: else:
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m') logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC') HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
#exitStatus=1 will do a sys.exit in main #exitStatus=1 will do a sys.exit in main
self.exitStatus=1 self.exitStatus=1
return HTML return HTML
#-----------------$ #-----------------$
#PUBLIC Methods$ #PUBLIC Methods$
#-----------------$ #-----------------$
def Build_PhySim(self,htmlObj,constObj): def Build_PhySim(self,htmlObj,constObj):
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
#create working dir #create working dir
mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5) mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5)
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
if not self.ranRepository.lower().endswith('.git'): if not self.ranRepository.lower().endswith('.git'):
self.ranRepository+='.git' self.ranRepository+='.git'
#git clone #git clone
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
#git config #git config
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5) mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
#git clean depending on self.forced_workspace_cleanup captured in xml #git clean depending on self.forced_workspace_cleanup captured in xml
if self.forced_workspace_cleanup==True: if self.forced_workspace_cleanup==True:
logging.info('Cleaning workspace ...') logging.info('Cleaning workspace ...')
mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30) mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
else: else:
logging.info('Workspace cleaning was disabled') logging.info('Workspace cleaning was disabled')
# if the commit ID is provided, use it to point to it # if the commit ID is provided, use it to point to it
if self.ranCommitID != '': if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
# if the branch is not develop, then it is a merge request and we need to do # if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should have already been checked earlier # the potential merge. Note that merge conflicts should have already been checked earlier
if (self.ranAllowMerge): if (self.ranAllowMerge):
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5) mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
else: else:
logging.info('Merging with the target branch: ' + self.ranTargetBranch) logging.info('Merging with the target branch: ' + self.ranTargetBranch)
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5) mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
#build #build
mySSH.command('source oaienv', '\$', 5) mySSH.command('source oaienv', '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5) mySSH.command('cd cmake_targets', '\$', 5)
mySSH.command('mkdir -p log', '\$', 5) mySSH.command('mkdir -p log', '\$', 5)
mySSH.command('chmod 777 log', '\$', 5) mySSH.command('chmod 777 log', '\$', 5)
mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500) mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500)
mySSH.close() mySSH.close()
#check build status and update HTML object #check build status and update HTML object
lHTML = html.HTMLManagement() lHTML = html.HTMLManagement()
lHTML=self.__CheckBuild_PhySim(htmlObj,constObj) lHTML=self.__CheckBuild_PhySim(htmlObj,constObj)
return lHTML return lHTML
def Run_PhySim(self,htmlObj,constObj,testcase_id): def Run_PhySim(self,htmlObj,constObj,testcase_id):
#create run logs folder locally #create run logs folder locally
os.system('mkdir -p ./'+self.__runLogPath) os.system('mkdir -p ./'+self.__runLogPath)
#log file is tc_<testcase_id>.log remotely #log file is tc_<testcase_id>.log remotely
self.__runLogFile='physim_'+str(testcase_id)+'.log' self.__runLogFile='physim_'+str(testcase_id)+'.log'
#open a session for test run #open a session for test run
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
mySSH.command('cd '+self.__workSpacePath,'\$',5) mySSH.command('cd '+self.__workSpacePath,'\$',5)
#run and redirect the results to a log file #run and redirect the results to a log file
mySSH.command(self.__workSpacePath+'phy_simulators/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30) mySSH.command(self.__workSpacePath+'phy_simulators/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30)
mySSH.close() mySSH.close()
#return updated HTML to main #return updated HTML to main
lHTML = html.HTMLManagement() lHTML = html.HTMLManagement()
lHTML=self.__CheckResults_PhySim(htmlObj,constObj,testcase_id) lHTML=self.__CheckResults_PhySim(htmlObj,constObj,testcase_id)
return lHTML return lHTML
+59 -17
View File
@@ -64,7 +64,7 @@ class PhySim:
#PUBLIC Methods$ #PUBLIC Methods$
#-----------------$ #-----------------$
def Deploy_PhySim(self, HTML): def Deploy_PhySim(self, HTML, RAN):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '': if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
@@ -88,9 +88,10 @@ class PhySim:
# on RedHat/CentOS .git extension is mandatory # on RedHat/CentOS .git extension is mandatory
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None: if result is not None:
full_ran_repo_name = self.ranRepository full_ran_repo_name = self.ranRepository.replace('git/', 'git')
else: else:
full_ran_repo_name = self.ranRepository + '.git' full_ran_repo_name = self.ranRepository + '.git'
mySSH.command('echo ' + lPassWord + ' | sudo rm -Rf ' + lSourcePath, '\$', 30)
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
mySSH.command('cd ' + lSourcePath, '\$', 5) mySSH.command('cd ' + lSourcePath, '\$', 5)
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
@@ -102,9 +103,15 @@ class PhySim:
mySSH.command('mkdir -p cmake_targets/log', '\$', 5) mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.ranCommitID != '': if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
if self.ranAllowMerge: if self.ranAllowMerge:
imageTag = "ci-temp" imageTag = "ci-temp"
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
else: else:
imageTag = "develop" imageTag = "develop"
# Check if image is exist on the Red Hat server, before pushing it to OC cluster # Check if image is exist on the Red Hat server, before pushing it to OC cluster
@@ -112,7 +119,9 @@ class PhySim:
if mySSH.getBefore().count('no such image') != 0: if mySSH.getBefore().count('no such image') != 0:
logging.error('\u001B[1m No such image oai-physim\u001B[0m') logging.error('\u001B[1m No such image oai-physim\u001B[0m')
mySSH.close() mySSH.close()
sys.exit(-1) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.PHYSIM_IMAGE_ABSENT)
RAN.prematureExit = True
return
else: else:
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore()) result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore())
if result is not None: if result is not None:
@@ -135,14 +144,18 @@ class PhySim:
if mySSH.getBefore().count('Login successful.') == 0: if mySSH.getBefore().count('Login successful.') == 0:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
mySSH.close() mySSH.close()
sys.exit(-1) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
RAN.prematureExit = True
return
else: else:
logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m') logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m')
mySSH.command(f'oc project {ocProjectName}', '\$', 6) mySSH.command(f'oc project {ocProjectName}', '\$', 6)
if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0: if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0:
logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m') logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m')
mySSH.close() mySSH.close()
sys.exit(-1) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL)
RAN.prematureExit = True
return
else: else:
logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m') logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m')
@@ -151,7 +164,9 @@ class PhySim:
if mySSH.getBefore().count('Login Succeeded!') == 0: if mySSH.getBefore().count('Login Succeeded!') == 0:
logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m') logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m')
mySSH.close() mySSH.close()
sys.exit(-1) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
RAN.prematureExit = True
return
else: else:
logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m') logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m')
time.sleep(2) time.sleep(2)
@@ -159,7 +174,9 @@ class PhySim:
if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0: if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0:
logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m') logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m')
mySSH.close() mySSH.close()
sys.exit(-1) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL)
RAN.prematureExit = True
return
else: else:
logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m') logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m')
time.sleep(2) time.sleep(2)
@@ -169,7 +186,9 @@ class PhySim:
if mySSH.getBefore().count('Storing signatures') == 0: if mySSH.getBefore().count('Storing signatures') == 0:
logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m') logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
mySSH.close() mySSH.close()
sys.exit(-1) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL)
RAN.prematureExit = True
return
else: else:
logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m') logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m')
@@ -180,9 +199,18 @@ class PhySim:
if mySSH.getBefore().count('STATUS: deployed') == 0: if mySSH.getBefore().count('STATUS: deployed') == 0:
logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m') logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
isFinished1 = False
while(isFinished1 == False):
time.sleep(20)
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True)
if re.search('No resources found', mySSH.getBefore()):
isFinished1 = True
mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
mySSH.command('oc delete is oai-physim', '\$', 6)
mySSH.close() mySSH.close()
self.AnalyzeLogFile_phySim(HTML) self.AnalyzeLogFile_phySim(HTML)
sys.exit(-1) RAN.prematureExit = True
return
else: else:
logging.debug('\u001B[1m Deployed PhySim Successfully using helm chart\u001B[0m') logging.debug('\u001B[1m Deployed PhySim Successfully using helm chart\u001B[0m')
isRunning = False isRunning = False
@@ -200,7 +228,18 @@ class PhySim:
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim 2>&1 | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6) mySSH.command('oc get pods -l app.kubernetes.io/instance=physim 2>&1 | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6)
mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
self.AnalyzeLogFile_phySim(HTML) self.AnalyzeLogFile_phySim(HTML)
sys.exit(-1) isFinished1 = False
while(isFinished1 == False):
time.sleep(20)
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True)
if re.search('No resources found', mySSH.getBefore()):
isFinished1 = True
mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
mySSH.command('oc delete is oai-physim', '\$', 6)
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL)
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
RAN.prematureExit = True
return
# Waiting to complete the running test # Waiting to complete the running test
count = 0 count = 0
isFinished = False isFinished = False
@@ -240,8 +279,15 @@ class PhySim:
mySSH.command('oc logout', '\$', 6) mySSH.command('oc logout', '\$', 6)
mySSH.close() mySSH.close()
self.AnalyzeLogFile_phySim(HTML) self.AnalyzeLogFile_phySim(HTML)
if self.testStatus == False: if self.testStatus:
sys.exit(-1) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
else:
RAN.prematureExit = True
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
logging.info('\u001B[1m Physical Simulator Fail\u001B[0m')
def AnalyzeLogFile_phySim(self, HTML): def AnalyzeLogFile_phySim(self, HTML):
lIpAddr = self.eNBIPAddress lIpAddr = self.eNBIPAddress
@@ -258,7 +304,6 @@ class PhySim:
os.mkdir(f'./physim_test_logs_{self.testCase_id}') os.mkdir(f'./physim_test_logs_{self.testCase_id}')
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', './physim_test_logs_' + self.testCase_id) mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', './physim_test_logs_' + self.testCase_id)
mySSH.command('rm -rf ./physim_test_log_'+ self.testCase_id, '\$', 5) mySSH.command('rm -rf ./physim_test_log_'+ self.testCase_id, '\$', 5)
mySSH.command('oc logout', '\$', 6)
mySSH.close() mySSH.close()
# physim test log analysis # physim test log analysis
nextt = 0 nextt = 0
@@ -289,7 +334,4 @@ class PhySim:
self.testSummary['Nbfail'] = self.testCount[2] self.testSummary['Nbfail'] = self.testCount[2]
if self.testSummary['Nbfail'] == 0: if self.testSummary['Nbfail'] == 0:
self.testStatus = True self.testStatus = True
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
return 0 return 0
+2 -2
View File
@@ -101,7 +101,7 @@ class StaticCodeAnalysis():
# on RedHat/CentOS .git extension is mandatory # on RedHat/CentOS .git extension is mandatory
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None: if result is not None:
full_ran_repo_name = self.ranRepository full_ran_repo_name = self.ranRepository.replace('git/', 'git')
else: else:
full_ran_repo_name = self.ranRepository + '.git' full_ran_repo_name = self.ranRepository + '.git'
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
@@ -115,7 +115,7 @@ class StaticCodeAnalysis():
mySSH.command('mkdir -p cmake_targets/log', '\$', 5) mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.ranCommitID != '': if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 60) mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 60)
mySSH.command('docker build --tag oai-cppcheck:xenial --file ci-scripts/docker/Dockerfile.cppcheck.xenial . > cmake_targets/log/cppcheck-xenial.txt 2>&1', '\$', 600) mySSH.command('docker build --tag oai-cppcheck:xenial --file ci-scripts/docker/Dockerfile.cppcheck.xenial . > cmake_targets/log/cppcheck-xenial.txt 2>&1', '\$', 600)
+1 -1
View File
@@ -126,7 +126,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -123,7 +123,7 @@ gNBs =
initialULBWPk2_0 = 6; initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=11 # this is SS=0 L=11
initialULBWPstartSymbolAndLength_0 = 55; initialULBWPstartSymbolAndLength_0 = 41;
initialULBWPk2_1 = 6; initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -121,7 +121,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -122,7 +122,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -127,7 +127,7 @@ gNBs =
initialULBWPk2_0 = 2; initialULBWPk2_0 = 2;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=11 # this is SS=0 L=11
initialULBWPstartSymbolAndLength_0 = 55; initialULBWPstartSymbolAndLength_0 = 41;
initialULBWPk2_1 = 2; initialULBWPk2_1 = 2;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
+5
View File
@@ -60,6 +60,11 @@ OAI_UE_PROCESS_SEG_FAULT = -25
OAI_UE_PROCESS_NO_MBMS_MSGS = -26 OAI_UE_PROCESS_NO_MBMS_MSGS = -26
OAI_UE_PROCESS_OK = +6 OAI_UE_PROCESS_OK = +6
INVALID_PARAMETER = -50 INVALID_PARAMETER = -50
PHYSIM_IMAGE_ABSENT = -60
OC_LOGIN_FAIL = -61
OC_PROJECT_FAIL = -62
OC_IS_FAIL = -63
OC_PHYSIM_DEPLOY_FAIL = -64
UE_STATUS_DETACHED = 0 UE_STATUS_DETACHED = 0
UE_STATUS_DETACHING = 1 UE_STATUS_DETACHING = 1
+10
View File
@@ -365,6 +365,16 @@ class HTMLManagement():
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - SPGW process not found</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - SPGW process not found</td>\n')
elif (processesStatus == CONST.UE_IP_ADDRESS_ISSUE): elif (processesStatus == CONST.UE_IP_ADDRESS_ISSUE):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - Could not retrieve UE IP address</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - Could not retrieve UE IP address</td>\n')
elif (processesStatus == CONST.PHYSIM_IMAGE_ABSENT):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - No such image oai-physim</td>\n')
elif (processesStatus == CONST.OC_LOGIN_FAIL):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - Could not log onto cluster</td>\n')
elif (processesStatus == CONST.OC_PROJECT_FAIL):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - Could not register into cluster project</td>\n')
elif (processesStatus == CONST.OC_IS_FAIL):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - Could not create Image Stream</td>\n')
elif (processesStatus == CONST.OC_PHYSIM_DEPLOY_FAIL):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - Could not properly deploy physim on cluster</td>\n')
else: else:
self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n')
else: else:
+1 -1
View File
@@ -786,7 +786,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Cppcheck_Analysis': elif action == 'Cppcheck_Analysis':
SCA.CppCheckAnalysis(HTML) SCA.CppCheckAnalysis(HTML)
elif action == 'Deploy_Run_PhySim': elif action == 'Deploy_Run_PhySim':
PHYSIM.Deploy_PhySim(HTML) PHYSIM.Deploy_PhySim(HTML, RAN)
else: else:
sys.exit('Invalid class (action) from xml') sys.exit('Invalid class (action) from xml')
if not RAN.prematureExit: if not RAN.prematureExit:
+51 -7
View File
@@ -148,7 +148,7 @@ class RANManagement():
# on RedHat/CentOS .git extension is mandatory # on RedHat/CentOS .git extension is mandatory
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None: if result is not None:
full_ran_repo_name = self.ranRepository full_ran_repo_name = self.ranRepository.replace('git/', 'git')
else: else:
full_ran_repo_name = self.ranRepository + '.git' full_ran_repo_name = self.ranRepository + '.git'
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
@@ -191,7 +191,7 @@ class RANManagement():
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30) mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.ranCommitID != '': if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
# if the branch is not develop, then it is a merge request and we need to do # if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should already been checked earlier # the potential merge. Note that merge conflicts should already been checked earlier
if (self.ranAllowMerge): if (self.ranAllowMerge):
@@ -388,13 +388,13 @@ class RANManagement():
# do not reset board twice in IF4.5 case # do not reset board twice in IF4.5 case
result = re.search('^rru|^enb|^du.band', str(config_file)) result = re.search('^rru|^enb|^du.band', str(config_file))
if result is not None: if result is not None:
mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 60) mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90)
result = re.search('type: b200', mySSH.getBefore()) result = re.search('type: b200', mySSH.getBefore())
if result is not None: if result is not None:
logging.debug('Found a B2xx device --> resetting it') logging.debug('Found a B2xx device --> resetting it')
mySSH.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10) mySSH.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
# Reloading FGPA bin firmware # Reloading FGPA bin firmware
mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 60) mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90)
# Make a copy and adapt to EPC / eNB IP addresses # Make a copy and adapt to EPC / eNB IP addresses
mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5) mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
localMmeIpAddr = EPC.MmeIPAddress localMmeIpAddr = EPC.MmeIPAddress
@@ -707,6 +707,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
#NSA specific log markers
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
#the datalog config file has to be loaded #the datalog config file has to be loaded
datalog_rt_stats_file='datalog_rt_stats.yaml' datalog_rt_stats_file='datalog_rt_stats.yaml'
@@ -722,8 +724,9 @@ class RANManagement():
datalog_rt_stats = yaml.load(f,Loader=yaml.FullLoader) datalog_rt_stats = yaml.load(f,Loader=yaml.FullLoader)
rt_keys = datalog_rt_stats['Ref'] #we use the keys from the Ref field rt_keys = datalog_rt_stats['Ref'] #we use the keys from the Ref field
line_cnt=0 #log file line counter
for line in enb_log_file.readlines(): for line in enb_log_file.readlines():
line_cnt+=1
# Runtime statistics # Runtime statistics
result = re.search('Run time:' ,str(line)) result = re.search('Run time:' ,str(line))
if result is not None: if result is not None:
@@ -899,7 +902,13 @@ class RANManagement():
#count "problem receiving samples" msg #count "problem receiving samples" msg
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
#nsa markers logging
for k in nsa_markers:
result = re.search(k, line)
if result is not None:
nsa_markers[k].append(line_cnt)
enb_log_file.close() enb_log_file.close()
logging.debug(' File analysis completed') logging.debug(' File analysis completed')
@@ -908,7 +917,7 @@ class RANManagement():
else: else:
nodeB_prefix = 'g' nodeB_prefix = 'g'
if self.air_interface[self.eNB_instance] == 'nr-softmodem': if nodeB_prefix == 'g':
if ulschReceiveOK > 0: if ulschReceiveOK > 0:
statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)' statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
@@ -935,6 +944,22 @@ class RANManagement():
htmlMsg = statMsg+'\n' htmlMsg = statMsg+'\n'
logging.debug(statMsg) logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg htmleNBFailureMsg += htmlMsg
#nsa markers
statMsg = 'logfile line count = ' + str(line_cnt)
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
if len(nsa_markers['SgNBReleaseRequestAcknowledge'])!=0:
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequestAcknowledge'][0])
else:
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences'
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
statMsg = 'FAILURE = ' + str(len(nsa_markers['FAILURE'])) + ' occurences'
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
#ulsch and dlsch statistics #ulsch and dlsch statistics
if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty
@@ -966,6 +991,25 @@ class RANManagement():
logging.debug('No real time stats found in the log file') logging.debug('No real time stats found in the log file')
htmleNBFailureMsg += statMsg htmleNBFailureMsg += statMsg
else:
#nsa markers
statMsg = 'logfile line count = ' + str(line_cnt)
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
if len(nsa_markers['SgNBReleaseRequest'])!=0:
statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequest'][0])
else:
statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences'
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
statMsg = 'scgFailureInformationNR-r15 = ' + str(len(nsa_markers['scgFailureInformationNR-r15'])) + ' occurences'
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
if uciStatMsgCount > 0: if uciStatMsgCount > 0:
statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
+7 -9
View File
@@ -30,19 +30,17 @@
040000 040000
000002 000002
010000 010000
000001
050000 050000
050001 050001
000001 000001
070000 070000
000001 000001
070001 070000
000001 000001
010002 010002
000001 000001
080001 080001
080000 080000
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
@@ -82,13 +80,13 @@
<testCase id="000001"> <testCase id="000001">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Sleep</desc> <desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec> <idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase> </testCase>
<testCase id="000002"> <testCase id="000002">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Sleep</desc> <desc>Sleep</desc>
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec> <idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase> </testCase>
@@ -110,8 +108,8 @@
<testCase id="070000"> <testCase id="070000">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile)</desc> <desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 20M -t 20 -i 1</iperf_args> <iperf_args>-u -b 20M -t 60 -i 1</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>
@@ -120,8 +118,8 @@
<testCase id="070001"> <testCase id="070001">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile)</desc> <desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 3M -t 20 -i 1</iperf_args> <iperf_args>-u -b 3M -t 60 -i 1</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>
@@ -21,49 +21,42 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>TEST-FR1-TM1</htmlTabRef> <htmlTabRef>TEST-NSA-FR1-TM1</htmlTabRef>
<htmlTabName>FR1</htmlTabName> <htmlTabName>NSA Ping DL UL with QUECTEL</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>3</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
010000
030000 030000
040000 040000
010001 000002
010000
000001 000001
050000 050000
050001 050001
000001 000001
060000
060001
000001
070000 070000
000001
070001 070001
000001
010002 010002
000001 000001
080001 080001
080000 080000
010003
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000"> <testCase id="010000">
<class>Initialize_UE</class> <class>Initialize_UE</class>
<desc>Initialize UE</desc> <desc>Initialize Quectel</desc>
<id>idefix</id>
</testCase> </testCase>
<testCase id="010003">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="010001">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="010002"> <testCase id="010002">
<class>Detach_UE</class> <class>Detach_UE</class>
<desc>Detach UE</desc> <desc>Detach UE</desc>
<id>idefix</id>
</testCase> </testCase>
@@ -74,13 +67,13 @@
<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>
</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/benetel-5g.conf</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/benetel-5g.conf -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>
@@ -89,12 +82,20 @@
<testCase id="000001"> <testCase id="000001">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Sleep</desc> <desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec> <idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase> </testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
</testCase>
<testCase id="050000"> <testCase id="050000">
<class>Ping</class> <class>Ping</class>
<desc>Ping: 20pings in 20sec</desc> <desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 20</ping_args> <ping_args>-c 20</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold> <ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase> </testCase>
@@ -102,46 +103,32 @@
<testCase id="050001"> <testCase id="050001">
<class>Ping</class> <class>Ping</class>
<desc>Ping: 100pings in 20sec</desc> <desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args> <ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold> <ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase> </testCase>
<testCase id="060000">
<class>Iperf</class>
<desc>iperf (DL/2.5Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 2.5M -t 60 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="060001">
<class>Iperf</class>
<desc>iperf (UL/1.5Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 1.5M -t 60 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="070000"> <testCase id="070000">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile)</desc> <desc>iperf (DL/20Mbps/UDP)(20 min)(single-ue profile)</desc>
<iperf_args>-u -b 20M -t 20 -i 1</iperf_args> <iperf_args>-u -b 20M -t 1200 -i 1</iperf_args>
<direction>DL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold> <iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile> <iperf_profile>single-ue</iperf_profile>
</testCase> </testCase>
<testCase id="070001"> <testCase id="070001">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile)</desc> <desc>iperf (UL/3Mbps/UDP)(20 min)(single-ue profile)</desc>
<iperf_args>-u -b 3M -t 20 -i 1 -R</iperf_args> <iperf_args>-u -b 2M -t 1200 -i 1</iperf_args>
<direction>UL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold> <iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile> <iperf_profile>single-ue</iperf_profile>
</testCase> </testCase>
<testCase id="080000"> <testCase id="080000">
<class>Terminate_eNB</class> <class>Terminate_eNB</class>
<desc>Terminate eNB</desc> <desc>Terminate eNB</desc>
@@ -35,6 +35,7 @@
<kind>all</kind> <kind>all</kind>
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId> <eNB_serverId>0</eNB_serverId>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase> </testCase>
</testCaseList> </testCaseList>
+3 -5
View File
@@ -30,19 +30,17 @@
040000 040000
000002 000002
010000 010000
000001
050000 050000
050001 050001
000001 000001
070000 070000
000001 000001
070001 070000
000001 000001
010002 010002
000001 000001
080001 080001
080000 080000
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
@@ -82,13 +80,13 @@
<testCase id="000001"> <testCase id="000001">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Sleep</desc> <desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec> <idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase> </testCase>
<testCase id="000002"> <testCase id="000002">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Sleep</desc> <desc>Sleep</desc>
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec> <idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase> </testCase>
+46 -41
View File
@@ -439,10 +439,6 @@ set(asn1_generated_dir ${OPENAIR_BIN_DIR})
set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf") set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf")
set(protobuf_generated_dir ${OPENAIR_BIN_DIR}) set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
if (${RU} STREQUAL 1)
add_definitions(-DNO_RRC)
endif (${RU} STREQUAL 1)
# RRC # RRC
###### ######
set (RRC_ASN1_VERSION "Rel15") set (RRC_ASN1_VERSION "Rel15")
@@ -454,7 +450,7 @@ set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
if (${RU} STREQUAL 0) if (${RU} STREQUAL 0)
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_" execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}"
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
endif (${RU} STREQUAL 0) endif (${RU} STREQUAL 0)
@@ -464,7 +460,7 @@ endif (NOT ${ret} STREQUAL 0)
file(GLOB rrc_source ${RRC_FULL_DIR}/*.c) file(GLOB rrc_source ${RRC_FULL_DIR}/*.c)
add_custom_target ( add_custom_target (
rrc_flag ALL rrc_flag ALL
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_" ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}"
DEPENDS ${RRC_GRAMMAR} DEPENDS ${RRC_GRAMMAR}
) )
@@ -485,19 +481,18 @@ add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
if (${RU} STREQUAL 0) execute_process(
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice" COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}"
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
endif () endif ()
file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c) file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h) file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
endif (${RU} STREQUAL 0)
add_custom_target ( add_custom_target (
nr_rrc_flag ALL nr_rrc_flag ALL
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice" ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}"
DEPENDS ${NR_RRC_GRAMMAR} DEPENDS ${NR_RRC_GRAMMAR}
) )
@@ -523,8 +518,9 @@ set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
if (${RU} STREQUAL 0) if (${RU} STREQUAL 0)
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps execute_process(
RESULT_VARIABLE ret) COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}"
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
@@ -533,7 +529,7 @@ endif (${RU} STREQUAL 0)
add_custom_target ( add_custom_target (
s1ap_flag ALL s1ap_flag ALL
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}"
DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}"
) )
@@ -578,8 +574,9 @@ set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files)
set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE}) set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "NGAP_" -fno-include-deps -findirect-choice execute_process(
RESULT_VARIABLE ret) COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
@@ -587,7 +584,7 @@ file(GLOB NGAP_source ${NGAP_C_DIR}/*.c)
add_custom_target ( add_custom_target (
ngap_flag ALL ngap_flag ALL
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "NGAP_" -fno-include-deps ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
DEPENDS "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" DEPENDS "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
) )
@@ -645,8 +642,9 @@ set(M2AP_C_DIR ${asn1_generated_dir}/M2AP_${M2AP_RELEASE})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
if (${RU} STREQUAL 0) if (${RU} STREQUAL 0)
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "M2AP_" -fno-include-deps -DEMIT_ASN_DEBUG=1 execute_process(
RESULT_VARIABLE ret) COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
@@ -656,7 +654,7 @@ file(GLOB M2AP_source ${M2AP_C_DIR}/*.c)
add_custom_target ( add_custom_target (
m2_flag ALL m2_flag ALL
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "M2AP_" -fno-include-deps COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"
DEPENDS ${M2AP_ASN_DIR}/${M2AP_ASN_FILES} DEPENDS ${M2AP_ASN_DIR}/${M2AP_ASN_FILES}
) )
@@ -717,8 +715,9 @@ set(M3AP_C_DIR ${asn1_generated_dir}/M3AP_${M3AP_RELEASE})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
if (${RU} STREQUAL 0) if (${RU} STREQUAL 0)
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "M3AP_" -fno-include-deps execute_process(
RESULT_VARIABLE ret) COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
@@ -728,7 +727,7 @@ file(GLOB M3AP_source ${M3AP_C_DIR}/*.c)
add_custom_target ( add_custom_target (
m3_flag ALL m3_flag ALL
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "M3AP_" -fno-include-deps COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"
DEPENDS ${M3AP_ASN_DIR}/${M3AP_ASN_FILES} DEPENDS ${M3AP_ASN_DIR}/${M3AP_ASN_FILES}
) )
@@ -773,8 +772,9 @@ set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE}) set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
if (${RU} STREQUAL 0) if (${RU} STREQUAL 0)
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps execute_process(
RESULT_VARIABLE ret) COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
@@ -784,7 +784,7 @@ file(GLOB X2AP_source ${X2AP_C_DIR}/*.c)
add_custom_target ( add_custom_target (
x2_flag ALL x2_flag ALL
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"
DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES} DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
) )
@@ -833,20 +833,25 @@ set(F1AP_ASN_FILES
if (${RU} STREQUAL 0) if (${RU} STREQUAL 0)
set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR}) set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR})
message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}") message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}")
execute_process(COMMAND mkdir -p ${F1AP_ASN_GENERATED_C_DIR} execute_process(
COMMAND env "ASN1C_PREFIX=F1AP_" asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
RESULT_VARIABLE ret RESULT_VARIABLE ret
OUTPUT_QUIET )
ERROR_QUIET)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "asn1c: error") message(FATAL_ERROR "asn1c: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c) add_custom_target (
add_library(F1AP_LIB f1_flag ALL
${F1AP_ASN_GENERATED_C_FILES} COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
) DEPENDS ${F1AP_ASN_FILES}
)
file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c)
add_library(F1AP_LIB
${F1AP_ASN_GENERATED_C_FILES}
)
add_dependencies (F1AP_LIB f1_flag)
include_directories ("${F1AP_ASN_GENERATED_C_DIR}") include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
include_directories ("${F1AP_DIR}") include_directories ("${F1AP_DIR}")
@@ -858,7 +863,6 @@ add_library(F1AP
endif (${RU} STREQUAL 0) endif (${RU} STREQUAL 0)
# Hardware dependant options # Hardware dependant options
################################### ###################################
add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4") add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4")
@@ -866,8 +870,6 @@ add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2"
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU") add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU")
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET") add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
#NOKIA config enhancement #NOKIA config enhancement
set (CONFIG_ROOTDIR set (CONFIG_ROOTDIR
@@ -3212,7 +3214,7 @@ target_link_libraries (nr-uesoftmodem
NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
NFAPI_USER_LIB S1AP_LIB S1AP_ENB NFAPI_USER_LIB S1AP_LIB S1AP_ENB
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB ${NAS_SIM_LIB}
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES}) target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
@@ -3650,6 +3652,9 @@ add_executable(nr-ittisim
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c ${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c
${XFORMSINTERFACE_SOURCE} ${XFORMSINTERFACE_SOURCE}
${T_SOURCE} ${T_SOURCE}
${CONFIG_SOURCES} ${CONFIG_SOURCES}
@@ -3662,7 +3667,7 @@ target_link_libraries (nr-ittisim
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (nr-ittisim ${LIBXML2_LIBRARIES}) target_link_libraries (nr-ittisim ${LIBXML2_LIBRARIES})
+1
View File
@@ -70,6 +70,7 @@ NR="False"
ITTI_SIM="False" ITTI_SIM="False"
SANITIZE_ADDRESS="False" SANITIZE_ADDRESS="False"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc" OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc"
RU=0
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
+12 -6
View File
@@ -1,13 +1,19 @@
#!/bin/bash #!/bin/bash
GENERATED_FULL_DIR=$1
shift
ASN1_SOURCE_DIR=$1
shift
export ASN1C_PREFIX=$1 export ASN1C_PREFIX=$1
shift shift
options=$* options=$1
shift
GENERATED_FULL_DIR=$1
shift
ASN1_SOURCE_DIR=$*
done_flag="$GENERATED_FULL_DIR"/done done_flag="$GENERATED_FULL_DIR"/done
if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then rebuild=0
for f in $ASN1_SOURCE_DIR ; do
if [ "$done_flag" -ot "$f" ] ; then
rebuild=1
fi
done
if [ $rebuild -eq 1 ] ; then
rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h
mkdir -p "$GENERATED_FULL_DIR" mkdir -p "$GENERATED_FULL_DIR"
asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example $options -D $GENERATED_FULL_DIR $ASN1_SOURCE_DIR |& egrep -v "^Copied|^Compiled" | sort -u asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example $options -D $GENERATED_FULL_DIR $ASN1_SOURCE_DIR |& egrep -v "^Copied|^Compiled" | sort -u
+1 -1
View File
@@ -122,5 +122,5 @@ typedef struct {
pthread_cond_t ru_cond; pthread_cond_t ru_cond;
} RAN_CONTEXT_t; } RAN_CONTEXT_t;
extern RAN_CONTEXT_t RC;
#endif #endif
+1
View File
@@ -31,6 +31,7 @@
#ifndef TELNETSRV_H #ifndef TELNETSRV_H
#define TELNETSRV_H #define TELNETSRV_H
#include <common/ran_context.h>
#define TELNETSRV_MODNAME "telnetsrv" #define TELNETSRV_MODNAME "telnetsrv"
#define TELNET_PORT 9090 #define TELNET_PORT 9090
+3 -2
View File
@@ -112,6 +112,7 @@ void configure_ru(int idx, void *arg);
void configure_rru(int idx, void *arg); void configure_rru(int idx, void *arg);
int attach_rru(RU_t *ru); int attach_rru(RU_t *ru);
int connect_rau(RU_t *ru); int connect_rau(RU_t *ru);
static void NRRCconfig_RU(void);
uint16_t sf_ahead; uint16_t sf_ahead;
uint16_t slot_ahead; uint16_t slot_ahead;
@@ -1837,7 +1838,7 @@ void init_NR_RU(char *rf_config_file)
pthread_cond_init(&RC.ru_cond,NULL); pthread_cond_init(&RC.ru_cond,NULL);
// read in configuration file) // read in configuration file)
printf("configuring RU from file\n"); printf("configuring RU from file\n");
RCconfig_RU(); NRRCconfig_RU();
LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_nr_L1_inst,RC.nb_RU,get_nprocs()); LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_nr_L1_inst,RC.nb_RU,get_nprocs());
LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU); LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU);
@@ -1912,7 +1913,7 @@ void stop_RU(int nb_ru)
/* --------------------------------------------------------*/ /* --------------------------------------------------------*/
/* from here function to use configuration module */ /* from here function to use configuration module */
void RCconfig_RU(void) static void NRRCconfig_RU(void)
{ {
int i = 0, j = 0; int i = 0, j = 0;
paramdef_t RUParams[] = RUPARAMS_DESC; paramdef_t RUParams[] = RUPARAMS_DESC;
+1 -1
View File
@@ -82,7 +82,6 @@ unsigned short config_frames[4] = {2,9,11,13};
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0) // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
#include "PHY/TOOLS/phy_scope_interface.h" #include "PHY/TOOLS/phy_scope_interface.h"
#include "PHY/TOOLS/nr_phy_scope.h" #include "PHY/TOOLS/nr_phy_scope.h"
#define NRUE_MAIN
#include <executables/nr-uesoftmodem.h> #include <executables/nr-uesoftmodem.h>
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "executables/thread-common.h" #include "executables/thread-common.h"
@@ -90,6 +89,7 @@ unsigned short config_frames[4] = {2,9,11,13};
extern const char *duplex_mode[]; extern const char *duplex_mode[];
msc_interface_t msc_interface; msc_interface_t msc_interface;
THREAD_STRUCT thread_struct; THREAD_STRUCT thread_struct;
nrUE_params_t nrUE_params;
// Thread variables // Thread variables
pthread_cond_t nfapi_sync_cond; pthread_cond_t nfapi_sync_cond;
-3
View File
@@ -72,9 +72,6 @@ extern uint64_t get_nrUE_optmask(void);
extern uint64_t set_nrUE_optmask(uint64_t bitmask); extern uint64_t set_nrUE_optmask(uint64_t bitmask);
extern nrUE_params_t *get_nrUE_params(void); extern nrUE_params_t *get_nrUE_params(void);
#ifdef NRUE_MAIN
nrUE_params_t nrUE_params;
#endif
// In nr-ue.c // In nr-ue.c
extern int setup_nr_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg); extern int setup_nr_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
+51 -49
View File
@@ -181,62 +181,64 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
} }
/*Mapping the encoded DCI along with the DMRS */ /*Mapping the encoded DCI along with the DMRS */
for (int cce_count = 0; cce_count < dci_pdu->AggregationLevel; cce_count ++) { for(int symbol_idx = 0; symbol_idx < pdcch_pdu_rel15->DurationSymbols; symbol_idx++) {
for (int cce_count = 0; cce_count < dci_pdu->AggregationLevel; cce_count+=pdcch_pdu_rel15->DurationSymbols) {
int8_t cce_idx = reg_list_order[cce_count]; int8_t cce_idx = reg_list_order[cce_count];
for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) { for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) {
k = cset_start_sc + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].start_sc_idx; k = cset_start_sc + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].start_sc_idx;
if (k >= frame_parms.ofdm_symbol_size)
k -= frame_parms.ofdm_symbol_size;
l = cset_start_symb + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].symb_idx;
// dmrs index depends on reference point for k according to 38.211 7.4.1.3.2
if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG)
dmrs_idx =(gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols) * 3;
else
dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols + rb_offset) * 3;
k_prime = 0;
for (int m = 0; m < NR_NB_SC_PER_RB; m++) {
if (m == (k_prime << 2) + 1) { // DMRS if not already mapped
((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] =
(amp * mod_dmrs[l][dmrs_idx << 1]) >> 15;
((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] =
(amp * mod_dmrs[l][(dmrs_idx << 1) + 1]) >> 15;
#ifdef DEBUG_PDCCH_DMRS
printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1],
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]);
#endif
dmrs_idx++;
k_prime++;
} else { // DCI payload
((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = (amp * mod_dci[dci_idx << 1]) >> 15;
((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] =
(amp * mod_dci[(dci_idx << 1) + 1]) >> 15;
#ifdef DEBUG_DCI
printf("PDCCH: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1],
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]);
#endif
dci_idx++;
}
k++;
if (k >= frame_parms.ofdm_symbol_size) if (k >= frame_parms.ofdm_symbol_size)
k -= frame_parms.ofdm_symbol_size; k -= frame_parms.ofdm_symbol_size;
} // m l = cset_start_symb + symbol_idx;
} // reg_in_cce_idx
} // cce_count // dmrs index depends on reference point for k according to 38.211 7.4.1.3.2
if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG)
dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx) * 3;
else
dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx + rb_offset) * 3;
k_prime = 0;
for (int m = 0; m < NR_NB_SC_PER_RB; m++) {
if (m == (k_prime << 2) + 1) { // DMRS if not already mapped
((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] =
(amp * mod_dmrs[l][dmrs_idx << 1]) >> 15;
((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] =
(amp * mod_dmrs[l][(dmrs_idx << 1) + 1]) >> 15;
#ifdef DEBUG_PDCCH_DMRS
printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1],
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]);
#endif
dmrs_idx++;
k_prime++;
} else { // DCI payload
((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = (amp * mod_dci[dci_idx << 1]) >> 15;
((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] =
(amp * mod_dci[(dci_idx << 1) + 1]) >> 15;
#ifdef DEBUG_DCI
printf("PDCCH: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1],
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]);
#endif
dci_idx++;
}
k++;
if (k >= frame_parms.ofdm_symbol_size)
k -= frame_parms.ofdm_symbol_size;
} // m
} // reg_in_cce_idx
} // cce_count
} // symbol_idx
LOG_D(PHY, LOG_D(PHY,
"DCI: payloadSize = %d | payload = %llx\n", "DCI: payloadSize = %d | payload = %llx\n",
+5 -5
View File
@@ -136,7 +136,7 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r
get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset); get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset);
int N_reg = n_rb * pdcch_pdu_rel15->DurationSymbols; int N_reg = n_rb;
int C=-1; int C=-1;
AssertFatal(N_reg > 0,"N_reg cannot be 0\n"); AssertFatal(N_reg > 0,"N_reg cannot be 0\n");
@@ -174,8 +174,8 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r
for (uint8_t reg_idx=0; reg_idx<bsize; reg_idx++) { for (uint8_t reg_idx=0; reg_idx<bsize; reg_idx++) {
reg = &cce->reg_list[reg_idx]; reg = &cce->reg_list[reg_idx];
reg->reg_idx = bsize*idx + reg_idx; reg->reg_idx = bsize*idx + reg_idx;
reg->start_sc_idx = (reg->reg_idx/pdcch_pdu_rel15->DurationSymbols) * NR_NB_SC_PER_RB; reg->start_sc_idx = reg->reg_idx * NR_NB_SC_PER_RB;
reg->symb_idx = reg->reg_idx % pdcch_pdu_rel15->DurationSymbols; reg->symb_idx = 0;
LOG_D(PHY, "reg %d symbol %d start subcarrier %d\n", reg->reg_idx, reg->symb_idx, reg->start_sc_idx); LOG_D(PHY, "reg %d symbol %d start subcarrier %d\n", reg->reg_idx, reg->symb_idx, reg->start_sc_idx);
} }
} }
@@ -185,8 +185,8 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r
for (uint8_t reg_idx=0; reg_idx<NR_NB_REG_PER_CCE; reg_idx++) { for (uint8_t reg_idx=0; reg_idx<NR_NB_REG_PER_CCE; reg_idx++) {
reg = &cce->reg_list[reg_idx]; reg = &cce->reg_list[reg_idx];
reg->reg_idx = cce->cce_idx*NR_NB_REG_PER_CCE + reg_idx; reg->reg_idx = cce->cce_idx*NR_NB_REG_PER_CCE + reg_idx;
reg->start_sc_idx = (reg->reg_idx/pdcch_pdu_rel15->DurationSymbols) * NR_NB_SC_PER_RB; reg->start_sc_idx = reg->reg_idx * NR_NB_SC_PER_RB;
reg->symb_idx = reg->reg_idx % pdcch_pdu_rel15->DurationSymbols; reg->symb_idx = 0;
LOG_D(PHY, "reg %d symbol %d start subcarrier %d\n", reg->reg_idx, reg->symb_idx, reg->start_sc_idx); LOG_D(PHY, "reg %d symbol %d start subcarrier %d\n", reg->reg_idx, reg->symb_idx, reg->start_sc_idx);
} }
+2 -2
View File
@@ -1621,7 +1621,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
if (pucch_pdu->bit_len_harq>0) { if (pucch_pdu->bit_len_harq>0) {
int harq_bytes=pucch_pdu->bit_len_harq>>3; int harq_bytes=pucch_pdu->bit_len_harq>>3;
if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++; if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++;
uci_pdu->pduBitmap|=1; uci_pdu->pduBitmap|=2;
uci_pdu->harq.harq_payload = (uint8_t*)malloc(harq_bytes); uci_pdu->harq.harq_payload = (uint8_t*)malloc(harq_bytes);
uci_pdu->harq.harq_crc = decoderState; uci_pdu->harq.harq_crc = decoderState;
int i=0; int i=0;
@@ -1635,7 +1635,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
} }
if (pucch_pdu->sr_flag == 1) { if (pucch_pdu->sr_flag == 1) {
uci_pdu->pduBitmap|=2; uci_pdu->pduBitmap|=1;
uci_pdu->sr.sr_bit_len = 1; uci_pdu->sr.sr_bit_len = 1;
uci_pdu->sr.sr_payload = malloc(1); uci_pdu->sr.sr_payload = malloc(1);
uci_pdu->sr.sr_payload[0] = decodedPayload[0]&1; uci_pdu->sr.sr_payload[0] = decodedPayload[0]&1;
+20 -14
View File
@@ -132,7 +132,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
if (reg_bundle_size_L != 0) { // interleaving will be done only if reg_bundle_size_L != 0 if (reg_bundle_size_L != 0) { // interleaving will be done only if reg_bundle_size_L != 0
coreset_interleaved = 1; coreset_interleaved = 1;
coreset_C = (uint32_t) ((coreset_nbr_rb * coreset_time_dur) / (coreset_interleaver_size_R * reg_bundle_size_L)); coreset_C = (uint32_t) (coreset_nbr_rb / (coreset_interleaver_size_R * reg_bundle_size_L));
} else { } else {
reg_bundle_size_L = 6; reg_bundle_size_L = 6;
} }
@@ -140,7 +140,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
int f_bundle_j_list[NR_MAX_PDCCH_AGG_LEVEL] = {}; int f_bundle_j_list[NR_MAX_PDCCH_AGG_LEVEL] = {};
for (int reg = 0; reg < ((coreset_nbr_rb * coreset_time_dur)); reg++) { for (int reg = 0; reg < coreset_nbr_rb; reg++) {
if ((reg % reg_bundle_size_L) == 0) { if ((reg % reg_bundle_size_L) == 0) {
if (r == coreset_interleaver_size_R) { if (r == coreset_interleaver_size_R) {
r = 0; r = 0;
@@ -148,7 +148,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
} }
bundle_j = (c * coreset_interleaver_size_R) + r; bundle_j = (c * coreset_interleaver_size_R) + r;
f_bundle_j = ((r * coreset_C) + c + n_shift) % ((coreset_nbr_rb * coreset_time_dur) / reg_bundle_size_L); f_bundle_j = ((r * coreset_C) + c + n_shift) % (coreset_nbr_rb / reg_bundle_size_L);
if (coreset_interleaved == 0) f_bundle_j = bundle_j; if (coreset_interleaved == 0) f_bundle_j = bundle_j;
@@ -174,22 +174,28 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
} }
} }
for(int reg=0; reg<((coreset_nbr_rb*coreset_time_dur)); reg++) { int rb = 0;
for (int c_id = 0; c_id < number_of_candidates; c_id++ ) {
for (int symbol_idx = 0; symbol_idx < coreset_time_dur; symbol_idx++) {
for (int cce_count = CCE[c_id/coreset_time_dur]+c_id%coreset_time_dur; cce_count < CCE[c_id/coreset_time_dur]+c_id%coreset_time_dur+L[c_id]; cce_count += coreset_time_dur) {
for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) {
f_reg = (f_bundle_j_list_ord[reg/6]*reg_bundle_size_L)+(reg%reg_bundle_size_L); f_reg = (f_bundle_j_list_ord[cce_count] * reg_bundle_size_L) + reg_in_cce_idx;
index_z = 9*reg; index_z = 9 * rb;
index_llr = 9*((uint16_t)floor(f_reg/coreset_time_dur)+((f_reg%coreset_time_dur)*(coreset_nbr_rb))); index_llr = (uint16_t) (f_reg + symbol_idx * coreset_nbr_rb) * 9;
for (int i=0; i<9; i++) { for (int i = 0; i < 9; i++) {
z[index_z + i] = llr[index_llr + i]; z[index_z + i] = llr[index_llr + i];
#ifdef NR_PDCCH_DCI_DEBUG #ifdef NR_PDCCH_DCI_DEBUG
LOG_D(PHY,"[reg=%d,bundle_j=%d] z[%d]=(%d,%d) <-> \t[f_reg=%d,fbundle_j=%d] llr[%d]=(%d,%d) \n", LOG_I(PHY,"[cce_count=%d,reg_in_cce_idx=%d,bundle_j=%d,symbol_idx=%d,candidate=%d] z[%d]=(%d,%d) <-> \t[f_reg=%d,fbundle_j=%d] llr[%d]=(%d,%d) \n",
reg,bundle_j,(index_z + i),*(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]), cce_count,reg_in_cce_idx,bundle_j,symbol_idx,c_id,(index_z + i),*(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]),
f_reg,f_bundle_j,(index_llr + i),*(int16_t *) &llr[index_llr + i], *(1 + (int16_t *) &llr[index_llr + i])); f_reg,f_bundle_j,(index_llr + i),*(int16_t *) &llr[index_llr + i], *(1 + (int16_t *) &llr[index_llr + i]));
#endif #endif
}
rb++;
}
}
} }
if ((reg%reg_bundle_size_L) == 0) r++;
} }
} }
+1
View File
@@ -28,6 +28,7 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include <common/ran_context.h>
/* Forms and Objects */ /* Forms and Objects */
+1 -1
View File
@@ -240,7 +240,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in
for (int pix=0; pix<graph->w; pix++) { for (int pix=0; pix<graph->w; pix++) {
scopeSample_t *end=values+(pix+1)*samplesPerPixel; scopeSample_t *end=values+(pix+1)*samplesPerPixel;
end-=2; end-=2;
AssertFatal(end <= values+datasize,"diff : %u", end-values+datasize); AssertFatal(end <= values+datasize,"diff : %ld", end-values+datasize);
double val=0; double val=0;
for (scopeSample_t *s=values+(pix)*samplesPerPixel; for (scopeSample_t *s=values+(pix)*samplesPerPixel;
+4 -3
View File
@@ -523,7 +523,7 @@ void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
} }
void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
/* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */ /* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */
int pucch_decode_done = 0; int pucch_decode_done = 0;
int pusch_decode_done = 0; int pusch_decode_done = 0;
@@ -649,10 +649,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1);
start_meas(&gNB->rx_pusch_stats); start_meas(&gNB->rx_pusch_stats);
no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, harq_pid); no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, harq_pid);
if (no_sig && (get_softmodem_params()->phy_test == 0)) { if (no_sig) {
LOG_I(PHY, "PUSCH not detected in frame %d, slot %d\n", frame_rx, slot_rx); LOG_I(PHY, "PUSCH not detected in frame %d, slot %d\n", frame_rx, slot_rx);
nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid, 1); nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid, 1);
return; return 1;
} }
stop_meas(&gNB->rx_pusch_stats); stop_meas(&gNB->rx_pusch_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
@@ -678,4 +678,5 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0);
return 0;
} }
+1 -1
View File
@@ -38,7 +38,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx);
void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME_PARMS *fp); void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME_PARMS *fp);
void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, int frame_tx, int slot_tx, int do_meas); void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, int frame_tx, int slot_tx, int do_meas);
void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx);
void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx);
void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot); void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot);
void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu); void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu);
void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx); void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx);
+10 -5
View File
@@ -304,7 +304,7 @@ int main(int argc, char **argv)
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0 ) { if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0 ) {
exit_fun("[NR_ULSIM] Error, configuration module init failed\n"); exit_fun("[NR_ULSIM] Error, configuration module init failed\n");
} }
int ul_proc_error = 0; // uplink processing checking status flag
//logInit(); //logInit();
randominit(0); randominit(0);
@@ -1109,6 +1109,11 @@ int main(int argc, char **argv)
phy_procedures_nrUE_TX(UE, &UE_proc, gNB_id); phy_procedures_nrUE_TX(UE, &UE_proc, gNB_id);
/* We need to call common sending function to send signal */
LOG_D(PHY, "Sending Uplink data \n");
nr_ue_pusch_common_procedures(UE,
slot,
&UE->frame_parms,1);
if (n_trials==1) { if (n_trials==1) {
LOG_M("txsig0.m","txs0", UE->common_vars.txdata[0],frame_parms->samples_per_subframe*10,1,1); LOG_M("txsig0.m","txs0", UE->common_vars.txdata[0],frame_parms->samples_per_subframe*10,1,1);
@@ -1180,7 +1185,7 @@ int main(int argc, char **argv)
phy_procedures_gNB_common_RX(gNB, frame, slot); phy_procedures_gNB_common_RX(gNB, frame, slot);
phy_procedures_gNB_uespec_RX(gNB, frame, slot); ul_proc_error = phy_procedures_gNB_uespec_RX(gNB, frame, slot);
if (n_trials==1 && round==0) { if (n_trials==1 && round==0) {
LOG_M("rxsig0.m","rx0",&gNB->common_vars.rxdata[0][slot_offset],slot_length,1,1); LOG_M("rxsig0.m","rx0",&gNB->common_vars.rxdata[0][slot_offset],slot_length,1,1);
@@ -1210,9 +1215,9 @@ int main(int argc, char **argv)
&gNB->pusch_vars[0]->llr[0],(nb_symb_sch-1)*NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order,1,0); &gNB->pusch_vars[0]->llr[0],(nb_symb_sch-1)*NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order,1,0);
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
if (gNB->ulsch[0][0]->last_iteration_cnt >= if ((gNB->ulsch[0][0]->last_iteration_cnt >=
gNB->ulsch[0][0]->max_ldpc_iterations+1) { gNB->ulsch[0][0]->max_ldpc_iterations+1) || ul_proc_error == 1) {
error_flag = 1; error_flag = 1;
n_errors[round]++; n_errors[round]++;
crc_status = 1; crc_status = 1;
+3 -3
View File
@@ -189,7 +189,7 @@ typedef struct MEAS_REQ_TABLE_ENTRY {
MAC_MEAS_REQ Mac_meas_req; MAC_MEAS_REQ Mac_meas_req;
unsigned int Last_report_frame; unsigned int Last_report_frame;
unsigned int Next_check_frame; unsigned int Next_check_frame;
uint8_t Status; uint8_t StatusMeas;
uint8_t Meas_req_status; uint8_t Meas_req_status;
uint8_t Rx_activity; uint8_t Rx_activity;
//uint8_t Meas_Direction;//??? //uint8_t Meas_Direction;//???
@@ -269,7 +269,7 @@ typedef struct {
char Wideband_sinr; char Wideband_sinr;
uint8_t Forg_fact; uint8_t Forg_fact;
unsigned short Rep_interval; unsigned short Rep_interval;
uint8_t Status; uint8_t StatusMeas;
unsigned int Last_report_frame; unsigned int Last_report_frame;
unsigned int Next_check_frame; unsigned int Next_check_frame;
uint8_t Active; uint8_t Active;
@@ -299,7 +299,7 @@ typedef struct {
unsigned short Rep_interval; unsigned short Rep_interval;
unsigned int Last_report_frame; unsigned int Last_report_frame;
unsigned int Next_check_frame; unsigned int Next_check_frame;
uint8_t Status; //IDLE,NEED_rADIO_CONFIG, RADIO_CONFIG_TX, RADIO_CONFIG_ok uint8_t StatusMeas; //IDLE,NEED_rADIO_CONFIG, RADIO_CONFIG_TX, RADIO_CONFIG_ok
uint8_t Active; uint8_t Active;
} __attribute__ ((__packed__)) DEFAULT_CH_MEAS; } __attribute__ ((__packed__)) DEFAULT_CH_MEAS;
#define DEFAULT_eNB_MEAS_SIZE sizeof(DEFAULT_eNB_MEAS) #define DEFAULT_eNB_MEAS_SIZE sizeof(DEFAULT_eNB_MEAS)
-5
View File
@@ -32,14 +32,9 @@
#ifndef __PLATFORM_CONSTANTS_H__ #ifndef __PLATFORM_CONSTANTS_H__
# define __PLATFORM_CONSTANTS_H__ # define __PLATFORM_CONSTANTS_H__
#ifndef NO_RRC
#include "LTE_asn_constant.h" #include "LTE_asn_constant.h"
#include "NR_asn_constant.h" #include "NR_asn_constant.h"
#else
#define LTE_maxDRB 14
#define LTE_maxDRB_NB_r13 5
#define NR_MAXDRB 14 #define NR_MAXDRB 14
#endif
#ifdef JUMBO_FRAME #ifdef JUMBO_FRAME
#define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/ #define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/
-89
View File
@@ -1,89 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// This task is mandatory and must always be placed in first position
TASK_DEF(TASK_TIMER, TASK_PRIORITY_MAX, 10)
// Other possible tasks in the process
// Common tasks:
/// Bearers Manager task
TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200)
// eNodeB tasks and sub-tasks:
/// Radio Resource Control task
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200)
// Define here for now
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200)
/// S1ap task
/// RAL task for ENB
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200)
// UDP TASK
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000)
// GTP_V1U task
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000)
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200)
/// M3ap task, acts as both source and target
TASK_DEF(TASK_M3AP, TASK_PRIORITY_MED, 200)
/// M3ap task, acts as both source and target
TASK_DEF(TASK_M3AP_MME, TASK_PRIORITY_MED, 200)
/// M3ap task, acts as both source and target
TASK_DEF(TASK_M3AP_MCE, TASK_PRIORITY_MED, 200)
/// M2ap task, acts as both source and target
TASK_DEF(TASK_M2AP_MCE, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_M2AP_ENB, TASK_PRIORITY_MED, 200)
/// X2ap task, acts as both source and target
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
/// Sctp task (Used by both S1AP and X2AP)
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200)
/// eNB APP task
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
/// gNB APP task
TASK_DEF(TASK_GNB_APP, TASK_PRIORITY_MED, 200)
/// eNB Agent task
TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_PROTO_AGENT, TASK_PRIORITY_MED, 200)
// UE tasks and sub-tasks:
/// Radio Resource Control task
TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED, 200)
/// Non Access Stratum task
TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200)
//MESSAGE GENERATOR TASK
TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200)
#ifdef ITTI_SIM
TASK_DEF(TASK_RRC_GNB_SIM, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200)
#endif
+1 -1
View File
@@ -888,7 +888,7 @@ uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti) {
if (!ue_context_p) return RRC_INACTIVE; if (!ue_context_p) return RRC_INACTIVE;
return ue_context_p->ue_context.Status; return ue_context_p->ue_context.StatusRrc;
} }
uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id) { uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id) {
+1 -1
View File
@@ -721,7 +721,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
} else { } else {
LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti); LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti);
ue_context_p->ue_context.Status = RRC_CONNECTED; ue_context_p->ue_context.StatusRrc = RRC_CONNECTED;
} }
break; break;
+1 -1
View File
@@ -92,7 +92,7 @@ typedef struct ru_config_s {
uint8_t if_compress; uint8_t if_compress;
} ru_config_t; } ru_config_t;
*/ */
extern void RCconfig_RU(void); extern void NRRCconfig_RU(void);
extern void RCconfig_nr_flexran(void); extern void RCconfig_nr_flexran(void);
extern void RCconfig_NR_L1(void); extern void RCconfig_NR_L1(void);
extern void RCconfig_nr_macrlc(void); extern void RCconfig_nr_macrlc(void);
@@ -1172,9 +1172,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
harq->is_waiting = true; harq->is_waiting = true;
ra->harq_pid = current_harq_pid; ra->harq_pid = current_harq_pid;
nr_acknack_scheduling(module_idP, UE_id, frameP, slotP); int alloc = nr_acknack_scheduling(module_idP, UE_id, frameP, slotP);
harq->feedback_slot = sched_ctrl->sched_pucch->ul_slot; AssertFatal(alloc>=0,"Couldn't find a pucch allocation for ack nack (msg4)\n");
harq->feedback_frame = sched_ctrl->sched_pucch->frame; NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[alloc];
harq->feedback_slot = pucch->ul_slot;
harq->feedback_frame = pucch->frame;
// Bytes to be transmitted // Bytes to be transmitted
uint8_t *buf = (uint8_t *) harq->tb; uint8_t *buf = (uint8_t *) harq->tb;
@@ -1376,10 +1378,10 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
dci_payload.rv = pdsch_pdu_rel15->rvIndex[0]; dci_payload.rv = pdsch_pdu_rel15->rvIndex[0];
dci_payload.harq_pid = current_harq_pid; dci_payload.harq_pid = current_harq_pid;
dci_payload.ndi = harq->ndi; dci_payload.ndi = harq->ndi;
dci_payload.dai[0].val = (sched_ctrl->sched_pucch->dai_c-1)&3; dci_payload.dai[0].val = (pucch->dai_c-1)&3;
dci_payload.tpc = sched_ctrl->tpc1; // TPC for PUCCH: table 7.2.1-1 in 38.213 dci_payload.tpc = sched_ctrl->tpc1; // TPC for PUCCH: table 7.2.1-1 in 38.213
dci_payload.pucch_resource_indicator = sched_ctrl->sched_pucch->resource_indicator; dci_payload.pucch_resource_indicator = pucch->resource_indicator;
dci_payload.pdsch_to_harq_feedback_timing_indicator.val = sched_ctrl->sched_pucch->timing_indicator; dci_payload.pdsch_to_harq_feedback_timing_indicator.val = pucch->timing_indicator;
LOG_D(NR_MAC, LOG_D(NR_MAC,
"[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n",
@@ -492,8 +492,8 @@ bool allocate_dl_retransmission(module_id_t module_id,
/* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
* allocation after CCE alloc fail would be more complex) */ * allocation after CCE alloc fail would be more complex) */
const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); const int alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot);
if (!alloc) { if (alloc<0) {
LOG_D(MAC, LOG_D(MAC,
"%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n",
__func__, __func__,
@@ -509,6 +509,8 @@ bool allocate_dl_retransmission(module_id_t module_id,
return false; return false;
} }
sched_ctrl->sched_pdsch.pucch_allocation = alloc;
/* just reuse from previous scheduling opportunity, set new start RB */ /* just reuse from previous scheduling opportunity, set new start RB */
sched_ctrl->sched_pdsch = *retInfo; sched_ctrl->sched_pdsch = *retInfo;
sched_ctrl->sched_pdsch.rbStart = rbStart; sched_ctrl->sched_pdsch.rbStart = rbStart;
@@ -615,8 +617,8 @@ void pf_dl(module_id_t module_id,
/* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
* allocation after CCE alloc fail would be more complex) */ * allocation after CCE alloc fail would be more complex) */
const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); const int alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot);
if (!alloc) { if (alloc<0) {
LOG_D(MAC, LOG_D(MAC,
"%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n",
__func__, __func__,
@@ -648,7 +650,7 @@ void pf_dl(module_id_t module_id,
scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps); scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps);
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx); sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx); sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
sched_pdsch->pucch_allocation = alloc;
uint32_t TBS = 0; uint32_t TBS = 0;
uint16_t rbSize; uint16_t rbSize;
const int oh = 2 + (sched_ctrl->num_total_bytes >= 256) const int oh = 2 + (sched_ctrl->num_total_bytes >= 256)
@@ -811,7 +813,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid]; NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
DevAssert(!harq->is_waiting); DevAssert(!harq->is_waiting);
add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid); add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid);
NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0]; NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[sched_pdsch->pucch_allocation];
harq->feedback_frame = pucch->frame; harq->feedback_frame = pucch->frame;
harq->feedback_slot = pucch->ul_slot; harq->feedback_slot = pucch->ul_slot;
harq->is_waiting = true; harq->is_waiting = true;
@@ -339,8 +339,8 @@ void nr_preprocessor_phytest(module_id_t module_id,
__func__, __func__,
UE_id); UE_id);
const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); const int alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot);
if (!alloc) { if (alloc < 0) {
LOG_D(MAC, LOG_D(MAC,
"%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n",
__func__, __func__,
@@ -355,12 +355,13 @@ void nr_preprocessor_phytest(module_id_t module_id,
return; return;
} }
AssertFatal(alloc, //AssertFatal(alloc,
"could not find uplink slot for PUCCH (RNTI %04x@%d.%d)!\n", // "could not find uplink slot for PUCCH (RNTI %04x@%d.%d)!\n",
rnti, frame, slot); // rnti, frame, slot);
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
sched_pdsch->pucch_allocation = alloc;
sched_pdsch->rbStart = rbStart; sched_pdsch->rbStart = rbStart;
sched_pdsch->rbSize = rbSize; sched_pdsch->rbSize = rbSize;
const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot]; const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot];
+47 -44
View File
@@ -553,9 +553,6 @@ void nr_csi_meas_reporting(int Mod_idP,
for (int i = start; i < start + len; ++i) { for (int i = start; i < start + len; ++i) {
vrb_map_UL[i] |= mask; vrb_map_UL[i] |= mask;
} }
AssertFatal(!curr_pucch->simultaneous_harqcsi,
"UE %04x has simultaneous HARQ/CSI configured, but we don't support that\n",
UE_info->rnti[UE_id]);
} }
} }
} }
@@ -1088,10 +1085,14 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
// function to update pucch scheduling parameters in UE list when a USS DL is scheduled // function to update pucch scheduling parameters in UE list when a USS DL is scheduled
bool nr_acknack_scheduling(int mod_id, // this function returns an index to NR_sched_pucch structure
int UE_id, // currently this structure contains PUCCH0 at index 0 and PUCCH2 at index 1
frame_t frame, // if the function returns -1 it was not possible to schedule acknack
sub_frame_t slot) // when current pucch is ready to be scheduled nr_fill_nfapi_pucch is called
int nr_acknack_scheduling(int mod_id,
int UE_id,
frame_t frame,
sub_frame_t slot)
{ {
const NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; const NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon;
const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
@@ -1101,6 +1102,7 @@ bool nr_acknack_scheduling(int mod_id,
const int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots; const int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots;
const int first_ul_slot_tdd = tdd->nrofDownlinkSlots + nr_slots_period * (slot / nr_slots_period); const int first_ul_slot_tdd = tdd->nrofDownlinkSlots + nr_slots_period * (slot / nr_slots_period);
const int CC_id = 0; const int CC_id = 0;
NR_sched_pucch_t *csi_pucch;
AssertFatal(slot < first_ul_slot_tdd + (tdd->nrofUplinkSymbols != 0), AssertFatal(slot < first_ul_slot_tdd + (tdd->nrofUplinkSymbols != 0),
"cannot handle multiple TDD periods (yet): slot %d first_ul_slot_tdd %d nrofUplinkSlots %ld\n", "cannot handle multiple TDD periods (yet): slot %d first_ul_slot_tdd %d nrofUplinkSlots %ld\n",
@@ -1120,7 +1122,6 @@ bool nr_acknack_scheduling(int mod_id,
"%s(): csi_bits %d in sched_pucch[0]\n", "%s(): csi_bits %d in sched_pucch[0]\n",
__func__, __func__,
pucch->csi_bits); pucch->csi_bits);
/* if the currently allocated PUCCH of this UE is full, allocate it */ /* if the currently allocated PUCCH of this UE is full, allocate it */
if (pucch->dai_c == 2) { if (pucch->dai_c == 2) {
/* advance the UL slot information in PUCCH by one so we won't schedule in /* advance the UL slot information in PUCCH by one so we won't schedule in
@@ -1132,17 +1133,13 @@ bool nr_acknack_scheduling(int mod_id,
pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
pucch->ul_slot = (s + 1) % n_slots_frame; pucch->ul_slot = (s + 1) % n_slots_frame;
// we assume that only two indices over the array sched_pucch exist // we assume that only two indices over the array sched_pucch exist
NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; csi_pucch = &sched_ctrl->sched_pucch[1];
// skip the CSI PUCCH if it is present and if in the next frame/slot // skip the CSI PUCCH if it is present and if in the next frame/slot
// and if we don't multiplex
if (csi_pucch->csi_bits > 0 if (csi_pucch->csi_bits > 0
&& csi_pucch->frame == pucch->frame && csi_pucch->frame == pucch->frame
&& csi_pucch->ul_slot == pucch->ul_slot) { && csi_pucch->ul_slot == pucch->ul_slot
AssertFatal(!csi_pucch->simultaneous_harqcsi, && !csi_pucch->simultaneous_harqcsi) {
"%s(): %d.%d cannot handle simultaneous_harqcsi, but found for UE %d\n",
__func__,
pucch->frame,
pucch->ul_slot,
UE_id);
nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id); nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id);
memset(csi_pucch, 0, sizeof(*csi_pucch)); memset(csi_pucch, 0, sizeof(*csi_pucch));
pucch->frame = s >= n_slots_frame - 2 ? (f + 1) % 1024 : f; pucch->frame = s >= n_slots_frame - 2 ? (f + 1) % 1024 : f;
@@ -1156,7 +1153,7 @@ bool nr_acknack_scheduling(int mod_id,
if ((pucch->frame == frame if ((pucch->frame == frame
&& (pucch->ul_slot >= first_ul_slot_tdd + nr_ulmix_slots)) && (pucch->ul_slot >= first_ul_slot_tdd + nr_ulmix_slots))
|| (pucch->frame == frame + 1)) || (pucch->frame == frame + 1))
return false; return -1;
// this is hardcoded for now as ue specific // this is hardcoded for now as ue specific
NR_SearchSpace__searchSpaceType_PR ss_type = NR_SearchSpace__searchSpaceType_PR_ue_Specific; NR_SearchSpace__searchSpaceType_PR ss_type = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
@@ -1190,7 +1187,7 @@ bool nr_acknack_scheduling(int mod_id,
pucch->timing_indicator = i; pucch->timing_indicator = i;
pucch->dai_c++; pucch->dai_c++;
// retain old resource indicator, and we are good // retain old resource indicator, and we are good
return true; return 0;
} }
/* we need to find a new PUCCH occasion */ /* we need to find a new PUCCH occasion */
@@ -1213,30 +1210,6 @@ bool nr_acknack_scheduling(int mod_id,
// advance ul_slot if it is not reachable by UE // advance ul_slot if it is not reachable by UE
pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]); pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]);
// is there already CSI in this slot?
NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1];
// skip the CSI PUCCH if it is present and if in the next frame/slot
if (csi_pucch->csi_bits > 0
&& csi_pucch->frame == pucch->frame
&& csi_pucch->ul_slot == pucch->ul_slot) {
AssertFatal(!csi_pucch->simultaneous_harqcsi,
"%s(): %d.%d cannot handle simultaneous_harqcsi, but found for UE %d\n",
__func__,
pucch->frame,
pucch->ul_slot,
UE_id);
nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id);
memset(csi_pucch, 0, sizeof(*csi_pucch));
/* advance the UL slot information in PUCCH by one so we won't schedule in
* the same slot again */
const int f = pucch->frame;
const int s = pucch->ul_slot;
memset(pucch, 0, sizeof(*pucch));
pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
pucch->ul_slot = (s + 1) % n_slots_frame;
return nr_acknack_scheduling(mod_id, UE_id, frame, slot);
}
// Find the right timing_indicator value. // Find the right timing_indicator value.
int i = 0; int i = 0;
while (i < 8) { while (i < 8) {
@@ -1252,8 +1225,38 @@ bool nr_acknack_scheduling(int mod_id,
slot, slot,
UE_id, UE_id,
pucch->ul_slot); pucch->ul_slot);
return false; return -1;
} }
// is there already CSI in this slot?
csi_pucch = &sched_ctrl->sched_pucch[1];
if (csi_pucch->csi_bits > 0
&& csi_pucch->frame == pucch->frame
&& csi_pucch->ul_slot == pucch->ul_slot) {
// skip the CSI PUCCH if it is present and if in the next frame/slot
// and if we don't multiplex
// FIXME currently we support at most 11 bits in pucch2 so skip also in that case
if(!csi_pucch->simultaneous_harqcsi
|| ((csi_pucch->csi_bits + csi_pucch->dai_c) >= 11)) {
nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id);
memset(csi_pucch, 0, sizeof(*csi_pucch));
/* advance the UL slot information in PUCCH by one so we won't schedule in
* the same slot again */
const int f = pucch->frame;
const int s = pucch->ul_slot;
memset(pucch, 0, sizeof(*pucch));
pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
pucch->ul_slot = (s + 1) % n_slots_frame;
return nr_acknack_scheduling(mod_id, UE_id, frame, slot);
}
// multiplexing harq and csi in a pucch
else {
csi_pucch->timing_indicator = i;
csi_pucch->dai_c++;
return 1;
}
}
pucch->timing_indicator = i; // index in the list of timing indicators pucch->timing_indicator = i; // index in the list of timing indicators
pucch->dai_c++; pucch->dai_c++;
@@ -1272,7 +1275,7 @@ bool nr_acknack_scheduling(int mod_id,
LOG_W(MAC, "symbol 0x%x is not free for PUCCH alloc in vrb_map_UL at RB %ld and slot %d.%d\n", symb, resource->startingPRB, pucch->frame, pucch->ul_slot); LOG_W(MAC, "symbol 0x%x is not free for PUCCH alloc in vrb_map_UL at RB %ld and slot %d.%d\n", symb, resource->startingPRB, pucch->frame, pucch->ul_slot);
vrb_map_UL[resource->startingPRB] |= symb; vrb_map_UL[resource->startingPRB] |= symb;
} }
return true; return 0;
} }
+4 -4
View File
@@ -187,10 +187,10 @@ void nr_csi_meas_reporting(int Mod_idP,
frame_t frameP, frame_t frameP,
sub_frame_t slotP); sub_frame_t slotP);
bool nr_acknack_scheduling(int Mod_idP, int nr_acknack_scheduling(int Mod_idP,
int UE_id, int UE_id,
frame_t frameP, frame_t frameP,
sub_frame_t slotP); sub_frame_t slotP);
void get_pdsch_to_harq_feedback(int Mod_idP, void get_pdsch_to_harq_feedback(int Mod_idP,
int UE_id, int UE_id,
+3
View File
@@ -389,6 +389,9 @@ typedef struct NR_sched_pdsch {
/// DL HARQ PID to use for this UE, or -1 for "any new" /// DL HARQ PID to use for this UE, or -1 for "any new"
int8_t dl_harq_pid; int8_t dl_harq_pid;
// pucch format allocation
uint8_t pucch_allocation;
/// the Time Domain Allocation used for this transmission. Note that this is /// the Time Domain Allocation used for this transmission. Note that this is
/// only important for retransmissions; otherwise, the TDA in /// only important for retransmissions; otherwise, the TDA in
/// NR_pdsch_semi_static_t has precedence /// NR_pdsch_semi_static_t has precedence
+4 -4
View File
@@ -349,12 +349,12 @@ mac_rrc_data_ind(
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id],rntiP); ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id],rntiP);
if(ue_context_p) { if(ue_context_p) {
if (ue_context_p->ue_context.Status != RRC_RECONFIGURED) { if (ue_context_p->ue_context.StatusRrc != RRC_RECONFIGURED) {
LOG_E(RRC,"[eNB %d] Received C-RNTI ,but UE %x status(%d) not RRC_RECONFIGURED\n",module_idP,rntiP,ue_context_p->ue_context.Status); LOG_E(RRC,"[eNB %d] Received C-RNTI ,but UE %x status(%d) not RRC_RECONFIGURED\n",module_idP,rntiP,ue_context_p->ue_context.StatusRrc);
return (-1); return (-1);
} }
rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt,ue_context_p,0); rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt,ue_context_p,0);
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED;
} }
} }
@@ -376,7 +376,7 @@ mac_eNB_get_rrc_status(
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP], rntiP); ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP], rntiP);
if (ue_context_p != NULL) { if (ue_context_p != NULL) {
return(ue_context_p->ue_context.Status); return(ue_context_p->ue_context.StatusRrc);
} else { } else {
return RRC_INACTIVE; return RRC_INACTIVE;
} }
+3 -3
View File
@@ -492,7 +492,7 @@ rrc_t310_expiration(
UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Srb_info.Srb_id, UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Srb_info.Srb_id,
Rlc_info_um); Rlc_info_um);
UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Active = 0; UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Active = 0;
UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Status = IDLE; UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].StatusSrb = IDLE;
UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Next_check_frame = 0; UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Next_check_frame = 0;
} }
} else { // Restablishment procedure } else { // Restablishment procedure
@@ -671,7 +671,7 @@ rrc_ue_establish_srb1(
{ {
// add descriptor from RRC PDU // add descriptor from RRC PDU
UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Active = 1; UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Active = 1;
UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Status = RADIO_CONFIG_OK;//RADIO CFG UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].StatusSrb = RADIO_CONFIG_OK;//RADIO CFG
UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Srb_info.Srb_id = 1; UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Srb_info.Srb_id = 1;
// copy default configuration for now // copy default configuration for now
// memcpy(&UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Srb_info.Lchan_desc[0],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE); // memcpy(&UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Srb_info.Lchan_desc[0],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE);
@@ -695,7 +695,7 @@ rrc_ue_establish_srb2(
{ {
// add descriptor from RRC PDU // add descriptor from RRC PDU
UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Active = 1; UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Active = 1;
UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Status = RADIO_CONFIG_OK;//RADIO CFG UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].StatusSrb = RADIO_CONFIG_OK;//RADIO CFG
UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Srb_id = 2; UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Srb_id = 2;
// copy default configuration for now // copy default configuration for now
// memcpy(&UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Lchan_desc[0],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE); // memcpy(&UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Lchan_desc[0],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE);
+3 -3
View File
@@ -519,13 +519,13 @@ typedef struct RB_INFO_TABLE_ENTRY_s {
RB_INFO Rb_info; RB_INFO Rb_info;
uint8_t Active; uint8_t Active;
uint32_t Next_check_frame; uint32_t Next_check_frame;
uint8_t Status; uint8_t StatusRb;
} RB_INFO_TABLE_ENTRY; } RB_INFO_TABLE_ENTRY;
typedef struct SRB_INFO_TABLE_ENTRY_s { typedef struct SRB_INFO_TABLE_ENTRY_s {
SRB_INFO Srb_info; SRB_INFO Srb_info;
uint8_t Active; uint8_t Active;
uint8_t Status; uint8_t StatusSrb;
uint32_t Next_check_frame; uint32_t Next_check_frame;
} SRB_INFO_TABLE_ENTRY; } SRB_INFO_TABLE_ENTRY;
@@ -599,7 +599,7 @@ typedef struct eNB_RRC_UE_s {
LTE_CipheringAlgorithm_r12_t ciphering_algorithm; LTE_CipheringAlgorithm_r12_t ciphering_algorithm;
e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm; e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
uint8_t Status; // RRC status, type enum UE_STATE_t uint8_t StatusRrc; // RRC status, type enum UE_STATE_t
rnti_t rnti; rnti_t rnti;
int gnb_rnti; //RNTI of the UE at the gNB if in ENDC connection int gnb_rnti; //RNTI of the UE at the gNB if in ENDC connection
int gnb_x2_assoc_id; int gnb_x2_assoc_id;
+31 -31
View File
@@ -1202,7 +1202,7 @@ rrc_eNB_process_RRCConnectionSetupComplete(
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, " "processing LTE_RRCConnectionSetupComplete from UE (SRB1 Active)\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, " "processing LTE_RRCConnectionSetupComplete from UE (SRB1 Active)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
ue_context_pP->ue_context.Srb1.Active = 1; ue_context_pP->ue_context.Srb1.Active = 1;
ue_context_pP->ue_context.Status = RRC_CONNECTED; ue_context_pP->ue_context.StatusRrc = RRC_CONNECTED;
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE,
T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->module_id),
@@ -1578,7 +1578,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
int measurements_enabled; int measurements_enabled;
uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);
int ret = 0; int ret = 0;
ue_context_pP->ue_context.Status = RRC_CONNECTED; ue_context_pP->ue_context.StatusRrc = RRC_CONNECTED;
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
ue_context_pP->ue_context.reestablishment_xid = next_xid; ue_context_pP->ue_context.reestablishment_xid = next_xid;
SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid]; SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid];
@@ -2208,7 +2208,7 @@ rrc_eNB_generate_RRCConnectionRelease(
#if 0 #if 0
if(ue_context_pP != NULL) { if(ue_context_pP != NULL) {
if(ue_context_pP->ue_context.Status == RRC_NR_NSA) { if(ue_context_pP->ue_context.StatusRrc == RRC_NR_NSA) {
//rrc_eNB_generate_SgNBReleaseRequest(ctxt_pP,ue_context_pP); //rrc_eNB_generate_SgNBReleaseRequest(ctxt_pP,ue_context_pP);
} }
} }
@@ -4586,9 +4586,9 @@ rrc_eNB_process_MeasurementReport(
/* TODO: improve NR triggering */ /* TODO: improve NR triggering */
if (measResults2->measId == 7) { if (measResults2->measId == 7) {
if ((ue_context_pP->ue_context.Status != RRC_NR_NSA) && (ue_context_pP->ue_context.Status != RRC_NR_NSA_RECONFIGURED)) { if ((ue_context_pP->ue_context.StatusRrc != RRC_NR_NSA) && (ue_context_pP->ue_context.StatusRrc != RRC_NR_NSA_RECONFIGURED)) {
MessageDef *msg; MessageDef *msg;
ue_context_pP->ue_context.Status = RRC_NR_NSA; ue_context_pP->ue_context.StatusRrc = RRC_NR_NSA;
ue_context_pP->ue_context.gnb_rnti = -1; // set when receiving X2AP_ENDC_SGNB_ADDITION_REQ_ACK ue_context_pP->ue_context.gnb_rnti = -1; // set when receiving X2AP_ENDC_SGNB_ADDITION_REQ_ACK
ue_context_pP->ue_context.gnb_x2_assoc_id = -1; // set when receiving X2AP_ENDC_SGNB_ADDITION_REQ_ACK ue_context_pP->ue_context.gnb_x2_assoc_id = -1; // set when receiving X2AP_ENDC_SGNB_ADDITION_REQ_ACK
@@ -4724,12 +4724,12 @@ rrc_eNB_process_MeasurementReport(
LOG_D(RRC, "A3 event is triggered...\n"); LOG_D(RRC, "A3 event is triggered...\n");
/* if the UE is not in handover mode, start handover procedure */ /* if the UE is not in handover mode, start handover procedure */
if (ue_context_pP->ue_context.Status != RRC_HO_EXECUTION) { if (ue_context_pP->ue_context.StatusRrc != RRC_HO_EXECUTION) {
MessageDef *msg; MessageDef *msg;
LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe); LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe);
/* HO info struct may not be needed anymore */ /* HO info struct may not be needed anymore */
ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info))); ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info)));
ue_context_pP->ue_context.Status = RRC_HO_EXECUTION; ue_context_pP->ue_context.StatusRrc = RRC_HO_EXECUTION;
ue_context_pP->ue_context.handover_info->state = HO_REQUEST; ue_context_pP->ue_context.handover_info->state = HO_REQUEST;
/* HO Preparation message */ /* HO Preparation message */
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ); msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ);
@@ -4861,7 +4861,7 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
RB_INSERT(rrc_ue_tree_s, &RC.rrc[mod_id]->rrc_ue_head, ue_context_target_p); RB_INSERT(rrc_ue_tree_s, &RC.rrc[mod_id]->rrc_ue_head, ue_context_target_p);
LOG_D(RRC, "eNB %d: Created new UE context uid %u\n", mod_id, ue_context_target_p->local_uid); LOG_D(RRC, "eNB %d: Created new UE context uid %u\n", mod_id, ue_context_target_p->local_uid);
ue_context_target_p->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_target_p->ue_context.handover_info))); ue_context_target_p->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_target_p->ue_context.handover_info)));
//ue_context_target_p->ue_context.Status = RRC_HO_EXECUTION; //ue_context_target_p->ue_context.StatusRrc = RRC_HO_EXECUTION;
//ue_context_target_p->ue_context.handover_info->state = HO_ACK; //ue_context_target_p->ue_context.handover_info->state = HO_ACK;
ue_context_target_p->ue_context.handover_info->x2_id = m->x2_id; ue_context_target_p->ue_context.handover_info->x2_id = m->x2_id;
ue_context_target_p->ue_context.handover_info->assoc_id = m->target_assoc_id; ue_context_target_p->ue_context.handover_info->assoc_id = m->target_assoc_id;
@@ -4936,7 +4936,7 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
} }
rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(mod_id, ue_context_target_p); rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(mod_id, ue_context_target_p);
ue_context_target_p->ue_context.Status = RRC_HO_EXECUTION; ue_context_target_p->ue_context.StatusRrc = RRC_HO_EXECUTION;
ue_context_target_p->ue_context.handover_info->state = HO_ACK; ue_context_target_p->ue_context.handover_info->state = HO_ACK;
} }
@@ -5051,7 +5051,7 @@ flexran_rrc_eNB_trigger_handover (int mod_id,
LOG_D(RRC, "Handover is triggered by FlexRAN controller...\n"); LOG_D(RRC, "Handover is triggered by FlexRAN controller...\n");
/* if the UE is not in handover mode, start handover procedure */ /* if the UE is not in handover mode, start handover procedure */
if (ue_context_pP->ue_context.Status != RRC_HO_EXECUTION) { if (ue_context_pP->ue_context.StatusRrc != RRC_HO_EXECUTION) {
MessageDef *msg; MessageDef *msg;
LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe); LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe);
/* Check memory leakage for handover info */ /* Check memory leakage for handover info */
@@ -5059,7 +5059,7 @@ flexran_rrc_eNB_trigger_handover (int mod_id,
//free(ue_context_pP->ue_context.handover_info); //free(ue_context_pP->ue_context.handover_info);
//} //}
ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info))); ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info)));
ue_context_pP->ue_context.Status = RRC_HO_EXECUTION; ue_context_pP->ue_context.StatusRrc = RRC_HO_EXECUTION;
ue_context_pP->ue_context.handover_info->state = HO_REQUEST; ue_context_pP->ue_context.handover_info->state = HO_REQUEST;
/* HO Preparation message */ /* HO Preparation message */
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ); msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ);
@@ -5120,7 +5120,7 @@ check_handovers(
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) { RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) {
ctxt_pP->rnti = ue_context_p->ue_id_rnti; ctxt_pP->rnti = ue_context_p->ue_id_rnti;
if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info != NULL) { if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info != NULL) {
/* in the source, UE in HO_PREPARE mode */ /* in the source, UE in HO_PREPARE mode */
if (ue_context_p->ue_context.handover_info->state == HO_PREPARE) { if (ue_context_p->ue_context.handover_info->state == HO_PREPARE) {
LOG_D(RRC, LOG_D(RRC,
@@ -5171,7 +5171,7 @@ check_handovers(
} }
} }
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED
&& ue_context_p->ue_context.handover_info != NULL && && ue_context_p->ue_context.handover_info != NULL &&
ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) { ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) {
MessageDef *msg_p; MessageDef *msg_p;
@@ -5237,7 +5237,7 @@ check_handovers(
ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_EMPTY; ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_EMPTY;
} }
if( ue_context_p->ue_context.Status == RRC_RECONFIGURED && if( ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED &&
ue_context_p->ue_context.handover_info != NULL && ue_context_p->ue_context.handover_info != NULL &&
ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_EMPTY && ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_EMPTY &&
ue_context_p->ue_context.handover_info->endmark_state == ENDMARK_NO_EMPTY && ue_context_p->ue_context.handover_info->endmark_state == ENDMARK_NO_EMPTY &&
@@ -7228,7 +7228,7 @@ rrc_eNB_decode_ccch(
} }
//c-plane not end //c-plane not end
if((ue_context_p->ue_context.Status != RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == LTE_ReestablishmentCause_spare1)) { if((ue_context_p->ue_context.StatusRrc != RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == LTE_ReestablishmentCause_spare1)) {
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" LTE_RRCConnectionReestablishmentRequest (UE %x c-plane is not end), let's reject the UE\n", PROTOCOL_RRC_CTXT_UE_FMT" LTE_RRCConnectionReestablishmentRequest (UE %x c-plane is not end), let's reject the UE\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),c_rnti); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),c_rnti);
@@ -7240,9 +7240,9 @@ rrc_eNB_decode_ccch(
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRRCConnectionReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status RRC_RECONFIGURED\n", PROTOCOL_RRC_CTXT_UE_FMT" RRRCConnectionReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status RRC_RECONFIGURED\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
ue_context_p->ue_context.Status ue_context_p->ue_context.StatusRrc
); );
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED;
protocol_ctxt_t ctxt_old_p; protocol_ctxt_t ctxt_old_p;
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p, PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p,
ctxt_pP->instance, ctxt_pP->instance,
@@ -8014,7 +8014,7 @@ rrc_eNB_decode_dcch(
int flexran_agent_handover = 0; int flexran_agent_handover = 0;
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) { if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
dedicated_DRB = 1; dedicated_DRB = 1;
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
@@ -8039,7 +8039,7 @@ rrc_eNB_decode_dcch(
dedicated_DRB = 2; dedicated_DRB = 2;
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
} }
} else if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION) { } else if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION) {
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id == -1) { if(UE_id == -1) {
@@ -8053,7 +8053,7 @@ rrc_eNB_decode_dcch(
RC.rrc[ctxt_pP->module_id]->Nb_ue++; RC.rrc[ctxt_pP->module_id]->Nb_ue++;
dedicated_DRB = 3; dedicated_DRB = 3;
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED;
if(ue_context_p->ue_context.handover_info) { if(ue_context_p->ue_context.handover_info) {
ue_context_p->ue_context.handover_info->state = HO_CONFIGURED; ue_context_p->ue_context.handover_info->state = HO_CONFIGURED;
@@ -8062,7 +8062,7 @@ rrc_eNB_decode_dcch(
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_HO_EXECUTION (xid %ld)\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_HO_EXECUTION (xid %ld)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
} else if(ue_context_p->ue_context.Status == RRC_NR_NSA) { } else if(ue_context_p->ue_context.StatusRrc == RRC_NR_NSA) {
//Looking for a condition to trigger S1AP E-RAB-Modification-indication, based on the reception of RRCConnectionReconfigurationComplete //Looking for a condition to trigger S1AP E-RAB-Modification-indication, based on the reception of RRCConnectionReconfigurationComplete
//including NR specific elements. //including NR specific elements.
if(ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8. if(ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.
@@ -8081,7 +8081,7 @@ rrc_eNB_decode_dcch(
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension
->scg_ConfigResponseNR_r15!=NULL) { ->scg_ConfigResponseNR_r15!=NULL) {
dedicated_DRB = -1; /* put a value that does not run anything below */ dedicated_DRB = -1; /* put a value that does not run anything below */
ue_context_p->ue_context.Status = RRC_NR_NSA_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_NR_NSA_RECONFIGURED;
/*Trigger E-RAB Modification Indication */ /*Trigger E-RAB Modification Indication */
rrc_eNB_send_E_RAB_Modification_Indication(ctxt_pP, ue_context_p); rrc_eNB_send_E_RAB_Modification_Indication(ctxt_pP, ue_context_p);
/* send reconfiguration complete to gNB */ /* send reconfiguration complete to gNB */
@@ -8095,7 +8095,7 @@ rrc_eNB_decode_dcch(
} }
} else { } else {
dedicated_DRB = 0; dedicated_DRB = 0;
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED;
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
@@ -8104,7 +8104,7 @@ rrc_eNB_decode_dcch(
ue_context_p->ue_context.reestablishment_xid = -1; ue_context_p->ue_context.reestablishment_xid = -1;
} else { } else {
dedicated_DRB = 1; dedicated_DRB = 1;
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED;
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
@@ -9272,8 +9272,8 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
} }
/* remove UE from gNB if UE is in NSA mode */ /* remove UE from gNB if UE is in NSA mode */
if (ue_to_be_removed[cur_ue]->ue_context.Status == RRC_NR_NSA || if (ue_to_be_removed[cur_ue]->ue_context.StatusRrc == RRC_NR_NSA ||
ue_to_be_removed[cur_ue]->ue_context.Status == RRC_NR_NSA_RECONFIGURED) { ue_to_be_removed[cur_ue]->ue_context.StatusRrc == RRC_NR_NSA_RECONFIGURED) {
MessageDef *message_p; MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_RELEASE_REQUEST); message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_RELEASE_REQUEST);
X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).rnti = ue_to_be_removed[cur_ue]->ue_context.gnb_rnti; X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).rnti = ue_to_be_removed[cur_ue]->ue_context.gnb_rnti;
@@ -9281,7 +9281,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).cause = X2AP_CAUSE_RADIO_CONNECTION_WITH_UE_LOST; X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).cause = X2AP_CAUSE_RADIO_CONNECTION_WITH_UE_LOST;
itti_send_msg_to_task(TASK_X2AP, ctxt_pP->module_id, message_p); itti_send_msg_to_task(TASK_X2AP, ctxt_pP->module_id, message_p);
/* set state to RRC_NR_NSA_DELETED to avoid sending X2AP_ENDC_SGNB_RELEASE_REQUEST again later */ /* set state to RRC_NR_NSA_DELETED to avoid sending X2AP_ENDC_SGNB_RELEASE_REQUEST again later */
ue_to_be_removed[cur_ue]->ue_context.Status = RRC_NR_NSA_DELETED; ue_to_be_removed[cur_ue]->ue_context.StatusRrc = RRC_NR_NSA_DELETED;
} }
rrc_eNB_free_UE(ctxt_pP->module_id, ue_to_be_removed[cur_ue]); rrc_eNB_free_UE(ctxt_pP->module_id, ue_to_be_removed[cur_ue]);
@@ -9451,13 +9451,13 @@ void rrc_eNB_process_ENDC_DC_prep_timeout(module_id_t module_id, x2ap_ENDC_dc_pr
return; return;
} }
if (ue_context->ue_context.Status != RRC_NR_NSA) { if (ue_context->ue_context.StatusRrc != RRC_NR_NSA) {
LOG_E(RRC, "receiving DC prep timeout for UE rnti %d not in state RRC_NR_NSA\n", m->rnti); LOG_E(RRC, "receiving DC prep timeout for UE rnti %d not in state RRC_NR_NSA\n", m->rnti);
return; return;
} }
LOG_I(RRC, "DC prep timeout for UE rnti %d, put back to RRC_RECONFIGURED mode\n", m->rnti); LOG_I(RRC, "DC prep timeout for UE rnti %d, put back to RRC_RECONFIGURED mode\n", m->rnti);
ue_context->ue_context.Status = RRC_RECONFIGURED; ue_context->ue_context.StatusRrc = RRC_RECONFIGURED;
} }
void rrc_eNB_process_ENDC_sgNB_release_required(module_id_t module_id, x2ap_ENDC_sgnb_release_required_t *m) void rrc_eNB_process_ENDC_sgNB_release_required(module_id_t module_id, x2ap_ENDC_sgnb_release_required_t *m)
@@ -9478,7 +9478,7 @@ void rrc_eNB_process_ENDC_sgNB_release_required(module_id_t module_id, x2ap_ENDC
ue_context->ue_context.ue_release_timer_thres_rrc = 100; ue_context->ue_context.ue_release_timer_thres_rrc = 100;
ue_context->ue_context.ue_release_timer_rrc = 1; ue_context->ue_context.ue_release_timer_rrc = 1;
ue_context->ue_context.Status = RRC_NR_NSA_DELETED; ue_context->ue_context.StatusRrc = RRC_NR_NSA_DELETED;
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
module_id, /* TODO: should be 'instance' */ module_id, /* TODO: should be 'instance' */
@@ -9744,7 +9744,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
if (X2AP_HANDOVER_CANCEL(msg_p).cause == X2AP_T_RELOC_PREP_TIMEOUT) { if (X2AP_HANDOVER_CANCEL(msg_p).cause == X2AP_T_RELOC_PREP_TIMEOUT) {
/* for prep timeout, simply return to normal state */ /* for prep timeout, simply return to normal state */
/* TODO: be sure that it's correct to set Status to RRC_RECONFIGURED */ /* TODO: be sure that it's correct to set Status to RRC_RECONFIGURED */
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED;
/* TODO: be sure free is enough here (check memory leaks) */ /* TODO: be sure free is enough here (check memory leaks) */
free(ue_context_p->ue_context.handover_info); free(ue_context_p->ue_context.handover_info);
ue_context_p->ue_context.handover_info = NULL; ue_context_p->ue_context.handover_info = NULL;
+2 -2
View File
@@ -188,7 +188,7 @@ boolean_t gtpv_data_req_new (
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt->module_id], ctxt->rnti); struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt->module_id], ctxt->rnti);
if(ue_context_p == NULL || ue_context_p->ue_context.handover_info == NULL || if(ue_context_p == NULL || ue_context_p->ue_context.handover_info == NULL ||
ue_context_p->ue_context.Status != RRC_HO_EXECUTION) { ue_context_p->ue_context.StatusRrc != RRC_HO_EXECUTION) {
LOG_E(RRC,"incoming GTP-U for X2 in non HO context\n"); LOG_E(RRC,"incoming GTP-U for X2 in non HO context\n");
return false; return false;
} }
@@ -215,7 +215,7 @@ boolean_t gtpv_data_req_new (
/* target enb */ /* target enb */
// We have 2*2=4 cases (data or end marker) * (from source, from EPC) // We have 2*2=4 cases (data or end marker) * (from source, from EPC)
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) { if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
// It should come from remote eNB // It should come from remote eNB
// case end marker by EPC is not possible ? // case end marker by EPC is not possible ?
if (task==TASK_END_MARKER) { if (task==TASK_END_MARKER) {
+1 -1
View File
@@ -1072,7 +1072,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
ue_context_p->ue_context.nr_security.kgNB); ue_context_p->ue_context.nr_security.kgNB);
// in case, send the S1SP initial context response if it is not sent with the attach complete message // in case, send the S1SP initial context response if it is not sent with the attach complete message
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) { if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
LOG_I(RRC, "Sending rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause); LOG_I(RRC, "Sending rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause);
//if(ue_context_p->ue_context.reestablishment_cause == ReestablishmentCause_spare1){} //if(ue_context_p->ue_context.reestablishment_cause == ReestablishmentCause_spare1){}
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p); rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
+7 -33
View File
@@ -960,22 +960,16 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_PUCCH_ResourceSet_t *pucchresset1=calloc(1,sizeof(*pucchresset1)); NR_PUCCH_ResourceSet_t *pucchresset1=calloc(1,sizeof(*pucchresset1));
pucchresset0->pucch_ResourceSetId = 0; pucchresset0->pucch_ResourceSetId = 0;
NR_PUCCH_ResourceId_t *pucchresset0id0=calloc(1,sizeof(*pucchresset0id0)); NR_PUCCH_ResourceId_t *pucchresset0id0=calloc(1,sizeof(*pucchresset0id0));
NR_PUCCH_ResourceId_t *pucchresset0id1=calloc(1,sizeof(*pucchresset0id1));
*pucchresset0id0=1; *pucchresset0id0=1;
ASN_SEQUENCE_ADD(&pucchresset0->resourceList.list,pucchresset0id0); ASN_SEQUENCE_ADD(&pucchresset0->resourceList.list,pucchresset0id0);
*pucchresset0id1=2;
ASN_SEQUENCE_ADD(&pucchresset0->resourceList.list,pucchresset0id1);
pucchresset0->maxPayloadSize=NULL; pucchresset0->maxPayloadSize=NULL;
ASN_SEQUENCE_ADD(&pucch_Config->resourceSetToAddModList->list,pucchresset0); ASN_SEQUENCE_ADD(&pucch_Config->resourceSetToAddModList->list,pucchresset0);
pucchresset1->pucch_ResourceSetId = 1; pucchresset1->pucch_ResourceSetId = 1;
NR_PUCCH_ResourceId_t *pucchresset1id0=calloc(1,sizeof(*pucchresset1id0)); NR_PUCCH_ResourceId_t *pucchresset1id0=calloc(1,sizeof(*pucchresset1id0));
NR_PUCCH_ResourceId_t *pucchresset1id1=calloc(1,sizeof(*pucchresset1id1)); *pucchresset1id0=2;
*pucchresset1id0=3;
ASN_SEQUENCE_ADD(&pucchresset1->resourceList.list,pucchresset1id0); ASN_SEQUENCE_ADD(&pucchresset1->resourceList.list,pucchresset1id0);
*pucchresset1id1=4;
ASN_SEQUENCE_ADD(&pucchresset1->resourceList.list,pucchresset1id1);
pucchresset1->maxPayloadSize=NULL; pucchresset1->maxPayloadSize=NULL;
ASN_SEQUENCE_ADD(&pucch_Config->resourceSetToAddModList->list,pucchresset1); ASN_SEQUENCE_ADD(&pucch_Config->resourceSetToAddModList->list,pucchresset1);
@@ -985,6 +979,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_PUCCH_Resource_t *pucchres1=calloc(1,sizeof(*pucchres1)); NR_PUCCH_Resource_t *pucchres1=calloc(1,sizeof(*pucchres1));
NR_PUCCH_Resource_t *pucchres2=calloc(1,sizeof(*pucchres2)); NR_PUCCH_Resource_t *pucchres2=calloc(1,sizeof(*pucchres2));
NR_PUCCH_Resource_t *pucchres3=calloc(1,sizeof(*pucchres3)); NR_PUCCH_Resource_t *pucchres3=calloc(1,sizeof(*pucchres3));
pucchres0->pucch_ResourceId=1; pucchres0->pucch_ResourceId=1;
pucchres0->startingPRB= (8 + uid) % curr_bwp; pucchres0->startingPRB= (8 + uid) % curr_bwp;
pucchres0->intraSlotFrequencyHopping=NULL; pucchres0->intraSlotFrequencyHopping=NULL;
@@ -996,18 +991,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pucchres0->format.choice.format0->startingSymbolIndex=13; pucchres0->format.choice.format0->startingSymbolIndex=13;
ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres0); ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres0);
pucchres1->pucch_ResourceId=2; pucchres2->pucch_ResourceId=2;
pucchres1->startingPRB= (8 + uid) % curr_bwp;
pucchres1->intraSlotFrequencyHopping=NULL;
pucchres1->secondHopPRB=NULL;
pucchres1->format.present= NR_PUCCH_Resource__format_PR_format0;
pucchres1->format.choice.format0=calloc(1,sizeof(*pucchres1->format.choice.format0));
pucchres1->format.choice.format0->initialCyclicShift=0;
pucchres1->format.choice.format0->nrofSymbols=1;
pucchres1->format.choice.format0->startingSymbolIndex=12;
ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres1);
pucchres2->pucch_ResourceId=3;
pucchres2->startingPRB=0; pucchres2->startingPRB=0;
pucchres2->intraSlotFrequencyHopping=NULL; pucchres2->intraSlotFrequencyHopping=NULL;
pucchres2->secondHopPRB=NULL; pucchres2->secondHopPRB=NULL;
@@ -1018,17 +1002,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pucchres2->format.choice.format2->startingSymbolIndex=13; pucchres2->format.choice.format2->startingSymbolIndex=13;
ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres2); ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres2);
pucchres3->pucch_ResourceId=4;
pucchres3->startingPRB=0;
pucchres3->intraSlotFrequencyHopping=NULL;
pucchres3->secondHopPRB=NULL;
pucchres3->format.present= NR_PUCCH_Resource__format_PR_format2;
pucchres3->format.choice.format2=calloc(1,sizeof(*pucchres3->format.choice.format2));
pucchres3->format.choice.format2->nrofPRBs=8;
pucchres3->format.choice.format2->nrofSymbols=1;
pucchres3->format.choice.format2->startingSymbolIndex=12;
ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres3);
pucch_Config->format2=calloc(1,sizeof(*pucch_Config->format2)); pucch_Config->format2=calloc(1,sizeof(*pucch_Config->format2));
pucch_Config->format2->present=NR_SetupRelease_PUCCH_FormatConfig_PR_setup; pucch_Config->format2->present=NR_SetupRelease_PUCCH_FormatConfig_PR_setup;
NR_PUCCH_FormatConfig_t *pucchfmt2 = calloc(1,sizeof(*pucchfmt2)); NR_PUCCH_FormatConfig_t *pucchfmt2 = calloc(1,sizeof(*pucchfmt2));
@@ -1036,10 +1009,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pucchfmt2->interslotFrequencyHopping=NULL; pucchfmt2->interslotFrequencyHopping=NULL;
pucchfmt2->additionalDMRS=NULL; pucchfmt2->additionalDMRS=NULL;
pucchfmt2->maxCodeRate=calloc(1,sizeof(*pucchfmt2->maxCodeRate)); pucchfmt2->maxCodeRate=calloc(1,sizeof(*pucchfmt2->maxCodeRate));
*pucchfmt2->maxCodeRate=NR_PUCCH_MaxCodeRate_zeroDot25; *pucchfmt2->maxCodeRate=NR_PUCCH_MaxCodeRate_zeroDot35;
pucchfmt2->nrofSlots=NULL; pucchfmt2->nrofSlots=NULL;
pucchfmt2->pi2BPSK=NULL; pucchfmt2->pi2BPSK=NULL;
pucchfmt2->simultaneousHARQ_ACK_CSI=NULL; pucchfmt2->simultaneousHARQ_ACK_CSI=calloc(1,sizeof(*pucchfmt2->simultaneousHARQ_ACK_CSI));
*pucchfmt2->simultaneousHARQ_ACK_CSI=NR_PUCCH_FormatConfig__simultaneousHARQ_ACK_CSI_true;
// for scheduling requestresource // for scheduling requestresource
pucch_Config->schedulingRequestResourceToAddModList = calloc(1,sizeof(*pucch_Config->schedulingRequestResourceToAddModList)); pucch_Config->schedulingRequestResourceToAddModList = calloc(1,sizeof(*pucch_Config->schedulingRequestResourceToAddModList));
@@ -1203,7 +1177,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csirep1->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320 = 9 + (10 * uid) % 320; csirep1->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320 = 9 + (10 * uid) % 320;
NR_PUCCH_CSI_Resource_t *pucchcsires1 = calloc(1,sizeof(*pucchcsires1)); NR_PUCCH_CSI_Resource_t *pucchcsires1 = calloc(1,sizeof(*pucchcsires1));
pucchcsires1->uplinkBandwidthPartId=1; pucchcsires1->uplinkBandwidthPartId=1;
pucchcsires1->pucch_Resource=3; pucchcsires1->pucch_Resource=2;
ASN_SEQUENCE_ADD(&csirep1->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list,pucchcsires1); ASN_SEQUENCE_ADD(&csirep1->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list,pucchcsires1);
csirep1->reportQuantity.present = NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP; csirep1->reportQuantity.present = NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP;
csirep1->reportQuantity.choice.ssb_Index_RSRP=(NULL_t)0; csirep1->reportQuantity.choice.ssb_Index_RSRP=(NULL_t)0;
+5 -5
View File
@@ -1736,13 +1736,13 @@ void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB
MessageDef *message_p; MessageDef *message_p;
uint8_t *message_buffer; uint8_t *message_buffer;
message_buffer = itti_malloc (TASK_RRC_NRUE,TASK_RRC_GNB_SIM, message_buffer = itti_malloc (TASK_RRC_NRUE,TASK_RRC_GNB_SIM,
NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size); NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size);
memcpy (message_buffer, (uint8_t*)NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload, memcpy (message_buffer, (uint8_t*)NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.Payload,
NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size); NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size);
message_p = itti_alloc_new_message (TASK_RRC_NRUE, 0, UE_RRC_CCCH_DATA_IND); message_p = itti_alloc_new_message (TASK_RRC_NRUE, 0, UE_RRC_CCCH_DATA_IND);
GNB_RRC_CCCH_DATA_IND (message_p).sdu = message_buffer; GNB_RRC_CCCH_DATA_IND (message_p).sdu = message_buffer;
GNB_RRC_CCCH_DATA_IND (message_p).size = NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size; GNB_RRC_CCCH_DATA_IND (message_p).size = NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size;
itti_send_msg_to_task (TASK_RRC_GNB_SIM, ctxt_pP->instance, message_p); itti_send_msg_to_task (TASK_RRC_GNB_SIM, gNB_index, message_p);
#endif #endif
} }
} }
+13 -1
View File
@@ -81,12 +81,13 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "RRC/NR_UE/rrc_proto.h" #include "RRC/NR_UE/rrc_proto.h"
#include "RRC/NR_UE/rrc_vars.h" #include "RRC/NR_UE/rrc_vars.h"
#include "openair3/NAS/UE/nas_ue_task.h" #include "openair3/NAS/UE/nas_ue_task.h"
#include <executables/split_headers.h>
#include <executables/nr-uesoftmodem.h>
pthread_cond_t nfapi_sync_cond; pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex; pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint8_t nfapi_mode = 0; // Default to monolithic mode
uint32_t timing_advance = 0; uint32_t timing_advance = 0;
uint64_t num_missed_slots=0; uint64_t num_missed_slots=0;
@@ -94,7 +95,18 @@ 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");
} }
void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask, uint16_t rnti, int32_t stat) {
AssertFatal(false, "Must not be called in this context\n");
}
nrUE_params_t nrUE_params;
nrUE_params_t *get_nrUE_params(void) {
return &nrUE_params;
}
void processSlotTX(void *arg) {}
THREAD_STRUCT thread_struct;
pthread_cond_t sync_cond; 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.
+3 -3
View File
@@ -281,7 +281,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
(ue_context_p->ue_context.handover_info->state < HO_FORWARDING_COMPLETE)) { (ue_context_p->ue_context.handover_info->state < HO_FORWARDING_COMPLETE)) {
if(msgType == NW_GTP_END_MARKER) { if(msgType == NW_GTP_END_MARKER) {
/* in the source enb, UE in RRC_HO_EXECUTION mode */ /* in the source enb, UE in RRC_HO_EXECUTION mode */
if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) { if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
/* set handover state */ /* set handover state */
//ue_context_p->ue_context.handover_info->state = HO_END_MARKER; //ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
MessageDef *msg; MessageDef *msg;
@@ -299,10 +299,10 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
} }
} }
if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION || ue_context_p->ue_context.Status == RRC_RECONFIGURED) { if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION || ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
int msgsrc = gtpv1u_eNB_get_msgsource(ue_context_p, teid); int msgsrc = gtpv1u_eNB_get_msgsource(ue_context_p, teid);
LOG_D(GTPU,"UE INFO.ueStatus %d, handover state %d, forwarding state %d, from %s. message type %s\n", LOG_D(GTPU,"UE INFO.ueStatus %d, handover state %d, forwarding state %d, from %s. message type %s\n",
ue_context_p->ue_context.Status, ue_context_p->ue_context.StatusRrc,
ue_context_p->ue_context.handover_info->state, ue_context_p->ue_context.handover_info->state,
ue_context_p->ue_context.handover_info->forwarding_state, ue_context_p->ue_context.handover_info->forwarding_state,
msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB?"Source eNB":"EPC", msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB?"Source eNB":"EPC",
+3
View File
@@ -561,7 +561,10 @@ extern int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **r
extern void iqrecorder_end(openair0_device *device); extern void iqrecorder_end(openair0_device *device);
#include <unistd.h>
#ifndef gettid
#define gettid() syscall(__NR_gettid) #define gettid() syscall(__NR_gettid)
#endif
/*@}*/ /*@}*/
@@ -127,7 +127,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -1,289 +0,0 @@
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-Eurecom-5GNRBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;});
tr_s_preference = "local_mac"
////////// Physical parameters:
component_carriers = (
{
node_function = "3GPP_gNODEB";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "TDD";
DL_prefix_type = "NORMAL";
UL_prefix_type = "NORMAL";
eutra_band = 78;
downlink_frequency = 3510000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 106;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
MIB_subCarrierSpacingCommon = 30;
MIB_ssb_SubcarrierOffset = 0;
MIB_dmrs_TypeA_Position = 2;
pdcch_ConfigSIB1 = 0;
SIB1_frequencyOffsetSSB = "khz5";
SIB1_ssb_PeriodicityServingCell = 5;
SIB1_ss_PBCH_BlockPower = -60;
absoluteFrequencySSB = 0;
DL_FreqBandIndicatorNR = 15;
DL_absoluteFrequencyPointA = 15;
DL_offsetToCarrier = 15;
DL_SCS_SubcarrierSpacing = "kHz30";
DL_SCS_SpecificCarrier_k0 = 0;
DL_carrierBandwidth = 15;
DL_locationAndBandwidth = 15;
DL_BWP_SubcarrierSpacing = "kHz30";
DL_BWP_prefix_type = "NORMAL";
UL_FreqBandIndicatorNR = 15;
UL_absoluteFrequencyPointA = 13;
UL_additionalSpectrumEmission = 3;
UL_p_Max = -1;
UL_frequencyShift7p5khz = "TRUE";
UL_offsetToCarrier = 10;
UL_SCS_SubcarrierSpacing = "kHz30";
UL_SCS_SpecificCarrier_k0 = 0;
UL_carrierBandwidth = 15;
UL_locationAndBandwidth = 15;
UL_BWP_SubcarrierSpacing = "kHz30";
UL_BWP_prefix_type = "NORMAL";
UL_timeAlignmentTimerCommon = "infinity";
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01;
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15";
ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
referenceSubcarrierSpacing = "kHz15";
dl_UL_TransmissionPeriodicity = "ms0p5";
nrofDownlinkSlots = 10;
nrofDownlinkSymbols = 10;
nrofUplinkSlots = 10;
nrofUplinkSymbols = 10;
rach_totalNumberOfRA_Preambles = 63;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice = "oneEighth";
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth = 4;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth = 8;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf = 16;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one = 24;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two = 32;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four = 8;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight = 4;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen = 2;
rach_groupBconfigured = "ENABLE";
rach_ra_Msg3SizeGroupA = 56;
rach_messagePowerOffsetGroupB = "dB0";
rach_numberOfRA_PreamblesGroupA = 32;
rach_ra_ContentionResolutionTimer = 8;
rsrp_ThresholdSSB = 64;
rsrp_ThresholdSSB_SUL = 64;
prach_RootSequenceIndex_choice = "l839";
prach_RootSequenceIndex_l839 = 0;
prach_RootSequenceIndex_l139 = 0;
prach_msg1_SubcarrierSpacing = "kHz30";
restrictedSetConfig = "unrestrictedSet";
msg3_transformPrecoding = "ENABLE";
prach_ConfigurationIndex = 10;
prach_msg1_FDM = "one";
prach_msg1_FrequencyStart = 10;
zeroCorrelationZoneConfig = 10;
preambleReceivedTargetPower = -150;
preambleTransMax = 6;
powerRampingStep = "dB0";
ra_ResponseWindow = 8;
groupHoppingEnabledTransformPrecoding = "ENABLE";
msg3_DeltaPreamble = 0;
p0_NominalWithGrant = 0;
PUSCH_TimeDomainResourceAllocation_k2 = 0;
PUSCH_TimeDomainResourceAllocation_mappingType = "typeA";
PUSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
pucch_ResourceCommon = 0;
pucch_GroupHopping = "neither";
hoppingId = 0;
p0_nominal = -30;
PDSCH_TimeDomainResourceAllocation_k0 = 2;
PDSCH_TimeDomainResourceAllocation_mappingType = "typeA";
PDSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
rateMatchPatternId = 0;
RateMatchPattern_patternType = "bitmaps";
symbolsInResourceBlock = "oneSlot";
periodicityAndPattern = 2;
RateMatchPattern_controlResourceSet = 5;
RateMatchPattern_subcarrierSpacing = "kHz30";
RateMatchPattern_mode = "dynamic";
controlResourceSetZero = 0;
searchSpaceZero = 0;
searchSpaceSIB1 = 10;
searchSpaceOtherSystemInformation = 10;
pagingSearchSpace = 10;
ra_SearchSpace = 10;
PDCCH_common_controlResourceSetId = 5;
PDCCH_common_ControlResourceSet_duration = 2;
PDCCH_cce_REG_MappingType = "nonInterleaved";
PDCCH_reg_BundleSize = 3;
PDCCH_interleaverSize = 3;
PDCCH_shiftIndex = 10;
PDCCH_precoderGranularity = "sameAsREG-bundle";
PDCCH_TCI_StateId = 32;
tci_PresentInDCI = "ENABLE";
PDCCH_DMRS_ScramblingID = 0;
SearchSpaceId = 10;
commonSearchSpaces_controlResourceSetId = 5;
SearchSpace_monitoringSlotPeriodicityAndOffset_choice = "sl1";
SearchSpace_monitoringSlotPeriodicityAndOffset_value = 0;
SearchSpace_duration = 2;
SearchSpace_nrofCandidates_aggregationLevel1 = 0;
SearchSpace_nrofCandidates_aggregationLevel2 = 0;
SearchSpace_nrofCandidates_aggregationLevel4 = 0;
SearchSpace_nrofCandidates_aggregationLevel8 = 0;
SearchSpace_nrofCandidates_aggregationLevel16 = 0;
SearchSpace_searchSpaceType = "common";
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16 = 1;
Common_dci_Format2_3_monitoringPeriodicity = 1;
Common_dci_Format2_3_nrofPDCCH_Candidates = 1;
ue_Specific__dci_Formats = "formats0-0-And-1-0";
RateMatchPatternLTE_CRS_carrierFreqDL = 6;
RateMatchPatternLTE_CRS_carrierBandwidthDL = 6;
RateMatchPatternLTE_CRS_nrofCRS_Ports = 1;
RateMatchPatternLTE_CRS_v_Shift = 0;
RateMatchPatternLTE_CRS_radioframeAllocationPeriod = 1;
RateMatchPatternLTE_CRS_radioframeAllocationOffset = 0;
RateMatchPatternLTE_CRS_subframeAllocation_choice = "oneFrame";
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8";
}
);
NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
@@ -122,8 +122,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=11 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPstartSymbolAndLength_0 = 55;
initialULBWPk2_1 = 6; initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -122,7 +122,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot (not used here) initialULBWPk2_1 = 2; # used for mixed slot (not used here)
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -122,7 +122,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -121,7 +121,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -121,7 +121,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,8 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=11 initialULBWPstartSymbolAndLength_0 = 41;
initialULBWPstartSymbolAndLength_0 = 55;
initialULBWPk2_1 = 6; initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -1,288 +0,0 @@
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-Eurecom-5GNRBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;});
tr_s_preference = "local_mac"
////////// Physical parameters:
component_carriers = (
{
node_function = "3GPP_gNODEB";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "TDD";
DL_prefix_type = "NORMAL";
UL_prefix_type = "NORMAL";
eutra_band = 78;
downlink_frequency = 3510000000L;
uplink_frequency_offset = 0;
Nid_cell = 0;
N_RB_DL = 106;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
MIB_subCarrierSpacingCommon = 30;
MIB_ssb_SubcarrierOffset = 0;
MIB_dmrs_TypeA_Position = 2;
pdcch_ConfigSIB1 = 0;
SIB1_frequencyOffsetSSB = "khz5";
SIB1_ssb_PeriodicityServingCell = 5;
SIB1_ss_PBCH_BlockPower = -60;
absoluteFrequencySSB = 0;
DL_FreqBandIndicatorNR = 15;
DL_absoluteFrequencyPointA = 15;
DL_offsetToCarrier = 15;
DL_SCS_SubcarrierSpacing = "kHz30";
DL_SCS_SpecificCarrier_k0 = 0;
DL_carrierBandwidth = 15;
DL_locationAndBandwidth = 15;
DL_BWP_SubcarrierSpacing = "kHz30";
DL_BWP_prefix_type = "NORMAL";
UL_FreqBandIndicatorNR = 15;
UL_absoluteFrequencyPointA = 13;
UL_additionalSpectrumEmission = 3;
UL_p_Max = -1;
UL_frequencyShift7p5khz = "TRUE";
UL_offsetToCarrier = 10;
UL_SCS_SubcarrierSpacing = "kHz30";
UL_SCS_SpecificCarrier_k0 = 0;
UL_carrierBandwidth = 15;
UL_locationAndBandwidth = 15;
UL_BWP_SubcarrierSpacing = "kHz30";
UL_BWP_prefix_type = "NORMAL";
UL_timeAlignmentTimerCommon = "infinity";
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01;
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15";
ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
referenceSubcarrierSpacing = "kHz15";
dl_UL_TransmissionPeriodicity = "ms0p5";
nrofDownlinkSlots = 10;
nrofDownlinkSymbols = 10;
nrofUplinkSlots = 10;
nrofUplinkSymbols = 10;
rach_totalNumberOfRA_Preambles = 63;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice = "oneEighth";
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth = 4;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth = 8;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf = 16;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one = 24;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two = 32;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four = 8;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight = 4;
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen = 2;
rach_groupBconfigured = "ENABLE";
rach_ra_Msg3SizeGroupA = 56;
rach_messagePowerOffsetGroupB = "dB0";
rach_numberOfRA_PreamblesGroupA = 32;
rach_ra_ContentionResolutionTimer = 8;
rsrp_ThresholdSSB = 64;
rsrp_ThresholdSSB_SUL = 64;
prach_RootSequenceIndex_choice = "l839";
prach_RootSequenceIndex_l839 = 0;
prach_RootSequenceIndex_l139 = 0;
prach_msg1_SubcarrierSpacing = "kHz30";
restrictedSetConfig = "unrestrictedSet";
msg3_transformPrecoding = "ENABLE";
prach_ConfigurationIndex = 10;
prach_msg1_FDM = "one";
prach_msg1_FrequencyStart = 10;
zeroCorrelationZoneConfig = 10;
preambleReceivedTargetPower = -150;
preambleTransMax = 6;
powerRampingStep = "dB0";
ra_ResponseWindow = 8;
groupHoppingEnabledTransformPrecoding = "ENABLE";
msg3_DeltaPreamble = 0;
p0_NominalWithGrant = 0;
PUSCH_TimeDomainResourceAllocation_k2 = 0;
PUSCH_TimeDomainResourceAllocation_mappingType = "typeA";
PUSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
pucch_ResourceCommon = 0;
pucch_GroupHopping = "neither";
hoppingId = 0;
p0_nominal = -30;
PDSCH_TimeDomainResourceAllocation_k0 = 2;
PDSCH_TimeDomainResourceAllocation_mappingType = "typeA";
PDSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
rateMatchPatternId = 0;
RateMatchPattern_patternType = "bitmaps";
symbolsInResourceBlock = "oneSlot";
periodicityAndPattern = 2;
RateMatchPattern_controlResourceSet = 5;
RateMatchPattern_subcarrierSpacing = "kHz30";
RateMatchPattern_mode = "dynamic";
controlResourceSetZero = 0;
searchSpaceZero = 0;
searchSpaceSIB1 = 10;
searchSpaceOtherSystemInformation = 10;
pagingSearchSpace = 10;
ra_SearchSpace = 10;
PDCCH_common_controlResourceSetId = 5;
PDCCH_common_ControlResourceSet_duration = 2;
PDCCH_cce_REG_MappingType = "nonInterleaved";
PDCCH_reg_BundleSize = 3;
PDCCH_interleaverSize = 3;
PDCCH_shiftIndex = 10;
PDCCH_precoderGranularity = "sameAsREG-bundle";
PDCCH_TCI_StateId = 32;
tci_PresentInDCI = "ENABLE";
PDCCH_DMRS_ScramblingID = 0;
SearchSpaceId = 10;
commonSearchSpaces_controlResourceSetId = 5;
SearchSpace_monitoringSlotPeriodicityAndOffset_choice = "sl1";
SearchSpace_monitoringSlotPeriodicityAndOffset_value = 0;
SearchSpace_duration = 2;
SearchSpace_nrofCandidates_aggregationLevel1 = 0;
SearchSpace_nrofCandidates_aggregationLevel2 = 0;
SearchSpace_nrofCandidates_aggregationLevel4 = 0;
SearchSpace_nrofCandidates_aggregationLevel8 = 0;
SearchSpace_nrofCandidates_aggregationLevel16 = 0;
SearchSpace_searchSpaceType = "common";
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8 = 1;
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16 = 1;
Common_dci_Format2_3_monitoringPeriodicity = 1;
Common_dci_Format2_3_nrofPDCCH_Candidates = 1;
ue_Specific__dci_Formats = "formats0-0-And-1-0";
RateMatchPatternLTE_CRS_carrierFreqDL = 6;
RateMatchPatternLTE_CRS_carrierBandwidthDL = 6;
RateMatchPatternLTE_CRS_nrofCRS_Ports = 1;
RateMatchPatternLTE_CRS_v_Shift = 0;
RateMatchPatternLTE_CRS_radioframeAllocationPeriod = 1;
RateMatchPatternLTE_CRS_radioframeAllocationOffset = 0;
RateMatchPatternLTE_CRS_subframeAllocation_choice = "oneFrame";
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8";
}
);
NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for (full) UL slot initialULBWPk2_0 = 6; # used for (full) UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for UL part mixed slot initialULBWPk2_1 = 6; # used for UL part mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -121,9 +121,9 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # 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 = 69; # this is SS=10 L=2
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -121,17 +121,14 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=11 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPstartSymbolAndLength_0 = 55;
initialULBWPk2_1 = 6; initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
# this is SS=0 L=12
initialULBWPstartSymbolAndLength_1 = 69; initialULBWPstartSymbolAndLength_1 = 69;
initialULBWPk2_2 = 7; initialULBWPk2_2 = 7;
initialULBWPmappingType_2 = 1; initialULBWPmappingType_2 = 1;
# this is SS=10 L=4
initialULBWPstartSymbolAndLength_2 = 52; initialULBWPstartSymbolAndLength_2 = 52;
msg3_DeltaPreamble = 1; msg3_DeltaPreamble = 1;
@@ -121,17 +121,14 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=11 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPstartSymbolAndLength_0 = 55;
initialULBWPk2_1 = 6; initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
# this is SS=0 L=12
initialULBWPstartSymbolAndLength_1 = 69; initialULBWPstartSymbolAndLength_1 = 69;
initialULBWPk2_2 = 7; initialULBWPk2_2 = 7;
initialULBWPmappingType_2 = 1; initialULBWPmappingType_2 = 1;
# this is SS=10 L=4
initialULBWPstartSymbolAndLength_2 = 52; initialULBWPstartSymbolAndLength_2 = 52;
msg3_DeltaPreamble = 1; msg3_DeltaPreamble = 1;
@@ -121,17 +121,14 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=11 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPstartSymbolAndLength_0 = 55;
initialULBWPk2_1 = 6; initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
# this is SS=0 L=12
initialULBWPstartSymbolAndLength_1 = 69; initialULBWPstartSymbolAndLength_1 = 69;
initialULBWPk2_2 = 7; initialULBWPk2_2 = 7;
initialULBWPmappingType_2 = 1; initialULBWPmappingType_2 = 1;
# this is SS=10 L=4
initialULBWPstartSymbolAndLength_2 = 52; initialULBWPstartSymbolAndLength_2 = 52;
msg3_DeltaPreamble = 1; msg3_DeltaPreamble = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -122,7 +122,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -135,8 +135,8 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; initialULBWPk2_0 = 2;
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
# this is SS=0 L=12 # this is SS=0 L=13
initialULBWPstartSymbolAndLength_0 = 55; initialULBWPstartSymbolAndLength_0 = 41;
initialULBWPk2_1 = 2; initialULBWPk2_1 = 2;
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -120,7 +120,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 2; # used for UL slot initialULBWPk2_0 = 2; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 2; # used for mixed slot initialULBWPk2_1 = 2; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -125,7 +125,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;
@@ -125,7 +125,7 @@ gNBs =
# pusch-ConfigCommon (up to 16 elements) # pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1 initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1; initialULBWPmappingType_1 = 1;