diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container
index 5a4e27ed19..cd8a50ed91 100644
--- a/ci-scripts/Jenkinsfile-GitLab-Container
+++ b/ci-scripts/Jenkinsfile-GitLab-Container
@@ -285,6 +285,29 @@ pipeline {
}
}
}
+ stage ("OAI-FLEXRIC-RAN-Integration-Test") {
+ when { expression {do5Gtest} }
+ steps {
+ script {
+ triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-Test')
+ }
+ }
+ post {
+ always {
+ script {
+ // Using a unique variable name for each test stage to avoid overwriting on a global variable
+ // due to parallel-time concurrency
+ flexricRAN5GStatus = finalizeSlaveJob('OAI-FLEXRIC-RAN-Integration-Test')
+ }
+ }
+ failure {
+ script {
+ currentBuild.result = 'FAILURE'
+ failingStages += flexricRAN5GStatus
+ }
+ }
+ }
+ }
stage ("L2-Sim-Test-4G") {
when { expression {do4Gtest} }
steps {
diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran
index e1593d52a4..bc8c742bb5 100644
--- a/ci-scripts/Jenkinsfile-tmp-ran
+++ b/ci-scripts/Jenkinsfile-tmp-ran
@@ -58,6 +58,8 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
+def flexricOption = ""
+
pipeline {
agent {
label pythonExecutor
@@ -148,18 +150,24 @@ pipeline {
allParametersPresent = false
}
+ if (params.Flexric_Tag != null) {
+ echo "This pipeline is configured to run with a FlexRIC deployment."
+ echo "Appending FlexRicTag option to the list of options"
+ flexricOption = "--FlexRicTag=${params.Flexric_Tag}"
+ echo "Using new Flexric option: ${flexricOption}"
+ }
+
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 {
+ } else if (eNB_CommitID != 'develop') {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
- echo "Some parameters are missing"
- sh "./ci-scripts/fail.sh"
+ error "Some parameters are missing"
}
}
}
@@ -190,13 +198,13 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
]) {
- sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
+ sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
- sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
+ sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py
index 7d753d21c7..c1a13eb9bf 100644
--- a/ci-scripts/args_parse.py
+++ b/ci-scripts/args_parse.py
@@ -264,6 +264,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
RAN.BuildId = matchReg.group(1)
+ elif re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
+ CONTAINERS.flexricTag = matchReg.group(1)
else:
HELP.GenericHelp(CONST.Version)
sys.exit('Invalid Parameter: ' + myArgv)
diff --git a/ci-scripts/ci_infra.yaml b/ci-scripts/ci_infra.yaml
index cf6e0cad11..d651f2723c 100644
--- a/ci-scripts/ci_infra.yaml
+++ b/ci-scripts/ci_infra.yaml
@@ -28,8 +28,8 @@ up2-fhi72:
up2-aerial:
Host: up2
- AttachScript: sudo /opt/mbim-aerial/start_quectel_mbim.sh
- DetachScript: sudo /opt/mbim-aerial/stop_quectel_mbim.sh
+ AttachScript: sudo /opt/mbim-fhi72/start_quectel_mbim.sh
+ DetachScript: sudo /opt/mbim-fhi72/stop_quectel_mbim.sh
NetworkScript: ip a show dev wwan0
IF: wwan0
MTU: 1500
@@ -75,6 +75,13 @@ oc-cn5g-20897:
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
+oc-cn5g-20897-aerial2:
+ Host: aerial2
+ Namespace: "oaicicd-core-for-fhi72"
+ CNPath: "/opt/oai-cn5g-fed-develop-2024-april-20897"
+ NetworkScript: echo "inet 172.21.6.105"
+ RunIperf3Server: False
+
matix-cn5g:
Host: matix
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py
index 503529d256..77ec791af2 100644
--- a/ci-scripts/cls_cluster.py
+++ b/ci-scripts/cls_cluster.py
@@ -73,7 +73,7 @@ def OC_deploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
if not succeeded:
return False, CONST.OC_LOGIN_FAIL
cmd.run('helm uninstall oai5gcn --wait --timeout 60s')
- ret = cmd.run(f'helm install --wait --timeout 60s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
+ ret = cmd.run(f'helm install --wait --timeout 120s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
if ret.returncode != 0:
logging.error('OC OAI CN5G: Deployment failed')
OC_logout(cmd)
@@ -126,8 +126,6 @@ class Cluster:
self.ranAllowMerge = False
self.ranTargetBranch = ""
self.cmd = None
- self.imageToPull = ''
- self.testSvrId = None
def _recreate_entitlements(self):
# recreating entitlements, don't care if deletion fails
@@ -240,44 +238,30 @@ class Cluster:
def _undeploy_pod(self, filename):
self.cmd.run(f'oc delete -f {filename}')
- def PullClusterImage(self, HTML, RAN):
- if self.testSvrId == None: self.testSvrId = self.eNBIPAddress
- if self.imageToPull == '':
- HELP.GenericHelp(CONST.Version)
- raise ValueError('Insufficient Parameter')
- logging.debug(f'Pull OC image {self.imageToPull} to server {self.testSvrId}')
+ def PullClusterImage(self, HTML, node, images):
+ logging.debug(f'Pull OC image {images} to server {node}')
self.testCase_id = HTML.testCase_id
- cmd = cls_cmd.getConnection(self.testSvrId)
- logging.info(cmd.run('docker --version'))
- succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
- if not succeeded:
- logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
- HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
- return False
- ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
- if ret.returncode != 0:
- logging.error(f'\u001B[1m Unable to access OC project {CI_OC_RAN_NAMESPACE}\u001B[0m')
- OC_logout(cmd)
- cmd.close()
- HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
- return False
- for image in self.imageToPull:
- imagePrefix = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
- tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
- imageTag = f"{image}:{tag}"
- ret = cmd.run(f'docker pull {imagePrefix}/{imageTag}')
- if ret.returncode != 0:
- logging.error(f'Could not pull {image} from local registry : {self.OCRegistry}')
- OC_logout(cmd)
- cmd.close()
- HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK)
+ with cls_cmd.getConnection(node) as cmd:
+ succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
+ if not succeeded:
+ HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
- cmd.run(f'docker tag {imagePrefix}/{imageTag} oai-ci/{imageTag}')
- cmd.run(f'docker rmi {imagePrefix}/{imageTag}')
- OC_logout(cmd)
- cmd.close()
- HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
- return True
+ ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
+ if ret.returncode != 0:
+ logging.error(f'cannot authenticate at registry')
+ OC_logout(cmd)
+ HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
+ return False
+ tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
+ registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
+ success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, registry, None, None)
+ OC_logout(cmd)
+ param = f"on node {node}"
+ if success:
+ HTML.CreateHtmlTestRowQueue(param, 'OK', [msg])
+ else:
+ HTML.CreateHtmlTestRowQueue(param, 'KO', [msg])
+ return success
def BuildClusterImage(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index 28f1abbfac..a9c4b5be08 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -70,6 +70,8 @@ def CreateWorkspace(host, sourcePath, ranRepository, ranCommitID, ranTargetBranc
return ret.returncode == 0
def CreateTag(ranCommitID, ranBranch, ranAllowMerge):
+ if ranCommitID == 'develop':
+ return 'develop'
shortCommit = ranCommitID[0:8]
if ranAllowMerge:
# Allowing contributor to have a name/branchName format
@@ -159,26 +161,25 @@ def GetContainerHealth(ssh, containerName):
return False
if 'db_init' in containerName or 'db-init' in containerName: # exits with 0, there cannot be healthy
return True
- time.sleep(5)
- for _ in range(3):
+ for _ in range(8):
result = ssh.run(f'docker inspect --format="{{{{.State.Health.Status}}}}" {containerName}', silent=True)
if result.stdout == 'healthy':
return True
- time.sleep(10)
+ time.sleep(5)
return False
def ExistEnvFilePrint(ssh, wd, prompt='env vars in existing'):
- ret = ssh.run(f'cat {wd}/.env', silent=True)
+ ret = ssh.run(f'cat {wd}/.env', silent=True, reportNonZero=False)
if ret.returncode != 0:
return False
env_vars = ret.stdout.strip().splitlines()
logging.info(f'{prompt} {wd}/.env: {env_vars}')
return True
-def WriteEnvFile(ssh, services, wd, tag):
- ret = ssh.run(f'cat {wd}/.env', silent=True)
+def WriteEnvFile(ssh, services, wd, tag, flexric_tag):
+ ret = ssh.run(f'cat {wd}/.env', silent=True, reportNonZero=False)
registry = "oai-ci" # pull_images() gives us this registry path
- envs = {"REGISTRY":registry, "TAG": tag}
+ envs = {"REGISTRY":registry, "TAG": tag, "FLEXRIC_TAG": flexric_tag}
if ret.returncode == 0: # it exists, we have to update
# transforms env file to dictionary
old_envs = {}
@@ -221,7 +222,6 @@ def CopyinContainerLog(ssh, lSourcePath, yaml, containerName, filename):
remote_filename = f"{lSourcePath}/cmake_targets/log/{filename}"
ssh.run(f'docker logs {containerName} &> {remote_filename}')
local_dir = f"{os.getcwd()}/../cmake_targets/log/{yaml}"
- os.system(f'mkdir -p {local_dir}')
local_filename = f"{local_dir}/{filename}"
return ssh.copyin(remote_filename, local_filename)
@@ -334,12 +334,11 @@ class Containerize():
self.cliOptions = ''
self.imageToCopy = ''
- self.registrySvrId = ''
- self.testSvrId = ''
- self.imageToPull = []
#checkers from xml
self.ran_checkers={}
+ self.flexricTag = ''
+
#-----------------------------------------------------------
# Container management functions
#-----------------------------------------------------------
@@ -723,8 +722,8 @@ class Containerize():
HTML.CreateHtmlTabFooter(False)
return False
- def Push_Image_to_Local_Registry(self, HTML):
- lIpAddr, lSourcePath = self.GetCredentials(self.registrySvrId)
+ def Push_Image_to_Local_Registry(self, HTML, svr_id):
+ lIpAddr, lSourcePath = self.GetCredentials(svr_id)
logging.debug('Pushing images from server: ' + lIpAddr)
ssh = cls_cmd.getConnection(lIpAddr)
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
@@ -771,64 +770,66 @@ class Containerize():
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
- def Pull_Image_from_Local_Registry(self, HTML):
- lIpAddr, lSourcePath = self.GetCredentials(self.testSvrId)
- logging.debug('\u001B[1m Pulling image(s) on server: ' + lIpAddr + '\u001B[0m')
- myCmd = cls_cmd.getConnection(lIpAddr)
- imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
- response = myCmd.run(f'docker login -u oaicicd -p oaicicd {imagePrefix}')
- if response.returncode != 0:
- msg = 'Could not log into local registry'
- logging.error(msg)
- myCmd.close()
- HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
- return False
- pulled_images = []
- for image in self.imageToPull:
- tagToUse = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
- imageTag = f"{image}:{tagToUse}"
- cmd = f'docker pull {imagePrefix}/{imageTag}'
- response = myCmd.run(cmd, timeout=120)
+ def Pull_Image(cmd, images, tag, registry, username, password):
+ if username is not None and password is not None:
+ logging.info(f"logging into registry {username}@{registry}")
+ response = cmd.run(f'docker login -u {username} -p {password} {registry}', silent=True, reportNonZero=False)
if response.returncode != 0:
- logging.debug(response)
- msg = f'Could not pull {image} from local registry : {imageTag}'
+ msg = f'Could not log into registry {username}@{registry}'
logging.error(msg)
- myCmd.close()
- HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK)
- return False
- myCmd.run(f'docker tag {imagePrefix}/{imageTag} oai-ci/{imageTag}')
- myCmd.run(f'docker rmi {imagePrefix}/{imageTag}')
- pulled_images += [f"oai-ci/{imageTag}"]
- response = myCmd.run(f'docker logout {imagePrefix}')
- if response.returncode != 0:
- msg = 'Could not log off from local registry'
- logging.error(msg)
- myCmd.close()
- HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
- return False
- myCmd.close()
- msg = "Pulled Images:\n" + '\n'.join(pulled_images)
- HTML.CreateHtmlTestRowQueue('N/A', 'OK', [msg])
- return True
-
- def Clean_Test_Server_Images(self, HTML):
- lIpAddr, lSourcePath = self.GetCredentials(self.testSvrId)
- if lIpAddr != 'none':
- logging.debug('Removing test images from server: ' + lIpAddr)
- myCmd = cls_cmd.RemoteCmd(lIpAddr)
- else:
- logging.debug('Removing test images locally')
- myCmd = cls_cmd.LocalCmd()
-
- for image in IMAGES:
- tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
+ return False, msg
+ pulled_images = []
+ for image in images:
imageTag = f"{image}:{tag}"
- cmd = f'docker rmi oai-ci/{imageTag}'
- myCmd.run(cmd, reportNonZero=False)
+ response = cmd.run(f'docker pull {registry}/{imageTag}')
+ if response.returncode != 0:
+ msg = f'Could not pull {image} from local registry: {imageTag}'
+ logging.error(msg)
+ return False, msg
+ cmd.run(f'docker tag {registry}/{imageTag} oai-ci/{imageTag}')
+ cmd.run(f'docker rmi {registry}/{imageTag}')
+ pulled_images += [f"oai-ci/{imageTag}"]
+ if username is not None and password is not None:
+ response = cmd.run(f'docker logout {registry}')
+ # we have the images, if logout fails it's no problem
+ msg = "Pulled Images:\n" + '\n'.join(pulled_images)
+ return True, msg
- myCmd.close()
- HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
- return True
+ def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"):
+ lIpAddr, lSourcePath = self.GetCredentials(svr_id)
+ logging.debug('\u001B[1m Pulling image(s) on server: ' + lIpAddr + '\u001B[0m')
+ if not tag:
+ tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
+ with cls_cmd.getConnection(lIpAddr) as cmd:
+ success, msg = Containerize.Pull_Image(cmd, images, tag, registry, username, password)
+ param = f"on node {lIpAddr}"
+ if success:
+ HTML.CreateHtmlTestRowQueue(param, 'OK', [msg])
+ else:
+ HTML.CreateHtmlTestRowQueue(param, 'KO', [msg])
+ return success
+
+ def Clean_Test_Server_Images(self, HTML, svr_id, images, tag=None):
+ lIpAddr, lSourcePath = self.GetCredentials(svr_id)
+ logging.debug(f'\u001B[1m Cleaning image(s) from server: {lIpAddr}\u001B[0m')
+ if not tag:
+ tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
+
+ status = True
+ with cls_cmd.getConnection(lIpAddr) as myCmd:
+ removed_images = []
+ for image in images:
+ fullImage = f"oai-ci/{image}:{tag}"
+ cmd = f'docker rmi {fullImage}'
+ if myCmd.run(cmd).returncode != 0:
+ status = False
+ removed_images += [fullImage]
+
+ msg = "Removed Images:\n" + '\n'.join(removed_images)
+ s = 'OK' if status else 'KO'
+ param = f"on node {lIpAddr}"
+ HTML.CreateHtmlTestRowQueue(param, s, [msg])
+ return status
def Create_Workspace(self,HTML):
svr = self.eNB_serverId[self.eNB_instance]
@@ -845,6 +846,9 @@ class Containerize():
lIpAddr, lSourcePath = self.GetCredentials(svr)
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
yaml = self.yamlPath[self.eNB_instance].strip('/')
+ # creating the log folder by default
+ local_dir = f"{os.getcwd()}/../cmake_targets/log/{yaml.split('/')[-1]}"
+ os.system(f'mkdir -p {local_dir}')
wd = f'{lSourcePath}/{yaml}'
with cls_cmd.getConnection(lIpAddr) as ssh:
@@ -856,7 +860,7 @@ class Containerize():
return False
ExistEnvFilePrint(ssh, wd)
- WriteEnvFile(ssh, services, wd, self.deploymentTag)
+ WriteEnvFile(ssh, services, wd, self.deploymentTag, self.flexricTag)
logging.info(f"will start services {services}")
status = ssh.run(f'docker compose -f {wd}/docker-compose.y*ml up -d -- {services}')
diff --git a/ci-scripts/cls_oai_html.py b/ci-scripts/cls_oai_html.py
index b2efcc66b7..8e99b20de7 100644
--- a/ci-scripts/cls_oai_html.py
+++ b/ci-scripts/cls_oai_html.py
@@ -147,7 +147,7 @@ class HTMLManagement():
self.htmlFile.write('
Commit ID | \n')
self.htmlFile.write(' ' + self.ranCommitID + ' | \n')
self.htmlFile.write(' \n')
- if self.ranAllowMerge != '':
+ if self.ranAllowMerge != '' and self.ranCommitID != 'develop':
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
commit_message = commit_message.strip()
self.htmlFile.write(' \n')
diff --git a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
index c035882d36..a38355ecea 100644
--- a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
+++ b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
@@ -188,7 +188,7 @@ gNBs =
////////// AMF parameters:
- amf_ip_address = ({ ipv4 = "192.168.71.132"; });
+ amf_ip_address = ({ ipv4 = "172.21.6.103"; });
NETWORK_INTERFACES :
diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf
index b89b385ad9..b9c569b625 100644
--- a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf
+++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf
@@ -13,7 +13,6 @@ gNBs =
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
- //nr_cellid = 12345678L;
nr_cellid = 1;
////////// Physical parameters:
@@ -23,7 +22,7 @@ gNBs =
maxMIMO_layers = 2;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
- do_SRS = 0 ;
+ do_SRS = 0;
pdcch_ConfigSIB1 = (
{
@@ -38,10 +37,11 @@ gNBs =
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
- # this is 3450.72 MHz (center frequency)
+ # center frequency = 3999.36 MHz
+ # selected SSB frequency = 3999.36 MHz
absoluteFrequencySSB = 666624;
dl_frequencyBand = 77;
- # this is 3401.58 MHz
+ # frequency point A = 3950.22 MHz
dl_absoluteFrequencyPointA = 663348;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
@@ -186,8 +186,8 @@ MACRLCs = (
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 180;
pucch_TargetSNRx10 = 230;
- ul_bler_target_upper=.35;
- ul_bler_target_lower=.15;
+ ul_bler_target_upper = .35;
+ ul_bler_target_lower = .15;
pusch_FailureThres = 100;
}
);
@@ -211,7 +211,7 @@ RUs = (
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
- att_tx = 0
+ att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
@@ -220,21 +220,11 @@ RUs = (
eNB_instances = [0];
ru_thread_core = 5;
sl_ahead = 5;
- clock_src = "internal";
tr_preference = "raw_if4p5"; # important: activate FHI7.2
- do_precoding = 0; # needs to match O-RU configuration
+ do_precoding = 0; # needs to match O-RU configuration
}
);
-rfsimulator :
-{
- serveraddr = "server";
- serverport = "4043";
- options = (); #("saviq"); or/and "chanmod"
- modelname = "AWGN";
- IQfile = "/tmp/rfsimulator.iqs";
-};
-
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
@@ -252,7 +242,8 @@ security = {
drb_integrity = "no";
};
-log_config : {
+log_config :
+{
global_log_level = "info";
hw_log_level = "info";
phy_log_level = "info";
@@ -269,25 +260,21 @@ fhi_72 = {
system_core = 0;
io_core = 1;
worker_cores = (2);
- du_addr = ("76:76:64:6e:00:01", "76:76:64:6e:00:01");
ru_addr = ("98:ae:71:01:c5:eb", "98:ae:71:01:c5:eb");
- mtu = 9216; # check if xran uses this properly
+ mtu = 9600;
fh_config = ({
Tadv_cp_dl = 125;
- T2a_cp_dl = (285, 429); # (min, max)
- T2a_cp_ul = (285, 429); # (min, max)
- T2a_up = (125, 428); # (min, max)
- Ta3 = (130, 170); # (min, max)
- T1a_cp_dl = (285, 470); # (min, max)
- T1a_cp_ul = (285, 429); # (min, max)
- T1a_up = (125, 350); # (min, max)
- Ta4 = (110, 180); # (min, max)
+ T2a_cp_dl = (285, 429);
+ T2a_cp_ul = (285, 429);
+ T2a_up = (125, 428);
+ Ta3 = (130, 170);
+ T1a_cp_dl = (285, 470);
+ T1a_cp_ul = (285, 429);
+ T1a_up = (125, 350);
+ Ta4 = (110, 180);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
- prach_config = {
- eAxC_offset = 4;
- };
});
};
diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf
new file mode 100644
index 0000000000..8e7f52a931
--- /dev/null
+++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf
@@ -0,0 +1,239 @@
+Active_gNBs = ( "gnb-rfsim");
+# Asn1_verbosity, choice in: none, info, annoying
+Asn1_verbosity = "none";
+
+gNBs =
+(
+ {
+ ////////// Identification parameters:
+ gNB_ID = 0xe00;
+
+ gNB_name = "gnb-rfsim";
+
+ // Tracking area code, 0x0000 and 0xfffe are reserved values
+ tracking_area_code = 1;
+
+ plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; }) });
+
+ nr_cellid = 12345678L
+
+ ////////// Physical parameters:
+
+ min_rxtxtime = 6;
+
+ servingCellConfigCommon = (
+ {
+#spCellConfigCommon
+
+ physCellId = 0;
+
+# downlinkConfigCommon
+ #frequencyInfoDL
+ # this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
+ absoluteFrequencySSB = 621312;
+ # this is 3300.60 MHz
+ dl_absoluteFrequencyPointA = 620040;
+ #scs-SpecificCarrierList
+ dl_offstToCarrier = 0;
+ # subcarrierSpacing
+ # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
+ dl_subcarrierSpacing = 1;
+ dl_carrierBandwidth = 106;
+ #initialDownlinkBWP
+ #genericParameters
+ # this is RBstart=0,L=106 (275*(L-1))+RBstart
+ initialDLBWPlocationAndBandwidth = 28875;
+ # subcarrierSpacing
+ # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
+ initialDLBWPsubcarrierSpacing = 1;
+ #pdcch-ConfigCommon
+ initialDLBWPcontrolResourceSetZero = 11;
+ initialDLBWPsearchSpaceZero = 0;
+
+# uplinkConfigCommon
+ #frequencyInfoUL
+ ul_frequencyBand = 78;
+ #scs-SpecificCarrierList
+ ul_offstToCarrier = 0;
+ # subcarrierSpacing
+ # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
+ ul_subcarrierSpacing = 1;
+ ul_carrierBandwidth = 106;
+ pMax = 20;
+ #initialUplinkBWP
+ #genericParameters
+ initialULBWPlocationAndBandwidth = 28875;
+ # subcarrierSpacing
+ # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
+ initialULBWPsubcarrierSpacing = 1;
+ #rach-ConfigCommon
+ #rach-ConfigGeneric
+ prach_ConfigurationIndex = 98;
+ #prach_msg1_FDM
+ #0 = one, 1=two, 2=four, 3=eight
+ prach_msg1_FDM = 0;
+ prach_msg1_FrequencyStart = 0;
+ zeroCorrelationZoneConfig = 12;
+ preambleReceivedTargetPower = -104;
+ #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
+ preambleTransMax = 6;
+ #powerRampingStep
+ # 0=dB0,1=dB2,2=dB4,3=dB6
+ powerRampingStep = 1;
+ #ra_ReponseWindow
+ #1,2,4,8,10,20,40,80
+ ra_ResponseWindow = 4;
+ #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
+ #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
+ ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
+ #oneHalf (0..15) 4,8,12,16,...60,64
+ ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
+ #ra_ContentionResolutionTimer
+ #(0..7) 8,16,24,32,40,48,56,64
+ ra_ContentionResolutionTimer = 7;
+ rsrp_ThresholdSSB = 19;
+ #prach-RootSequenceIndex_PR
+ #1 = 839, 2 = 139
+ prach_RootSequenceIndex_PR = 2;
+ prach_RootSequenceIndex = 1;
+ # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
+ #
+ msg1_SubcarrierSpacing = 1,
+ # restrictedSetConfig
+ # 0=unrestricted, 1=restricted type A, 2=restricted type B
+ restrictedSetConfig = 0,
+
+ msg3_DeltaPreamble = 1;
+ p0_NominalWithGrant = -90;
+
+ # pucch-ConfigCommon setup :
+ # pucchGroupHopping
+ # 0 = neither, 1= group hopping, 2=sequence hopping
+ pucchGroupHopping = 0;
+ hoppingId = 40;
+ p0_nominal = -90;
+
+ ssb_PositionsInBurst_Bitmap = 1;
+
+ # ssb_periodicityServingCell
+ # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
+ ssb_periodicityServingCell = 2;
+
+ # dmrs_TypeA_position
+ # 0 = pos2, 1 = pos3
+ dmrs_TypeA_Position = 0;
+
+ # subcarrierSpacing
+ # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
+ subcarrierSpacing = 1;
+
+ #tdd-UL-DL-ConfigurationCommon
+ # subcarrierSpacing
+ # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
+ referenceSubcarrierSpacing = 1;
+ # pattern1
+ # dl_UL_TransmissionPeriodicity
+ # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
+ dl_UL_TransmissionPeriodicity = 6;
+ nrofDownlinkSlots = 7;
+ nrofDownlinkSymbols = 6;
+ nrofUplinkSlots = 2;
+ nrofUplinkSymbols = 4;
+
+ ssPBCH_BlockPower = -25;
+ });
+
+
+ # ------- SCTP definitions
+ SCTP :
+ {
+ # Number of streams to use in input/output
+ SCTP_INSTREAMS = 2;
+ SCTP_OUTSTREAMS = 2;
+ };
+
+ ////////// AMF parameters:
+ amf_ip_address = ({ ipv4 = "192.168.70.132"; });
+
+ NETWORK_INTERFACES :
+ {
+ GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.151";
+ GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.151";
+ GNB_PORT_FOR_S1U = 2152; # Spec 2152
+ };
+
+ }
+);
+
+MACRLCs = (
+ {
+ num_cc = 1;
+ tr_s_preference = "local_L1";
+ tr_n_preference = "local_RRC";
+ pusch_TargetSNRx10 = 200;
+ pucch_TargetSNRx10 = 200;
+ }
+);
+
+L1s = (
+{
+ num_cc = 1;
+ tr_n_preference = "local_mac";
+ prach_dtx_threshold = 200;
+# pucch0_dtx_threshold = 150;
+}
+);
+
+RUs = (
+ {
+ local_rf = "yes";
+ nb_tx = 1;
+ nb_rx = 1;
+ att_tx = 0;
+ att_rx = 0;
+ bands = [78];
+ max_pdschReferenceSignalPower = -27;
+ max_rxgain = 75;
+ eNB_instances = [0];
+ sf_extension = 0;
+ sdr_addrs = "serial=XXXXXXX";
+ }
+);
+
+rfsimulator: {
+ serveraddr = "server";
+};
+
+security = {
+ # preferred ciphering algorithms
+ # the first one of the list that an UE supports in chosen
+ # valid values: nea0, nea1, nea2, nea3
+ ciphering_algorithms = ( "nea0" );
+
+ # preferred integrity algorithms
+ # the first one of the list that an UE supports in chosen
+ # valid values: nia0, nia1, nia2, nia3
+ integrity_algorithms = ( "nia2", "nia0" );
+
+ # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
+ # what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
+ drb_ciphering = "yes";
+ drb_integrity = "no";
+};
+
+log_config : {
+ global_log_level ="info";
+ hw_log_level ="info";
+ phy_log_level ="info";
+ mac_log_level ="info";
+ rlc_log_level ="info";
+ pdcp_log_level ="info";
+ rrc_log_level ="info";
+ f1ap_log_level ="info";
+};
+
+e2_agent = {
+ near_ric_ip_addr = "192.168.70.150";
+ #sm_dir = "/path/where/the/SMs/are/located/"
+ sm_dir = "/usr/local/lib/flexric/"
+};
diff --git a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf
index 139923e65a..de2a610371 100644
--- a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf
+++ b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf
@@ -22,9 +22,9 @@ gNBs =
maxMIMO_layers = 2;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
- do_SRS = 0 ;
- sib1_tda = 15;
-# force_UL256qam_off = 1;
+ do_SRS = 0;
+ sib1_tda = 15;
+ # force_UL256qam_off = 1;
pdcch_ConfigSIB1 = (
{
@@ -41,10 +41,11 @@ gNBs =
# n_TimingAdvanceOffset = 0;
# downlinkConfigCommon
#frequencyInfoDL
- # this is 3450.72 MHz (center frequency)
+ # center frequency = 3350.01 MHz
+ # selected SSB frequency = 3349.92 MHz
absoluteFrequencySSB = 623328;
dl_frequencyBand = 78;
- # this is 3401.58 MHz
+ # frequency point A = 3300.87 MHz
dl_absoluteFrequencyPointA = 620052;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
@@ -189,10 +190,10 @@ MACRLCs = (
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 100;
pucch_TargetSNRx10 = 200;
- dl_bler_target_upper=.35;
- dl_bler_target_lower=.15;
- ul_bler_target_upper=.35;
- ul_bler_target_lower=.15;
+ dl_bler_target_upper = .35;
+ dl_bler_target_lower = .15;
+ ul_bler_target_upper = .35;
+ ul_bler_target_lower = .15;
pusch_FailureThres = 1000;
ul_max_mcs = 28;
}
@@ -218,7 +219,7 @@ RUs = (
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
- att_tx = 0
+ att_tx = 0;
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
@@ -228,7 +229,7 @@ RUs = (
ru_thread_core = 5;
sl_ahead = 10;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
- do_precoding = 0; # needs to match O-RU configuration
+ do_precoding = 0; # needs to match O-RU configuration
}
);
@@ -251,15 +252,15 @@ security = {
log_config :
{
- global_log_level ="info";
- hw_log_level ="info";
- phy_log_level ="info";
- mac_log_level ="info";
- rlc_log_level ="info";
- pdcp_log_level ="info";
- rrc_log_level ="info";
- ngap_log_level ="info";
- f1ap_log_level ="info";
+ global_log_level = "info";
+ hw_log_level = "info";
+ phy_log_level = "info";
+ mac_log_level = "info";
+ rlc_log_level = "info";
+ pdcp_log_level = "info";
+ rrc_log_level = "info";
+ ngap_log_level = "info";
+ f1ap_log_level = "info";
};
fhi_72 = {
@@ -267,10 +268,8 @@ fhi_72 = {
system_core = 0;
io_core = 1;
worker_cores = (2);
- du_addr = ("00:11:22:33:44:66", "00:11:22:33:44:67");
ru_addr = ("70:b3:d5:e1:5b:81", "70:b3:d5:e1:5b:81");
- mtu = 9216;
- file_prefix = "fhi_72";
+ mtu = 9600;
fh_config = ({
Tadv_cp_dl = 125;
T2a_cp_dl = (259, 500);
@@ -285,8 +284,5 @@ fhi_72 = {
iq_width = 9;
iq_width_prach = 9;
};
- prach_config = {
- eAxC_offset = 4;
- };
});
};
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 2e595aa834..9bf196338c 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -370,26 +370,20 @@ def ExecuteActionWithParam(action):
success = SCA.CppCheckAnalysis(HTML)
elif action == 'Push_Local_Registry':
- string_field = test.findtext('registry_svr_id')
- if (string_field is not None):
- CONTAINERS.registrySvrId = string_field
- success = CONTAINERS.Push_Image_to_Local_Registry(HTML)
+ svr_id = test.findtext('svr_id')
+ success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id)
- elif action == 'Pull_Local_Registry':
- string_field = test.findtext('test_svr_id')
- if (string_field is not None):
- CONTAINERS.testSvrId = string_field
- CONTAINERS.imageToPull.clear()
- string_field = test.findtext('images_to_pull')
- if (string_field is not None):
- CONTAINERS.imageToPull = string_field.split()
- success = CONTAINERS.Pull_Image_from_Local_Registry(HTML)
-
- elif action == 'Clean_Test_Server_Images':
- string_field = test.findtext('test_svr_id')
- if (string_field is not None):
- CONTAINERS.testSvrId = string_field
- success = CONTAINERS.Clean_Test_Server_Images(HTML)
+ elif action == 'Pull_Local_Registry' or action == 'Clean_Test_Server_Images':
+ svr_id = test.findtext('svr_id')
+ images = test.findtext('images').split()
+ # hack: for FlexRIC, we need to overwrite the tag to use
+ tag = None
+ if len(images) == 1 and images[0] == "oai-flexric":
+ tag = CONTAINERS.flexricTag
+ if action == "Pull_Local_Registry":
+ success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag)
+ if action == "Clean_Test_Server_Images":
+ success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images, tag=tag)
elif action == 'Custom_Command':
node = test.findtext('node')
@@ -404,13 +398,9 @@ def ExecuteActionWithParam(action):
success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail)
elif action == 'Pull_Cluster_Image':
- string_field = test.findtext('images_to_pull')
- if (string_field is not None):
- CLUSTER.imageToPull = string_field.split()
- string_field = test.findtext('test_svr_id')
- if (string_field is not None):
- CLUSTER.testSvrId = string_field
- success = CLUSTER.PullClusterImage(HTML, RAN)
+ images = test.findtext('images').split()
+ node = test.findtext('node')
+ success = CLUSTER.PullClusterImage(HTML, node, images)
else:
logging.warning(f"unknown action {action}, skip step")
@@ -634,7 +624,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
#(6 digits or less than 6 digits followed by +)
for test in exclusion_tests:
if (not re.match('^[0-9]{6}$', test) and
- not re.match('^[0-9]{1,5}\+$', test)):
+ not re.match('^[0-9]{1,5}\\+$', test)):
logging.error('exclusion test is invalidly formatted: ' + test)
sys.exit(1)
else:
@@ -645,7 +635,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
#be verbose
for test in requested_tests:
if (re.match('^[0-9]{6}$', test) or
- re.match('^[0-9]{1,5}\+$', test)):
+ re.match('^[0-9]{1,5}\\+$', test)):
logging.info('test group/case requested: ' + test)
else:
logging.error('requested test is invalidly formatted: ' + test)
diff --git a/ci-scripts/tests/pull-clean-int-registry.py b/ci-scripts/tests/pull-clean-int-registry.py
new file mode 100644
index 0000000000..d4d5b4fc0a
--- /dev/null
+++ b/ci-scripts/tests/pull-clean-int-registry.py
@@ -0,0 +1,53 @@
+import sys
+import logging
+logging.basicConfig(
+ level=logging.DEBUG,
+ stream=sys.stdout,
+ format="[%(asctime)s] %(levelname)8s: %(message)s"
+)
+import os
+os.system(f'rm -rf cmake_targets')
+os.system(f'mkdir -p cmake_targets/log')
+import unittest
+
+sys.path.append('./') # to find OAI imports below
+import cls_oai_html
+import cls_cmd
+import cls_containerize
+
+class TestDeploymentMethods(unittest.TestCase):
+ def setUp(self):
+ self.html = cls_oai_html.HTMLManagement()
+ self.html.testCaseId = "000000"
+ self.cont = cls_containerize.Containerize()
+ self.cont.eNBIPAddress = 'localhost'
+ self.cont.eNBSourceCodePath = os.getcwd()
+
+ def test_pull_clean_local_reg(self):
+ # the pull function has the authentication at the internal cluster hardcoded
+ # this is a refactoring opportunity: we should do it in a separate step
+ # and allow to have pull work with any registry
+ registry = "porcepix.sboai.cs.eurecom.fr"
+ with cls_cmd.getConnection("localhost") as cmd:
+ ret = cmd.run(f"ping -c1 -w1 {registry}")
+ if ret.returncode != 0: # could not ping once -> skip test
+ self.skipTest(f"test_pull_clean_local_reg: could not reach {registry} (run inside sboai)")
+ svr_id = '0'
+ images = ["oai-gnb"]
+ tag = "develop"
+ pull = self.cont.Pull_Image_from_Registry(self.html, svr_id, images, tag=tag)
+ clean = self.cont.Clean_Test_Server_Images(self.html, svr_id, images, tag=tag)
+ self.assertTrue(pull)
+ self.assertTrue(clean)
+
+ def test_pull_clean_docker_hub(self):
+ svr_id = '0'
+ r = "docker.io"
+ images = ["hello-world"]
+ tag = "latest"
+ pull = self.cont.Pull_Image_from_Registry(self.html, svr_id, images, tag=tag, registry=r, username=None, password=None)
+ clean = self.cont.Clean_Test_Server_Images(self.html, svr_id, images, tag=tag)
+ self.assertTrue(pull)
+ self.assertTrue(clean)
+
+if __name__ == '__main__':unittest.main()
diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
index 97a0610efa..6a0e5ae00f 100644
--- a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
+++ b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
@@ -44,8 +44,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb oai-lte-ue
+ 0
+ oai-enb oai-lte-ue
Create_Workspace
@@ -149,7 +149,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb oai-lte-ue
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
index 9e8bb1e704..12f8f13a5b 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
@@ -52,8 +52,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb-asan oai-lte-ue-asan
+ 0
+ oai-enb-asan oai-lte-ue-asan
@@ -166,7 +166,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb-asan oai-lte-ue-asan
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
index 0081f8eab9..031a308a5c 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
@@ -43,8 +43,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb-asan oai-lte-ue-asan
+ 0
+ oai-enb-asan oai-lte-ue-asan
Create_Workspace
@@ -137,7 +137,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb-asan oai-lte-ue-asan
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
index 310f886497..d56aeb231e 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
@@ -47,8 +47,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb-asan oai-lte-ue-asan
+ 0
+ oai-enb-asan oai-lte-ue-asan
Create_Workspace
@@ -166,7 +166,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb-asan oai-lte-ue-asan
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
index 357db604a6..e957417f1c 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
@@ -47,8 +47,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb-asan oai-lte-ue-asan
+ 0
+ oai-enb-asan oai-lte-ue-asan
Create_Workspace
@@ -166,7 +166,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb-asan oai-lte-ue-asan
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml
index e1484004e2..c030fbb4a4 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml
@@ -40,8 +40,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb-asan oai-lte-ue-asan
+ 0
+ oai-enb-asan oai-lte-ue-asan
Create_Workspace
@@ -104,7 +104,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb-asan oai-lte-ue-asan
diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml
index cf154b4476..34c2fc6c89 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml
@@ -40,8 +40,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb-asan oai-lte-ue-asan
+ 0
+ oai-enb-asan oai-lte-ue-asan
Create_Workspace
@@ -104,7 +104,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb-asan oai-lte-ue-asan
diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
index 77d9f19ee9..e292958576 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
@@ -47,8 +47,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb oai-lte-ue
+ 0
+ oai-enb oai-lte-ue
Create_Workspace
@@ -159,7 +159,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb oai-lte-ue
diff --git a/ci-scripts/xml_files/container_5g_e1_rfsim.xml b/ci-scripts/xml_files/container_5g_e1_rfsim.xml
index bf4cf6ec04..8128fca08c 100644
--- a/ci-scripts/xml_files/container_5g_e1_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_e1_rfsim.xml
@@ -40,8 +40,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb oai-nr-cuup oai-nr-ue
+ 0
+ oai-gnb oai-nr-cuup oai-nr-ue
Create_Workspace
@@ -107,7 +107,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb oai-nr-cuup oai-nr-ue
diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml
index 8c925cbc5f..54d2b221b2 100644
--- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml
@@ -47,8 +47,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan
Create_Workspace
@@ -194,7 +194,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
index d3640da596..276bb5b9a3 100644
--- a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
@@ -42,8 +42,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
Create_Workspace
@@ -133,7 +133,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_flexric_rfsim.xml b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml
new file mode 100644
index 0000000000..cc791980f0
--- /dev/null
+++ b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml
@@ -0,0 +1,213 @@
+
+
+ rfsim-5gnr-flexric
+ Monolithic SA TDD gNB and FlexRic Integration
+ wrench
+ 1
+
+ 111110
+ 111111
+ 111112
+ 000001
+ 000002
+ 000003
+ 002001
+ 010000
+ 000004
+ 333333
+ 010001
+ 010002
+ 010003
+ 020005
+ 010013
+ 002006
+ 444444
+ 100002
+ 100001
+ 222221
+ 222222
+
+
+
+
+ IdleSleep
+ Sleep
+ 10
+
+
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-gnb oai-nr-ue
+
+
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-flexric
+
+
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+ oai-gnb oai-nr-ue
+ true
+
+
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+ oai-flexric
+ true
+
+
+
+ Custom_Command
+ Updating CN5G images
+ localhost
+ docker compose -f ../doc/tutorial_resources/oai-cn5g/docker-compose.yaml pull
+
+
+
+ Deploy_Object
+ Deploy OAI 5G CoreNetwork
+ doc/tutorial_resources/oai-cn5g
+ mysql oai-nrf oai-udr oai-udm oai-ausf oai-amf oai-smf oai-upf oai-ext-dn
+ 0
+ 0
+
+
+
+ Deploy_Object
+ Deploy OAI FlexRIC
+ ci-scripts/yaml_files/5g_rfsimulator_flexric
+ oai-flexric
+ 0
+ 0
+
+
+
+ Deploy_Object
+ Deploy OAI 5G gNB in RF sim SA
+ ci-scripts/yaml_files/5g_rfsimulator_flexric
+ oai-gnb
+ 0
+ 0
+
+
+
+ Deploy_Object
+ Deploy 2 OAI 5G NR-UEs in RF sim SA
+ ci-scripts/yaml_files/5g_rfsimulator_flexric
+ oai-nr-ue oai-nr-ue2
+ 0
+ 0
+
+
+
+ Ping
+ Ping ext-dn from both UEs
+ rfsim5g_ue rfsim5g_ue2
+ selfix selfix
+ -c 20 192.168.70.135
+ 5
+
+
+
+ Attach_UE
+ Attach OAI UE 1 and 2
+ rfsim5g_ue rfsim5g_ue2
+ selfix selfix
+
+
+
+ Detach_UE
+ Detach OAI UE 1 and 2
+ rfsim5g_ue rfsim5g_ue2
+ selfix selfix
+
+
+
+ Undeploy_Object
+ Undeploy Core Network
+ doc/tutorial_resources/oai-cn5g
+ 0
+ 0
+ true
+
+
+
+ Undeploy_Object
+ Undeploy RAN and Flexric
+ ci-scripts/yaml_files/5g_rfsimulator_flexric
+ 0
+ 0
+ true
+
+
+
+ Custom_Command
+ RC monitoring
+ localhost
+ yes
+ docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_rc_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/rc-moni-010000.log
+
+
+
+ Custom_Command
+ KPM monitoring
+ localhost
+ yes
+ docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_kpm_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/kpm-moni-010001.log
+
+
+
+ Custom_Command
+ KPM monitoring and RC control
+ localhost
+ yes
+ docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/kpm_rc/xapp_kpm_rc" > ../cmake_targets/log/5g_rfsimulator_flexric/kpm_rc-010002.log
+
+
+
+ Custom_Command
+ Custom SMs monitoring
+ localhost
+ yes
+ docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/sms-moni-010003.log
+
+
+
+ Custom_Command
+ Custom SMs monitoring
+ localhost
+ yes
+ docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/sms-moni-010013.log
+
+
+
diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml
index 16eacb02c5..6388a3fe3e 100644
--- a/ci-scripts/xml_files/container_5g_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim.xml
@@ -57,8 +57,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue
+ 0
+ oai-gnb-asan oai-nr-ue
Create_Workspace
@@ -259,7 +259,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue
diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml
index 2e3bbf1d3a..5c2a069122 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml
@@ -42,8 +42,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
Create_Workspace
@@ -133,7 +133,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml
index a18928cc80..3b7a1d738e 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml
@@ -42,8 +42,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
Create_Workspace
@@ -133,7 +133,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml
index 10081b9606..100465614d 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml
@@ -42,8 +42,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
@@ -133,7 +133,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml
index b29be08d21..d700862689 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml
@@ -39,8 +39,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
@@ -101,7 +101,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml
index 04bf430f03..5e3c4bedb5 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml
@@ -41,8 +41,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
@@ -107,7 +107,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml
index d42f8851bb..133d960c3a 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml
@@ -39,8 +39,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-nr-ue-asan
+ 0
+ oai-nr-ue-asan
@@ -97,7 +97,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml
index 35834493cc..861158c08f 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml
@@ -41,8 +41,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
@@ -116,7 +116,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml
index 38d88b7e5e..7014c54a2a 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml
@@ -42,8 +42,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-asan oai-nr-ue-asan
+ 0
+ oai-gnb-asan oai-nr-ue-asan
Create_Workspace
@@ -133,7 +133,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-asan oai-nr-ue-asan
diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml
index 58b3c00d5e..7db63e4281 100644
--- a/ci-scripts/xml_files/container_image_build.xml
+++ b/ci-scripts/xml_files/container_image_build.xml
@@ -49,7 +49,7 @@
Push_Local_Registry
Push Images to Local Registry
- 0
+ 0
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
index 00516269a6..01e1cfc4ed 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
@@ -43,8 +43,8 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
@@ -211,7 +211,8 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
index 4ede8e072b..c13952094f 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
@@ -42,8 +42,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
@@ -194,7 +194,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
index b9bc7f7a42..4bfcb02258 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
@@ -42,8 +42,8 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Custom_Command
@@ -176,7 +176,8 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
index 958e0a895a..6b1afaf079 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
@@ -44,8 +44,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Custom_Command
@@ -206,7 +206,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
index 60a9bd0c16..1469918617 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
@@ -43,8 +43,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Custom_Command
@@ -138,7 +138,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
index 10cd2e89c1..f978d14cf9 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
@@ -49,14 +49,14 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Pull_Local_Registry
Pull Images from Local Registry
- 1
- oai-lte-ue
+ 1
+ oai-lte-ue
Custom_Command
@@ -190,14 +190,16 @@
Clean_Test_Server_Images
true
Clean Test Images on eNB Test Server
- 0
+ 0
+ oai-enb
Clean_Test_Server_Images
true
Clean Test Images on LTE-UE Test Server
- 1
+ 1
+ oai-lte-ue
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
index 510d0d3f2e..a830803f9f 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
@@ -43,8 +43,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Custom_Command
@@ -206,7 +206,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
index c8bcde980f..dc85ee5813 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
@@ -43,8 +43,8 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
@@ -223,7 +223,8 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
index 22a86d1f57..f5467c2623 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
@@ -41,8 +41,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
@@ -209,7 +209,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml
index 068d4521b2..1a3bfa6692 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml
@@ -41,8 +41,8 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm2.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Custom_Command
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
index 570fffef71..4d34ff1434 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
@@ -42,8 +42,8 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Custom_Command
@@ -214,7 +214,8 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
index 49826d782c..2620296bde 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
@@ -42,8 +42,8 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Custom_Command
@@ -212,7 +212,8 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
index 8e47a61a48..5dc0ab9585 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
@@ -42,8 +42,8 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
@@ -217,7 +217,8 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
index d144448301..5234e2d35c 100644
--- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
@@ -48,8 +48,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
@@ -153,7 +153,8 @@
Clean_Test_Server_Images
true
Clean Test Images
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
index 50494d7778..a02d0c48ef 100644
--- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
+++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
@@ -48,8 +48,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
@@ -153,7 +153,8 @@
Clean_Test_Server_Images
true
Clean Test Images
- 0
+ 0
+ oai-enb
diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml
index c745cb90aa..7b43dc609b 100644
--- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml
@@ -57,15 +57,15 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-enb
+ 0
+ oai-enb
Pull_Local_Registry
Pull Images from Local Registry
- 1
- oai-gnb
+ 1
+ oai-gnb
@@ -252,14 +252,16 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-enb
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 1
+ 1
+ oai-gnb
diff --git a/ci-scripts/xml_files/container_sa_aerial_quectel.xml b/ci-scripts/xml_files/container_sa_aerial_quectel.xml
index 63f22af51d..0b110cab3b 100644
--- a/ci-scripts/xml_files/container_sa_aerial_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_aerial_quectel.xml
@@ -25,6 +25,7 @@
AERIAL 100 MHz TDD SA
tasks
+ 555000
111111
000222
800813
@@ -37,14 +38,20 @@
000222
222222
333333
+ 000555
+
+ Initialize_5GCN
+ Initialize 5G Core
+ oc-cn5g-20897-aerial2
+
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb-aerial
+ 0
+ oai-gnb-aerial
@@ -82,15 +89,15 @@
Ping
Ping: 100pings in 20sec
up2-aerial
- -c 100 -i 0.2 %cn_ip%
+ -c 100 -i 0.2 172.21.6.104
5
Iperf
- iperf (DL/UDP/700M)(30 sec)(single-ue profile)
+ iperf (DL/UDP/600M)(30 sec)(single-ue profile)
-u -b 600M -t 30 -R
- porcepix-cn5g
+ oc-cn5g-20897-aerial2
up2-aerial
25
80
@@ -100,7 +107,7 @@
Iperf
iperf (UL/UDP/50M)(30 sec)(single-ue profile)
-u -b 50M -t 30
- porcepix-cn5g
+ oc-cn5g-20897-aerial2
up2-aerial
25
80
@@ -128,8 +135,15 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-aerial
+
+ Terminate_5GCN
+ true
+ Terminate 5G Core
+ oc-cn5g-20897-aerial2
+
diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml
index f023da8402..701d4c23d5 100644
--- a/ci-scripts/xml_files/container_sa_aw2s_asue.xml
+++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml
@@ -65,7 +65,8 @@
Pull_Cluster_Image
Pull Images from Cluster
oaicicd-ran
- oai-gnb-aw2s
+ oai-gnb-aw2s
+ avra
@@ -277,7 +278,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-aw2s
diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml
index 514672df66..9f6a373eca 100644
--- a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml
+++ b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml
@@ -64,7 +64,8 @@
Pull_Cluster_Image
Pull Images from Cluster
oaicicd-ran
- oai-gnb-aw2s
+ oai-gnb-aw2s
+ avra
Create_Workspace
@@ -274,7 +275,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-aw2s
diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml
index 4a4c8309a5..51d9c314b4 100644
--- a/ci-scripts/xml_files/container_sa_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml
@@ -59,8 +59,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb
+ 0
+ oai-gnb
@@ -220,7 +220,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb
diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
index 563167a2dd..f93da0e890 100644
--- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
@@ -56,8 +56,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb oai-nr-cuup
+ 0
+ oai-gnb oai-nr-cuup
@@ -218,7 +218,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb oai-nr-cuup
diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
index e03180e236..82f3cc84e5 100644
--- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
@@ -64,8 +64,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb
+ 0
+ oai-gnb
@@ -251,7 +251,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb
diff --git a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
index 215fe3ea26..927fe1a3e7 100644
--- a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
+++ b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
@@ -56,7 +56,8 @@
Pull_Cluster_Image
Pull Images from Cluster
oaicicd-ran
- oai-gnb-fhi72
+ oai-gnb-fhi72
+ cacofonix
Create_Workspace
@@ -153,7 +154,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb-fhi72
diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml
index 214991e117..3fd9c83522 100644
--- a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml
@@ -46,8 +46,8 @@
Pull_Cluster_Image
Pull Images from Cluster
- oai-gnb
- matix
+ oai-gnb
+ matix
@@ -156,7 +156,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb
diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml
index c94c30a7b2..d4d7568ec4 100644
--- a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml
@@ -46,8 +46,8 @@
Pull_Cluster_Image
Pull Images from Cluster
- oai-gnb
- matix
+ oai-gnb
+ matix
@@ -156,7 +156,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb
diff --git a/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml
index 0ffe3044b6..b89891f496 100644
--- a/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml
@@ -46,8 +46,8 @@
Pull_Cluster_Image
Pull Images from Cluster
- oai-gnb
- matix
+ oai-gnb
+ matix
@@ -156,7 +156,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb
diff --git a/ci-scripts/xml_files/container_sa_n310_nrue.xml b/ci-scripts/xml_files/container_sa_n310_nrue.xml
index a358bbf5f8..e1e79ccec9 100644
--- a/ci-scripts/xml_files/container_sa_n310_nrue.xml
+++ b/ci-scripts/xml_files/container_sa_n310_nrue.xml
@@ -44,15 +44,15 @@
Pull_Cluster_Image
Pull Images from Cluster
- oai-gnb
- avra
+ oai-gnb
+ avra
Pull_Cluster_Image
Pull Images from Cluster
- oai-nr-ue
- caracal
+ oai-nr-ue
+ caracal
@@ -163,14 +163,16 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 1
+ 1
+ oai-nr-ue
diff --git a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
index d2bfaa02d4..a8515f3ec0 100644
--- a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
@@ -53,8 +53,8 @@
Pull_Local_Registry
Pull Images from Local Registry
- 0
- oai-gnb
+ 0
+ oai-gnb
@@ -214,7 +214,8 @@
Clean_Test_Server_Images
true
Clean Test Images on Test Server
- 0
+ 0
+ oai-gnb
diff --git a/ci-scripts/xml_files/nsa_epc_closure.xml b/ci-scripts/xml_files/nsa_epc_closure.xml
new file mode 100644
index 0000000000..2fd8031936
--- /dev/null
+++ b/ci-scripts/xml_files/nsa_epc_closure.xml
@@ -0,0 +1,47 @@
+
+
+ epc-closure
+ EPC-Closure
+ log-out
+
+060000 060001 060002
+
+
+
+
+ Terminate_HSS
+ Terminate HSS
+
+
+
+ Terminate_MME
+ Terminate MME
+
+
+
+ Terminate_SPGW
+ Terminate SPGW
+
+
+
diff --git a/ci-scripts/xml_files/nsa_epc_start.xml b/ci-scripts/xml_files/nsa_epc_start.xml
new file mode 100644
index 0000000000..5cef2b5a6a
--- /dev/null
+++ b/ci-scripts/xml_files/nsa_epc_start.xml
@@ -0,0 +1,48 @@
+
+
+ epc-start-tab
+ EPC-Start
+ log-in
+
+ 000100 000101 000102
+
+
+
+
+
+ Initialize_HSS
+ Initialize HSS
+
+
+
+ Initialize_MME
+ Initialize MME
+
+
+
+ Initialize_SPGW
+ Initialize SPGW
+
+
+
diff --git a/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml b/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml
new file mode 100644
index 0000000000..3de615330a
--- /dev/null
+++ b/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml
@@ -0,0 +1,38 @@
+
+
+ cn5g-start-tab
+ CN5G-Start
+ log-in
+
+000100
+
+
+
+
+
+ Initialize_5GCN
+ Initialize 5G Core
+ oc-cn5g
+
+
diff --git a/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml b/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml
new file mode 100644
index 0000000000..727e208d4c
--- /dev/null
+++ b/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml
@@ -0,0 +1,38 @@
+
+
+ cn5g-closure
+ CN5G-Closure
+ log-out
+
+060000
+
+
+
+
+ Terminate_5GCN
+ Terminate 5G Core
+ oc-cn5g
+
+
+
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_flexric/conf/flexric.conf b/ci-scripts/yaml_files/5g_rfsimulator_flexric/conf/flexric.conf
new file mode 100644
index 0000000000..5ffbf3d47f
--- /dev/null
+++ b/ci-scripts/yaml_files/5g_rfsimulator_flexric/conf/flexric.conf
@@ -0,0 +1,5 @@
+[NEAR-RIC]
+NEAR_RIC_IP = 192.168.70.150
+[XAPP]
+DB_PATH = /flexric/db/
+DB_NAME = xapp_rnis_db
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_flexric/docker-compose.yml b/ci-scripts/yaml_files/5g_rfsimulator_flexric/docker-compose.yml
new file mode 100644
index 0000000000..9afdd02b60
--- /dev/null
+++ b/ci-scripts/yaml_files/5g_rfsimulator_flexric/docker-compose.yml
@@ -0,0 +1,81 @@
+services:
+ oai-flexric:
+ image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
+ container_name: oai-flexric
+ networks:
+ public_net:
+ ipv4_address: 192.168.70.150
+ volumes:
+ - ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
+ - sharedXappLibs:/usr/local/lib/flexric/
+ healthcheck:
+ test: /bin/bash -c "pgrep nearRT-RIC"
+ interval: 10s
+ timeout: 5s
+
+ oai-gnb:
+ image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
+ privileged: true
+ container_name: rfsim5g-oai-gnb
+ environment:
+ USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time
+ ASAN_OPTIONS: detect_leaks=0
+ depends_on:
+ - oai-flexric
+ networks:
+ public_net:
+ ipv4_address: 192.168.70.151
+ volumes:
+ - ../../conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf:/opt/oai-gnb/etc/gnb.conf
+ - sharedXappLibs:/usr/local/lib/flexric/
+ healthcheck:
+ test: /bin/bash -c "pgrep nr-softmodem"
+ interval: 10s
+ timeout: 5s
+ retries: 5
+
+ oai-nr-ue:
+ image: ${REGISTRY:-oaisoftwarealliance}/${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
+ privileged: true
+ container_name: rfsim5g-oai-nr-ue
+ environment:
+ USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C 3619200000 --uicc0.imsi 001010000000003 --rfsimulator.serveraddr 192.168.70.151 --log_config.global_log_options level,nocolor,time
+ depends_on:
+ - oai-gnb
+ networks:
+ public_net:
+ ipv4_address: 192.168.70.152
+ volumes:
+ - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
+ healthcheck:
+ test: /bin/bash -c "pgrep nr-uesoftmodem"
+ interval: 10s
+ timeout: 5s
+ retries: 5
+
+ oai-nr-ue2:
+ image: ${REGISTRY:-oaisoftwarealliance}/${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
+ privileged: true
+ container_name: rfsim5g-oai-nr-ue2
+ environment:
+ USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C 3619200000 --uicc0.imsi 001010000000004 --rfsimulator.serveraddr 192.168.70.151 --log_config.global_log_options level,nocolor,time
+ depends_on:
+ - oai-gnb
+ networks:
+ public_net:
+ ipv4_address: 192.168.70.153
+ volumes:
+ - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
+ healthcheck:
+ test: /bin/bash -c "pgrep nr-uesoftmodem"
+ interval: 10s
+ timeout: 5s
+ retries: 5
+
+volumes:
+ sharedXappLibs:
+
+networks:
+ public_net:
+ name: oai-cn5g-public-net
+ external: true
diff --git a/common/platform_types.h b/common/platform_types.h
index 888a812465..cb3d872804 100644
--- a/common/platform_types.h
+++ b/common/platform_types.h
@@ -193,6 +193,20 @@ typedef struct nsa_msg_t {
uint8_t msg_buffer[MAX_MESSAGE_SIZE];
} nsa_msg_t;
+typedef struct transport_layer_addr_s {
+ /**
+ * Transport Layer Address as a bitstring:
+ * - 32 bits for IPv4 (RFC 791),
+ * - 128 bits for IPv6 (RFC 2460),
+ * - 160 bits for both IPv4 and IPv6, with IPv4 in the first 32 bits.
+ * The S1AP/NGAP layer forwards this address (bitstring<1..160>)
+ * to S1-U/NG-U without interpreting it.
+ */
+ uint8_t length;
+ /// Buffer: address in network byte order
+ uint8_t buffer[20];
+} transport_layer_addr_t;
+
//-----------------------------------------------------------------------------
// GTPV1U TYPES
//-----------------------------------------------------------------------------
diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h
index 94102a858f..1408f271b0 100644
--- a/common/utils/nr/nr_common.h
+++ b/common/utils/nr/nr_common.h
@@ -43,6 +43,7 @@
#define MAX_BWP_SIZE 275
#define NR_MAX_NUM_BWP 4
#define NR_MAX_HARQ_PROCESSES 32
+#define NR_MAX_HARQ_ROUNDS_FOR_STATS 16
#define NR_NB_REG_PER_CCE 6
#define NR_NB_SC_PER_RB 12
#define NR_MAX_NUM_LCID 32
diff --git a/doc/ORAN_FHI7.2_Tutorial.md b/doc/ORAN_FHI7.2_Tutorial.md
index a077778162..d0e66fe68c 100644
--- a/doc/ORAN_FHI7.2_Tutorial.md
+++ b/doc/ORAN_FHI7.2_Tutorial.md
@@ -42,7 +42,10 @@ NICs we have tested so far:
|E810-C |4.20 0x8001784e 22.0.9 |
|Intel XXV710 |6.02 0x80003888 |
-**Note**: With AMD servers/desktop machines with PCIe 5.0 we have only used E810 cards.
+**Note**:
+
+- With AMD servers/desktop machines with PCIe 5.0 we have only used E810 cards.
+- If you are using Mellanox NIC, please be aware that DPDK can't bind the NIC as vfio-pci. Instead it must be bind with mlx driver.
PTP enabled switches and grandmaster clock we have in are lab:
@@ -481,12 +484,15 @@ Contact the RU vendor and get the configuration manual to understand the below c
### Benetel 650
-- **Valid only for version RAN650-1v1.0.4-dda1bf5**
-- TDD pattern `DDDDDDDSUU`, 5ms
+**Valid only for version RAN650-1v1.0.4-dda1bf5**
+
+The OAI configuration file [`gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf) corresponds to:
+- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
-- MTU 9216 (this is the maximum we can configure on our switch)
+- MTU 9600
- 4TX4R
-- The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf) corresponds to below RU configuration.
+
+#### RU configuration
After switching on the radio or rebooting, wait for the radio bring up to complete, which you can follow using `tail -f /tmp/logs/radio_status`. Once you will see `[INFO] Radio bringup complete`, you can configure the RU via editing `/etc/ru_config.cfg`
@@ -506,12 +512,15 @@ dl_ul_tuning_special_slot=0xfd00000
### Benetel 550
+**Valid only for version RAN550-1v1.0.4-605a25a**
-- **Valid only for version RAN550-1v1.0.4-605a25a**
+The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf) corresponds to:
- TDD pattern `DDDDDDDSUU`, 5ms
- Bandwidth 100MHz
+- MTU 9600
- 4TX4R
-- The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf) corresponds to below RU configuration.
+
+#### RU configuration
After switching on the radio or rebooting, wait for the radio bring up to complete, which you can follow using `tail -f /tmp/logs/radio_status`. Once you will see `[INFO] Radio bringup complete`, you can configure the RU via editing `/etc/ru_config.cfg`
@@ -529,48 +538,56 @@ flexran_prach_workaround=disabled
dl_tuning_special_slot=0x13b6
```
-### LiteON
+### LITEON
+**Verson 01.00.08**
+The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
-- Default MTU is 1500
+- MTU 1500 (the above mentioned LITEON version doesn't support jumbo frames)
+
+#### RU configuration
SSH to the unit as user `user`. Write `enable` in the terminal to enter the configuration console; the password should be in the user guide. Use the command `show oru-status` to check the RU status. The output should be similar to:
-
```bash
# show oru-status
Sync State : SYNCHRONIZED
RF State : Ready
DPD : Ready
+DuConnected : notReady
```
-Once the RU is PTP synced, and RF state and DPD are `Ready`, write `configure` in the terminal to set:
+Also, you can use `show running-config` to display the current RU configuration.
+Once the RU is PTP synced, and RF state and DPD are `Ready`, write `configure terminal` to set:
- Center frequency
- Bandwidth
- Compression Bitwidth
- TX/RX attenuation
-To configure 4TX and 4RX antennas, you have to repeat the below steps after every reboot, so don't restart the RU after entering below commands:
-
+After each reboot, the PRACH has to be manually configured.
+To do so, please login to RU as user `root` and run below commands:
```bash
devmem 0x80001014 32 0x00050004
devmem 0x80001018 32 0x00070006
devmem 0x8000201C 32 0x00000001
```
-If you want to set MTU size to 9000 then use the below command:
-
+If you have RU version that supports jumbo frames, please enable it as:
```bash
devmem 0x8000200C 32 0x00000001
```
### VVDN LPRU
+**Version 3.x**
+
+The OAI configuration file [`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
-- MTU 9216 (this is the maximum we can configure on our switch)
-- The OAI configuration file [`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf) corresponds to below RU configuration.
+- MTU 9600
+
+#### RU configuration
Check in the RU user manual how to configure the center frequency. There are multiple ways to do it. We set the center frequency by editing `sysrepocfg` database. You can use `sysrepocfg --edit=vi -d running` to do the same. You can edit the `startup` database to make the center frequency change persistent.
@@ -604,76 +621,140 @@ Execute the below commands on every restart
```bash
xml_parser 4x4-config.xml
## To enable prach compression
-mw.l a0010024 1919
+mw.l a0010024 1919 # format `
## This will show the current configuration
/etc/scripts/lpru_configuration.sh
## Edit the sysrepo to ACTIVATE the carrier when you want to use the RU
+## option 1 - activation by writing directly in register
+mw.l a0050010 3 # e.g. VLAN = 4 => `mw.l a0050010 43`
+## option 2 - activation via sysrepocfg command
sysrepocfg --edit=vi -d running
```
+### Metanoia RU
+
+**Version 2.0.6**
+
+The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf) corresponds to:
+- TDD pattern `DDDSU`, 2.5ms (`DDDDDDDSUU`, 5ms, also supported)
+- Bandwidth 100MHz
+- 4TX4R
+
+The RU configuration is stored in `/etc/rumanager.conf`. The required modifications:
+1. `processing_element/vlan_id`
+2. `processing_element/du_mac_address`
+3. `low_level_tx_endpoint/compression_type` -> `STATIC`
+4. `low_level_rx_endpoint/compression_type` -> `STATIC`
+5. `low_level_rx_endpoint/compression/fs-offset` -> `8`
+6. `center-of-channel-bandwidth` -> `3750000000`
+7. `tx_gain_correction` -> tested with `6020` (please be careful to not fry the RU)
+8. `rx_gain_correction` -> tested with `-903` (please be careful to not fry the RU)
+
+At this stage, RU must be rebooted so the changes apply.
+
## Configure Network Interfaces and DPDK VFs
The 7.2 fronthaul uses the xran library, which requires DPDK. In this step, we
need to configure network interfaces to send data to the RU, and configure DPDK
to bind to the corresponding PCI interfaces. More specifically, in the
following we use [SR-IOV](https://en.wikipedia.org/wiki/Single-root_input/output_virtualization)
-to create multiple virtual functions (VFs) through which Control plane (C
+to create one or multiple virtual functions (VFs) through which Control plane (C
plane) and User plane (U plane) traffic will flow. The following commands are
not persistant, and have to be repeated after reboot.
In the following, we will use these short hands:
-- `physical-interface`: Physical network interface through which you can access the RU
-- `vlan`: VLAN tags as defined in the RU configuration
-- `mtu`: the MTU as specified by the RU vendor, and supported by the NIC
-- `du-c-plane-mac-addr`: DU C plane MAC address
-- `pci-address-c-plane-vf`: PCI bus address of the VF for C plane
-- `du-u-plane-mac-addr`: DU U plane MAC address
-- `pci-address-u-plane-vf`: PCI bus address of the VF for U plane
+- `IF_NAME`: Physical network interface through which you can access the RU
+- `VLAN`: the VLAN tag as recommended by the RU vendor
+- `MTU`: the MTU as specified by the RU vendor, and supported by the NIC
+- `DU_U_PLANE_MAC_ADD`: DU U plane MAC address
+- `U_PLANE_PCI_BUS_ADD`: PCI bus address of the VF for U plane
+- `DU_C_PLANE_MAC_ADD`: DU C plane MAC address
+- `C_PLANE_PCI_BUS_ADD`: PCI bus address of the VF for C plane
In the configuration file, in option `fhi_72.dpdk_devices`, the first PCI address is for U-plane and the second for C-plane.
-For both the MAC addresses, you might use the MAC addresses which are
-pre-configured in the RUs (typically `00:11:22:33:44:66`, but that is not
-always the case). Note that if your system has Intel E-810 NIC cards/ICE
-driver, you have to choose different MAC addresses (valid for above-mentioned
-kernels). If the RU vendor requires untagged traffic, remove the VLAN tagging
+RU might support either one DU MAC address for both CU planes or two different.
+i.e. VVDN Gen3, Metanoia support only one, Benetel550 supports both cases
+
+
+**Note**
+
+- X710 NIC supports the same DU MAC address for multiple VFs
+- E-810 NIC requires different DU MAC addresses for multiple VFs
+
+If the RU vendor requires untagged traffic, remove the VLAN tagging
in the below command and configure VLAN on the switch as "access VLAN". In case
the MTU is different than 1500, you have to update the MTU on the switch
interface as well.
-First, set maximum ring buffers:
+### Set maximum ring buffers:
+
+As a first step, please set up the maximum allowed buffer size to your desired interface. To check the maximum value, please execute the following command:
```bash
-sudo ethtool -g
-sudo ethtool -G rx 4096 # assumes 4096 is max
-sudo ethtool -G tx 4096 # assumes 4096 is max
+sudo ethtool -g $IF_NAME
```
-Set the maximum MTU in the physical interface:
```bash
-sudo ifconfig mtu
+set -x
+IF_NAME=
+MAX_RING_BUFFER_SIZE=
+
+sudo ethtool -G $IF_NAME rx $MAX_RING_BUFFER_SIZE tx $MAX_RING_BUFFER_SIZE
```
-(Re-)create two VFs, load the Linux "Base Driver for Intel Ethernet Adaptive
-Virtual Function" (in case you use Intel ethernet card), and set up the VFs.
+### Set the maximum MTU in the physical interface:
+```bash
+set -x
+IF_NAME=
+MTU=
+
+sudo ip link set $IF_NAME mtu $MTU
+```
+
+### (Re-)create VF(s)
+
+#### one VF
```bash
+set -x
+IF_NAME=
+DU_CU_PLANE_MAC_ADD=
+VLAN=
+MTU=
+
sudo modprobe iavf
-sudo sh -c echo "0" > /sys/class/net//device/sriov_numvfs
-sudo sh -c echo "2" > /sys/class/net//device/sriov_numvfs
-sudo ip link set vf 0 mac vlan mtu spoofchk off
-sudo ip link set vf 1 mac vlan mtu spoofchk off
+sudo sh -c 'echo 0 > /sys/class/net/$IF_NAME/device/sriov_numvfs'
+sudo sh -c 'echo 1 > /sys/class/net/$IF_NAME/device/sriov_numvfs'
+sudo ip link set $IF_NAME vf 0 mac $DU_CU_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set CU planes PCI address
```
-After running the above commands, the kernel created virtual functions that
+#### two VFs
+
+```bash
+set -x
+IF_NAME=
+DU_U_PLANE_MAC_ADD=
+DU_C_PLANE_MAC_ADD= # can be same as for U plane -> depends if the NIC supports the same MAC address
+VLAN=
+MTU=
+
+sudo modprobe iavf
+sudo sh -c 'echo 0 > /sys/class/net/$IF_NAME/device/sriov_numvfs'
+sudo sh -c 'echo 2 > /sys/class/net/$IF_NAME/device/sriov_numvfs'
+sudo ip link set $IF_NAME vf 0 mac $DU_U_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set U plane PCI address
+sudo ip link set $IF_NAME vf 1 mac $DU_C_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set C plane PCI address
+```
+
+After running the above commands, the kernel created VF(s) that
have been assigned a PCI address under the same device and vendor ID. For
instance, use `sudo lshw -c network -businfo` to get a list of PCI addresses
-and interface names, locate the PCI address of ``, then use
+and interface names, locate the PCI address of `$IF_NAME`, then use
`lspci | grep Virtual` to get all virtual interfaces and use the ones with the
same Device/Vendor ID parts (first two numbers).
-Example
+Example with two VFs
The machine in this example has an Intel X710 card. The interface
in question is `eno12409`. Running `lshw` gives:
@@ -706,41 +787,68 @@ The hardware card `31:00.1` has two associated virtual functions `31:06.0` and
`31:06.1`.
+### Bind VF(s)
+
Now, unbind any pre-existing DPDK devices, load the "Virtual Function I/O"
-driver `vfio_pci`, and bind DPDK to these devices:
+driver `vfio_pci` or `mlx5_core`, and bind DPDK to these devices.
-```
-sudo /usr/local/bin/dpdk-devbind.py --unbind
-sudo /usr/local/bin/dpdk-devbind.py --unbind
-sudo modprobe vfio_pci
-sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci
-sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci
+#### Bind one VF
+
+```bash
+set -x
+CU_PLANE_PCI_BUS_ADD=
+DRIVER= # set to `vfio_pci` or `mlx5_core`, depending on your NIC
+
+sudo /usr/local/bin/dpdk-devbind.py --unbind $CU_PLANE_PCI_BUS_ADD
+sudo modprobe $DRIVER
+sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $CU_PLANE_PCI_BUS_ADD
```
-We recommand to put the above commands into a script file to quickly repeat them.
+#### Bind two VFs
+
+```bash
+set -x
+U_PLANE_PCI_BUS_ADD=
+C_PLANE_PCI_BUS_ADD=
+DRIVER= # set to `vfio_pci` or `mlx5_core`, depending on your NIC
+
+sudo /usr/local/bin/dpdk-devbind.py --unbind $U_PLANE_PCI_BUS_ADD
+sudo /usr/local/bin/dpdk-devbind.py --unbind $C_PLANE_PCI_BUS_ADD
+sudo modprobe $DRIVER
+sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $U_PLANE_PCI_BUS_ADD
+sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $C_PLANE_PCI_BUS_ADD
+```
+
+We recommand to put the above four steps into one script file to quickly repeat them.
-Example script for Benetel 550-A/650 with Intel X710 on host
+Example script for Benetel 550-A/650 with Intel X710 on host with two VFs
-```console
+```bash
set -x
+IF_NAME=eno12409
+MAX_RING_BUFFER_SIZE=4096
+MTU=9600
+DU_U_PLANE_MAC_ADD=00:11:22:33:44:66
+DU_C_PLANE_MAC_ADD=00:11:22:33:44:67
+VLAN=3
+U_PLANE_PCI_BUS_ADD=31:06.0
+C_PLANE_PCI_BUS_ADD=31:06.1
+DRIVER=vfio_pci
-sudo ethtool -G eno12409 rx 4096
-sudo ethtool -G eno12409 tx 4096
-sudo ifconfig eno12409 mtu 9216
-
-sudo modprobe -r iavf
+sudo ethtool -G $IF_NAME rx $MAX_RING_BUFFER_SIZE tx $MAX_RING_BUFFER_SIZE
+sudo ip link set $IF_NAME mtu $MTU
sudo modprobe iavf
-sudo sh -c 'echo 0 > /sys/class/net/eno12409/device/sriov_numvfs'
-sudo sh -c 'echo 2 > /sys/class/net/eno12409/device/sriov_numvfs'
-sudo ip link set eno12409 vf 0 mac 00:11:22:33:44:66 vlan 3 qos 0 spoofchk off mtu 9216
-sudo ip link set eno12409 vf 1 mac 00:11:22:33:44:67 vlan 3 qos 0 spoofchk off mtu 9216
-
-sudo /usr/local/bin/dpdk-devbind.py --unbind 31:06.0
-sudo /usr/local/bin/dpdk-devbind.py --unbind 31:06.1
-sudo modprobe vfio-pci
-sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci 31:06.0
-sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci 31:06.1
+sudo sh -c 'echo 0 > /sys/class/net/$IF_NAME/device/sriov_numvfs'
+sudo sh -c 'echo 2 > /sys/class/net/$IF_NAME/device/sriov_numvfs'
+sudo ip link set $IF_NAME vf 0 mac $DU_U_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set U plane PCI address
+sudo ip link set $IF_NAME vf 1 mac $DU_C_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set C plane PCI address
+sleep 1
+sudo /usr/local/bin/dpdk-devbind.py --unbind $U_PLANE_PCI_BUS_ADD
+sudo /usr/local/bin/dpdk-devbind.py --unbind $C_PLANE_PCI_BUS_ADD
+sudo modprobe $DRIVER
+sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $U_PLANE_PCI_BUS_ADD
+sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $C_PLANE_PCI_BUS_ADD
```
@@ -751,9 +859,19 @@ sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci 31:06.1
**Beware in the following section to let in the range of isolated cores the parameters that should be (i.e. `L1s.L1_rx_thread_core`, `L1s.L1_tx_thread_core`, `RUs.ru_thread_core`, `fhi_72.io_core` and `fhi_72.worker_cores`)**
Sample configuration files for OAI gNB, specific to the manufacturer of the radio unit, are available at:
-1. LITE-ON RU: [`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf) (band n78, 273 PRBs, 3.5GHz center freq, 4x4 antenna configuration with 9 bit I/Q samples (compressed) for PUSCH/PDSCH/PRACH, 2-layer DL MIMO, UL SISO)
-2. Benetel 650 RU: [`gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf) (band n78, 273 PRBs, 3.5GHz center freq, 4x2 antenna configuration with 9 bit I/Q samples (compressed) for PUSCH/PDSCH/PRACH, 2-layer DL MIMO, UL SISO)
-3. VVDN RU: [`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf) (band n77, 273 PRBs, 4.0GHz center freq, 4x4 antenna configuration with 9 bit I/Q samples (compressed) for PUSCH/PDSCH/PRACH, 2-layer DL MIMO, UL SISO)
+1. LITEON RU:
+[`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf)
+2. VVDN RU:
+[`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf)
+[`gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf)
+[`gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf)
+3. Benetel 650 RU:
+[`gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf)
+4. Benetel 550 RU:
+[`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf)
+[`gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf)
+5. Metanoia RU:
+[`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf)
Edit the sample OAI gNB configuration file and check following parameters:
@@ -778,16 +896,15 @@ Edit the sample OAI gNB configuration file and check following parameters:
* `fhi_72` (FrontHaul Interface) section: this config follows the structure
that is employed by the xRAN library (`xran_fh_init` and `xran_fh_config`
structs in the code):
- * `dpdk_devices`: PCI addresses of NIC VFs binded to the DPDK (not the physical NIC but the VFs, use `lspci | grep Virtual`)
+ * `dpdk_devices`: PCI addresses of NIC VFs binded to the DPDK (not the physical NIC but the VFs, use `lspci | grep Virtual`) in the format `{VF-U-plane, VF-C-plane}`;
+ if one VF used per RU, U and C planes will share the same VF => depends on the RU capabilities
* `system_core`: absolute CPU core ID for DPDK control threads, it should be an isolated core, in our environment we are using CPU 0
(`rte_mp_handle`, `eal-intr-thread`, `iavf-event-thread`)
* `io_core`: absolute CPU core ID for XRAN library, it should be an isolated core, in our environment we are using CPU 4
* `worker_cores`: array of absolute CPU core IDs for XRAN library, they should be isolated cores, in our environment we are using CPU 2
- * `du_addr`: DU C- and U-plane MAC-addresses (format `UU:VV:WW:XX:YY:ZZ`,
- hexadecimal numbers)
- * `ru_addr`: RU C- and U-plane MAC-addresses (format `UU:VV:WW:XX:YY:ZZ`,
- hexadecimal numbers)
- * `mtu`: Maximum Transmission Unit for the RU, specified by RU vendor
+ * `ru_addr`: RU U- and C-plane MAC-addresses (format `UU:VV:WW:XX:YY:ZZ`, hexadecimal numbers)
+ * `mtu`: Maximum Transmission Unit for the RU, specified by RU vendor; either 1500 or 9600 B (Jumbo Frames); if not set, 1500 is used
+ * `file_prefix` : used to specify a unique prefix for shared memory and files created by multiple DPDK processes; if not set, default value of `wls_0` is used
* `dpdk_mem_size`: the huge page size that should be pre-allocated by DPDK
_for NUMA node 0_; by default, this is 8192 MiB (corresponding to 8 huge
pages à 1024 MiB each, see above). In the current implementation, you
@@ -804,17 +921,19 @@ Edit the sample OAI gNB configuration file and check following parameters:
* `iq_width_prach`: Width of PRACH IQ samples: if 16, no compression, if <16, applies
compression
* `prach_config`: PRACH-specific configuration
- * `eAxC_offset`: PRACH antenna offset
+ * `eAxC_offset`: PRACH antenna offset; if not set, default value of `N = max(Nrx,Ntx)` is used
* `kbar`: the PRACH guard interval, provided in RU
Layer mapping (eAxC offsets) happens as follows:
-- For PUSCH/PDSCH, the layers are mapped to `[0,1,...,N-1]` where `N` is the
+- For PUSCH/PDSCH, the layers are mapped to `[0,1,...,Nrx-1]/[0,1,...,Ntx-1]` where `Nrx/Ntx` is the
respective RX/TX number of antennas.
-- For PRACH, the layers are mapped to `[No,No+1,...No+N-1]` where No is the
- `fhi_72.fh_config.[0].prach_config.eAxC_offset` and `N` the number of receive
- antennas.
+- For PRACH, the layers are mapped to `[No,No+1,...No+Nrx-1]` where `No` is the
+ `fhi_72.fh_config.[0].prach_config.eAxC_offset`. Please be aware that the following equation must be fullfilled: `No >= max(Nrx,Ntx)`.
-xRAN SRS reception is not supported.
+**Note**
+
+- At the moment, OAI is compatible with CAT A O-RU only. Therefore, SRS is not supported.
+- XRAN retreives DU MAC address with `rte_eth_macaddr_get()` function. Hence, `fhi_72.du_addr` parameter is not taken into account.
# Start and Operation of OAI gNB
@@ -920,7 +1039,7 @@ Some caveats:
For two RUs each using a 4x4 configuration, make sure to configure the 8x8
configuration, i.e., set `nb_tx` and `nb_rx` under `RUs` to 8 each (NOT two
-RUs!). Also, set the antenna port information as listed above, i.e.,
+`RUs`!). Also, set the antenna port information as listed above, i.e.,
```
pdsch_AntennaPorts_XP = 2;
@@ -934,11 +1053,10 @@ Next, configure the `fhi_72` section as indicated below:
```
fhi_72 = {
- dpdk_devices = ("ru1_up_vf_pci", "ru1_cp_vf_pci", "ru2_up_vf_pci", "ru2_cp_vf_pci");
+ dpdk_devices = ("ru1_up_vf_pci", "ru1_cp_vf_pci", "ru2_up_vf_pci", "ru2_cp_vf_pci"); # two VFs can be used as well
// core config as always
- du_addr = ("du_ru1_up_mac_addr", "du_ru1_cp_mac_addr", "du_ru2_up_mac_addr", "du_ru2_cp_mac_addr");
- ru_addr = ("ru1_up_mac_addr", "ru1_cp_mac_addr", "ru2_up_mac_addr", "ru2_cp_mac_addr");
- // mtu, file_prefix ...
+ ru_addr = ("ru1_up_mac_addr", "ru1_cp_mac_addr", "ru2_up_mac_addr", "ru2_cp_mac_addr"); # if two VFs, set two RU MAC addresses (one per RU)
+ // mtu
fh_config = (
{
// timing, ru_config, prach_config of RU1
@@ -950,12 +1068,12 @@ fhi_72 = {
};
```
-i.e., for `dpdk_devices`, `du_addr`, and `ru_addr` is configured for
+i.e., for `dpdk_devices`, and `ru_addr` is configured for
both RUs in a (flat) array, and the individual radio configuration is given for
each RU individually inside the `fh_config`.
-Sample FHI 7.2 configuration for two RUs (Benetel 550 and 650)
+Sample FHI 7.2 configuration for two RUs (2 x Benetel 650)
```
fhi_72 = {
@@ -963,12 +1081,10 @@ fhi_72 = {
system_core = 0;
io_core = 1;
worker_cores = (2);
- du_addr = ("00:11:22:33:44:66","00:11:22:33:44:67","00:11:22:33:44:66","00:11:22:33:44:67");
- ru_addr = ("70:b3:d5:e1:5b:ff","70:b3:d5:e1:5b:ff","70:b3:d5:e1:5b:81", "70:b3:d5:e1:5b:81");
- mtu = 9216;
- file_prefix = "fhi_72";
+ ru_addr = ("8c:1f:64:d1:10:46","8c:1f:64:d1:10:46","8c:1f:64:d1:10:43","8c:1f:64:d1:10:43")
+ mtu = 9600;
fh_config = (
-# RAN650
+# RAN650 #1
{
Tadv_cp_dl = 125;
T2a_cp_dl = (259, 500);
@@ -983,11 +1099,8 @@ fhi_72 = {
iq_width = 9;
iq_width_prach = 9;
};
- prach_config = {
- eAxC_offset = 4;
- };
},
-# RAN550
+# RAN650 #2
{
Tadv_cp_dl = 125;
T2a_cp_dl = (259, 500);
@@ -1002,38 +1115,35 @@ fhi_72 = {
iq_width = 9;
iq_width_prach = 9;
};
- prach_config = {
- eAxC_offset = 4;
- };
});
```
Compare also with the example (DU) configuration in
-[`gnb-du.sa.band78.106prb.fhi72.8x8-benetel-650-550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.fhi72.8x8-benetel-650-550.conf).
+[`gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf).
Afterwards, start the gNB with the modified configuration file. If everything
went well, you should see the RU counters for both RUs go up:
```
-[NR_PHY] [o-du 0][rx 614400 pps 61440 kbps 844953][tx 1275076 pps 127488 kbps 1998585][Total Msgs_Rcvd 614400]
-[NR_PHY] [o_du0][pusch0 107520 prach0 46080]
-[NR_PHY] [o_du0][pusch1 107520 prach1 46080]
-[NR_PHY] [o_du0][pusch2 107520 prach2 46080]
-[NR_PHY] [o_du0][pusch3 107520 prach3 46080]
-[NR_PHY] [o-du 1][rx 614400 pps 61440 kbps 844953][tx 1275076 pps 127488 kbps 1998585][Total Msgs_Rcvd 614400]
-[NR_PHY] [o_du1][pusch0 107520 prach0 46080]
-[NR_PHY] [o_du1][pusch1 107520 prach1 46080]
-[NR_PHY] [o_du1][pusch2 107520 prach2 46080]
-[NR_PHY] [o_du1][pusch3 107520 prach3 46080]
+[NR_PHY] [o-du 0][rx 63488 pps 63264 kbps 2759808][tx 127684 pps 127116 kbps 4717971][Total Msgs_Rcvd 63488]
+[NR_PHY] [o_du0][pusch0 14336 prach0 1536]
+[NR_PHY] [o_du0][pusch1 14336 prach1 1536]
+[NR_PHY] [o_du0][pusch2 14336 prach2 1536]
+[NR_PHY] [o_du0][pusch3 14336 prach3 1536]
+[NR_PHY] [o-du 1][rx 63544 pps 63320 kbps 2763240][tx 127684 pps 127116 kbps 4717971][Total Msgs_Rcvd 63544]
+[NR_PHY] [o_du1][pusch0 14350 prach0 1536]
+[NR_PHY] [o_du1][pusch1 14350 prach1 1536]
+[NR_PHY] [o_du1][pusch2 14350 prach2 1536]
+[NR_PHY] [o_du1][pusch3 14350 prach3 1536]
```
You can also verify that there is signal on all RX antennas like so:
```bash
$ cat nrL1_stats.log
[...]
-max_IO = 66 (81), min_I0 = 0 (53), avg_I0 = 51 dB(46.48.45.46.51.56.55.45.)
-PRACH I0 = 38.0 dB
+max_IO = 55 (85), min_I0 = 0 (136), avg_I0 = 44 dB(43.44.43.45.44.43.43.45.)
+PRACH I0 = 30.6 dB
```
Note the eight entries after `avg_IO`.
@@ -1049,7 +1159,7 @@ Your email should contain below information:
- A clear subject in your email.
- For all the queries there should be [Query\] in the subject of the email and for problems there should be [Problem\].
- In case of a problem, add a small description.
-- Do not share any photos unless you want to share a diagram.
+- Do not share any screenshots/photos unless you want to share a diagram.
- OAI gNB/DU/CU/CU-CP/CU-UP configuration file in `.conf` format only.
- Logs of OAI gNB/DU/CU/CU-CP/CU-UP in `.log` or `.txt` format only.
- RU Vendor and Version.
diff --git a/doc/TESTBenches.md b/doc/TESTBenches.md
index c41657538f..57606548e7 100644
--- a/doc/TESTBenches.md
+++ b/doc/TESTBenches.md
@@ -128,6 +128,9 @@ information on how the images are built.
- [OAI-CN5G-COTS-UE-Test](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-COTS-UE-Test/)
~5G-NR
- using 5GC bench (resources `CI-Cetautomatix-OC-oaicicd-session`, `CI-Dogmatix-CN5G-gNB`): Attach/Detach of UE with multiple PDU sessions
+- [OAI-FLEXRIC-RAN-Integration-Test](https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/) ~5G-NR
+ - selfix (gNB, nrUE, OAI 5GC, FlexRIC)
+ - uses RFsimulator, tests FlexRIC/E2 interface and xApps
- [RAN-gNB-N300-Timing-Phytest-LDPC](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-gNB-N300-Timing-Phytest-LDPC/)
~5G-NR
- caracal + N310
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index e449e6c33e..48011f8d17 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -21,66 +21,13 @@
#define _GNU_SOURCE /* See feature_test_macros(7) */
-#include
-
-#include "T.h"
-
-#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
-#include
-#include "common/oai_version.h"
-
-#include "PHY/types.h"
-#include "common/ran_context.h"
-
-#include "PHY/defs_gNB.h"
-#include "PHY/defs_common.h"
#include "common/config/config_userapi.h"
-#include "common/utils/load_module_shlib.h"
-#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
-//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
-
-#include "radio/COMMON/common_lib.h"
-#include "radio/ETHERNET/if_defs.h"
-
-//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
-
-#include "PHY/phy_vars.h"
#include "RRC/LTE/rrc_vars.h"
-#include "PHY_INTERFACE/phy_interface_vars.h"
-#include "gnb_config.h"
-#include "SIMULATION/TOOLS/sim.h"
-
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
unsigned short config_frames[4] = {2,9,11,13};
#endif
-
-#include "common/utils/LOG/log.h"
-#include "common/utils/LOG/vcd_signal_dumper.h"
-#include "UTIL/OPT/opt.h"
-#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
-
-#include "intertask_interface.h"
-
-#include "PHY/INIT/nr_phy_init.h"
-
-#include "system.h"
-#include
-#include "PHY/TOOLS/phy_scope_interface.h"
-#include "PHY/TOOLS/nr_phy_scope.h"
-#include "nr-softmodem.h"
-#include "executables/softmodem-common.h"
-#include "executables/thread-common.h"
-#include "NB_IoT_interface.h"
-#include "x2ap_eNB.h"
-#include "ngap_gNB.h"
-#include "gnb_paramdef.h"
-#include
-#include "nfapi/oai_integration/vendor_ext.h"
-#include "gnb_config.h"
-#include "openair2/E1AP/e1ap_common.h"
-#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#ifdef ENABLE_AERIAL
#include "nfapi/oai_integration/aerial/fapi_nvIPC.h"
#endif
@@ -88,6 +35,58 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "openair2/E2AP/flexric/src/agent/e2_agent_api.h"
#include "openair2/E2AP/RAN_FUNCTION/init_ran_func.h"
#endif
+#include "nr-softmodem.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
+#include "NR_MAC_COMMON/nr_mac_extern.h"
+#include "NR_PHY_INTERFACE/NR_IF_Module.h"
+#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
+#include "PHY/INIT/nr_phy_init.h"
+#include "PHY/TOOLS/phy_scope_interface.h"
+#include "PHY/defs_common.h"
+#include "PHY/defs_gNB.h"
+#include "PHY/defs_nr_common.h"
+#include "PHY/phy_vars.h"
+#include "RRC/NR/nr_rrc_defs.h"
+#include "RRC/NR/nr_rrc_proto.h"
+#include "RRC_nr_paramsvalues.h"
+#include "SIMULATION/TOOLS/sim.h"
+#include "T.h"
+#include "UTIL/OPT/opt.h"
+#include "common/config/config_userapi.h"
+#include "common/ngran_types.h"
+#include "common/oai_version.h"
+#include "common/ran_context.h"
+#include "common/utils/LOG/log.h"
+#include "e1ap_messages_types.h"
+#include "executables/softmodem-common.h"
+#include "gnb_config.h"
+#include "gnb_paramdef.h"
+#include "intertask_interface.h"
+#include "nfapi/oai_integration/vendor_ext.h"
+#include "nfapi_interface.h"
+#include "nfapi_nr_interface_scf.h"
+#include "ngap_gNB.h"
+#include "nr-softmodem-common.h"
+#include "openair2/E1AP/e1ap_common.h"
+#include "pdcp.h"
+#include "radio/COMMON/common_lib.h"
+#include "s1ap_eNB.h"
+#include "sctp_eNB_task.h"
+#include "softmodem-bits.h"
+#include "system.h"
+#include "time_meas.h"
+#include "utils.h"
+#include "x2ap_eNB.h"
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
@@ -424,7 +423,6 @@ void init_pdcp(void) {
}
#ifdef E2_AGENT
-#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h" // need to get info from MAC
static void initialize_agent(ngran_node_t node_type, e2_agent_args_t oai_args)
{
AssertFatal(oai_args.sm_dir != NULL , "Please, specify the directory where the SMs are located in the config file, i.e., add in config file the next line: e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\");} ");
diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index d6c3086317..a7661b0c06 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -594,7 +594,11 @@ void processSlotTX(void *arg)
RU_write(rxtxD, sl_tx_action);
}
-static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc, int *tx_wait_for_dlsch, nr_phy_data_t *phy_data)
+static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE,
+ const UE_nr_rxtx_proc_t *proc,
+ int *tx_wait_for_dlsch,
+ nr_phy_data_t *phy_data,
+ bool *stats_printed)
{
int sampleShift = INT_MAX;
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
@@ -602,7 +606,6 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
if (IS_SOFTMODEM_NOS1 || IS_SA_MODE(get_softmodem_params())) {
-
// Start synchronization with a target gNB
if (UE->synch_request.received_synch_request == 1) {
fapi_nr_synch_request_t *synch_req = &UE->synch_request.synch_req;
@@ -655,6 +658,16 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc
const int ack_nack_slot = (proc->nr_slot_rx + phy_data->dlsch[0].dlsch_config.k1_feedback) % UE->frame_parms.slots_per_frame;
tx_wait_for_dlsch[ack_nack_slot]++;
}
+ } else {
+ // good time to print statistics, we don't have to spend time to decode DCI
+ if (proc->frame_rx % 128 == 0) {
+ if (*stats_printed == false) {
+ print_ue_mac_stats(UE->Mod_id, proc->frame_rx, proc->nr_slot_rx);
+ *stats_printed = true;
+ }
+ } else {
+ *stats_printed = false;
+ }
}
if (UE->sl_mode == 2) {
@@ -833,6 +846,7 @@ void *UE_thread(void *arg)
int shiftForNextFrame = 0;
int intialSyncOffset = 0;
openair0_timestamp sync_timestamp;
+ bool stats_printed = false;
if (get_softmodem_params()->sync_ref && UE->sl_mode == 2) {
UE->is_synchronized = 1;
@@ -1029,7 +1043,7 @@ void *UE_thread(void *arg)
notifiedFIFO_elt_t *newRx = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), curMsg.proc.nr_slot_rx, NULL, UE_dl_processing);
nr_rxtx_thread_data_t *curMsgRx = (nr_rxtx_thread_data_t *)NotifiedFifoData(newRx);
*curMsgRx = (nr_rxtx_thread_data_t){.proc = curMsg.proc, .UE = UE};
- int ret = UE_dl_preprocessing(UE, &curMsgRx->proc, tx_wait_for_dlsch, &curMsgRx->phy_data);
+ int ret = UE_dl_preprocessing(UE, &curMsgRx->proc, tx_wait_for_dlsch, &curMsgRx->phy_data, &stats_printed);
if (ret != INT_MAX)
shiftForNextFrame = ret;
pushTpool(&(get_nrUE_params()->Tpool), newRx);
diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c
index fbd10c5c04..8a9f0c626f 100644
--- a/executables/nr-uesoftmodem.c
+++ b/executables/nr-uesoftmodem.c
@@ -87,6 +87,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "nr_nas_msg.h"
#include
#include "openair2/GNB_APP/gnb_paramdef.h"
+#include "pdcp.h"
extern const char *duplex_mode[];
THREAD_STRUCT thread_struct;
diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c
index a240f3ecde..677401ae47 100644
--- a/openair1/PHY/INIT/nr_init_ue.c
+++ b/openair1/PHY/INIT/nr_init_ue.c
@@ -467,10 +467,10 @@ void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCE
void init_nr_ue_transport(PHY_VARS_NR_UE *ue) {
nr_init_dl_harq_processes(ue->dl_harq_processes, NR_MAX_DLSCH_HARQ_PROCESSES, ue->frame_parms.N_RB_DL);
- nr_init_ul_harq_processes(ue->ul_harq_processes, NR_MAX_ULSCH_HARQ_PROCESSES, ue->frame_parms.N_RB_UL, ue->frame_parms.nb_antennas_tx);
-
- for(int i=0; i<5; i++)
- ue->dl_stats[i] = 0;
+ nr_init_ul_harq_processes(ue->ul_harq_processes,
+ NR_MAX_ULSCH_HARQ_PROCESSES,
+ ue->frame_parms.N_RB_UL,
+ ue->frame_parms.nb_antennas_tx);
}
void clean_UE_harq(PHY_VARS_NR_UE *UE)
diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
index b8b44eceb6..acdd291343 100644
--- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
@@ -19,7 +19,6 @@
* contact@openairinterface.org
*/
-
#include
#include "nr_ul_estimation.h"
@@ -35,13 +34,12 @@
#include "executables/softmodem-common.h"
#include "nr_phy_common.h"
-
//#define DEBUG_CH
//#define DEBUG_PUSCH
//#define SRS_DEBUG
#define NO_INTERP 1
-#define dBc(x,y) (dB_fixed(((int32_t)(x))*(x) + ((int32_t)(y))*(y)))
+#define dBc(x, y) (dB_fixed(((int32_t)(x)) * (x) + ((int32_t)(y)) * (y)))
__attribute__((always_inline)) inline c16_t c32x16cumulVectVectWithSteps(c16_t *in1,
int *offset1,
@@ -50,130 +48,81 @@ __attribute__((always_inline)) inline c16_t c32x16cumulVectVectWithSteps(c16_t *
int *offset2,
const int step2,
const int modulo2,
- const int N) {
-
- int localOffset1=*offset1;
- int localOffset2=*offset2;
- c32_t cumul={0};
- for (int i=0; ichest_freq;
+ puschAntennaProc_t *rdata = (puschAntennaProc_t *)arg;
+ unsigned char Ns = rdata->Ns;
+ int nl = rdata->nl;
+ unsigned short p = rdata->p;
+ unsigned char symbol = rdata->symbol;
+ int aarx = rdata->aarx;
+ int numAntennas = rdata->numAntennas;
+ unsigned short bwp_start_subcarrier = rdata->bwp_start_subcarrier;
+ nfapi_nr_pusch_pdu_t *pusch_pdu = rdata->pusch_pdu;
+ int *max_ch = rdata->max_ch;
+ c16_t *pilot = rdata->pilot;
+ uint64_t noise_amp2 = *(rdata->noise_amp2);
+ int nest_count = *(rdata->nest_count);
+ delay_t *delay = rdata->delay;
-#ifdef DEBUG_CH
- FILE *debug_ch_est;
- debug_ch_est = fopen("debug_ch_est.txt","w");
-#endif
- NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[ul_id];
+ const int chest_freq = rdata->chest_freq;
+ NR_gNB_PUSCH *pusch_vars = rdata->pusch_vars;
c16_t **ul_ch_estimates = (c16_t **)pusch_vars->ul_ch_estimates;
- const int symbolSize = gNB->frame_parms.ofdm_symbol_size;
- const int slot_offset = (Ns & 3) * gNB->frame_parms.symbols_per_slot * symbolSize;
+ NR_DL_FRAME_PARMS *frame_parms = rdata->frame_parms;
+ const int symbolSize = frame_parms->ofdm_symbol_size;
+ const int slot_offset = (Ns & 3) * frame_parms->symbols_per_slot * symbolSize;
const int delta = get_delta(p, pusch_pdu->dmrs_config_type);
const int symbol_offset = symbolSize * symbol;
const int k0 = bwp_start_subcarrier;
const int nb_rb_pusch = pusch_pdu->rb_size;
-
- LOG_D(PHY, "symbol_offset %d, slot_offset %d, OFDM size %d, Ns = %d, k0 = %d, symbol %d\n",
- symbol_offset,
- slot_offset,
- symbolSize,
- Ns,
- k0,
- symbol);
-
- //------------------generate DMRS------------------//
-
- if (pusch_pdu->transform_precoding == transformPrecoder_disabled) {
- // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS
- NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
- const uint32_t *gold = nr_gold_pusch(fp->N_RB_UL,
- fp->symbols_per_slot,
- gNB->gNB_config.cell_config.phy_cell_id.value,
- pusch_pdu->scid,
- Ns,
- symbol);
- nr_pusch_dmrs_rx(gNB,
- Ns,
- gold,
- pilot,
- (1000 + p),
- 0,
- nb_rb_pusch,
- (pusch_pdu->bwp_start + pusch_pdu->rb_start) * NR_NB_SC_PER_RB,
- pusch_pdu->dmrs_config_type);
- } else { // if transform precoding or SC-FDMA is enabled in Uplink
- // NR_SC_FDMA supports type1 DMRS so only 6 DMRS REs per RB possible
- const int index = get_index_for_dmrs_lowpapr_seq(nb_rb_pusch * (NR_NB_SC_PER_RB / 2));
- const uint8_t u = pusch_pdu->dfts_ofdm.low_papr_group_number;
- const uint8_t v = pusch_pdu->dfts_ofdm.low_papr_sequence_number;
- c16_t *dmrs_seq = gNB_dmrs_lowpaprtype1_sequence[u][v][index];
- LOG_D(PHY,"Transform Precoding params. u: %d, v: %d, index for dmrsseq: %d\n", u, v, index);
- AssertFatal(index >= 0, "Num RBs not configured according to 3GPP 38.211 section 6.3.1.4. For PUSCH with transform precoding, num RBs cannot be multiple of any other primenumber other than 2,3,5\n");
- AssertFatal(dmrs_seq != NULL, "DMRS low PAPR seq not found, check if DMRS sequences are generated");
- nr_pusch_lowpaprtype1_dmrs_rx(gNB, Ns, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
-#ifdef DEBUG_PUSCH
- printf ("NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v);
- LOG_M("gNb_DMRS_SEQ.m","gNb_DMRS_SEQ", dmrs_seq,6*nb_rb_pusch,1,1);
-#endif
- }
- //------------------------------------------------//
-
-#ifdef DEBUG_PUSCH
-
- for (int i = 0; i < (6 * nb_rb_pusch); i++) {
- LOG_I(PHY, "In %s: %d + j*(%d)\n", __FUNCTION__, pilot[i].r,pilot[i].i);
- }
-
-#endif
-
- int nest_count = 0;
- uint64_t noise_amp2 = 0;
- c16_t ul_ls_est[symbolSize] __attribute__((aligned(32)));
- memset(ul_ls_est, 0, sizeof(c16_t) * symbolSize);
- delay_t *delay = &gNB->ulsch[ul_id].delay;
- memset(delay, 0, sizeof(*delay));
-
- for (int aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) {
- c16_t *rxdataF = (c16_t *)&gNB->common_vars.rxdataF[beam_nb][aarx][symbol_offset + slot_offset];
- c16_t *ul_ch = &ul_ch_estimates[nl * gNB->frame_parms.nb_antennas_rx + aarx][symbol_offset];
-
+ const int beam_nb = rdata->beam_nb;
+ for (int antenna = aarx; antenna < aarx + numAntennas; antenna++) {
+ c16_t ul_ls_est[symbolSize] __attribute__((aligned(32)));
+ memset(ul_ls_est, 0, sizeof(c16_t) * symbolSize);
+ c16_t *rxdataF = (c16_t *)&rdata->rxdataF[beam_nb][antenna][symbol_offset + slot_offset];
+ c16_t *ul_ch = &ul_ch_estimates[nl * frame_parms->nb_antennas_rx + antenna][symbol_offset];
memset(ul_ch, 0, sizeof(*ul_ch) * symbolSize);
+
+ LOG_D(PHY,
+ "symbol_offset %d, slot_offset %d, OFDM size %d, Ns = %d, k0 = %d, symbol %d\n",
+ symbol_offset,
+ slot_offset,
+ symbolSize,
+ Ns,
+ k0,
+ symbol);
+
#ifdef DEBUG_PUSCH
LOG_I(PHY, "symbol_offset %d, delta %d\n", symbol_offset, delta);
- LOG_I(PHY, "ch est pilot, N_RB_UL %d\n", gNB->frame_parms.N_RB_UL);
+ LOG_I(PHY, "ch est pilot, N_RB_UL %d\n", frame_parms->N_RB_UL);
LOG_I(PHY,
"bwp_start_subcarrier %d, k0 %d, first_carrier %d, nb_rb_pusch %d\n",
bwp_start_subcarrier,
k0,
- gNB->frame_parms.first_carrier_offset,
+ frame_parms->first_carrier_offset,
nb_rb_pusch);
LOG_I(PHY, "ul_ch addr %p \n", ul_ch);
#endif
if (pusch_pdu->dmrs_config_type == pusch_dmrs_type1 && chest_freq == 0) {
- c16_t *pil = pilot;
+ c16_t *pil = pilot;
int re_offset = k0;
- LOG_D(PHY,"PUSCH estimation DMRS type 1, Freq-domain interpolation");
+ LOG_D(PHY, "PUSCH estimation DMRS type 1, Freq-domain interpolation");
int pilot_cnt = 0;
for (int n = 0; n < 3 * nb_rb_pusch; n++) {
@@ -187,27 +136,25 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
}
c16_t ch16 = {.r = (int16_t)ch.r, .i = (int16_t)ch.i};
- *max_ch = max(*max_ch, max(abs(ch.r), abs(ch.i)));
+ *max_ch = max(abs(ch.r), abs(ch.i));
for (int k = pilot_cnt << 1; k < (pilot_cnt << 1) + 4; k++) {
ul_ls_est[k] = ch16;
}
pilot_cnt += 2;
}
- nr_est_delay(gNB->frame_parms.ofdm_symbol_size, ul_ls_est, (c16_t *)pusch_vars->ul_ch_estimates_time[aarx], delay);
+ nr_est_delay(frame_parms->ofdm_symbol_size, ul_ls_est, (c16_t *)pusch_vars->ul_ch_estimates_time[antenna], delay);
int delay_idx = get_delay_idx(delay->est_delay, MAX_DELAY_COMP);
- c16_t *ul_delay_table = gNB->frame_parms.delay_table[delay_idx];
+ c16_t *ul_delay_table = frame_parms->delay_table[delay_idx];
#ifdef DEBUG_PUSCH
printf("Estimated delay = %i\n", delay->est_delay >> 1);
#endif
pilot_cnt = 0;
- for (int n = 0; n < 3*nb_rb_pusch; n++) {
-
+ for (int n = 0; n < 3 * nb_rb_pusch; n++) {
// Channel interpolation
for (int k_line = 0; k_line <= 1; k_line++) {
-
// Apply delay
int k = pilot_cnt << 1;
c16_t ch16 = c16mulShift(ul_ls_est[k], ul_delay_table[k], 8);
@@ -216,7 +163,13 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
re_offset = (k0 + (n << 2) + (k_line << 1)) % symbolSize;
c16_t *rxF = &rxdataF[re_offset];
printf("pilot %4d: pil -> (%6d,%6d), rxF -> (%4d,%4d), ch -> (%4d,%4d)\n",
- pilot_cnt, pil->r, pil->i, rxF->r, rxF->i, ch16.r, ch16.i);
+ pilot_cnt,
+ pil->r,
+ pil->i,
+ rxF->r,
+ rxF->i,
+ ch.r,
+ ch.i);
#endif
if (pilot_cnt == 0) {
@@ -238,9 +191,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
// Revert delay
pilot_cnt = 0;
- ul_ch = &ul_ch_estimates[nl * gNB->frame_parms.nb_antennas_rx + aarx][symbol_offset];
+ ul_ch = &ul_ch_estimates[nl * frame_parms->nb_antennas_rx + antenna][symbol_offset];
int inv_delay_idx = get_delay_idx(-delay->est_delay, MAX_DELAY_COMP);
- c16_t *ul_inv_delay_table = gNB->frame_parms.delay_table[inv_delay_idx];
+ c16_t *ul_inv_delay_table = frame_parms->delay_table[inv_delay_idx];
for (int n = 0; n < 3 * nb_rb_pusch; n++) {
for (int k_line = 0; k_line <= 1; k_line++) {
int k = pilot_cnt << 1;
@@ -258,7 +211,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
}
}
- } else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type2 && chest_freq == 0) { // pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
+ } else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type2
+ && chest_freq == 0) { // pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
LOG_D(PHY, "PUSCH estimation DMRS type 2, Freq-domain interpolation\n");
c16_t *pil = pilot;
c16_t *rx = &rxdataF[delta];
@@ -268,26 +222,27 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
c16_t ch1 = c16mulShift(*pil, rx[(k0 + n + 1) % symbolSize], 15);
pil++;
c16_t ch = c16addShift(ch0, ch1, 1);
- *max_ch = max(*max_ch, max(abs(ch.r), abs(ch.i)));
+ *max_ch = max(abs(ch.r), abs(ch.i));
multadd_real_four_symbols_vector_complex_scalar(filt8_rep4, &ch, &ul_ls_est[n]);
ul_ls_est[n + 4] = ch;
ul_ls_est[n + 5] = ch;
noise_amp2 += c16amp2(c16sub(ch0, ch));
- nest_count++;
+ nest_count += 1;
}
// Delay compensation
- nr_est_delay(gNB->frame_parms.ofdm_symbol_size, ul_ls_est, (c16_t *)pusch_vars->ul_ch_estimates_time[aarx], delay);
+ nr_est_delay(frame_parms->ofdm_symbol_size, ul_ls_est, (c16_t *)pusch_vars->ul_ch_estimates_time[antenna], delay);
int delay_idx = get_delay_idx(-delay->est_delay, MAX_DELAY_COMP);
- c16_t *ul_delay_table = gNB->frame_parms.delay_table[delay_idx];
+ c16_t *ul_delay_table = frame_parms->delay_table[delay_idx];
for (int n = 0; n < nb_rb_pusch * NR_NB_SC_PER_RB; n++) {
ul_ch[n] = c16mulShift(ul_ls_est[n], ul_delay_table[n % 6], 8);
}
}
- // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 6 DMRS REs and use a common value for the whole PRB
+ // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 6 DMRS REs and use a
+ // common value for the whole PRB
else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type1) {
- LOG_D(PHY,"PUSCH estimation DMRS type 1, no Freq-domain interpolation\n");
+ LOG_D(PHY, "PUSCH estimation DMRS type 1, no Freq-domain interpolation\n");
c16_t *rxF = &rxdataF[delta];
int pil_offset = 0;
int re_offset = k0;
@@ -297,8 +252,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch = c32x16cumulVectVectWithSteps(pilot, &pil_offset, 1, rxF, &re_offset, 2, symbolSize, 6);
#if NO_INTERP
- for (c16_t *end=ul_ch+12; ul_ch>15; // 1/12*16384
- ul_ch[3].i += (ch.i * 1365)>>15; // 1/12*16384
+ ul_ch[3].r += (ch.r * 1365) >> 15; // 1/12*16384
+ ul_ch[3].i += (ch.i * 1365) >> 15; // 1/12*16384
ul_ch += 4;
c16multaddVectRealComplex(filt8_avlip3, &ch, ul_ch, 8);
@@ -329,26 +284,27 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
#endif
}
// Last PRB
- ch=c32x16cumulVectVectWithSteps(pilot, &pil_offset, 1, rxF, &re_offset, 2, symbolSize, 6);
+ ch = c32x16cumulVectVectWithSteps(pilot, &pil_offset, 1, rxF, &re_offset, 2, symbolSize, 6);
#if NO_INTERP
- for (c16_t *end=ul_ch+12; ul_ch>15; // 1/12*16384
- ul_ch[3].i += (ch.i * 1365)>>15; // 1/12*16384
+ ul_ch[3].r += (ch.r * 1365) >> 15; // 1/12*16384
+ ul_ch[3].i += (ch.i * 1365) >> 15; // 1/12*16384
ul_ch += 4;
c16multaddVectRealComplex(filt8_avlip3, &ch, ul_ch, 8);
ul_ch += 8;
c16multaddVectRealComplex(filt8_avlip6, &ch, ul_ch, 8);
#endif
- } else { // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 4 DMRS REs and use a common value for the whole PRB
- LOG_D(PHY,"PUSCH estimation DMRS type 2, no Freq-domain interpolation");
+ } else { // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 4 DMRS REs
+ // and use a common value for the whole PRB
+ LOG_D(PHY, "PUSCH estimation DMRS type 2, no Freq-domain interpolation");
c16_t *pil = pilot;
int re_offset = (k0 + delta) % symbolSize;
c32_t ch0 = {0};
- //First PRB
+ // First PRB
ch0 = c32x16mulShift(*pil, rxdataF[re_offset], 15);
pil++;
re_offset = (re_offset + 1) % symbolSize;
@@ -361,10 +317,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
pil++;
re_offset = (re_offset + 5) % symbolSize;
- c16_t ch=c16x32div(ch0, 4);
+ c16_t ch = c16x32div(ch0, 4);
#if NO_INTERP
- for (c16_t *end=ul_ch+12; ul_chframe_parms.nb_antennas_rx + aarx][symbol_offset];
for (int idxP = 0; idxP < ceil((float)nb_rb_pusch * 12 / 8); idxP++) {
for (int idxI = 0; idxI < 8; idxI++) {
- printf("%d\t%d\t", ul_ch[idxP * 8 + idxI].r, ul_ch[idxP * 8 + idxI].i);
+ printf("%d\t%d\t", ul_ch[idxP * 8 + idxI].r, ul_ch[idxP * 8 + idxI].i);
}
printf("%d\n", idxP);
}
#endif
+ // update the values inside the arrays
+ *(rdata->noise_amp2) = noise_amp2;
+ *(rdata->nest_count) = nest_count;
+ }
+}
+
+int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
+ unsigned char Ns,
+ int nl,
+ unsigned short p,
+ unsigned char symbol,
+ int ul_id,
+ int beam_nb,
+ unsigned short bwp_start_subcarrier,
+ nfapi_nr_pusch_pdu_t *pusch_pdu,
+ int *max_ch,
+ uint32_t *nvar)
+{
+ c16_t pilot[3280] __attribute__((aligned(32)));
+
+#ifdef DEBUG_CH
+ FILE *debug_ch_est;
+ debug_ch_est = fopen("debug_ch_est.txt", "w");
+#endif
+
+ const int nb_rb_pusch = pusch_pdu->rb_size;
+
+ //------------------generate DMRS------------------//
+
+ if (pusch_pdu->transform_precoding == transformPrecoder_disabled) {
+ // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS
+ NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
+ const uint32_t *gold = nr_gold_pusch(fp->N_RB_UL,
+ fp->symbols_per_slot,
+ gNB->gNB_config.cell_config.phy_cell_id.value,
+ pusch_pdu->scid,
+ Ns,
+ symbol);
+ nr_pusch_dmrs_rx(gNB,
+ Ns,
+ gold,
+ pilot,
+ (1000 + p),
+ 0,
+ nb_rb_pusch,
+ (pusch_pdu->bwp_start + pusch_pdu->rb_start) * NR_NB_SC_PER_RB,
+ pusch_pdu->dmrs_config_type);
+ } else { // if transform precoding or SC-FDMA is enabled in Uplink
+ // NR_SC_FDMA supports type1 DMRS so only 6 DMRS REs per RB possible
+ const int index = get_index_for_dmrs_lowpapr_seq(nb_rb_pusch * (NR_NB_SC_PER_RB / 2));
+ const uint8_t u = pusch_pdu->dfts_ofdm.low_papr_group_number;
+ const uint8_t v = pusch_pdu->dfts_ofdm.low_papr_sequence_number;
+ c16_t *dmrs_seq = gNB_dmrs_lowpaprtype1_sequence[u][v][index];
+ LOG_D(PHY, "Transform Precoding params. u: %d, v: %d, index for dmrsseq: %d\n", u, v, index);
+ AssertFatal(index >= 0,
+ "Num RBs not configured according to 3GPP 38.211 section 6.3.1.4. For PUSCH with transform precoding, num RBs "
+ "cannot be multiple of any other primenumber other than 2,3,5\n");
+ AssertFatal(dmrs_seq != NULL, "DMRS low PAPR seq not found, check if DMRS sequences are generated");
+ nr_pusch_lowpaprtype1_dmrs_rx(gNB, Ns, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
+#ifdef DEBUG_PUSCH
+ printf("NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v);
+ LOG_M("gNb_DMRS_SEQ.m", "gNb_DMRS_SEQ", dmrs_seq, 6 * nb_rb_pusch, 1, 1);
+#endif
+ }
+ //------------------------------------------------//
+
+#ifdef DEBUG_PUSCH
+
+ for (int i = 0; i < (6 * nb_rb_pusch); i++) {
+ LOG_I(PHY, "In %s: %d + j*(%d)\n", __FUNCTION__, pilot[i].r, pilot[i].i);
+ }
+
+#endif
+
+ int nbAarx = 0;
+ int nest_count = 0;
+ uint64_t noise_amp2 = 0;
+ delay_t *delay = &gNB->ulsch[ul_id].delay;
+ memset(delay, 0, sizeof(*delay));
+
+ int nb_antennas_rx = gNB->frame_parms.nb_antennas_rx;
+ delay_t delay_arr[nb_antennas_rx];
+ uint64_t noise_amp2_arr[nb_antennas_rx];
+ int max_ch_arr[nb_antennas_rx];
+ int nest_count_arr[nb_antennas_rx];
+
+ for (int i = 0; i < nb_antennas_rx; ++i) {
+ max_ch_arr[i] = *max_ch;
+ nest_count_arr[i] = nest_count;
+ noise_amp2_arr[i] = noise_amp2;
+ delay_arr[i] = *delay;
+ }
+
+ notifiedFIFO_t respPuschAarx;
+ initNotifiedFIFO(&respPuschAarx);
+ start_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
+ int numAntennas = gNB->dmrs_num_antennas_per_thread;
+ for (int aarx = 0; aarx < gNB->frame_parms.nb_antennas_rx; aarx += numAntennas) {
+ union puschAntennaReqUnion id = {.s = {ul_id, 0}};
+ id.p = 1 + aarx;
+ notifiedFIFO_elt_t *req = newNotifiedFIFO_elt(sizeof(puschAntennaProc_t),
+ id.p,
+ &respPuschAarx,
+ &nr_pusch_antenna_processing); // create a job for Tpool
+ puschAntennaProc_t *rdata = (puschAntennaProc_t *)NotifiedFifoData(req); // data for the job
+
+ // Local init in the current loop
+ rdata->Ns = Ns;
+ rdata->nl = nl;
+ rdata->p = p;
+ rdata->symbol = symbol;
+ rdata->aarx = aarx;
+ rdata->numAntennas = numAntennas;
+ rdata->bwp_start_subcarrier = bwp_start_subcarrier;
+ rdata->pusch_pdu = pusch_pdu;
+ rdata->max_ch = &max_ch_arr[rdata->aarx];
+ rdata->pilot = pilot;
+ rdata->nest_count = &nest_count_arr[rdata->aarx];
+ rdata->noise_amp2 = &noise_amp2_arr[rdata->aarx];
+ rdata->delay = &delay_arr[rdata->aarx];
+ rdata->beam_nb = beam_nb;
+ rdata->frame_parms = &gNB->frame_parms;
+ rdata->pusch_vars = &gNB->pusch_vars[ul_id];
+ rdata->chest_freq = gNB->chest_freq;
+ rdata->rxdataF = gNB->common_vars.rxdataF;
+ // Call the nr_pusch_antenna_processing function
+ pushTpool(&gNB->threadPool, req);
+ nbAarx++;
+
+ LOG_D(PHY, "Added Antenna (count %d) to process, in pipe\n", nbAarx);
+ } // Antenna Loop
+
+ while (nbAarx > 0) {
+ notifiedFIFO_elt_t *req = pullTpool(&respPuschAarx, &gNB->threadPool);
+ nbAarx--;
+ delNotifiedFIFO_elt(req);
+ }
+
+ stop_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
+ for (int aarx = 0; aarx < gNB->frame_parms.nb_antennas_rx; aarx++) {
+ *max_ch = max(*max_ch, max_ch_arr[aarx]);
+ noise_amp2 += noise_amp2_arr[aarx];
+ nest_count += nest_count_arr[aarx];
+ }
+ // get the maximum delay
+ *delay = delay_arr[0];
+ for (int aarx = 1; aarx < gNB->frame_parms.nb_antennas_rx; aarx++) {
+ if (delay_arr[aarx].est_delay >= delay->est_delay) {
+ *delay = delay_arr[aarx];
+ }
}
#ifdef DEBUG_CH
@@ -463,7 +569,6 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
return 0;
}
-
/*******************************************************************
*
* NAME : nr_pusch_ptrs_processing
@@ -495,51 +600,46 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
uint32_t nb_re_pusch)
{
NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[ulsch_id];
- int32_t *ptrs_re_symbol = NULL;
- int8_t ret = 0;
- uint8_t symbInSlot = rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols;
- uint8_t *startSymbIndex = &rel15_ul->start_symbol_index;
- uint8_t *nbSymb = &rel15_ul->nr_of_symbols;
- uint8_t *L_ptrs = &rel15_ul->pusch_ptrs.ptrs_time_density;
- uint8_t *K_ptrs = &rel15_ul->pusch_ptrs.ptrs_freq_density;
- uint16_t *dmrsSymbPos = &rel15_ul->ul_dmrs_symb_pos;
+ int32_t *ptrs_re_symbol = NULL;
+ int8_t ret = 0;
+ uint8_t symbInSlot = rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols;
+ uint8_t *startSymbIndex = &rel15_ul->start_symbol_index;
+ uint8_t *nbSymb = &rel15_ul->nr_of_symbols;
+ uint8_t *L_ptrs = &rel15_ul->pusch_ptrs.ptrs_time_density;
+ uint8_t *K_ptrs = &rel15_ul->pusch_ptrs.ptrs_freq_density;
+ uint16_t *dmrsSymbPos = &rel15_ul->ul_dmrs_symb_pos;
uint16_t *ptrsSymbPos = &pusch_vars->ptrs_symbols;
uint8_t *ptrsSymbIdx = &pusch_vars->ptrs_symbol_index;
- uint16_t *nb_rb = &rel15_ul->rb_size;
- uint8_t *ptrsReOffset = &rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset;
+ uint16_t *nb_rb = &rel15_ul->rb_size;
+ uint8_t *ptrsReOffset = &rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset;
/* loop over antennas */
- for (int aarx=0; aarxnb_antennas_rx; aarx++) {
+ for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
c16_t *phase_per_symbol = (c16_t *)pusch_vars->ptrs_phase_per_slot[aarx];
ptrs_re_symbol = &pusch_vars->ptrs_re_per_slot;
*ptrs_re_symbol = 0;
- phase_per_symbol[symbol].i = 0;
+ phase_per_symbol[symbol].i = 0;
/* set DMRS estimates to 0 angle with magnitude 1 */
- if(is_dmrs_symbol(symbol,*dmrsSymbPos)) {
+ if (is_dmrs_symbol(symbol, *dmrsSymbPos)) {
/* set DMRS real estimation to 32767 */
- phase_per_symbol[symbol].r=INT16_MAX; // 32767
+ phase_per_symbol[symbol].r = INT16_MAX; // 32767
#ifdef DEBUG_UL_PTRS
- printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[symbol].r,phase_per_symbol[symbol].i);
+ printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[symbol].r, phase_per_symbol[symbol].i);
#endif
- }
- else {// real ptrs value is set to 0
- phase_per_symbol[symbol].r = 0;
+ } else { // real ptrs value is set to 0
+ phase_per_symbol[symbol].r = 0;
}
- if(symbol == *startSymbIndex) {
+ if (symbol == *startSymbIndex) {
*ptrsSymbPos = 0;
- set_ptrs_symb_idx(ptrsSymbPos,
- *nbSymb,
- *startSymbIndex,
- 1<< *L_ptrs,
- *dmrsSymbPos);
+ set_ptrs_symb_idx(ptrsSymbPos, *nbSymb, *startSymbIndex, 1 << *L_ptrs, *dmrsSymbPos);
}
/* if not PTRS symbol set current ptrs symbol index to zero*/
*ptrsSymbIdx = 0;
/* Check if current symbol contains PTRS */
- if(is_ptrs_symbol(symbol, *ptrsSymbPos)) {
+ if (is_ptrs_symbol(symbol, *ptrsSymbPos)) {
*ptrsSymbIdx = symbol;
/*------------------------------------------------------------------------------------------------------- */
/* 1) Estimate common phase error per PTRS symbol */
@@ -564,27 +664,27 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
}
/* For last OFDM symbol at each antenna perform interpolation and compensation for the slot*/
- if(symbol == (symbInSlot -1)) {
+ if (symbol == (symbInSlot - 1)) {
/*------------------------------------------------------------------------------------------------------- */
/* 2) Interpolate PTRS estimated value in TD */
/*------------------------------------------------------------------------------------------------------- */
/* If L-PTRS is > 0 then we need interpolation */
- if(*L_ptrs > 0) {
- ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, (int16_t*)phase_per_symbol, *startSymbIndex, *nbSymb);
- if(ret != 0) {
- LOG_W(PHY,"[PTRS] Compensation is skipped due to error in PTRS slot processing !!\n");
+ if (*L_ptrs > 0) {
+ ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, (int16_t *)phase_per_symbol, *startSymbIndex, *nbSymb);
+ if (ret != 0) {
+ LOG_W(PHY, "[PTRS] Compensation is skipped due to error in PTRS slot processing !!\n");
}
}
/*------------------------------------------------------------------------------------------------------- */
/* 3) Compensated DMRS based estimated signal with PTRS estimation */
/*--------------------------------------------------------------------------------------------------------*/
- for(uint8_t i = *startSymbIndex; i < symbInSlot; i++) {
+ for (uint8_t i = *startSymbIndex; i < symbInSlot; i++) {
/* DMRS Symbol has 0 phase so no need to rotate the respective symbol */
/* Skip rotation if the slot processing is wrong */
- if((!is_dmrs_symbol(i,*dmrsSymbPos)) && (ret == 0)) {
+ if ((!is_dmrs_symbol(i, *dmrsSymbPos)) && (ret == 0)) {
#ifdef DEBUG_UL_PTRS
- printf("[PHY][UL][PTRS]: Rotate Symbol %2d with %d + j* %d\n", i, phase_per_symbol[i].r,phase_per_symbol[i].i);
+ printf("[PHY][UL][PTRS]: Rotate Symbol %2d with %d + j* %d\n", i, phase_per_symbol[i].r, phase_per_symbol[i].i);
#endif
rotate_cpx_vector((c16_t *)&pusch_vars->rxdataF_comp[aarx][i * nb_re_pusch],
&phase_per_symbol[i],
@@ -613,22 +713,22 @@ int nr_srs_channel_estimation(
int8_t *snr)
{
#ifdef SRS_DEBUG
- LOG_I(NR_PHY,"Calling %s function\n", __FUNCTION__);
+ LOG_I(NR_PHY, "Calling %s function\n", __FUNCTION__);
#endif
const NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
- const uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*NR_NB_SC_PER_RB;
+ const uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start * NR_NB_SC_PER_RB;
- const uint8_t N_ap = 1<num_ant_ports;
- const uint8_t K_TC = 2<comb_size;
+ const uint8_t N_ap = 1 << srs_pdu->num_ant_ports;
+ const uint8_t K_TC = 2 << srs_pdu->comb_size;
const uint16_t m_SRS_b = get_m_srs(srs_pdu->config_index, srs_pdu->bandwidth_index);
- const uint16_t M_sc_b_SRS = m_SRS_b * NR_NB_SC_PER_RB/K_TC;
+ const uint16_t M_sc_b_SRS = m_SRS_b * NR_NB_SC_PER_RB / K_TC;
uint8_t fd_cdm = N_ap;
if (N_ap == 4 && ((K_TC == 2 && srs_pdu->cyclic_shift >= 4) || (K_TC == 4 && srs_pdu->cyclic_shift >= 6))) {
fd_cdm = 2;
}
- c16_t srs_ls_estimated_channel[frame_parms->ofdm_symbol_size*(1<num_symbols)];
+ c16_t srs_ls_estimated_channel[frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols)];
uint32_t noise_power_per_rb[srs_pdu->bwp_size];
const uint32_t arr_len = frame_parms->nb_antennas_rx * N_ap * M_sc_b_SRS;
@@ -639,7 +739,8 @@ int nr_srs_channel_estimation(
c16_t noise[arr_len];
memset(noise, 0, arr_len * sizeof(c16_t));
- uint8_t mem_offset = ((16 - ((long)&srs_estimated_channel_freq[0][0][subcarrier_offset + nr_srs_info->k_0_p[0][0]])) & 0xF) >> 2; // >> 2 <=> /sizeof(int32_t)
+ uint8_t mem_offset = ((16 - ((long)&srs_estimated_channel_freq[0][0][subcarrier_offset + nr_srs_info->k_0_p[0][0]])) & 0xF)
+ >> 2; // >> 2 <=> /sizeof(int32_t)
// filt16_end is {4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0}
// The End of OFDM symbol corresponds to the position of last 16384 in the filter
@@ -649,26 +750,23 @@ int nr_srs_channel_estimation(
c16_t ls_estimated = {0};
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
-
for (int p_index = 0; p_index < N_ap; p_index++) {
-
- memset(srs_ls_estimated_channel, 0, frame_parms->ofdm_symbol_size*(1<num_symbols)*sizeof(c16_t));
- memset(srs_est, 0, (frame_parms->ofdm_symbol_size*(1<num_symbols) + mem_offset)*sizeof(int32_t));
+ memset(srs_ls_estimated_channel, 0, frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols) * sizeof(c16_t));
+ memset(srs_est, 0, (frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols) + mem_offset) * sizeof(int32_t));
#ifdef SRS_DEBUG
- LOG_I(NR_PHY,"====================== UE port %d --> gNB Rx antenna %i ======================\n", p_index, ant);
+ LOG_I(NR_PHY, "====================== UE port %d --> gNB Rx antenna %i ======================\n", p_index, ant);
#endif
uint16_t subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][0];
- if (subcarrier>frame_parms->ofdm_symbol_size) {
+ if (subcarrier > frame_parms->ofdm_symbol_size) {
subcarrier -= frame_parms->ofdm_symbol_size;
}
c16_t *srs_estimated_channel16 = (c16_t *)&srs_est[subcarrier + mem_offset];
for (int k = 0; k < M_sc_b_SRS; k++) {
-
- if (k%fd_cdm==0) {
+ if (k % fd_cdm == 0) {
ls_estimated = (c16_t){0, 0};
uint16_t subcarrier_cdm = subcarrier;
@@ -676,18 +774,21 @@ int nr_srs_channel_estimation(
int16_t generated_real = srs_generated_signal[p_index][subcarrier_cdm].r;
int16_t generated_imag = srs_generated_signal[p_index][subcarrier_cdm].i;
- int16_t received_real = ((c16_t*)srs_received_signal[ant])[subcarrier_cdm].r;
- int16_t received_imag = ((c16_t*)srs_received_signal[ant])[subcarrier_cdm].i;
+ int16_t received_real = ((c16_t *)srs_received_signal[ant])[subcarrier_cdm].r;
+ int16_t received_imag = ((c16_t *)srs_received_signal[ant])[subcarrier_cdm].i;
- // We know that nr_srs_info->srs_generated_signal_bits bits are enough to represent the generated_real and generated_imag.
- // So we only need a nr_srs_info->srs_generated_signal_bits shift to ensure that the result fits into 16 bits.
- ls_estimated.r += (int16_t)(((int32_t)generated_real*received_real + (int32_t)generated_imag*received_imag)>>nr_srs_info->srs_generated_signal_bits);
- ls_estimated.i += (int16_t)(((int32_t)generated_real*received_imag - (int32_t)generated_imag*received_real)>>nr_srs_info->srs_generated_signal_bits);
+ // We know that nr_srs_info->srs_generated_signal_bits bits are enough to represent the generated_real and
+ // generated_imag. So we only need a nr_srs_info->srs_generated_signal_bits shift to ensure that the result fits into 16
+ // bits.
+ ls_estimated.r += (int16_t)(((int32_t)generated_real * received_real + (int32_t)generated_imag * received_imag)
+ >> nr_srs_info->srs_generated_signal_bits);
+ ls_estimated.i += (int16_t)(((int32_t)generated_real * received_imag - (int32_t)generated_imag * received_real)
+ >> nr_srs_info->srs_generated_signal_bits);
// Subcarrier increment
subcarrier_cdm += K_TC;
if (subcarrier_cdm >= frame_parms->ofdm_symbol_size) {
- subcarrier_cdm=subcarrier_cdm-frame_parms->ofdm_symbol_size;
+ subcarrier_cdm = subcarrier_cdm - frame_parms->ofdm_symbol_size;
}
}
}
@@ -695,19 +796,23 @@ int nr_srs_channel_estimation(
srs_ls_estimated_channel[subcarrier] = ls_estimated;
#ifdef SRS_DEBUG
- int subcarrier_log = subcarrier-subcarrier_offset;
- if(subcarrier_log < 0) {
+ int subcarrier_log = subcarrier - subcarrier_offset;
+ if (subcarrier_log < 0) {
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
}
- if(subcarrier_log%12 == 0) {
- LOG_I(NR_PHY,"------------------------------------ %d ------------------------------------\n", subcarrier_log/12);
- LOG_I(NR_PHY,"\t __genRe________genIm__|____rxRe_________rxIm__|____lsRe________lsIm_\n");
+ if (subcarrier_log % 12 == 0) {
+ LOG_I(NR_PHY, "------------------------------------ %d ------------------------------------\n", subcarrier_log / 12);
+ LOG_I(NR_PHY, "\t __genRe________genIm__|____rxRe_________rxIm__|____lsRe________lsIm_\n");
}
- LOG_I(NR_PHY,"(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
+ LOG_I(NR_PHY,
+ "(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
subcarrier_log,
- ((c16_t*)srs_generated_signal[p_index])[subcarrier].r, ((c16_t*)srs_generated_signal[p_index])[subcarrier].i,
- ((c16_t*)srs_received_signal[ant])[subcarrier].r, ((c16_t*)srs_received_signal[ant])[subcarrier].i,
- ls_estimated.r, ls_estimated.i);
+ ((c16_t *)srs_generated_signal[p_index])[subcarrier].r,
+ ((c16_t *)srs_generated_signal[p_index])[subcarrier].i,
+ ((c16_t *)srs_received_signal[ant])[subcarrier].r,
+ ((c16_t *)srs_received_signal[ant])[subcarrier].i,
+ ls_estimated.r,
+ ls_estimated.i);
#endif
const uint16_t sc_offset = subcarrier + mem_offset;
@@ -722,7 +827,8 @@ int nr_srs_channel_estimation(
srs_estimated_channel16 = (c16_t *)&srs_est[subcarrier];
const short *filter = mem_offset == 0 ? filt8_start : filt8_start_shift2;
c16multaddVectRealComplex(filter, &ls_estimated, srs_estimated_channel16, 8);
- } else if ((subcarrier + K_TC) >= frame_parms->ofdm_symbol_size || k == (M_sc_b_SRS - 1)) { // End of OFDM symbol or last subcarrier cases
+ } else if ((subcarrier + K_TC) >= frame_parms->ofdm_symbol_size
+ || k == (M_sc_b_SRS - 1)) { // End of OFDM symbol or last subcarrier cases
// filt8_end is {4096,8192,12288,16384,0,0,0,0}
const short *filter = mem_offset == 0 || k == (M_sc_b_SRS - 1) ? filt8_end : filt8_end_shift2;
c16multaddVectRealComplex(filter, &ls_estimated, srs_estimated_channel16, 8);
@@ -742,7 +848,8 @@ int nr_srs_channel_estimation(
srs_estimated_channel16 = (c16_t *)&srs_est[sc_offset];
// filt16_start is {12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0}
c16multaddVectRealComplex(filt16_start, &ls_estimated, srs_estimated_channel16, 16);
- } else if ((subcarrier + K_TC) >= frame_parms->ofdm_symbol_size || k == (M_sc_b_SRS - 1)) { // End of OFDM symbol or last subcarrier cases
+ } else if ((subcarrier + K_TC) >= frame_parms->ofdm_symbol_size
+ || k == (M_sc_b_SRS - 1)) { // End of OFDM symbol or last subcarrier cases
// filt16_end is {4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0}
c16multaddVectRealComplex(filt16_end, &ls_estimated, srs_estimated_channel16, 16);
} else { // Middle case
@@ -755,18 +862,18 @@ int nr_srs_channel_estimation(
// Subcarrier increment
subcarrier += K_TC;
if (subcarrier >= frame_parms->ofdm_symbol_size) {
- subcarrier=subcarrier-frame_parms->ofdm_symbol_size;
+ subcarrier = subcarrier - frame_parms->ofdm_symbol_size;
}
} // for (int k = 0; k < M_sc_b_SRS; k++)
memcpy(&srs_estimated_channel_freq[ant][p_index][0],
&srs_est[mem_offset],
- (frame_parms->ofdm_symbol_size*(1<num_symbols))*sizeof(int32_t));
+ (frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols)) * sizeof(int32_t));
// Compute noise
subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][0];
- if (subcarrier>frame_parms->ofdm_symbol_size) {
+ if (subcarrier > frame_parms->ofdm_symbol_size) {
subcarrier -= frame_parms->ofdm_symbol_size;
}
uint16_t base_idx = ant * N_ap * M_sc_b_SRS + p_index * M_sc_b_SRS;
@@ -782,23 +889,23 @@ int nr_srs_channel_estimation(
#ifdef SRS_DEBUG
subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][0];
- if (subcarrier>frame_parms->ofdm_symbol_size) {
+ if (subcarrier > frame_parms->ofdm_symbol_size) {
subcarrier -= frame_parms->ofdm_symbol_size;
}
- for (int k = 0; k < K_TC*M_sc_b_SRS; k++) {
-
- int subcarrier_log = subcarrier-subcarrier_offset;
- if(subcarrier_log < 0) {
+ for (int k = 0; k < K_TC * M_sc_b_SRS; k++) {
+ int subcarrier_log = subcarrier - subcarrier_offset;
+ if (subcarrier_log < 0) {
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
}
- if(subcarrier_log%12 == 0) {
- LOG_I(NR_PHY,"------------------------------------- %d -------------------------------------\n", subcarrier_log/12);
- LOG_I(NR_PHY,"\t __lsRe__________lsIm__|____intRe_______intIm__|____noiRe_______noiIm__\n");
+ if (subcarrier_log % 12 == 0) {
+ LOG_I(NR_PHY, "------------------------------------- %d -------------------------------------\n", subcarrier_log / 12);
+ LOG_I(NR_PHY, "\t __lsRe__________lsIm__|____intRe_______intIm__|____noiRe_______noiIm__\n");
}
- LOG_I(NR_PHY,"(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
+ LOG_I(NR_PHY,
+ "(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
subcarrier_log,
srs_ls_estimated_channel[subcarrier].r,
srs_ls_estimated_channel[subcarrier].i,
@@ -810,23 +917,23 @@ int nr_srs_channel_estimation(
// Subcarrier increment
subcarrier++;
if (subcarrier >= frame_parms->ofdm_symbol_size) {
- subcarrier=subcarrier-frame_parms->ofdm_symbol_size;
+ subcarrier = subcarrier - frame_parms->ofdm_symbol_size;
}
}
#endif
// Convert to time domain
freq2time(gNB->frame_parms.ofdm_symbol_size,
- (int16_t*) srs_estimated_channel_freq[ant][p_index],
- (int16_t*) srs_estimated_channel_time[ant][p_index]);
+ (int16_t *)srs_estimated_channel_freq[ant][p_index],
+ (int16_t *)srs_estimated_channel_time[ant][p_index]);
memcpy(&srs_estimated_channel_time_shifted[ant][p_index][0],
- &srs_estimated_channel_time[ant][p_index][gNB->frame_parms.ofdm_symbol_size>>1],
- (gNB->frame_parms.ofdm_symbol_size>>1)*sizeof(int32_t));
+ &srs_estimated_channel_time[ant][p_index][gNB->frame_parms.ofdm_symbol_size >> 1],
+ (gNB->frame_parms.ofdm_symbol_size >> 1) * sizeof(int32_t));
- memcpy(&srs_estimated_channel_time_shifted[ant][p_index][gNB->frame_parms.ofdm_symbol_size>>1],
+ memcpy(&srs_estimated_channel_time_shifted[ant][p_index][gNB->frame_parms.ofdm_symbol_size >> 1],
&srs_estimated_channel_time[ant][p_index][0],
- (gNB->frame_parms.ofdm_symbol_size>>1)*sizeof(int32_t));
+ (gNB->frame_parms.ofdm_symbol_size >> 1) * sizeof(int32_t));
} // for (int p_index = 0; p_index < N_ap; p_index++)
} // for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++)
@@ -835,7 +942,7 @@ int nr_srs_channel_estimation(
uint32_t signal_power = max(signal_energy_nodc(ch, arr_len), 1);
#ifdef SRS_DEBUG
- LOG_I(NR_PHY,"signal_power = %u\n", signal_power);
+ LOG_I(NR_PHY, "signal_power = %u\n", signal_power);
#endif
if (signal_power == 0) {
@@ -845,14 +952,13 @@ int nr_srs_channel_estimation(
// Compute noise power
const uint8_t srs_symbols_per_rb = srs_pdu->comb_size == 0 ? 6 : 3;
- const uint8_t n_noise_est = frame_parms->nb_antennas_rx*N_ap*srs_symbols_per_rb;
+ const uint8_t n_noise_est = frame_parms->nb_antennas_rx * N_ap * srs_symbols_per_rb;
uint64_t sum_re = 0;
uint64_t sum_re2 = 0;
uint64_t sum_im = 0;
uint64_t sum_im2 = 0;
for (int rb = 0; rb < m_SRS_b; rb++) {
-
sum_re = 0;
sum_re2 = 0;
sum_im = 0;
@@ -870,12 +976,13 @@ int nr_srs_channel_estimation(
} // for (int p_index = 0; p_index < N_ap; p_index++)
} // for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++)
- noise_power_per_rb[rb] = max(sum_re2 / n_noise_est - (sum_re / n_noise_est) * (sum_re / n_noise_est) +
- sum_im2 / n_noise_est - (sum_im / n_noise_est) * (sum_im / n_noise_est), 1);
+ noise_power_per_rb[rb] = max(sum_re2 / n_noise_est - (sum_re / n_noise_est) * (sum_re / n_noise_est) + sum_im2 / n_noise_est
+ - (sum_im / n_noise_est) * (sum_im / n_noise_est),
+ 1);
snr_per_rb[rb] = dB_fixed(signal_power) - dB_fixed(noise_power_per_rb[rb]);
#ifdef SRS_DEBUG
- LOG_I(NR_PHY,"noise_power_per_rb[%i] = %i, snr_per_rb[%i] = %i dB\n", rb, noise_power_per_rb[rb], rb, snr_per_rb[rb]);
+ LOG_I(NR_PHY, "noise_power_per_rb[%i] = %i, snr_per_rb[%i] = %i dB\n", rb, noise_power_per_rb[rb], rb, snr_per_rb[rb]);
#endif
} // for (int rb = 0; rb < m_SRS_b; rb++)
@@ -885,7 +992,7 @@ int nr_srs_channel_estimation(
*snr = dB_fixed(signal_power) - dB_fixed(noise_power);
#ifdef SRS_DEBUG
- LOG_I(NR_PHY,"noise_power = %u, SNR = %i dB\n", noise_power, *snr);
+ LOG_I(NR_PHY, "noise_power = %u, SNR = %i dB\n", noise_power, *snr);
#endif
return 0;
diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
index 82407980fe..6a57c1eafe 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
@@ -1486,14 +1486,16 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
int total_res = 0;
for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < end_symbol; symbol += numSymbols) {
+ int res_per_task = 0;
for (int s = 0; s < numSymbols; s++) {
pusch_vars->ul_valid_re_per_slot[symbol+s] = get_nb_re_pusch(frame_parms,rel15_ul,symbol+s);
pusch_vars->llr_offset[symbol+s] = ((symbol+s) == rel15_ul->start_symbol_index) ?
0 :
pusch_vars->llr_offset[symbol+s-1] + pusch_vars->ul_valid_re_per_slot[symbol+s-1] * rel15_ul->qam_mod_order;
- total_res+=pusch_vars->ul_valid_re_per_slot[symbol+s];
+ res_per_task += pusch_vars->ul_valid_re_per_slot[symbol + s];
}
- if (total_res > 0) {
+ total_res += res_per_task;
+ if (res_per_task > 0) {
union puschSymbolReqUnion id = {.s={ulsch_id,frame,slot,0}};
id.p=1+symbol;
notifiedFIFO_elt_t *req = newNotifiedFIFO_elt(sizeof(puschSymbolProc_t), id.p, &gNB->respPuschSymb, &nr_pusch_symbol_processing); // create a job for Tpool
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
index 243e3f9a23..58114dfeb5 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
@@ -285,7 +285,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
// HARQ stats
- phy_vars_ue->dl_stats[harq_process->DLround]++;
LOG_D(PHY, "Round %d RV idx %d\n", harq_process->DLround, dlsch->dlsch_config.rv);
uint16_t nb_rb;// = 30;
uint8_t dmrs_Type = dlsch->dlsch_config.dmrsConfigType;
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
index 9bc764fa35..c0019fb3ec 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
@@ -28,6 +28,8 @@
* \note
* \warning
*/
+
+#include "common/platform_constants.h"
#include "nr_phy_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_extern.h"
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
index 6c26a3e59d..176ed67cf3 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
@@ -200,13 +200,6 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
#endif
-int dump_ue_stats(PHY_VARS_NR_UE *phy_vars_ue,
- const UE_nr_rxtx_proc_t *proc,
- char *buffer,
- int length,
- runmode_t mode,
- int input_level_dBm);
-
/*!
\brief This function performs the initial cell search procedure - PSS detection, SSS detection and PBCH detection. At the
end, the basic frame parameters are known (Frame configuration - TDD/FDD and cyclic prefix length,
diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h
index 7022ad8b23..81d193634a 100644
--- a/openair1/PHY/defs_gNB.h
+++ b/openair1/PHY/defs_gNB.h
@@ -33,6 +33,7 @@
#ifndef __PHY_DEFS_GNB__H__
#define __PHY_DEFS_GNB__H__
+#include "common/platform_constants.h"
#include "defs_nr_common.h"
#include "CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
@@ -543,6 +544,7 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t ulsch_decoding_stats;
time_stats_t ulsch_deinterleaving_stats;
time_stats_t ulsch_channel_estimation_stats;
+ time_stats_t pusch_channel_estimation_antenna_processing_stats;
time_stats_t ulsch_llr_stats;
time_stats_t rx_srs_stats;
time_stats_t generate_srs_stats;
@@ -562,7 +564,10 @@ typedef struct PHY_VARS_gNB_s {
notifiedFIFO_t L1_rx_out;
notifiedFIFO_t resp_RU_tx;
tpool_t threadPool;
+ int nbSymb;
+ int nbAarx;
int num_pusch_symbols_per_thread;
+ int dmrs_num_antennas_per_thread;
pthread_t L1_rx_thread;
int L1_rx_thread_core;
pthread_t L1_tx_thread;
@@ -585,6 +590,37 @@ union puschSymbolReqUnion {
uint64_t p;
};
+typedef struct puschAntennaProc_s {
+ unsigned char Ns;
+ int nl;
+ unsigned short p;
+ unsigned char symbol;
+ unsigned short bwp_start_subcarrier;
+ int aarx;
+ int beam_nb;
+ int numAntennas;
+ nfapi_nr_pusch_pdu_t *pusch_pdu;
+ int *max_ch;
+ c16_t *pilot;
+ int *nest_count;
+ uint64_t *noise_amp2;
+ delay_t *delay;
+ int chest_freq;
+ NR_gNB_PUSCH *pusch_vars;
+ NR_DL_FRAME_PARMS *frame_parms;
+ c16_t ***rxdataF;
+} puschAntennaProc_t;
+
+struct puschAntennaReqId {
+ uint16_t ul_id;
+ uint16_t spare;
+} __attribute__((packed));
+
+union puschAntennaReqUnion {
+ struct puschAntennaReqId s;
+ uint64_t p;
+};
+
typedef struct LDPCDecode_s {
PHY_VARS_gNB *gNB;
NR_UL_gNB_HARQ_t *ulsch_harq;
diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h
index 12b10e4b96..7178faefd1 100644
--- a/openair1/PHY/defs_nr_UE.h
+++ b/openair1/PHY/defs_nr_UE.h
@@ -520,8 +520,6 @@ typedef struct PHY_VARS_NR_UE_s {
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
#endif
- int dl_errors;
- _Atomic(int) dl_stats[16];
void* scopeData;
// Pointers to hold PDSCH data only for phy simulators
void *phy_sim_rxdataF;
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index 2be6faeb9c..a737b5246e 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -1010,22 +1010,6 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_
} // for rsc_id
} // for gNB_id
- if ((frame_rx%64 == 0) && (nr_slot_rx==0)) {
- LOG_I(NR_PHY,"============================================\n");
- // fixed text + 8 HARQs rounds à 10 ("999999999/") + NULL
- // if we use 999999999 HARQs, that should be sufficient for at least 138 hours
- const size_t harq_output_len = 31 + 10 * 8 + 1;
- char output[harq_output_len];
- char *p = output;
- const char *end = output + harq_output_len;
- p += snprintf(p, end - p, "[UE %d] Harq round stats for Downlink: %d", ue->Mod_id, ue->dl_stats[0]);
- for (int round = 1; round < 16 && (round < 3 || ue->dl_stats[round] != 0); ++round)
- p += snprintf(p, end - p,"/%d", ue->dl_stats[round]);
- LOG_I(NR_PHY,"%s\n", output);
-
- LOG_I(NR_PHY,"============================================\n");
- }
-
LOG_D(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_IN);
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index a67c5be9da..c445bfb6a0 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -19,59 +19,81 @@
* contact@openairinterface.org
*/
-#include
+#include
+#include
#include
+#include
+#include
+#include
+#include
#include
-#include
-#include
-#include
-#include "common/ran_context.h"
-#include "common/config/config_userapi.h"
+#include "common/utils/assertions.h"
#include "common/utils/nr/nr_common.h"
#include "common/utils/var_array.h"
-#include "common/utils/LOG/log.h"
-#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
+#include "executables/nr-uesoftmodem.h"
+#include "executables/softmodem-common.h"
#include "LAYER2/NR_MAC_UE/mac_defs.h"
-#include "LAYER2/NR_MAC_UE/mac_extern.h"
-#include "PHY/defs_gNB.h"
-#include "PHY/defs_nr_common.h"
-#include "PHY/defs_nr_UE.h"
-#include "PHY/phy_vars_nr_ue.h"
-#include "PHY/types.h"
+#include "LAYER2/NR_MAC_UE/mac_proto.h"
+#include "LAYER2/NR_MAC_gNB/mac_proto.h"
+#include "LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
+#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
+#include "NR_BCCH-BCH-Message.h"
+#include "NR_BWP-Downlink.h"
+#include "NR_CellGroupConfig.h"
+#include "NR_MAC_COMMON/nr_mac.h"
+#include "NR_MAC_COMMON/nr_mac_common.h"
+#include "NR_PHY_INTERFACE/NR_IF_Module.h"
+#include "NR_ReconfigurationWithSync.h"
+#include "NR_ServingCellConfig.h"
+#include "NR_SetupRelease.h"
+#include "NR_UE_PHY_INTERFACE/NR_IF_Module.h"
+#include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/INIT/nr_phy_init.h"
-#include "PHY/MODULATION/modulation_eNB.h"
-#include "PHY/MODULATION/nr_modulation.h"
-#include "PHY/MODULATION/modulation_UE.h"
-#include "PHY/NR_REFSIG/refsig_defs_ue.h"
+#include "PHY/MODULATION/modulation_common.h"
+#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
-#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
-#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
+#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
+#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
+#include "PHY/TOOLS/tools_defs.h"
+#include "PHY/defs_RU.h"
+#include "PHY/defs_common.h"
+#include "PHY/defs_gNB.h"
+#include "PHY/defs_nr_UE.h"
+#include "PHY/defs_nr_common.h"
+#include "PHY/impl_defs_nr.h"
+#include "PHY/phy_vars_nr_ue.h"
+#include "RRC/NR/nr_rrc_config.h"
+#include "RRC/NR/nr_rrc_proto.h"
#include "SCHED_NR/fapi_nr_l1.h"
#include "SCHED_NR/sched_nr.h"
#include "SCHED_NR_UE/defs.h"
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
-#include "NR_PHY_INTERFACE/NR_IF_Module.h"
-#include "NR_UE_PHY_INTERFACE/NR_IF_Module.h"
-
-#include "LAYER2/NR_MAC_UE/mac_proto.h"
-#include "LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
-#include "LAYER2/NR_MAC_gNB/mac_proto.h"
-#include "NR_asn_constant.h"
-#include "RRC/NR/nr_rrc_config.h"
-#include "openair1/SIMULATION/RF/rf.h"
-#include "openair1/SIMULATION/TOOLS/sim.h"
+#include "T.h"
+#include "asn_internal.h"
+#include "assertions.h"
+#include "common/config/config_load_configmodule.h"
+#include "common/ngran_types.h"
+#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "common/utils/nr/nr_common.h"
+#include "common/utils/var_array.h"
+#include "common_lib.h"
+#include "e1ap_messages_types.h"
+#include "fapi_nr_ue_interface.h"
+#include "nfapi_interface.h"
+#include "nfapi_nr_interface.h"
+#include "nfapi_nr_interface_scf.h"
+#include "nr_ue_phy_meas.h"
+#include "oai_asn1.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
-#include "PHY/NR_REFSIG/ptrs_nr.h"
-#include "NR_RRCReconfiguration.h"
+#include "openair1/SIMULATION/TOOLS/sim.h"
+#include "openair2/RRC/LTE/rrc_vars.h"
+#include "softmodem-bits.h"
+#include "thread-pool.h"
+#include "time_meas.h"
+#include "utils.h"
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
#include "SIMULATION/LTE_PHY/common_sim.h"
-#include "PHY/NR_REFSIG/dmrs_nr.h"
-
-#include
-
-#include
-#include
-#include
const char *__asan_default_options()
{
diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c
index 76b5d979b3..08bf2e8fe6 100644
--- a/openair1/SIMULATION/NR_PHY/prachsim.c
+++ b/openair1/SIMULATION/NR_PHY/prachsim.c
@@ -19,40 +19,54 @@
* contact@openairinterface.org
*/
-#include
+
#include
-#include
-#include
-
+#include
+#include
+#include
+#include
+#include "common/utils/assertions.h"
+#include "executables/softmodem-common.h"
+#include "common/platform_types.h"
+#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h"
+#include "NR_PHY_INTERFACE/NR_IF_Module.h"
#include "common/config/config_userapi.h"
-#include "common/utils/load_module_shlib.h"
-#include "common/utils/LOG/log.h"
-#include "common/ran_context.h"
-
-#include "SIMULATION/TOOLS/sim.h"
-#include "SIMULATION/RF/rf.h"
-#include "PHY/types.h"
-#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
-#include "SCHED_NR/sched_nr.h"
-#include "SCHED_NR_UE/phy_frame_config_nr.h"
-#include "PHY/phy_vars_nr_ue.h"
-#include "PHY/NR_REFSIG/refsig_defs_ue.h"
-#include "PHY/MODULATION/nr_modulation.h"
-#include "PHY/MODULATION/modulation_eNB.h"
-#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/nr_phy_init.h"
-#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
+#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
+#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "nr_unitary_defs.h"
-#include
-#include
-#include
-#include
-#include
+#include "openair2/RRC/LTE/rrc_vars.h"
+#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
+#include "PHY/TOOLS/tools_defs.h"
+#include "PHY/defs_RU.h"
+#include "PHY/defs_common.h"
+#include "PHY/defs_gNB.h"
+#include "PHY/defs_nr_UE.h"
+#include "PHY/defs_nr_common.h"
+#include "PHY/impl_defs_nr.h"
+#include "PHY/phy_vars_nr_ue.h"
+#include "SCHED_NR/phy_frame_config_nr.h"
+#include "SCHED_NR/sched_nr.h"
+#include "SIMULATION/TOOLS/sim.h"
+#include "T.h"
+#include "assertions.h"
+#include "common/config/config_load_configmodule.h"
+#include "common/ran_context.h"
+#include "common/utils/LOG/log.h"
+#include "common/utils/T/T.h"
+#include "common/utils/load_module_shlib.h"
+#include "common_lib.h"
+#include "defs.h"
#include "executables/nr-uesoftmodem.h"
+#include "fapi_nr_ue_interface.h"
#include "nfapi/oai_integration/vendor_ext.h"
+#include "nfapi_interface.h"
+#include "nfapi_nr_interface_scf.h"
+#include "nr_common.h"
+#include "time_meas.h"
#define NR_PRACH_DEBUG 1
#define PRACH_WRITE_OUTPUT_DEBUG 1
diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c
index 431e4875fc..8ffa0e4a3f 100644
--- a/openair1/SIMULATION/NR_PHY/ulsim.c
+++ b/openair1/SIMULATION/NR_PHY/ulsim.c
@@ -19,54 +19,80 @@
* contact@openairinterface.org
*/
-#include
+#include
#include
-#include
-#include
-#include
-#include
-#include "common/ran_context.h"
-#include "common/config/config_userapi.h"
-#include "common/utils/LOG/log.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include "common/utils/nr/nr_common.h"
#include "common/utils/var_array.h"
-#include "PHY/defs_gNB.h"
-#include "PHY/defs_nr_common.h"
-#include "PHY/defs_nr_UE.h"
-#include "PHY/phy_vars_nr_ue.h"
-#include "PHY/types.h"
+#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
+#include "SIMULATION/LTE_PHY/common_sim.h"
+#include "openair2/RRC/LTE/rrc_vars.h"
+#include "common/utils/assertions.h"
+#include "executables/softmodem-common.h"
+#include "NR_BCCH-BCH-Message.h"
+#include "NR_IF_Module.h"
+#include "NR_MAC_COMMON/nr_mac.h"
+#include "NR_MAC_COMMON/nr_mac_common.h"
+#include "NR_MAC_UE/mac_defs.h"
+#include "NR_MAC_gNB/nr_mac_gNB.h"
+#include "NR_PHY_INTERFACE/NR_IF_Module.h"
+#include "NR_ReconfigurationWithSync.h"
+#include "NR_ServingCellConfig.h"
+#include "NR_UE-NR-Capability.h"
+#include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/INIT/nr_phy_init.h"
-#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
-#include "PHY/NR_REFSIG/refsig_defs_ue.h"
-#include "PHY/NR_TRANSPORT/nr_dlsch.h"
-#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
-#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
+#include "PHY/NR_REFSIG/ptrs_nr.h"
+#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
+#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
-#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
+#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/TOOLS/tools_defs.h"
+#include "PHY/defs_RU.h"
+#include "PHY/defs_common.h"
+#include "PHY/defs_gNB.h"
+#include "PHY/defs_nr_UE.h"
+#include "PHY/defs_nr_common.h"
+#include "PHY/impl_defs_nr.h"
+#include "PHY/phy_vars_nr_ue.h"
#include "SCHED_NR/fapi_nr_l1.h"
#include "SCHED_NR/sched_nr.h"
#include "SCHED_NR_UE/defs.h"
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
-#include "openair1/SIMULATION/TOOLS/sim.h"
-#include "openair1/SIMULATION/RF/rf.h"
+#include "asn_internal.h"
+#include "assertions.h"
+#include "common/config/config_load_configmodule.h"
+#include "common/ngran_types.h"
+#include "common/openairinterface5g_limits.h"
+#include "common/ran_context.h"
+#include "common/utils/LOG/log.h"
+#include "common/utils/T/T.h"
+#include "common/utils/nr/nr_common.h"
+#include "common/utils/threadPool/thread-pool.h"
+#include "common/utils/var_array.h"
+#include "common_lib.h"
+#include "e1ap_messages_types.h"
+#include "executables/nr-uesoftmodem.h"
+#include "fapi_nr_ue_constants.h"
+#include "fapi_nr_ue_interface.h"
+#include "nfapi_interface.h"
+#include "nfapi_nr_interface_scf.h"
+#include "nr_ue_phy_meas.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
-#include "openair2/RRC/NR/nr_rrc_config.h"
+#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
-#include "common/utils/threadPool/thread-pool.h"
-#include "PHY/NR_REFSIG/ptrs_nr.h"
-#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
-#include "SIMULATION/LTE_PHY/common_sim.h"
+#include "openair2/RRC/NR/nr_rrc_config.h"
+#include "time_meas.h"
+#include "utils.h"
-#include
-
-#include
-#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
-#include
-#include "executables/nr-uesoftmodem.h"
//#define DEBUG_ULSIM
const char *__asan_default_options()
@@ -213,6 +239,7 @@ int main(int argc, char *argv[])
int params_from_file = 0;
int threadCnt=0;
int max_ldpc_iterations = 5;
+ int num_antennas_per_thread = 1;
if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) {
exit_fun("[NR_ULSIM] Error, configuration module init failed\n");
}
@@ -224,7 +251,7 @@ int main(int argc, char *argv[])
InitSinLUT();
int c;
- while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) {
+ while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:A:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) {
/* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
@@ -395,6 +422,10 @@ int main(int argc, char *argv[])
}
break;
+ case 'A':
+ num_antennas_per_thread = atoi(optarg);
+ break;
+
case 'F':
input_fd = fopen(optarg, "r");
if (input_fd == NULL) {
@@ -512,6 +543,7 @@ int main(int argc, char *argv[])
printf("-w Start PRB for PUSCH\n");
printf("-y Number of TX antennas used at UE\n");
printf("-z Number of RX antennas used at gNB\n");
+ printf("-A Number of antennas per thread for PUSCH channel estimation\n");
printf("-C Specify the number of threads for the simulation\n");
printf("-E {SRS: [0] Disabled, [1] Enabled} e.g. -E 1\n");
printf("-F Input filename (.txt format) for RX conformance testing\n");
@@ -559,6 +591,7 @@ int main(int argc, char *argv[])
gNB = RC.gNB[0];
gNB->ofdm_offset_divisor = UINT_MAX;
gNB->num_pusch_symbols_per_thread = 1;
+ gNB->dmrs_num_antennas_per_thread = num_antennas_per_thread;
gNB->RU_list[0] = calloc(1, sizeof(**gNB->RU_list));
gNB->RU_list[0]->rfdevice.openair0_cfg = openair0_cfg;
@@ -952,6 +985,7 @@ int main(int argc, char *argv[])
reset_meas(&gNB->rx_pusch_symbol_processing_stats);
reset_meas(&gNB->ulsch_decoding_stats);
reset_meas(&gNB->ulsch_channel_estimation_stats);
+ reset_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
reset_meas(&gNB->rx_srs_stats);
reset_meas(&gNB->generate_srs_stats);
reset_meas(&gNB->get_srs_signal_stats);
@@ -1512,6 +1546,7 @@ int main(int argc, char *argv[])
printDistribution(&gNB->phy_proc_rx,table_rx, "Total PHY proc rx");
printStatIndent(&gNB->rx_pusch_stats, "RX PUSCH time");
printStatIndent2(&gNB->ulsch_channel_estimation_stats, "ULSCH channel estimation time");
+ printStatIndent3(&gNB->pusch_channel_estimation_antenna_processing_stats, "Antenna Processing time");
printStatIndent2(&gNB->rx_pusch_init_stats, "RX PUSCH Initialization time");
printStatIndent2(&gNB->rx_pusch_symbol_processing_stats, "RX PUSCH Symbol Processing time");
printStatIndent(&gNB->ulsch_decoding_stats,"ULSCH total decoding time");
diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
index 33cd1b3432..1217f70fba 100644
--- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
+++ b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
@@ -180,7 +180,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
}
/* set a tx slot with no ack */
- NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
+ NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
@@ -267,7 +267,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_OK);
/* set a tx slot with no ack */
- NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
+ NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
harq_status->ack = DL_ACK;
@@ -557,7 +557,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
int reset_harq = false;
int dl_harq_pid[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
int pucch_resource_indicator[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK][2] = { { 0, 4 }, { 1, 0 } , { 1, 3 } , { 5, 7 } };
- NR_UE_HARQ_STATUS_t *harq_status;
+ NR_UE_DL_HARQ_STATUS_t *harq_status;
ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1;
@@ -584,7 +584,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i];
- NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
+ NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
@@ -618,7 +618,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i];
- NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
+ NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
@@ -662,7 +662,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
int reset_harq = false;
int dl_harq_pid[TST_NB_STEP_TWO_TRANSPORT_BLOCKS] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
int pucch_resource_indicator[TST_NB_STEP_TWO_TRANSPORT_BLOCKS][2] = { { 0, 1 }, { 3, 7 } , { 2 , 4 } , { 4 , 6 } };
- NR_UE_HARQ_STATUS_t *harq_status;
+ NR_UE_DL_HARQ_STATUS_t *harq_status;
int TB_identifier = 1;
int thread_number = TST_THREAD_ID;
@@ -682,7 +682,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
- NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
+ NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
@@ -725,7 +725,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
- NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
+ NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
@@ -759,7 +759,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
- NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
+ NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
@@ -973,7 +973,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
/* set a first harq ack context */
- NR_UE_HARQ_STATUS_t *harq_status;
+ NR_UE_DL_HARQ_STATUS_t *harq_status;
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
@@ -1085,7 +1085,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
/* set a first harq ack context */
- NR_UE_HARQ_STATUS_t *harq_status;
+ NR_UE_DL_HARQ_STATUS_t *harq_status;
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
diff --git a/openair2/COMMON/gtpv1_u_messages_types.h b/openair2/COMMON/gtpv1_u_messages_types.h
index 77e92f39bb..0a2691e643 100644
--- a/openair2/COMMON/gtpv1_u_messages_types.h
+++ b/openair2/COMMON/gtpv1_u_messages_types.h
@@ -24,6 +24,7 @@
#include "LTE_asn_constant.h"
#include "NR_asn_constant.h"
+#include "s1ap_messages_types.h"
#define GTPV1U_MAX_BEARERS_PER_UE max_val_LTE_DRB_Identity
#define NR_GTPV1U_MAX_BEARERS_PER_UE max_val_NR_DRB_Identity
@@ -170,13 +171,10 @@ typedef struct {
typedef struct gtpv1u_gnb_create_tunnel_req_s {
ue_id_t ue_id;
int num_tunnels;
- //teid_t upf_NGu_teid[NR_GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
teid_t outgoing_teid[NR_GTPV1U_MAX_BEARERS_PER_UE];
int outgoing_qfi[NR_GTPV1U_MAX_BEARERS_PER_UE];
pdusessionid_t pdusession_id[NR_GTPV1U_MAX_BEARERS_PER_UE];
ebi_t incoming_rb_id[NR_GTPV1U_MAX_BEARERS_PER_UE];
- //ebi_t outgoing_rb_id[NR_GTPV1U_MAX_BEARERS_PER_UE];
- //transport_layer_addr_t upf_addr[NR_GTPV1U_MAX_BEARERS_PER_UE];
transport_layer_addr_t dst_addr[NR_GTPV1U_MAX_BEARERS_PER_UE];
} gtpv1u_gnb_create_tunnel_req_t;
diff --git a/openair2/COMMON/ngap_messages_types.h b/openair2/COMMON/ngap_messages_types.h
index 0f1555cfdf..cdba1c5e2d 100644
--- a/openair2/COMMON/ngap_messages_types.h
+++ b/openair2/COMMON/ngap_messages_types.h
@@ -32,11 +32,9 @@
#include "common/platform_constants.h"
#include "common/platform_types.h"
#include "common/5g_platform_types.h"
-#include "LTE_asn_constant.h"
#include "s1ap_messages_types.h"
-//-------------------------------------------------------------------------------------------//
-// Defines to access message fields.
+// Defines to access message fields.
#define NGAP_REGISTER_GNB_REQ(mSGpTR) (mSGpTR)->ittiMsg.ngap_register_gnb_req
#define NGAP_REGISTER_GNB_CNF(mSGpTR) (mSGpTR)->ittiMsg.ngap_register_gnb_cnf
@@ -72,10 +70,9 @@
#define NGAP_PDUSESSION_RELEASE_RESPONSE(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_release_resp
//-------------------------------------------------------------------------------------------//
-/* Maximum number of e-rabs to be setup/deleted in a single message.
- * Even if only one bearer will be modified by message.
- */
-#define NGAP_MAX_PDUSESSION (LTE_maxDRB + 3)
+
+// maxnoofPDUSessions in 3GPP TS 38.413
+#define NGAP_MAX_PDUSESSION 16 // 256 according to specs
/* Length of the transport layer address string
* 160 bits / 8 bits by char.
diff --git a/openair2/COMMON/s1ap_messages_types.h b/openair2/COMMON/s1ap_messages_types.h
index 7537d7c6d7..e7bbfc7989 100644
--- a/openair2/COMMON/s1ap_messages_types.h
+++ b/openair2/COMMON/s1ap_messages_types.h
@@ -224,16 +224,6 @@ typedef struct nas_pdu_s {
uint32_t length;
} nas_pdu_t, ue_radio_cap_t;
-typedef struct transport_layer_addr_s {
- /* Length of the transport layer address buffer in bits. S1AP layer received a
- * bit string<1..160> containing one of the following addresses: ipv4,
- * ipv6, or ipv4 and ipv6. The layer doesn't interpret the buffer but
- * silently forward it to S1-U.
- */
- uint8_t length;
- uint8_t buffer[20]; // in network byte order
-} transport_layer_addr_t;
-
#define TRANSPORT_LAYER_ADDR_COPY(dEST,sOURCE) \
do { \
AssertFatal(sOURCE.len <= 20); \
diff --git a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
index c1d2a0f0b7..31d96433c1 100644
--- a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
+++ b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
@@ -93,5 +93,7 @@ void read_gtp_setup_sm(void* data)
sm_ag_if_ans_t write_ctrl_gtp_sm(void const* src)
{
assert(src != NULL);
- assert(0 !=0 && "Not supported");
+ printf("write_ctrl callback for GTP SM: operation not supported\n");
+ sm_ag_if_ans_t ans = {0};
+ return ans;
}
diff --git a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c
index 56633f53e0..3e3caac9fe 100644
--- a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c
+++ b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c
@@ -123,6 +123,8 @@ void read_mac_setup_sm(void* data)
sm_ag_if_ans_t write_ctrl_mac_sm(void const* data)
{
assert(data != NULL);
- assert(0 !=0 && "Not supported");
+ printf("write_ctrl callback for MAC SM: operation not supported\n");
+ sm_ag_if_ans_t ans = {0};
+ return ans;
}
diff --git a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.c b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.c
index 6c8c1268a7..21b2e0f41c 100644
--- a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.c
+++ b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.c
@@ -152,7 +152,7 @@ sm_ag_if_ans_t write_ctrl_pdcp_sm(void const* data)
{
assert(data != NULL);
// assert(data->type == PDCP_CTRL_REQ_V0 );
- assert(0 !=0 && "Not supported");
+ printf("write_ctrl callback for PDCP SM: operation not supported\n");
sm_ag_if_ans_t ans = {0};
return ans;
}
diff --git a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.c b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.c
index d78c103fbf..08b070eb8d 100644
--- a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.c
+++ b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.c
@@ -174,6 +174,8 @@ void read_rlc_setup_sm(void* data)
sm_ag_if_ans_t write_ctrl_rlc_sm(void const* data)
{
(void)data;
- assert(0!=0 && "Not supported");
+ printf("write_ctrl callback for RLC SM: operation not supported\n");
+ sm_ag_if_ans_t ans = {0};
+ return ans;
}
diff --git a/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c b/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
index 748b4f7d29..40371df046 100644
--- a/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
+++ b/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
@@ -537,7 +537,7 @@ void read_kpm_setup_sm(void* e2ap)
sm_ag_if_ans_t write_ctrl_kpm_sm(void const* src)
{
- assert(0 !=0 && "Not supported");
+ printf("write_ctrl callback for KPM SM: operation not supported\n");
(void)src;
sm_ag_if_ans_t ans = {0};
return ans;
diff --git a/openair2/GNB_APP/L1_nr_paramdef.h b/openair2/GNB_APP/L1_nr_paramdef.h
index b6d2e87d9c..e313818ad2 100644
--- a/openair2/GNB_APP/L1_nr_paramdef.h
+++ b/openair2/GNB_APP/L1_nr_paramdef.h
@@ -59,6 +59,8 @@
#define HLP_L1TX_BO "Backoff from full-scale output at the L1 entity(frequency domain), ex. 12 would corresponding to 14-bit input level (6 dB/bit). Default 36 dBFS for OAI RU entity"
#define CONFIG_STRING_L1_PHASE_COMP "phase_compensation"
#define HLP_L1_PHASE_COMP "Apply NR symbolwise phase rotation"
+#define CONFIG_STRING_NUM_ANTENNAS_PER_THREAD "dmrs_num_antennas_per_thread"
+#define HLP_NUM_ARX "Number of antennas per thread for PUSCH channel estimation"
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* L1 configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
@@ -84,6 +86,7 @@
{CONFIG_STRING_L1_TX_THREAD_CORE, NULL, 0, .uptr=NULL, .defintval=-1, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_TX_AMP_BACKOFF_dB, HLP_L1TX_BO,0, .uptr=NULL, .defintval=36, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PHASE_COMP, HLP_L1_PHASE_COMP,PARAMFLAG_BOOL, .uptr=NULL,.defintval=1, TYPE_UINT, 0}, \
+ {CONFIG_STRING_NUM_ANTENNAS_PER_THREAD, HLP_NUM_ARX,0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \
}
// clang-format on
#define L1_CC_IDX 0
@@ -105,6 +108,7 @@
#define L1_TX_THREAD_CORE 16
#define L1_TX_AMP_BACKOFF_dB 17
#define L1_PHASE_COMP 18
+#define NUM_ANTENNAS_PER_THREAD 19
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif
diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c
index 44c402fb8a..0612fa9677 100644
--- a/openair2/GNB_APP/gnb_config.c
+++ b/openair2/GNB_APP/gnb_config.c
@@ -27,27 +27,64 @@
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr, kroempa@gmail.com
*/
-#include "executables/softmodem-common.h"
#include "gnb_config.h"
-#include "enb_paramdef.h"
-#include "UTIL/OTG/otg.h"
-#include "sctp_default_values.h"
-#include "f1ap_common.h"
-#include "PHY/INIT/nr_phy_init.h"
-#include "radio/ETHERNET/ethernet_lib.h"
-#include "nfapi_vnf.h"
-#include "nfapi_pnf.h"
-#include "prs_nr_paramdef.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "BIT_STRING.h"
#include "L1_nr_paramdef.h"
#include "MACRLC_nr_paramdef.h"
-#include "gnb_paramdef.h"
-#include "NR_MAC_gNB/mac_proto.h"
+#include "PHY/INIT/nr_phy_init.h"
+#include "PHY/defs_common.h"
+#include "PHY/defs_gNB.h"
+#include "PHY/defs_nr_common.h"
+#include "RRC/NR/nr_rrc_config.h"
#include "RRC/NR/nr_rrc_extern.h"
+#include "RRC_nr_paramsvalues.h"
+#include "T.h"
+#include "asn_SEQUENCE_OF.h"
+#include "asn_codecs.h"
+#include "asn_internal.h"
+#include "NR_MAC_gNB/nr_mac_gNB.h"
+#include "NR_MAC_gNB/mac_proto.h"
+#include "common/5g_platform_types.h"
+#include "common/config/config_paramdesc.h"
+#include "common/config/config_userapi.h"
+#include "common/openairinterface5g_limits.h"
+#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "common_lib.h"
+#include "constr_TYPE.h"
+#include "enb_paramdef.h"
+#include "executables/softmodem-common.h"
+#include "f1ap_common.h"
+#include "gnb_paramdef.h"
+#include "lib/f1ap_interface_management.h"
#include "nfapi/oai_integration/vendor_ext.h"
+#include "nfapi_pnf.h"
+#include "nfapi_vnf.h"
+#include "ngap_gNB.h"
+#include "ngap_messages_types.h"
+#include "nr_common.h"
+#include "oai_asn1.h"
+#include "openair1/PHY/defs_common.h"
+#include "prs_nr_paramdef.h"
+#include "radio/ETHERNET/if_defs.h"
+#include "rrc_messages_types.h"
+#include "s1ap_messages_types.h"
+#include "sctp_default_values.h"
+#include "seq_arr.h"
+#include "uper_encoder.h"
+#include "utils.h"
+#include "x2ap_messages_types.h"
#ifdef ENABLE_AERIAL
#include "nfapi/oai_integration/aerial/fapi_vnf_p5.h"
#endif
-#include "lib/f1ap_interface_management.h"
static int DEFBANDS[] = {7};
static int DEFENBS[] = {0};
@@ -914,6 +951,7 @@ void RCconfig_NR_L1(void)
LOG_I(NR_PHY, "L1_RX_THREAD_CORE %d (%d)\n", *(L1_ParamList.paramarray[j][L1_RX_THREAD_CORE].iptr), L1_RX_THREAD_CORE);
gNB->TX_AMP = (int16_t)(32767.0 / pow(10.0, .05 * (double)(*L1_ParamList.paramarray[j][L1_TX_AMP_BACKOFF_dB].uptr)));
gNB->phase_comp = *L1_ParamList.paramarray[j][L1_PHASE_COMP].uptr;
+ gNB->dmrs_num_antennas_per_thread = *(L1_ParamList.paramarray[j][NUM_ANTENNAS_PER_THREAD].uptr);
LOG_I(NR_PHY, "TX_AMP = %d (-%d dBFS)\n", gNB->TX_AMP, *L1_ParamList.paramarray[j][L1_TX_AMP_BACKOFF_dB].uptr);
AssertFatal(gNB->TX_AMP > 300, "TX_AMP is too small, must be larger than 300 (is %d)\n", gNB->TX_AMP);
// Midhaul configuration
diff --git a/openair2/GNB_APP/gnb_config.h b/openair2/GNB_APP/gnb_config.h
index 0a52684612..aaa945509c 100644
--- a/openair2/GNB_APP/gnb_config.h
+++ b/openair2/GNB_APP/gnb_config.h
@@ -29,23 +29,13 @@
#ifndef GNB_CONFIG_H_
#define GNB_CONFIG_H_
-#include
-#include
-#include
-#include
-
-#include "commonDef.h"
-#include "common/platform_types.h"
-#include "common/platform_constants.h"
-#include "PHY/defs_eNB.h"
-#include "s1ap_messages_types.h"
-#include "ngap_messages_types.h"
-#include "f1ap_messages_types.h"
-#include "e1ap_messages_types.h"
-
-#include "rrc_messages_types.h"
-#include "intertask_interface.h"
+#include
#include "RRC/NR/nr_rrc_defs.h"
+#include "assertions.h"
+#include "common/config/config_load_configmodule.h"
+#include "common/ngran_types.h"
+#include "f1ap_messages_types.h"
+#include "intertask_interface.h"
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
struct in_addr inp;\
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
index 28bf3bfc8e..08cfd7303c 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
@@ -2232,8 +2232,7 @@ static const uint16_t Table_51311[32][2] = {{2, 1200}, {2, 1570}, {2, 1930}, {2,
{4, 6580}, {6, 4380}, {6, 4660}, {6, 5170}, {6, 5670}, {6, 6160}, {6, 6660}, {6, 7190},
{6, 7720}, {6, 8220}, {6, 8730}, {6, 9100}, {6, 9480}, {2, 0}, {4, 0}, {6, 0}};
-//Table 5.1.3.1-2 of 38.214
-// Imcs values 20 and 26 have been multiplied by 2 to avoid the floating point
+// Table 5.1.3.1-2 of 38.214
static const uint16_t Table_51312[32][2] = {{2, 1200}, {2, 1930}, {2, 3080}, {2, 4490}, {2, 6020}, {4, 3780}, {4, 4340},
{4, 4900}, {4, 5530}, {4, 6160}, {4, 6580}, {6, 4660}, {6, 5170}, {6, 5670},
{6, 6160}, {6, 6660}, {6, 7190}, {6, 7720}, {6, 8220}, {6, 8730}, {8, 6825},
diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c
index 80e2255aa5..b430727955 100644
--- a/openair2/LAYER2/NR_MAC_UE/config_ue.c
+++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c
@@ -1676,6 +1676,32 @@ static int get_ta_offset(long *n_TimingAdvanceOffset)
return -1;
}
+static void configure_si_schedulingInfo(NR_UE_MAC_INST_t *mac,
+ NR_SI_SchedulingInfo_t *si_SchedulingInfo,
+ NR_SI_SchedulingInfo_v1700_t *si_SchedulingInfo_v1700)
+{
+ asn_sequence_empty(&mac->si_SchedInfo.si_SchedInfo_list);
+ if (si_SchedulingInfo) {
+ mac->si_SchedInfo.si_WindowLength = si_SchedulingInfo->si_WindowLength;
+ for (int i = 0; i < si_SchedulingInfo->schedulingInfoList.list.count; i++) {
+ si_schedinfo_config_t *config = calloc_or_fail(1, sizeof(*config));
+ config->type = NR_SI_INFO;
+ config->si_WindowPosition = i + 1;
+ config->si_Periodicity = si_SchedulingInfo->schedulingInfoList.list.array[i]->si_Periodicity;
+ ASN_SEQUENCE_ADD(&mac->si_SchedInfo.si_SchedInfo_list, config);
+ }
+ }
+ if (si_SchedulingInfo_v1700) {
+ for (int i = 0; i < si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.count; i++) {
+ si_schedinfo_config_t *config = calloc_or_fail(1, sizeof(*config));
+ config->type = NR_SI_INFO_v1700;
+ config->si_WindowPosition = si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.array[i]->si_WindowPosition_r17;
+ config->si_Periodicity = si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.array[i]->si_Periodicity_r17;
+ ASN_SEQUENCE_ADD(&mac->si_SchedInfo.si_SchedInfo_list, config);
+ }
+ }
+}
+
void nr_rrc_mac_config_req_sib1(module_id_t module_id,
int cc_idP,
NR_SI_SchedulingInfo_t *si_SchedulingInfo,
@@ -1688,8 +1714,7 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id,
AssertFatal(scc, "SIB1 SCC should not be NULL\n");
UPDATE_IE(mac->tdd_UL_DL_ConfigurationCommon, scc->tdd_UL_DL_ConfigurationCommon, NR_TDD_UL_DL_ConfigCommon_t);
- UPDATE_IE(mac->si_SchedulingInfo, si_SchedulingInfo, NR_SI_SchedulingInfo_t);
- UPDATE_IE(mac->si_SchedulingInfo_v1700, si_SchedulingInfo_v1700, NR_SI_SchedulingInfo_v1700_t);
+ configure_si_schedulingInfo(mac, si_SchedulingInfo, si_SchedulingInfo_v1700);
mac->n_ta_offset = get_ta_offset(scc->n_TimingAdvanceOffset);
config_common_ue_sa(mac, scc, cc_idP);
@@ -1734,35 +1759,32 @@ void nr_rrc_mac_config_req_sib19_r17(module_id_t module_id,
static void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac,
int cc_idP,
- const NR_ReconfigurationWithSync_t *reconfigurationWithSync)
+ const NR_ReconfigurationWithSync_t *reconfWithSync)
{
- mac->crnti = reconfigurationWithSync->newUE_Identity;
+ reset_mac_inst(mac);
+ mac->crnti = reconfWithSync->newUE_Identity;
LOG_I(NR_MAC, "Configuring CRNTI %x\n", mac->crnti);
RA_config_t *ra = &mac->ra;
- if (reconfigurationWithSync->rach_ConfigDedicated) {
- AssertFatal(
- reconfigurationWithSync->rach_ConfigDedicated->present == NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink,
- "RACH on supplementaryUplink not supported\n");
- UPDATE_IE(ra->rach_ConfigDedicated, reconfigurationWithSync->rach_ConfigDedicated->choice.uplink, NR_RACH_ConfigDedicated_t);
+ if (reconfWithSync->rach_ConfigDedicated) {
+ AssertFatal(reconfWithSync->rach_ConfigDedicated->present == NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink,
+ "RACH on supplementaryUplink not supported\n");
+ UPDATE_IE(ra->rach_ConfigDedicated, reconfWithSync->rach_ConfigDedicated->choice.uplink, NR_RACH_ConfigDedicated_t);
}
- if (reconfigurationWithSync->spCellConfigCommon) {
- NR_ServingCellConfigCommon_t *scc = reconfigurationWithSync->spCellConfigCommon;
+ if (reconfWithSync->spCellConfigCommon) {
+ NR_ServingCellConfigCommon_t *scc = reconfWithSync->spCellConfigCommon;
mac->n_ta_offset = get_ta_offset(scc->n_TimingAdvanceOffset);
if (scc->physCellId)
mac->physCellId = *scc->physCellId;
mac->dmrs_TypeA_Position = scc->dmrs_TypeA_Position;
UPDATE_IE(mac->tdd_UL_DL_ConfigurationCommon, scc->tdd_UL_DL_ConfigurationCommon, NR_TDD_UL_DL_ConfigCommon_t);
config_common_ue(mac, scc, cc_idP);
+ const int bwp_id = 0;
if (scc->downlinkConfigCommon)
- configure_common_BWP_dl(mac,
- 0, // bwp-id
- scc->downlinkConfigCommon->initialDownlinkBWP);
+ configure_common_BWP_dl(mac, bwp_id, scc->downlinkConfigCommon->initialDownlinkBWP);
if (scc->uplinkConfigCommon)
- configure_common_BWP_ul(mac,
- 0, // bwp-id
- scc->uplinkConfigCommon->initialUplinkBWP);
+ configure_common_BWP_ul(mac, bwp_id, scc->uplinkConfigCommon->initialUplinkBWP);
}
mac->state = UE_NOT_SYNC;
diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h
index 1530846d6b..51b9c29058 100644
--- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h
+++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h
@@ -385,13 +385,15 @@ typedef struct {
uint32_t R;
uint32_t TBS;
int last_ndi;
-} NR_UE_HARQ_STATUS_t;
+ int round;
+} NR_UE_DL_HARQ_STATUS_t;
typedef struct {
uint32_t R;
uint32_t TBS;
int last_ndi;
-} NR_UL_HARQ_INFO_t;
+ int round;
+} NR_UE_UL_HARQ_INFO_t;
typedef struct {
uint8_t freq_hopping;
@@ -510,6 +512,48 @@ typedef enum {
ON_PUSCH
} CSI_mapping_t;
+typedef struct {
+ uint64_t rounds[NR_MAX_HARQ_ROUNDS_FOR_STATS];
+ uint64_t total_bits;
+ uint64_t total_symbols;
+ uint64_t target_code_rate;
+ uint64_t qam_mod_order;
+ uint64_t rb_size;
+ uint64_t nr_of_symbols;
+} ue_mac_dir_stats_t;
+
+typedef struct {
+ ue_mac_dir_stats_t dl;
+ ue_mac_dir_stats_t ul;
+ uint32_t bad_dci;
+ uint32_t ulsch_DTX;
+ uint64_t ulsch_total_bytes_scheduled;
+ uint32_t pucch0_DTX;
+ int cumul_rsrp;
+ uint8_t num_rsrp_meas;
+ char srs_stats[50]; // Statistics may differ depending on SRS usage
+ int pusch_snrx10;
+ int deltaMCS;
+ int NPRB;
+} ue_mac_stats_t;
+
+typedef enum {
+ NR_SI_INFO,
+ NR_SI_INFO_v1700
+} nr_si_info_type;
+
+typedef struct {
+ nr_si_info_type type;
+ long si_Periodicity;
+ long si_WindowPosition;
+} si_schedinfo_config_t;
+
+typedef struct {
+ int si_window_start;
+ int si_WindowLength;
+ A_SEQUENCE_OF(si_schedinfo_config_t) si_SchedInfo_list;
+} si_schedInfo_t;
+
/*!\brief Top level UE MAC structure */
typedef struct NR_UE_MAC_INST_s {
module_id_t ue_id;
@@ -520,9 +564,8 @@ typedef struct NR_UE_MAC_INST_s {
bool get_sib1;
bool get_otherSI;
NR_MIB_t *mib;
- struct NR_SI_SchedulingInfo *si_SchedulingInfo;
- struct NR_SI_SchedulingInfo_v1700 *si_SchedulingInfo_v1700;
- int si_window_start;
+
+ si_schedInfo_t si_SchedInfo;
ssb_list_info_t ssb_list[MAX_NUM_BWP_UE];
prach_association_pattern_t prach_assoc_pattern[MAX_NUM_BWP_UE];
@@ -594,8 +637,8 @@ typedef struct NR_UE_MAC_INST_s {
// Defined for abstracted mode
nr_downlink_indication_t dl_info;
- NR_UE_HARQ_STATUS_t dl_harq_info[NR_MAX_HARQ_PROCESSES];
- NR_UL_HARQ_INFO_t ul_harq_info[NR_MAX_HARQ_PROCESSES];
+ NR_UE_DL_HARQ_STATUS_t dl_harq_info[NR_MAX_HARQ_PROCESSES];
+ NR_UE_UL_HARQ_INFO_t ul_harq_info[NR_MAX_HARQ_PROCESSES];
NR_TAG_Id_t tag_Id;
A_SEQUENCE_OF(NR_TAG_t) TAG_list;
@@ -615,6 +658,7 @@ typedef struct NR_UE_MAC_INST_s {
bool pusch_power_control_initialized;
int delta_msg2;
pthread_mutex_t if_mutex;
+ ue_mac_stats_t stats;
} NR_UE_MAC_INST_t;
/*@}*/
diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
index 68dd57efd1..76dd88d07d 100644
--- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
@@ -60,7 +60,7 @@ void nr_ue_init_mac(NR_UE_MAC_INST_t *mac)
mac->get_sib1 = false;
mac->get_otherSI = false;
memset(&mac->phy_config, 0, sizeof(mac->phy_config));
- mac->si_window_start = -1;
+ mac->si_SchedInfo.si_window_start = -1;
mac->servCellIndex = 0;
mac->harq_ACK_SpatialBundlingPUCCH = false;
mac->harq_ACK_SpatialBundlingPUSCH = false;
@@ -240,8 +240,7 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
nr_mac->scheduling_info.phr_info.was_mac_reset = true;
// flush the soft buffers for all DL HARQ processes
- for (int k = 0; k < NR_MAX_HARQ_PROCESSES; k++)
- memset(&nr_mac->dl_harq_info[k], 0, sizeof(NR_UE_HARQ_STATUS_t));
+ memset(nr_mac->dl_harq_info, 0, sizeof(nr_mac->dl_harq_info));
// for each DL HARQ process, consider the next received transmission for a TB as the very first transmission
for (int k = 0; k < NR_MAX_HARQ_PROCESSES; k++)
@@ -262,7 +261,7 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac, NR_UE_MAC_reset_cause_t ca
asn1cFreeStruc(asn_DEF_NR_MIB, mac->mib);
asn1cFreeStruc(asn_DEF_NR_SearchSpace, mac->search_space_zero);
asn1cFreeStruc(asn_DEF_NR_ControlResourceSet, mac->coreset0);
- asn1cFreeStruc(asn_DEF_NR_SI_SchedulingInfo, mac->si_SchedulingInfo);
+ asn_sequence_empty(&mac->si_SchedInfo.si_SchedInfo_list);
asn1cFreeStruc(asn_DEF_NR_TDD_UL_DL_ConfigCommon, mac->tdd_UL_DL_ConfigurationCommon);
for (int i = mac->lc_ordered_list.count; i > 0 ; i--)
asn_sequence_del(&mac->lc_ordered_list, i - 1, 1);
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
index 53f29ff056..26fcd95757 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
@@ -1053,7 +1053,7 @@ void trigger_MAC_UE_RA(NR_UE_MAC_INST_t *mac)
void prepare_msg4_msgb_feedback(NR_UE_MAC_INST_t *mac, int pid, int ack_nack)
{
- NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[pid];
+ NR_UE_DL_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[pid];
int sched_slot = current_harq->ul_slot;
int sched_frame = current_harq->ul_frame;
mac->nr_ue_emul_l1.num_harqs = 1;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
index 1c01f84d4d..debd5226be 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
@@ -444,8 +444,8 @@ bool search_space_monitoring_ocasion_other_si(NR_UE_MAC_INST_t *mac,
int K = mac->ssb_list->nb_ssb_per_index[mac->mib_ssb];
// numbering current frame and slot in terms of monitoring occasions in window
- int current_monitor_occasion =
- ((abs_slot - mac->si_window_start) % period) + (duration * (abs_slot - mac->si_window_start) / period);
+ int rel_slot = abs_slot - mac->si_SchedInfo.si_window_start;
+ int current_monitor_occasion = (rel_slot % period) + (duration * rel_slot / period);
return current_monitor_occasion % N == K;
}
}
@@ -455,12 +455,12 @@ bool search_space_monitoring_ocasion_other_si(NR_UE_MAC_INST_t *mac,
bool is_window_valid(NR_UE_MAC_INST_t *mac, int window_slots, int abs_slot)
{
- if (mac->si_window_start == -1) {
+ if (mac->si_SchedInfo.si_window_start == -1) {
// out of window
return false;
- } else if (abs_slot > mac->si_window_start + window_slots) {
+ } else if (abs_slot > mac->si_SchedInfo.si_window_start + window_slots) {
// window expired
- mac->si_window_start = -1;
+ mac->si_SchedInfo.si_window_start = -1;
return false;
}
return true;
@@ -472,56 +472,38 @@ bool monitor_dci_for_other_SI(NR_UE_MAC_INST_t *mac,
const int frame,
const int slot)
{
- const struct NR_SI_SchedulingInfo *si_SchedulingInfo = mac->si_SchedulingInfo;
- const struct NR_SI_SchedulingInfo_v1700 *si_SchedulingInfo_v1700 = mac->si_SchedulingInfo_v1700;
- // 5.2.2.3.2 in 331
-
- if (!si_SchedulingInfo_v1700 && !si_SchedulingInfo) {
- LOG_D(NR_MAC_DCI, "No scheduling info provided in SIB1\n");
- return false;
- }
-
+ // according to 5.2.2.3.2 in 331
const int abs_slot = frame * slots_per_frame + slot;
const int bwp_id = mac->current_DL_BWP->bwp_id;
- if (si_SchedulingInfo) {
- const int si_window_slots = 5 << si_SchedulingInfo->si_WindowLength;
- for (int n = 0; n < si_SchedulingInfo->schedulingInfoList.list.count; n++) {
- struct NR_SchedulingInfo *sched_Info = si_SchedulingInfo->schedulingInfoList.list.array[n];
- if (mac->si_window_start == -1) {
- int x = n * si_window_slots;
- int T = 8 << sched_Info->si_Periodicity; // radio frame periodicity
- if ((frame % T) == (x / slots_per_frame) && (x % slots_per_frame == 0))
- mac->si_window_start = abs_slot; // in terms of absolute slot number
- }
- bool check_valid = is_window_valid(mac, si_window_slots, abs_slot);
- if (check_valid && search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id)) {
- return true;
- }
- }
- }
-
- if (si_SchedulingInfo_v1700) {
- for (int n = 0; n < si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.count; n++) {
- struct NR_SchedulingInfo2_r17 *sched_Info = si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.array[n];
-
- const int T = 8 << sched_Info->si_Periodicity_r17;
- const int window_slots = 5 << 1; // 10 slots
- const int x = ((sched_Info->si_WindowPosition_r17 - 1) * window_slots); // currently window starts from slot 0, maybe + 1?
- const int N = 10; // TS 38.211
-
- if (mac->si_window_start == -1) {
- // this condition will calculate where SI-window starts
- // 5.2.2.3.2
- if ((frame % T == floor(x / N)) && (slot == x % N)) {
- mac->si_window_start = abs_slot;
+ for (int i = 0; i < mac->si_SchedInfo.si_SchedInfo_list.count; i++) {
+ si_schedinfo_config_t *config = mac->si_SchedInfo.si_SchedInfo_list.array[i];
+ int window_slots = 5 << mac->si_SchedInfo.si_WindowLength;
+ int x = (config->si_WindowPosition - 1) * window_slots;
+ int T = 8 << config->si_Periodicity; // radio frame periodicity
+ bool check_valid;
+ switch (config->type) {
+ case NR_SI_INFO :
+ if (mac->si_SchedInfo.si_window_start == -1) {
+ if ((frame % T) == (x / slots_per_frame) && (x % slots_per_frame == 0))
+ mac->si_SchedInfo.si_window_start = abs_slot; // in terms of absolute slot number
}
- }
-
- bool check_valid = is_window_valid(mac, window_slots, abs_slot);
- if (check_valid && (sched_Info->si_WindowPosition_r17 - 1) == slot) {
- return search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id);
- }
+ check_valid = is_window_valid(mac, window_slots, abs_slot);
+ if (check_valid && search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id))
+ return true;
+ break;
+ case NR_SI_INFO_v1700 :
+ if (mac->si_SchedInfo.si_window_start == -1) {
+ if ((frame % T == floor(x / slots_per_frame)) && (slot == x % slots_per_frame))
+ mac->si_SchedInfo.si_window_start = abs_slot;
+ }
+ window_slots = 10; // TODO window length hardcoded to 10 at gNB for NTN
+ check_valid = is_window_valid(mac, window_slots, abs_slot);
+ if (check_valid && (config->si_WindowPosition - 1) == slot)
+ return search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id);
+ break;
+ default :
+ AssertFatal(false, "Invalid SI-SchedulingInfo case\n");
}
}
return false;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index c871a696da..5376d85ef8 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -806,7 +806,7 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac,
/* MCS */
dlsch_pdu->mcs = dci->mcs;
- NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[dci->harq_pid.val];
+ NR_UE_DL_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[dci->harq_pid.val];
/* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/
if (dl_conf_req->pdu_type == FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH ||
dl_conf_req->pdu_type == FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH ||
@@ -815,9 +815,9 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac,
dlsch_pdu->new_data_indicator = true;
current_harq->R = 0;
current_harq->TBS = 0;
- }
- else
+ } else {
dlsch_pdu->new_data_indicator = false;
+ }
if (dl_conf_req->pdu_type != FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH &&
dl_conf_req->pdu_type != FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH) {
@@ -935,6 +935,12 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac,
dci_ind->N_CCE,
frame,
slot);
+ if (dlsch_pdu->new_data_indicator)
+ current_harq->round = 0;
+ else
+ current_harq->round++;
+ if (current_harq->round < sizeofArray(mac->stats.dl.rounds))
+ mac->stats.dl.rounds[current_harq->round]++;
}
LOG_D(MAC,
@@ -1126,7 +1132,7 @@ static int nr_ue_process_dci_dl_11(NR_UE_MAC_INST_t *mac,
/* MCS (for transport block 1)*/
dlsch_pdu->mcs = dci->mcs;
/* NDI (for transport block 1)*/
- NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[dci->harq_pid.val];
+ NR_UE_DL_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[dci->harq_pid.val];
if (dci->ndi != current_harq->last_ndi) {
// new data
dlsch_pdu->new_data_indicator = true;
@@ -1275,6 +1281,12 @@ static int nr_ue_process_dci_dl_11(NR_UE_MAC_INST_t *mac,
dci_ind->N_CCE,
frame,
slot);
+ if (dlsch_pdu->new_data_indicator)
+ current_harq->round = 0;
+ else
+ current_harq->round++;
+ if (current_harq->round < sizeofArray(mac->stats.dl.rounds))
+ mac->stats.dl.rounds[current_harq->round]++;
// send the ack/nack slot number to phy to indicate tx thread to wait for DLSCH decoding
dlsch_pdu->k1_feedback = feedback_ti;
@@ -1432,10 +1444,11 @@ nr_dci_format_t nr_ue_process_dci_indication_pdu(NR_UE_MAC_INST_t *mac, frame_t
nr_extract_dci_info(mac, dci->dci_format, dci->payloadSize, dci->rnti, dci->ss_type, dci->payloadBits, slot);
if (format == NR_DCI_NONE)
return NR_DCI_NONE;
- dci_pdu_rel15_t *def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[slot][format];
- int ret = nr_ue_process_dci(mac, frame, slot, def_dci_pdu_rel15, dci, format);
- if (ret < 0)
+ int ret = nr_ue_process_dci(mac, frame, slot, mac->def_dci_pdu_rel15[slot] + format, dci, format);
+ if (ret < 0) {
+ mac->stats.bad_dci++;
return NR_DCI_NONE;
+ }
return format;
}
@@ -1459,7 +1472,7 @@ void set_harq_status(NR_UE_MAC_INST_t *mac,
frame_t frame,
int slot)
{
- NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[harq_id];
+ NR_UE_DL_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[harq_id];
current_harq->active = true;
current_harq->ack_received = false;
current_harq->pucch_resource_indicator = pucch_id;
@@ -1486,7 +1499,7 @@ void set_harq_status(NR_UE_MAC_INST_t *mac,
// looking for other active HARQ processes with feedback in the same frame/slot
if (i == harq_id)
continue;
- NR_UE_HARQ_STATUS_t *harq = &mac->dl_harq_info[i];
+ NR_UE_DL_HARQ_STATUS_t *harq = &mac->dl_harq_info[i];
if (harq->active &&
harq->ul_frame == current_harq->ul_frame &&
harq->ul_slot == current_harq->ul_slot) {
@@ -2331,7 +2344,7 @@ bool get_downlink_ack(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, PUCCH_sche
for (int dl_harq_pid = 0; dl_harq_pid < num_dl_harq; dl_harq_pid++) {
- NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[dl_harq_pid];
+ NR_UE_DL_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[dl_harq_pid];
if (current_harq->active) {
LOG_D(PHY, "HARQ pid %d is active for %d.%d\n",
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index ff44c21541..65597bd3dd 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -166,8 +166,8 @@ void handle_time_alignment_timer_expired(NR_UE_MAC_INST_t *mac)
{
// flush all HARQ buffers for all Serving Cells
for (int k = 0; k < NR_MAX_HARQ_PROCESSES; k++) {
- memset(&mac->dl_harq_info[k], 0, sizeof(NR_UE_HARQ_STATUS_t));
- memset(&mac->ul_harq_info[k], 0, sizeof(NR_UL_HARQ_INFO_t));
+ memset(&mac->dl_harq_info[k], 0, sizeof(*mac->dl_harq_info));
+ memset(&mac->ul_harq_info[k], 0, sizeof(*mac->ul_harq_info));
mac->dl_harq_info[k].last_ndi = -1; // initialize to invalid value
mac->ul_harq_info[k].last_ndi = -1; // initialize to invalid value
}
@@ -704,6 +704,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
0,
f_alloc) < 0) {
LOG_E(NR_MAC, "can't nr_ue_process_dci_freq_dom_resource_assignment()\n");
+ mac->stats.bad_dci++;
return -1;
}
@@ -713,7 +714,6 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
// Time domain allocation
pusch_config_pdu->start_symbol_index = tda_info->startSymbolIndex;
pusch_config_pdu->nr_of_symbols = tda_info->nrOfSymbols;
-
l_prime_mask = get_l_prime(tda_info->nrOfSymbols,
tda_info->mapping_type,
add_pos,
@@ -817,11 +817,13 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
ul_ports_config(mac, &dmrslength, pusch_config_pdu, dci, dci_format);
} else {
LOG_E(NR_MAC, "UL grant from DCI format %d is not handled...\n", dci_format);
+ mac->stats.bad_dci++;
return -1;
}
if (pusch_config_pdu->nrOfLayers < 1) {
LOG_E(NR_MAC, "Invalid UL number of layers %d from DCI\n", pusch_config_pdu->nrOfLayers);
+ mac->stats.bad_dci++;
return -1;
}
@@ -892,6 +894,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
0,
dci->frequency_domain_assignment) < 0) {
LOG_E(NR_MAC, "can't nr_ue_process_dci_freq_dom_resource_assignment()\n");
+ mac->stats.bad_dci++;
return -1;
}
@@ -910,18 +913,20 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu->mcs_table = get_pusch_mcs_table(mcs_table_config, tp_enabled, dci_format, rnti_type, ss_type, false);
/* NDI */
- NR_UL_HARQ_INFO_t *harq = &mac->ul_harq_info[dci->harq_pid.val];
+ const int pid = dci->harq_pid.val;
+ NR_UE_UL_HARQ_INFO_t *harq = &mac->ul_harq_info[pid];
pusch_config_pdu->pusch_data.new_data_indicator = false;
if (dci->ndi != harq->last_ndi) {
pusch_config_pdu->pusch_data.new_data_indicator = true;
// if new data reset harq structure
memset(harq, 0, sizeof(*harq));
- }
+ } else
+ harq->round++;
harq->last_ndi = dci->ndi;
/* RV */
pusch_config_pdu->pusch_data.rv_index = dci->rv;
/* HARQ_PROCESS_NUMBER */
- pusch_config_pdu->pusch_data.harq_process_id = dci->harq_pid.val;
+ pusch_config_pdu->pusch_data.harq_process_id = pid;
if (NR_DMRS_ulconfig != NULL)
add_pos = (NR_DMRS_ulconfig->dmrs_AdditionalPosition == NULL) ? 2 : *NR_DMRS_ulconfig->dmrs_AdditionalPosition;
@@ -994,6 +999,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu->qam_mod_order = nr_get_Qm_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
if (pusch_config_pdu->qam_mod_order == 0) {
LOG_W(NR_MAC, "Invalid Mod order, likely due to unexpected UL DCI. Ignoring DCI! \n");
+ mac->stats.bad_dci++;
return -1;
}
@@ -1001,15 +1007,16 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
int number_of_symbols = pusch_config_pdu->nr_of_symbols;
int number_dmrs_symbols = 0;
for (int i = start_symbol; i < start_symbol + number_of_symbols; i++) {
- if((pusch_config_pdu->ul_dmrs_symb_pos >> i) & 0x01)
+ if ((pusch_config_pdu->ul_dmrs_symb_pos >> i) & 0x01)
number_dmrs_symbols += 1;
}
- int nb_dmrs_re_per_rb = ((pusch_config_pdu->dmrs_config_type == pusch_dmrs_type1) ? 6 : 4) * pusch_config_pdu->num_dmrs_cdm_grps_no_data;
+ int nb_dmrs_re_per_rb =
+ ((pusch_config_pdu->dmrs_config_type == pusch_dmrs_type1) ? 6 : 4) * pusch_config_pdu->num_dmrs_cdm_grps_no_data;
// Compute TBS
uint16_t R = nr_get_code_rate_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
- int pid = pusch_config_pdu->pusch_data.harq_process_id;
+ const int pid = pusch_config_pdu->pusch_data.harq_process_id;
if (R > 0) {
pusch_config_pdu->target_code_rate = R;
pusch_config_pdu->pusch_data.tb_size = nr_compute_tbs(pusch_config_pdu->qam_mod_order,
@@ -1022,8 +1029,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu->nrOfLayers) >> 3;
mac->ul_harq_info[pid].TBS = pusch_config_pdu->pusch_data.tb_size;
mac->ul_harq_info[pid].R = R;
- }
- else {
+ } else {
pusch_config_pdu->target_code_rate = mac->ul_harq_info[pid].R;
pusch_config_pdu->pusch_data.tb_size = mac->ul_harq_info[pid].TBS;
}
@@ -1052,7 +1058,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu->rb_start,
pusch_config_pdu->nr_of_symbols,
nb_dmrs_re_per_rb * number_dmrs_symbols,
- 0, //TODO: count PTRS per RB
+ 0, // TODO: count PTRS per RB
pusch_config_pdu->qam_mod_order,
pusch_config_pdu->target_code_rate,
pusch_config_pdu->pusch_uci.beta_offset_csi1,
@@ -1063,12 +1069,13 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu->ldpcBaseGraph = get_BG(pusch_config_pdu->pusch_data.tb_size << 3, pusch_config_pdu->target_code_rate);
- //The MAC entity shall restart retxBSR-Timer upon reception of a grant for transmission of new data on any UL-SCH
+ // The MAC entity shall restart retxBSR-Timer upon reception of a grant for transmission of new data on any UL-SCH
if (pusch_config_pdu->pusch_data.new_data_indicator && dci && dci->ulsch_indicator)
nr_timer_start(&mac->scheduling_info.retxBSR_Timer);
if (pusch_config_pdu->pusch_data.tb_size == 0) {
LOG_E(MAC, "Invalid TBS = 0. Probably caused by missed detection of DCI\n");
+ mac->stats.bad_dci++;
return -1;
}
@@ -1081,6 +1088,14 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
nr_timer_start(&mac->scheduling_info.phr_info.periodicPHR_Timer);
}
}
+ if (mac->ul_harq_info[pid].round < sizeofArray(mac->stats.ul.rounds))
+ mac->stats.ul.rounds[mac->ul_harq_info[pid].round]++;
+ int bits = pusch_config_pdu->pusch_data.tb_size;
+ mac->stats.ul.total_bits += bits;
+ mac->stats.ul.target_code_rate += pusch_config_pdu->target_code_rate * bits;
+ mac->stats.ul.total_symbols += bits / pusch_config_pdu->qam_mod_order;
+ mac->stats.ul.rb_size += pusch_config_pdu->rb_size;
+ mac->stats.ul.nr_of_symbols += pusch_config_pdu->nr_of_symbols;
return 0;
}
@@ -2124,9 +2139,9 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
tx_ssb->nb_mapped_ro);
// If all the required SSBs are mapped to this RO, exit the loop of SSBs
if (ro_p->nb_mapped_ssb == ssb_rach_ratio) {
- idx++;
- break;
- }
+ idx++;
+ break;
+ }
}
done = MAX_NB_SSB == idx;
}
diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c
index 9ded767395..4927f407d0 100644
--- a/openair2/LAYER2/NR_MAC_gNB/config.c
+++ b/openair2/LAYER2/NR_MAC_gNB/config.c
@@ -30,26 +30,37 @@
*/
-#include "common/platform_types.h"
-#include "common/platform_constants.h"
-#include "common/ran_context.h"
-#include "common/utils/nr/nr_common.h"
-#include "common/utils/LOG/log.h"
-#include "common/utils/LOG/vcd_signal_dumper.h"
-
+#include
+#include
+#include
+#include
+#include
+#include "BIT_STRING.h"
+#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
+#include "LAYER2/NR_MAC_gNB/mac_proto.h"
+#include "NR_MIB.h"
+#include "NR_MAC_COMMON/nr_mac_extern.h"
+#include "NR_MAC_gNB/nr_mac_gNB.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_ServingCellConfigCommon.h"
-#include "uper_encoder.h"
-
-#include "LAYER2/NR_MAC_gNB/mac_proto.h"
-#include "SCHED_NR/phy_frame_config_nr.h"
-
#include "NR_MIB.h"
-#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
-#include "nfapi/oai_integration/vendor_ext.h"
-/* Softmodem params */
+#include "PHY/TOOLS/tools_defs.h"
+#include "PHY/defs_common.h"
+#include "RRC/NR/nr_rrc_config.h"
+#include "SCHED_NR/phy_frame_config_nr.h"
+#include "T.h"
+#include "asn_internal.h"
+#include "assertions.h"
+#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "common/utils/nr/nr_common.h"
#include "executables/softmodem-common.h"
-#include
+#include "f1ap_messages_types.h"
+#include "nfapi/oai_integration/vendor_ext.h"
+#include "nfapi_interface.h"
+#include "nfapi_nr_interface.h"
+#include "nfapi_nr_interface_scf.h"
+#include "utils.h"
extern RAN_CONTEXT_t RC;
//extern int l2_init_gNB(void);
diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c
index a663ed522c..f8e6d120de 100644
--- a/openair2/LAYER2/NR_MAC_gNB/main.c
+++ b/openair2/LAYER2/NR_MAC_gNB/main.c
@@ -30,17 +30,47 @@
*/
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "NR_DRB-ToAddMod.h"
+#include "NR_DRB-ToAddModList.h"
+#include "NR_MAC_COMMON/nr_mac.h"
+#include "NR_MAC_COMMON/nr_mac_common.h"
#include "NR_MAC_gNB/mac_proto.h"
-#include "NR_MAC_COMMON/nr_mac_extern.h"
+#include "NR_MAC_gNB/mac_rrc_ul.h"
+#include "NR_MAC_gNB/nr_mac_gNB.h"
+#include "NR_PHY_INTERFACE/NR_IF_Module.h"
+#include "NR_RLC-BearerConfig.h"
+#include "NR_RadioBearerConfig.h"
+#include "NR_ServingCellConfig.h"
+#include "NR_ServingCellConfigCommon.h"
+#include "NR_TAG.h"
+#include "PHY/defs_common.h"
+#include "RRC/NR/MESSAGES/asn1_msg.h"
+#include "RRC/NR/nr_rrc_config.h"
#include "assertions.h"
+#include "common/ngran_types.h"
+#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "executables/softmodem-common.h"
+#include "linear_alloc.h"
+#include "nr_pdcp/nr_pdcp_entity.h"
#include "nr_pdcp/nr_pdcp_oai_api.h"
-
-#include "common/utils/LOG/log.h"
#include "nr_rlc/nr_rlc_oai_api.h"
#include "openair2/F1AP/f1ap_ids.h"
-
-#include "common/ran_context.h"
-#include "executables/softmodem-common.h"
+#include "rlc.h"
+#include "seq_arr.h"
+#include "system.h"
+#include "time_meas.h"
+#include "utils.h"
extern RAN_CONTEXT_t RC;
diff --git a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
index e0ac130279..ab2756c3cd 100644
--- a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
+++ b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
@@ -20,20 +20,33 @@
*/
#include "cucp_cuup_handler.h"
-
+#include
+#include
+#include
+#include
+#include "NR_DRB-ToAddMod.h"
#include "NR_DRB-ToAddModList.h"
-
-#include "common/platform_types.h"
-#include "intertask_interface.h"
-#include "openair2/COMMON/e1ap_messages_types.h"
-#include "openair3/ocp-gtpu/gtp_itf.h"
-#include "openair2/F1AP/f1ap_ids.h"
-#include "nr_pdcp_oai_api.h"
-#include "cuup_cucp_if.h"
+#include "NR_PDCP-Config.h"
+#include "NR_QFI.h"
+#include "NR_SDAP-Config.h"
+#include "PHY/defs_common.h"
+#include "RRC/NR/nr_rrc_common.h"
+#include "SDAP/nr_sdap/nr_sdap_entity.h"
+#include "asn_internal.h"
+#include "assertions.h"
+#include "common/utils/T/T.h"
#include "common/utils/oai_asn1.h"
-#include "openair2/SDAP/nr_sdap/nr_sdap.h"
+#include "constr_TYPE.h"
+#include "cuup_cucp_if.h"
+#include "gtpv1_u_messages_types.h"
+#include "nr_pdcp/nr_pdcp_entity.h"
+#include "nr_pdcp_oai_api.h"
+#include "openair2/COMMON/e1ap_messages_types.h"
#include "openair2/E1AP/e1ap_common.h"
#include "openair2/F1AP/f1ap_common.h"
+#include "openair2/F1AP/f1ap_ids.h"
+#include "openair2/SDAP/nr_sdap/nr_sdap.h"
+#include "openair3/ocp-gtpu/gtp_itf.h"
static void fill_DRB_configList_e1(NR_DRB_ToAddModList_t *DRB_configList, const pdu_session_to_setup_t *pdu)
{
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
index a416ddd617..cb80ec99ce 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
@@ -22,27 +22,50 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
-#include "nr_pdcp_asn1_utils.h"
-#include "nr_pdcp_ue_manager.h"
-#include "nr_pdcp_timer_thread.h"
-#include "NR_RadioBearerConfig.h"
-#include "NR_RLC-BearerConfig.h"
-#include "NR_RLC-Config.h"
-#include "NR_CellGroupConfig.h"
-#include "openair2/RRC/NR/nr_rrc_proto.h"
-#include "common/utils/mem/oai_memory.h"
-#include
-
-/* from OAI */
-#include "oai_asn1.h"
#include "nr_pdcp_oai_api.h"
-#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
-#include "openair2/F1AP/f1ap_ids.h"
+#include
+#include
#include
-#include "openair2/SDAP/nr_sdap/nr_sdap.h"
-#include "gnb_config.h"
-#include "executables/softmodem-common.h"
+#include
+#include
+#include
+#include
+#include
+#include "LAYER2/MAC/mac_extern.h"
+#include "LTE_DRB-ToAddModList.h"
+#include "LTE_DRB-ToReleaseList.h"
+#include "LTE_PMCH-InfoList-r9.h"
+#include "LTE_SRB-ToAddModList.h"
+#include "NR_DRB-ToAddMod.h"
+#include "NR_QFI.h"
+#include "NR_SDAP-Config.h"
+#include "NR_SRB-ToAddMod.h"
+#include "SDAP/nr_sdap/nr_sdap_entity.h"
+#include "assertions.h"
+#include "common/ngran_types.h"
+#include "common/platform_constants.h"
+#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "common/utils/tun_if.h"
#include "cuup_cucp_if.h"
+#include "executables/lte-softmodem.h"
+#include "executables/softmodem-common.h"
+#include "f1ap_messages_types.h"
+#include "gnb_config.h"
+#include "gtpv1_u_messages_types.h"
+#include "hashtable.h"
+#include "intertask_interface.h"
+#include "common/utils/LOG/log.h"
+#include "nfapi/oai_integration/vendor_ext.h"
+#include "nr_pdcp_asn1_utils.h"
+#include "nr_pdcp_timer_thread.h"
+#include "nr_pdcp_ue_manager.h"
+#include "openair2/F1AP/f1ap_ids.h"
+#include "openair2/SDAP/nr_sdap/nr_sdap.h"
+#include "pdcp.h"
+#include "pdcp_messages_types.h"
+#include "rlc.h"
+#include "utils.h"
#define TODO do { \
printf("%s:%d:%s: todo\n", __FILE__, __LINE__, __FUNCTION__); \
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
index 967a2719ee..bdeb01fff1 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
@@ -22,8 +22,17 @@
#ifndef NR_PDCP_OAI_API_H
#define NR_PDCP_OAI_API_H
-#include "pdcp.h"
+#include
+#include
+#include
+#include "NR_DRB-ToAddModList.h"
+#include "NR_PDCP-Config.h"
+#include "NR_SRB-ToAddModList.h"
+#include "nr_pdcp/nr_pdcp_entity.h"
+#include "nr_pdcp/nr_pdcp_integrity_data.h"
#include "nr_pdcp_ue_manager.h"
+struct NR_DRB_ToAddMod;
+struct NR_SRB_ToAddMod;
void nr_pdcp_layer_init(void);
uint64_t nr_pdcp_module_init(uint64_t _pdcp_optmask, int id);
diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
index 455deb1eac..fd392ceae8 100644
--- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
@@ -31,14 +31,20 @@
*/
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
-#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
+#include
+#include
+#include
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
-#include "common/ran_context.h"
+#include "PHY/defs_common.h"
+#include "common/platform_constants.h"
+#include "common/utils/T/T.h"
#include "executables/softmodem-common.h"
-#include "nfapi/oai_integration/vendor_ext.h"
#include "nfapi/oai_integration/gnb_ind_vars.h"
-#include "openair2/PHY_INTERFACE/queue_t.h"
+#include "nfapi/oai_integration/vendor_ext.h"
+#include "nfapi_interface.h"
#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h"
+#include "openair2/PHY_INTERFACE/queue_t.h"
+#include "utils.h"
#define MAX_IF_MODULES 100
diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h
index 82ccdb782f..261ead1ba0 100644
--- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h
+++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h
@@ -35,9 +35,8 @@
#include
#include
+#include "assertions.h"
#include "nfapi_nr_interface_scf.h"
-#include "common/platform_constants.h"
-#include "common/platform_types.h"
#define MAX_NUM_DL_PDU 100
#define MAX_NUM_UL_PDU 100
diff --git a/openair2/NR_PHY_INTERFACE/nr_sched_response.c b/openair2/NR_PHY_INTERFACE/nr_sched_response.c
index 17b6c56c29..9c66b21536 100644
--- a/openair2/NR_PHY_INTERFACE/nr_sched_response.c
+++ b/openair2/NR_PHY_INTERFACE/nr_sched_response.c
@@ -38,10 +38,10 @@
*/
#include "nr_sched_response.h"
-
#include
+#include
#include
-
+#include "NR_PHY_INTERFACE/NR_IF_Module.h"
#include "common/utils/LOG/log.h"
#include "common/utils/assertions.h"
diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
index 10faa6cc65..44118704a4 100644
--- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
@@ -67,6 +67,57 @@ queue_t nr_ul_dci_req_queue;
queue_t nr_ul_tti_req_queue;
static void save_pdsch_pdu_for_crnti(nfapi_nr_dl_tti_request_t *dl_tti_request);
+void print_ue_mac_stats(const module_id_t mod, const int frame_rx, const int slot_rx)
+{
+ NR_UE_MAC_INST_t *mac = get_mac_inst(mod);
+ int ret = pthread_mutex_lock(&mac->if_mutex);
+ AssertFatal(!ret, "mutex failed %d\n", ret);
+
+ char txt[1024];
+ char *end = txt + sizeof(txt);
+ char *cur = txt;
+
+ float nbul = 0;
+ for (uint64_t *p = mac->stats.ul.rounds; p < mac->stats.ul.rounds + NR_MAX_HARQ_ROUNDS_FOR_STATS; p++)
+ nbul += *p;
+ if (nbul < 1)
+ nbul = 1;
+
+ float nbdl = 0;
+ for (uint64_t *p = mac->stats.dl.rounds; p < mac->stats.dl.rounds + NR_MAX_HARQ_ROUNDS_FOR_STATS; p++)
+ nbdl += *p;
+ if (nbdl < 1)
+ nbdl = 1;
+
+ cur += snprintf(cur, end - cur, "UE %d stats sfn: %d.%d, cumulated bad DCI %d\n", mod, frame_rx, slot_rx, mac->stats.bad_dci);
+
+ cur += snprintf(cur, end - cur, " DL harq: %lu", mac->stats.dl.rounds[0]);
+ int nb;
+ for (nb = NR_MAX_HARQ_ROUNDS_FOR_STATS - 1; nb > 1; nb--)
+ if (mac->stats.ul.rounds[nb])
+ break;
+ for (int i = 1; i < nb + 1; i++)
+ cur += snprintf(cur, end - cur, "/%lu", mac->stats.dl.rounds[i]);
+
+ cur += snprintf(cur, end - cur, "\n Ul harq: %lu", mac->stats.ul.rounds[0]);
+ for (nb = NR_MAX_HARQ_ROUNDS_FOR_STATS - 1; nb > 1; nb--)
+ if (mac->stats.ul.rounds[nb])
+ break;
+ for (int i = 1; i < nb + 1; i++)
+ cur += snprintf(cur, end - cur, "/%lu", mac->stats.ul.rounds[i]);
+ snprintf(cur,
+ end - cur,
+ " avg code rate %.01f, avg bit/symbol %.01f, avg per TB: "
+ "(nb RBs %.01f, nb symbols %.01f)\n",
+ (double)mac->stats.ul.target_code_rate / (mac->stats.ul.total_bits * 1024 * 10), // See const Table_51311 definition
+ (double)mac->stats.ul.total_bits / mac->stats.ul.total_symbols,
+ mac->stats.ul.rb_size / nbul,
+ mac->stats.ul.nr_of_symbols / nbul);
+ LOG_I(NR_MAC, "%s", txt);
+ ret = pthread_mutex_unlock(&mac->if_mutex);
+ AssertFatal(!ret, "mutex failed %d\n", ret);
+}
+
void nrue_init_standalone_socket(int tx_port, int rx_port)
{
{
@@ -1120,7 +1171,7 @@ static int8_t handle_csirs_measurements(NR_UE_MAC_INST_t *mac,
void update_harq_status(NR_UE_MAC_INST_t *mac, uint8_t harq_pid, uint8_t ack_nack)
{
- NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[harq_pid];
+ NR_UE_DL_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[harq_pid];
if (current_harq->active) {
LOG_D(PHY,"Updating harq_status for harq_id %d, ack/nak %d\n", harq_pid, current_harq->ack);
diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
index 6654fc8bff..c43eef87a3 100644
--- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
+++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
@@ -322,5 +322,7 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info);
void nr_ue_sl_indication(nr_sidelink_indication_t *sl_indication);
+void print_ue_mac_stats(const module_id_t mod, const int frame_rx, const int slot_rx);
+
#endif
diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h
index 2f0b4febf8..d7642ca663 100644
--- a/openair2/RRC/NR/MESSAGES/asn1_msg.h
+++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h
@@ -31,17 +31,30 @@
#ifndef __RRC_NR_MESSAGES_ASN1_MSG__H__
#define __RRC_NR_MESSAGES_ASN1_MSG__H__
+#include
+#include
#include
-#include
-#include /* for atoi(3) */
-#include /* for getopt(3) */
-#include /* for strerror(3) */
-#include /* for EX_* exit codes */
-#include /* for errno */
-
-#include
-
-#include "RRC/NR/nr_rrc_config.h"
+#include "NR_ARFCN-ValueNR.h"
+#include "NR_CellGroupConfig.h"
+#include "NR_CipheringAlgorithm.h"
+#include "NR_DRB-ToAddModList.h"
+#include "NR_DRB-ToReleaseList.h"
+#include "NR_IntegrityProtAlgorithm.h"
+#include "NR_LogicalChannelConfig.h"
+#include "NR_MeasConfig.h"
+#include "NR_MeasTiming.h"
+#include "NR_RLC-BearerConfig.h"
+#include "NR_RLC-Config.h"
+#include "NR_RRC-TransactionIdentifier.h"
+#include "NR_RadioBearerConfig.h"
+#include "NR_ReestablishmentCause.h"
+#include "NR_SRB-ToAddModList.h"
+#include "NR_SecurityConfig.h"
+#include "RRC/NR/nr_rrc_defs.h"
+#include "ds/seq_arr.h"
+#include "rrc_messages_types.h"
+struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList;
+struct asn_TYPE_descriptor_s;
/*
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
diff --git a/openair2/RRC/NR/cucp_cuup_direct.c b/openair2/RRC/NR/cucp_cuup_direct.c
index 97763d65d7..2e8bbfa428 100644
--- a/openair2/RRC/NR/cucp_cuup_direct.c
+++ b/openair2/RRC/NR/cucp_cuup_direct.c
@@ -19,8 +19,10 @@
* contact@openairinterface.org
*/
+#include
+#include
+#include "assertions.h"
#include "cucp_cuup_if.h"
-
#include "nr_rrc_defs.h"
#include "openair2/COMMON/e1ap_messages_types.h"
#include "openair2/LAYER2/nr_pdcp/cucp_cuup_handler.h"
diff --git a/openair2/RRC/NR/cucp_cuup_e1ap.c b/openair2/RRC/NR/cucp_cuup_e1ap.c
index b567fd76d4..69cb92f50a 100644
--- a/openair2/RRC/NR/cucp_cuup_e1ap.c
+++ b/openair2/RRC/NR/cucp_cuup_e1ap.c
@@ -19,13 +19,14 @@
* contact@openairinterface.org
*/
+#include
+#include
+#include "assertions.h"
#include "cucp_cuup_if.h"
+#include "e1ap_messages_types.h"
+#include "intertask_interface.h"
#include "nr_rrc_defs.h"
-#include "nr_rrc_proto.h"
-#include "nr_rrc_extern.h"
-#include "cucp_cuup_if.h"
-
static void cucp_cuup_bearer_context_setup_e1ap(sctp_assoc_t assoc_id, const e1ap_bearer_setup_req_t *req)
{
AssertFatal(assoc_id > 0, "illegal assoc_id %d\n", assoc_id);
diff --git a/openair2/RRC/NR/mac_rrc_dl_direct.c b/openair2/RRC/NR/mac_rrc_dl_direct.c
index 54ec7c8e4c..77113f6c8b 100644
--- a/openair2/RRC/NR/mac_rrc_dl_direct.c
+++ b/openair2/RRC/NR/mac_rrc_dl_direct.c
@@ -19,9 +19,13 @@
* contact@openairinterface.org
*/
-#include "nr_rrc_defs.h"
-
+#include
+#include
+#include
+#include "assertions.h"
+#include "f1ap_messages_types.h"
#include "mac_rrc_dl.h"
+#include "nr_rrc_defs.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
static void f1_reset_cu_initiated_direct(sctp_assoc_t assoc_id, const f1ap_reset_t *reset)
diff --git a/openair2/RRC/NR/mac_rrc_dl_f1ap.c b/openair2/RRC/NR/mac_rrc_dl_f1ap.c
index 70d36a144f..8593ff816a 100644
--- a/openair2/RRC/NR/mac_rrc_dl_f1ap.c
+++ b/openair2/RRC/NR/mac_rrc_dl_f1ap.c
@@ -19,8 +19,15 @@
* contact@openairinterface.org
*/
+#include
+#include
+#include
+#include
#include
-
+#include
+#include "assertions.h"
+#include "f1ap_messages_types.h"
+#include "intertask_interface.h"
#include "mac_rrc_dl.h"
#include "nr_rrc_defs.h"
#include "openair2/F1AP/lib/f1ap_rrc_message_transfer.h"
diff --git a/openair2/RRC/NR/nr_rrc_common.h b/openair2/RRC/NR/nr_rrc_common.h
index f81a57f5ad..f3bc3681a9 100644
--- a/openair2/RRC/NR/nr_rrc_common.h
+++ b/openair2/RRC/NR/nr_rrc_common.h
@@ -22,8 +22,6 @@
#ifndef __NR_RRC_COMMON_H__
#define __NR_RRC_COMMON_H__
-#include
-#include
#include
#define NR_NUM_SRB 4 /* Number of Signalling Radio Bearers according to clause 4.2.2 of 3GPP TS 38.331 */
diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c
index f955528167..798ec5ce4e 100644
--- a/openair2/RRC/NR/nr_rrc_config.c
+++ b/openair2/RRC/NR/nr_rrc_config.c
@@ -28,18 +28,33 @@
* \email: raymond.knopp@eurecom.fr, kroempa@gmail.com
*/
-#include "openair3/UTILS/conversions.h"
#include "nr_rrc_config.h"
+#include
+#include
+#include
+#include
+#include "BIT_STRING.h"
+#include "NULL.h"
+#include "RRC/NR/MESSAGES/asn1_msg.h"
+#include "RRC/NR/nr_rrc_proto.h"
+#include "SIMULATION/TOOLS/sim.h"
+#include "T.h"
+#include "asn_SET_OF.h"
+#include "asn_codecs.h"
+#include "asn_internal.h"
+#include "assertions.h"
+#include "common/openairinterface5g_limits.h"
+#include "common/utils/T/T.h"
#include "common/utils/nr/nr_common.h"
-#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
+#include "constr_TYPE.h"
#include "executables/softmodem-common.h"
#include "oai_asn1.h"
-#include "SIMULATION/TOOLS/sim.h" // for taus();
-
-#include "NR_MeasurementTimingConfiguration.h"
-
+#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
+#include "openair3/UTILS/conversions.h"
#include "uper_decoder.h"
#include "uper_encoder.h"
+#include "utils.h"
+#include "xer_encoder.h"
const uint8_t slotsperframe[5] = {10, 20, 40, 80, 160};
@@ -3090,8 +3105,6 @@ NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
return cellGroupConfig;
}
-#include "common/ran_context.h"
-#include "nr_rrc_defs.h"
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
const int uid,
NR_UE_NR_Capability_t *uecap,
diff --git a/openair2/RRC/NR/nr_rrc_config.h b/openair2/RRC/NR/nr_rrc_config.h
index ff94f2ab7e..b9f030e897 100644
--- a/openair2/RRC/NR/nr_rrc_config.h
+++ b/openair2/RRC/NR/nr_rrc_config.h
@@ -31,8 +31,17 @@
#ifndef __NR_RRC_CONFIG_H__
#define __NR_RRC_CONFIG_H__
-#include "nr_rrc_defs.h"
-#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
+#include
+#include
+#include "NR_BCCH-BCH-Message.h"
+#include "NR_BCCH-DL-SCH-Message.h"
+#include "NR_CellGroupConfig.h"
+#include "NR_UE-NR-Capability.h"
+#include "NR_UL-CCCH-Message.h"
+#include "PHY/defs_common.h"
+#include "f1ap_messages_types.h"
+struct NR_MeasurementTimingConfiguration;
+struct NR_PDSCH_TimeDomainResourceAllocationList;
// forward declaration of MAC configuration parameters, definition is included in C file
struct nr_mac_config_t;
diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h
index 7650718e66..b33b2c158c 100644
--- a/openair2/RRC/NR/nr_rrc_defs.h
+++ b/openair2/RRC/NR/nr_rrc_defs.h
@@ -34,39 +34,25 @@
#include
#include
#include
-
#include "collection/tree.h"
#include "collection/linear_alloc.h"
#include "common/utils/ds/seq_arr.h"
#include "nr_rrc_common.h"
#include "ds/byte_array.h"
-
#include "common/platform_constants.h"
#include "common/platform_types.h"
#include "mac_rrc_dl.h"
#include "cucp_cuup_if.h"
-
-#include "NR_SIB1.h"
-#include "NR_RRCReconfigurationComplete.h"
-#include "NR_RRCReconfiguration.h"
-#include "NR_RRCReestablishmentRequest.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_BCCH-DL-SCH-Message.h"
-#include "NR_BCCH-BCH-Message.h"
-#include "NR_PLMN-IdentityInfo.h"
-#include "NR_MCC-MNC-Digit.h"
-#include "NR_NG-5G-S-TMSI.h"
-
-#include "NR_UE-NR-Capability.h"
-#include "NR_UE-MRDC-Capability.h"
-#include "NR_MeasResults.h"
#include "NR_CellGroupConfig.h"
-#include "NR_ServingCellConfigCommon.h"
-#include "NR_EstablishmentCause.h"
+#include "NR_MeasurementReport.h"
#include "NR_MeasurementTimingConfiguration.h"
-
-//-------------------
-
+#include "NR_RRCReconfiguration.h"
+#include "NR_UE-CapabilityRAT-ContainerList.h"
+#include "NR_UL-CCCH-Message.h"
+#include "NR_UE-MRDC-Capability.h"
+#include "NR_UE-NR-Capability.h"
#include "intertask_interface.h"
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h
index 576a1f636a..ab2a95ecde 100644
--- a/openair2/RRC/NR/nr_rrc_proto.h
+++ b/openair2/RRC/NR/nr_rrc_proto.h
@@ -35,14 +35,9 @@
#define __NR_RRC_PROTO_H__
#include "RRC/NR/nr_rrc_defs.h"
-#include "NR_RRCReconfiguration.h"
-#include "NR_UE-NR-Capability.h"
-#include "NR_UE-CapabilityRAT-ContainerList.h"
-#include "LTE_UE-CapabilityRAT-ContainerList.h"
#include "NR_CG-Config.h"
#include "NR_CG-ConfigInfo.h"
-#include "NR_SecurityConfig.h"
-#include "NR_CellGroupConfig.h"
+#include "NR_RRCReconfiguration.h"
#define NR_MAX_SUPPORTED_DL_LAYERS 4
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 881a6d7fee..e94358f274 100644
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -30,79 +30,70 @@
#define RRC_GNB_C
#define RRC_GNB_C
-#include
#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
-
-#include "nr_rrc_config.h"
-#include "nr_rrc_defs.h"
-#include "nr_rrc_extern.h"
-#include "assertions.h"
-#include "common/ran_context.h"
-#include "oai_asn1.h"
-#include "rrc_gNB_radio_bearers.h"
-
-#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
-#include "LAYER2/NR_MAC_gNB/mac_proto.h"
-#include "common/utils/LOG/log.h"
+#include "openair2/RRC/NR/nr_rrc_proto.h"
+#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
+#include "openair3/SECU/key_nas_deriver.h"
+#include "openair3/ocp-gtpu/gtp_itf.h"
+#include "BIT_STRING.h"
+#include "F1AP_CauseProtocol.h"
+#include "F1AP_CauseRadioNetwork.h"
+#include "NGAP_CauseRadioNetwork.h"
+#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac.h"
+#include "OCTET_STRING.h"
+#include "PHY/defs_common.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
-#include "openair2/E1AP/e1ap_asnc.h"
-
-#include "NR_BCCH-BCH-Message.h"
-#include "NR_UL-DCCH-Message.h"
-#include "NR_DL-DCCH-Message.h"
-#include "NR_DL-CCCH-Message.h"
-#include "NR_UL-CCCH-Message.h"
-#include "NR_RRCReject.h"
-#include "NR_RejectWaitTime.h"
-#include "NR_RRCSetup.h"
-
-#include "NR_CellGroupConfig.h"
-#include "NR_MeasResults.h"
-#include "NR_UL-CCCH-Message.h"
-#include "NR_RRCSetupRequest-IEs.h"
-#include "NR_RRCSetupComplete-IEs.h"
-#include "NR_RRCReestablishmentRequest-IEs.h"
-#include "NR_MIB.h"
-#include "uper_encoder.h"
-#include "uper_decoder.h"
-
-#include "common/platform_types.h"
-#include "common/utils/LOG/vcd_signal_dumper.h"
-
+#include "RRC/NR/mac_rrc_dl.h"
+#include "RRC/NR/nr_rrc_common.h"
+#include "SIMULATION/TOOLS/sim.h"
#include "T.h"
-
-#include "openair3/SECU/secu_defs.h"
-
-#include "rrc_gNB_NGAP.h"
-#include "rrc_gNB_du.h"
-#include "rrc_gNB_mobility.h"
-
-#include "rrc_gNB_GTPV1U.h"
-
+#include "asn_codecs.h"
+#include "asn_internal.h"
+#include "assertions.h"
+#include "byte_array.h"
+#include "common/ngran_types.h"
+#include "common/openairinterface5g_limits.h"
+#include "common/platform_constants.h"
+#include "common/ran_context.h"
+#include "common_lib.h"
+#include "constr_SEQUENCE.h"
+#include "constr_TYPE.h"
+#include "cucp_cuup_if.h"
+#include "e1ap_messages_types.h"
+#include "executables/softmodem-common.h"
+#include "f1ap_messages_types.h"
+#include "gtpv1_u_messages_types.h"
+#include "intertask_interface.h"
+#include "linear_alloc.h"
+#include "ngap_messages_types.h"
#include "nr_pdcp/nr_pdcp_entity.h"
#include "nr_pdcp/nr_pdcp_oai_api.h"
-
-#include "intertask_interface.h"
-#include "SIMULATION/TOOLS/sim.h" // for taus
-
-#include "executables/softmodem-common.h"
-#include
-#include
-#include
-#include
-#include
+#include "nr_rrc_defs.h"
+#include "nr_rrc_extern.h"
+#include "oai_asn1.h"
#include "openair2/F1AP/f1ap_common.h"
#include "openair2/F1AP/f1ap_ids.h"
#include "openair2/F1AP/lib/f1ap_lib_extern.h"
-#include "openair2/SDAP/nr_sdap/nr_sdap_entity.h"
-#include "openair2/E1AP/e1ap.h"
-#include "cucp_cuup_if.h"
#include "lib/f1ap_interface_management.h"
-
-#include "BIT_STRING.h"
-#include "assertions.h"
+#include "rrc_gNB_NGAP.h"
+#include "rrc_gNB_du.h"
+#include "rrc_gNB_mobility.h"
+#include "rrc_gNB_radio_bearers.h"
+#include "rrc_messages_types.h"
+#include "seq_arr.h"
+#include "tree.h"
+#include "uper_decoder.h"
+#include "uper_encoder.h"
+#include "utils.h"
+#include "x2ap_messages_types.h"
+#include "xer_encoder.h"
#ifdef E2_AGENT
#include "openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_extern.h"
@@ -568,7 +559,7 @@ static void rrc_gNB_generate_dedicatedRRCReconfiguration(gNB_RRC_INST *rrc, gNB_
DevAssert(size > 0 && size <= sizeof(buffer));
LOG_UE_DL_EVENT(ue_p, "Generate RRCReconfiguration (bytes %d, xid %d)\n", size, xid);
- nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DCCH, buffer, size);
+ nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DL_SCH_LCID_DCCH, buffer, size);
}
void rrc_gNB_modify_dedicatedRRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p)
@@ -677,7 +668,7 @@ void rrc_gNB_modify_dedicatedRRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t
clear_nas_pdu(&ue_p->pduSession[i].param.nas_pdu);
LOG_I(NR_RRC, "UE %d: Generate RRCReconfiguration (bytes %d)\n", ue_p->rrc_ue_id, size);
- nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DCCH, buffer, size);
+ nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DL_SCH_LCID_DCCH, buffer, size);
}
//-----------------------------------------------------------------------------
@@ -729,7 +720,7 @@ void rrc_gNB_generate_dedicatedRRCReconfiguration_release(gNB_RRC_INST *rrc,
}
LOG_I(NR_RRC, "UE %d: Generate NR_RRCReconfiguration (bytes %d)\n", ue_p->rrc_ue_id, size);
- nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DCCH, buffer, size);
+ nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DL_SCH_LCID_DCCH, buffer, size);
}
/* \brief find existing PDU session inside E1AP Bearer Modif message, or
@@ -860,10 +851,10 @@ static void rrc_gNB_generate_RRCReestablishment(rrc_gNB_ue_context_t *ue_context
uint32_t old_gNB_DU_ue_id = old_rnti;
f1ap_dl_rrc_message_t dl_rrc = {.gNB_CU_ue_id = ue_p->rrc_ue_id,
.gNB_DU_ue_id = ue_data.secondary_ue,
- .srb_id = DCCH,
+ .srb_id = DL_SCH_LCID_DCCH,
.old_gNB_DU_ue_id = &old_gNB_DU_ue_id};
deliver_dl_rrc_message_data_t data = {.rrc = rrc, .dl_rrc = &dl_rrc, .assoc_id = ue_data.du_assoc_id};
- nr_pdcp_data_req_srb(ue_p->rrc_ue_id, DCCH, rrc_gNB_mui++, size, (unsigned char *const)buffer, rrc_deliver_dl_rrc_message, &data);
+ nr_pdcp_data_req_srb(ue_p->rrc_ue_id, DL_SCH_LCID_DCCH, rrc_gNB_mui++, size, (unsigned char *const)buffer, rrc_deliver_dl_rrc_message, &data);
/* RRCReestablishment has been generated, let's enable ciphering now. */
security_parameters.ciphering_algorithm = ue_p->ciphering_algorithm;
@@ -965,7 +956,7 @@ static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, gNB_RR
ue_p->rrc_ue_id,
ue_p->rnti,
size);
- nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DCCH, buffer, size);
+ nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DL_SCH_LCID_DCCH, buffer, size);
}
//-----------------------------------------------------------------------------
@@ -986,7 +977,7 @@ int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p, const int
uint8_t buffer[NR_RRC_BUF_SIZE];
int size = do_RRCReconfiguration(ue_p, buffer, NR_RRC_BUF_SIZE, xid, NULL, NULL, NULL, NULL, NULL, NULL, masterCellGroup);
- nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DCCH, buffer, size);
+ nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DL_SCH_LCID_DCCH, buffer, size);
return 0;
}
@@ -1406,7 +1397,7 @@ void rrc_forward_ue_nas_message(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE)
unsigned int xid = rrc_gNB_get_next_transaction_identifier(rrc->module_id);
uint32_t length = do_NR_DLInformationTransfer(buffer, sizeof(buffer), xid, UE->nas_pdu.length, UE->nas_pdu.buffer);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, buffer, length, "[MSG] RRC DL Information Transfer\n");
- rb_id_t srb_id = UE->Srb[2].Active ? DCCH1 : DCCH;
+ rb_id_t srb_id = UE->Srb[2].Active ? DL_SCH_LCID_DCCH1 : DL_SCH_LCID_DCCH;
nr_rrc_transfer_protected_rrc_message(rrc, UE, srb_id, buffer, length);
// no need to free UE->nas_pdu.buffer, do_NR_DLInformationTransfer() did that
UE->nas_pdu.buffer = NULL;
@@ -1654,7 +1645,7 @@ static void rrc_gNB_generate_UECapabilityEnquiry(gNB_RRC_INST *rrc, gNB_RRC_UE_t
AssertFatal(!NODE_IS_DU(rrc->node_type), "illegal node type DU!\n");
- nr_rrc_transfer_protected_rrc_message(rrc, ue, DCCH, buffer, size);
+ nr_rrc_transfer_protected_rrc_message(rrc, ue, DL_SCH_LCID_DCCH, buffer, size);
}
static int rrc_gNB_decode_dcch(gNB_RRC_INST *rrc, const f1ap_ul_rrc_message_t *msg)
@@ -2001,7 +1992,7 @@ static void rrc_CU_process_ue_context_release_request(MessageDef *msg_p, sctp_as
.gNB_DU_ue_id = source_ctx->du_ue_id,
.cause = F1AP_CAUSE_RADIO_NETWORK,
.cause_value = 5, // 5 = F1AP_CauseRadioNetwork_interaction_with_other_procedure
- .srb_id = DCCH,
+ .srb_id = DL_SCH_LCID_DCCH,
};
rrc->mac_rrc.ue_context_release_command(assoc_id, &cmd);
nr_rrc_finalize_ho(UE);
@@ -2649,7 +2640,7 @@ void rrc_gNB_generate_SecurityModeCommand(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p)
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Security Mode Command\n");
LOG_I(NR_RRC, "UE %u Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d)\n", ue_p->rrc_ue_id, size);
- nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DCCH, buffer, size);
+ nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DL_SCH_LCID_DCCH, buffer, size);
}
typedef struct deliver_ue_ctxt_release_data_t {
@@ -2684,10 +2675,10 @@ void rrc_gNB_generate_RRCRelease(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE)
.gNB_DU_ue_id = ue_data.secondary_ue,
.cause = F1AP_CAUSE_RADIO_NETWORK,
.cause_value = 10, // 10 = F1AP_CauseRadioNetwork_normal_release
- .srb_id = DCCH,
+ .srb_id = DL_SCH_LCID_DCCH,
};
deliver_ue_ctxt_release_data_t data = {.rrc = rrc, .release_cmd = &ue_context_release_cmd, .assoc_id = ue_data.du_assoc_id};
- nr_pdcp_data_req_srb(UE->rrc_ue_id, DCCH, rrc_gNB_mui++, size, buffer, rrc_deliver_ue_ctxt_release_cmd, &data);
+ nr_pdcp_data_req_srb(UE->rrc_ue_id, DL_SCH_LCID_DCCH, rrc_gNB_mui++, size, buffer, rrc_deliver_ue_ctxt_release_cmd, &data);
}
int rrc_gNB_generate_pcch_msg(sctp_assoc_t assoc_id, const NR_SIB1_t *sib1, uint32_t tmsi, uint8_t paging_drx)
diff --git a/openair2/RRC/NR/rrc_gNB_GTPV1U.c b/openair2/RRC/NR/rrc_gNB_GTPV1U.c
index e5412778bc..6bf64a27a9 100644
--- a/openair2/RRC/NR/rrc_gNB_GTPV1U.c
+++ b/openair2/RRC/NR/rrc_gNB_GTPV1U.c
@@ -27,20 +27,14 @@
* \email: lionel.gauthier@eurecom.fr, panagiotis.matzakos@eurecom.fr
*/
-# include "rrc_defs.h"
-# include "rrc_extern.h"
-# include "RRC/LTE/MESSAGES/asn1_msg.h"
-# include "rrc_eNB_GTPV1U.h"
-# include "rrc_eNB_UE_context.h"
-# include "openair2/RRC/NR/rrc_gNB_UE_context.h"
-
-//# if defined(ENABLE_ITTI)
-# include "oai_asn1.h"
-# include "intertask_interface.h"
-//#endif
-
-# include "common/ran_context.h"
#include "openair2/RRC/NR/rrc_gNB_GTPV1U.h"
+#include "LOG/log.h"
+#include "RRC/NR/nr_rrc_defs.h"
+#include "common/ran_context.h"
+#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
+#include "rrc_defs.h"
+#include "rrc_eNB_GTPV1U.h"
+#include "s1ap_messages_types.h"
extern RAN_CONTEXT_t RC;
diff --git a/openair2/RRC/NR/rrc_gNB_GTPV1U.h b/openair2/RRC/NR/rrc_gNB_GTPV1U.h
index 85ad11105e..60a6c0c5b5 100644
--- a/openair2/RRC/NR/rrc_gNB_GTPV1U.h
+++ b/openair2/RRC/NR/rrc_gNB_GTPV1U.h
@@ -30,6 +30,10 @@
#ifndef RRC_GNB_GTPV1U_H_
#define RRC_GNB_GTPV1U_H_
+#include
+#include "openair2/RRC/NR/nr_rrc_defs.h"
+#include "gtpv1_u_messages_types.h"
+
int rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(gNB_RRC_UE_t *ue,
const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP,
uint8_t *inde_list);
diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c
index 6a35f61b3f..c2a641db32 100644
--- a/openair2/RRC/NR/rrc_gNB_NGAP.c
+++ b/openair2/RRC/NR/rrc_gNB_NGAP.c
@@ -29,56 +29,64 @@
*/
#include "rrc_gNB_NGAP.h"
-#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
-#include "rrc_eNB_S1AP.h"
-#include "gnb_config.h"
-#include "common/ran_context.h"
-
-#include "oai_asn1.h"
-#include "intertask_interface.h"
-#include "nr_pdcp/nr_pdcp_oai_api.h"
-#include "pdcp_primitives.h"
-#include "SDAP/nr_sdap/nr_sdap.h"
-
-#include "openair3/ocp-gtpu/gtp_itf.h"
+#include
+#include
#include
-#include "RRC/LTE/rrc_eNB_GTPV1U.h"
-#include "RRC/NR/rrc_gNB_GTPV1U.h"
-
-#include "S1AP_NAS-PDU.h"
-#include "executables/softmodem-common.h"
-#include "openair3/SECU/key_nas_deriver.h"
-
-#include "ngap_gNB_defs.h"
-#include "ngap_gNB_ue_context.h"
-#include "ngap_gNB_management_procedures.h"
-#include "NR_ULInformationTransfer.h"
-#include "RRC/NR/MESSAGES/asn1_msg.h"
-#include "NR_UERadioAccessCapabilityInformation.h"
-#include "NR_UE-CapabilityRAT-ContainerList.h"
+#include
+#include
+#include
+#include
+#include "E1AP_ConfidentialityProtectionIndication.h"
+#include "E1AP_IntegrityProtectionIndication.h"
#include "NGAP_CauseRadioNetwork.h"
-#include "f1ap_messages_types.h"
-#include "openair2/F1AP/f1ap_ids.h"
-#include "openair2/E1AP/e1ap_asnc.h"
-#include "openair2/E1AP/e1ap.h"
-#include "NGAP_asn_constant.h"
-#include "NGAP_PDUSessionResourceSetupRequestTransfer.h"
-#include "NGAP_PDUSessionResourceModifyRequestTransfer.h"
-#include "NGAP_ProtocolIE-Field.h"
-#include "NGAP_GTPTunnel.h"
-#include "NGAP_QosFlowSetupRequestItem.h"
-#include "NGAP_QosFlowAddOrModifyRequestItem.h"
-#include "NGAP_NonDynamic5QIDescriptor.h"
#include "NGAP_Dynamic5QIDescriptor.h"
-#include "conversions.h"
+#include "NGAP_GTPTunnel.h"
+#include "NGAP_NonDynamic5QIDescriptor.h"
+#include "NGAP_PDUSessionResourceModifyRequestTransfer.h"
+#include "NGAP_PDUSessionResourceSetupRequestTransfer.h"
+#include "NGAP_QosFlowAddOrModifyRequestItem.h"
+#include "NGAP_QosFlowSetupRequestItem.h"
+#include "NGAP_asn_constant.h"
+#include "NGAP_ProtocolIE-Field.h"
+#include "NR_UE-NR-Capability.h"
+#include "NR_UERadioAccessCapabilityInformation.h"
+#include "MAC/mac.h"
+#include "OCTET_STRING.h"
+#include "PHY/defs_common.h"
+#include "RRC/NR/MESSAGES/asn1_msg.h"
+#include "RRC/NR/nr_rrc_common.h"
+#include "RRC/NR/nr_rrc_defs.h"
+#include "RRC/NR/nr_rrc_proto.h"
+#include "RRC/NR/rrc_gNB_UE_context.h"
#include "RRC/NR/rrc_gNB_radio_bearers.h"
+#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac.h"
+#include "T.h"
+#include "aper_decoder.h"
+#include "asn_codecs.h"
+#include "assertions.h"
+#include "common/ngran_types.h"
+#include "common/platform_constants.h"
+#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "constr_TYPE.h"
+#include "conversions.h"
+#include "e1ap_messages_types.h"
+#include "f1ap_messages_types.h"
+#include "gtpv1_u_messages_types.h"
+#include "intertask_interface.h"
+#include "nr_pdcp/nr_pdcp_entity.h"
+#include "nr_pdcp/nr_pdcp_oai_api.h"
+#include "oai_asn1.h"
+#include "openair2/F1AP/f1ap_ids.h"
+#include "openair3/SECU/key_nas_deriver.h"
+#include "rrc_messages_types.h"
+#include "s1ap_messages_types.h"
+#include "uper_encoder.h"
#ifdef E2_AGENT
#include "openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_extern.h"
#endif
-#include "uper_encoder.h"
-
extern RAN_CONTEXT_t RC;
/* Masks for NGAP Encryption algorithms, NEA0 is always supported (not coded) */
@@ -140,7 +148,7 @@ void nr_rrc_pdcp_config_security(gNB_RRC_UE_t *UE, bool enable_ciphering)
}
}
- nr_pdcp_config_set_security(UE->rrc_ue_id, DCCH, true, &security_parameters);
+ nr_pdcp_config_set_security(UE->rrc_ue_id, DL_SCH_LCID_DCCH, true, &security_parameters);
}
//------------------------------------------------------------------------------
diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.h b/openair2/RRC/NR/rrc_gNB_NGAP.h
index 9d83f28c3c..235a175954 100644
--- a/openair2/RRC/NR/rrc_gNB_NGAP.h
+++ b/openair2/RRC/NR/rrc_gNB_NGAP.h
@@ -31,14 +31,14 @@
#ifndef RRC_GNB_NGAP_H_
#define RRC_GNB_NGAP_H_
-#include "rrc_gNB_UE_context.h"
-#include "nr_rrc_defs.h"
-#include "nr_rrc_extern.h"
-
+#include
+#include
#include "NR_RRCSetupComplete-IEs.h"
-#include "NR_RegisteredAMF.h"
+#include "NR_UECapabilityInformation.h"
#include "NR_UL-DCCH-Message.h"
-#include "NGAP_CauseRadioNetwork.h"
+#include "intertask_interface.h"
+#include "ngap_messages_types.h"
+#include "nr_rrc_defs.h"
void rrc_gNB_send_NGAP_NAS_FIRST_REQ(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, NR_RRCSetupComplete_IEs_t *rrcSetupComplete);
diff --git a/openair2/RRC/NR/rrc_gNB_UE_context.c b/openair2/RRC/NR/rrc_gNB_UE_context.c
index 15f644955d..eae5c0706e 100644
--- a/openair2/RRC/NR/rrc_gNB_UE_context.c
+++ b/openair2/RRC/NR/rrc_gNB_UE_context.c
@@ -28,15 +28,18 @@
* \email: lionel.gauthier@eurecom.fr
*/
+#include "rrc_gNB_UE_context.h"
#include
#include
-#include
-#include
#include
-
+#include "RRC/NR/nr_rrc_defs.h"
+#include "T.h"
+#include "assertions.h"
+#include "common/platform_constants.h"
#include "common/utils/LOG/log.h"
-#include "rrc_gNB_UE_context.h"
+#include "linear_alloc.h"
#include "openair2/F1AP/f1ap_ids.h"
+#include "tree.h"
static void rrc_gNB_ue_context_update_time(rrc_gNB_ue_context_t *ctxt)
{
diff --git a/openair2/RRC/NR/rrc_gNB_UE_context.h b/openair2/RRC/NR/rrc_gNB_UE_context.h
index 37d71f9c29..9485672463 100644
--- a/openair2/RRC/NR/rrc_gNB_UE_context.h
+++ b/openair2/RRC/NR/rrc_gNB_UE_context.h
@@ -30,8 +30,11 @@
#ifndef __RRC_GNB_UE_CONTEXT_H__
#define __RRC_GNB_UE_CONTEXT_H__
+#include
+#include
+#include
+#include
#include "collection/tree.h"
-#include "common/platform_types.h"
#include "nr_rrc_defs.h"
int rrc_gNB_compare_ue_rnti_id(rrc_gNB_ue_context_t* c1_pP, rrc_gNB_ue_context_t* c2_pP);
diff --git a/openair2/RRC/NR/rrc_gNB_cuup.c b/openair2/RRC/NR/rrc_gNB_cuup.c
index 729f5f28b4..621ebca56e 100644
--- a/openair2/RRC/NR/rrc_gNB_cuup.c
+++ b/openair2/RRC/NR/rrc_gNB_cuup.c
@@ -19,9 +19,24 @@
* contact@openairinterface.org
*/
+#include
+#include
+#include
+#include
+#include
+#include "PHY/defs_common.h"
+#include "RRC/NR/nr_rrc_proto.h"
+#include "T.h"
+#include "as_message.h"
+#include "assertions.h"
#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "e1ap_messages_types.h"
+#include "intertask_interface.h"
#include "nr_rrc_defs.h"
#include "openair2/F1AP/f1ap_ids.h"
+#include "rrc_messages_types.h"
+#include "tree.h"
static int cuup_compare(const nr_rrc_cuup_container_t *a, const nr_rrc_cuup_container_t *b)
{
diff --git a/openair2/RRC/NR/rrc_gNB_du.c b/openair2/RRC/NR/rrc_gNB_du.c
index 98cdb313df..639c279d4d 100644
--- a/openair2/RRC/NR/rrc_gNB_du.c
+++ b/openair2/RRC/NR/rrc_gNB_du.c
@@ -20,17 +20,37 @@
*/
#include "rrc_gNB_du.h"
-#include "rrc_gNB_NGAP.h"
+#include
+#include
+#include
+#include "F1AP_CauseMisc.h"
+#include "F1AP_CauseProtocol.h"
+#include "F1AP_CauseRadioNetwork.h"
+#include "PHY/defs_common.h"
+#include "T.h"
+#include "asn_codecs.h"
+#include "assertions.h"
#include "common/ran_context.h"
+#include "common/utils/T/T.h"
+#include "common/utils/alg/foreach.h"
+#include "common/utils/ds/seq_arr.h"
+#include "constr_TYPE.h"
+#include "executables/softmodem-common.h"
+#include "f1ap_messages_types.h"
+#include "ngap_messages_types.h"
#include "nr_rrc_defs.h"
-#include "rrc_gNB_UE_context.h"
#include "rrc_gNB_mobility.h"
#include "openair2/F1AP/f1ap_common.h"
#include "openair2/F1AP/f1ap_ids.h"
-#include "executables/softmodem-common.h"
-#include "common/utils/ds/seq_arr.h"
-#include "common/utils/alg/foreach.h"
#include "lib/f1ap_interface_management.h"
+#include "rrc_gNB_NGAP.h"
+#include "rrc_gNB_UE_context.h"
+#include "rrc_messages_types.h"
+#include "s1ap_messages_types.h"
+#include "tree.h"
+#include "uper_decoder.h"
+#include "utils.h"
+#include "xer_encoder.h"
int get_dl_band(const struct f1ap_served_cell_info_t *cell_info)
{
diff --git a/openair2/RRC/NR/rrc_gNB_du.h b/openair2/RRC/NR/rrc_gNB_du.h
index bd3c4f6443..aadac0845a 100644
--- a/openair2/RRC/NR/rrc_gNB_du.h
+++ b/openair2/RRC/NR/rrc_gNB_du.h
@@ -26,7 +26,6 @@
#include
#include
#include
-
struct f1ap_setup_req_s;
struct f1ap_lost_connection_t;
struct gNB_RRC_INST_s;
diff --git a/openair2/RRC/NR/rrc_gNB_internode.c b/openair2/RRC/NR/rrc_gNB_internode.c
index 6b001e16fd..4fbca5f8f0 100644
--- a/openair2/RRC/NR/rrc_gNB_internode.c
+++ b/openair2/RRC/NR/rrc_gNB_internode.c
@@ -30,16 +30,22 @@
#ifndef RRC_GNB_INTERNODE_C
#define RRC_GNB_INTERNODE_C
-#include "nr_rrc_defs.h"
-#include "NR_RRCReconfiguration.h"
-#include "NR_UE-NR-Capability.h"
-#include "NR_CG-ConfigInfo.h"
-#include "NR_UE-CapabilityRAT-ContainerList.h"
-#include "LTE_UE-CapabilityRAT-ContainerList.h"
-#include "NR_CG-Config.h"
-#include "uper_encoder.h"
-#include "uper_decoder.h"
+#include
+#include