Merge branch 'develop' into prb_based_dl_channel_estimation
This commit is contained in:
@@ -198,6 +198,26 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("RF Simulators") {
|
||||
when { expression {doMandatoryTests} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-RF-Sim-Test', 'Test-RF-Sim-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('RAN-RF-Sim-Test')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
||||
|
||||
@@ -266,6 +266,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM):
|
||||
elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
|
||||
PHYSIM.OCProjectName = matchReg.group(1)
|
||||
elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.BuildId = matchReg.group(1)
|
||||
else:
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Invalid Parameter: ' + myArgv)
|
||||
|
||||
@@ -36,6 +36,7 @@ import re # reg
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
from zipfile import ZipFile
|
||||
@@ -76,6 +77,9 @@ class Containerize():
|
||||
self.eNB_instance = 0
|
||||
self.eNB_serverId = ['', '', '']
|
||||
self.yamlPath = ['', '', '']
|
||||
self.services = ['', '', '']
|
||||
self.nb_healthy = [0, 0, 0]
|
||||
self.exitStatus = 0
|
||||
self.eNB_logFile = ['', '', '']
|
||||
|
||||
self.testCase_id = ''
|
||||
@@ -89,6 +93,14 @@ class Containerize():
|
||||
self.allImagesSize = {}
|
||||
self.collectInfo = {}
|
||||
|
||||
self.pingContName = ''
|
||||
self.pingOptions = ''
|
||||
self.pingLossThreshold = ''
|
||||
self.svrContName = ''
|
||||
self.svrOptions = ''
|
||||
self.cliContName = ''
|
||||
self.cliOptions = ''
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Container management functions
|
||||
#-----------------------------------------------------------
|
||||
@@ -476,7 +488,6 @@ class Containerize():
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def UndeployObject(self, HTML, RAN):
|
||||
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m')
|
||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
||||
lIpAddr = self.eNBIPAddress
|
||||
lUserName = self.eNBUserName
|
||||
@@ -529,4 +540,307 @@ class Containerize():
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m')
|
||||
|
||||
def DeployGenObject(self, HTML):
|
||||
self.exitStatus = 0
|
||||
logging.info('\u001B[1m Checking Services to deploy\u001B[0m')
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose config --services'
|
||||
logging.debug(cmd)
|
||||
try:
|
||||
listServices = subprocess.check_output(cmd, shell=True, universal_newlines=True)
|
||||
except Exception as e:
|
||||
self.exitStatus = 1
|
||||
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
return
|
||||
for reqSvc in self.services[0].split(' '):
|
||||
res = re.search(reqSvc, listServices)
|
||||
if res is None:
|
||||
logging.error(reqSvc + ' not found in specified docker-compose')
|
||||
self.exitStatus = 1
|
||||
if (self.exitStatus == 1):
|
||||
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
return
|
||||
|
||||
if (self.ranAllowMerge):
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@ci-temp@" docker-compose.y*ml > docker-compose-ci.yml'
|
||||
else:
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@develop@" docker-compose.y*ml > docker-compose-ci.yml'
|
||||
logging.debug(cmd)
|
||||
subprocess.run(cmd, shell=True)
|
||||
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0]
|
||||
logging.debug(cmd)
|
||||
try:
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
|
||||
except Exception as e:
|
||||
self.exitStatus = 1
|
||||
logging.error('Could not deploy')
|
||||
HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
return
|
||||
|
||||
logging.info('\u001B[1m Checking if all deployed healthy\u001B[0m')
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps -a'
|
||||
count = 0
|
||||
healthy = 0
|
||||
while (count < 10):
|
||||
count += 1
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
healthy = 0
|
||||
for state in deployStatus.split('\n'):
|
||||
res = re.search('Up \(healthy\)', state)
|
||||
if res is not None:
|
||||
healthy += 1
|
||||
if healthy == self.nb_healthy[0]:
|
||||
count = 100
|
||||
else:
|
||||
time.sleep(10)
|
||||
|
||||
# HACK TO REMOVE LATER WHEN FIX
|
||||
res = re.search('oai-nr-ue', self.services[0])
|
||||
if res is not None:
|
||||
cmd = 'docker exec rfsim5g-oai-nr-ue /bin/bash -c "ip route del default"'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
cmd = 'docker exec rfsim5g-oai-nr-ue /bin/bash -c "ip route del 12.1.1.0/24"'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
cmd = 'docker exec rfsim5g-oai-nr-ue /bin/bash -c "ip route add default via 12.1.1.2 dev oaitun_ue1"'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
# END OF HACK TO REMOVE LATER WHEN FIX
|
||||
|
||||
if count == 100 and healthy == self.nb_healthy[0]:
|
||||
HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
logging.info('\u001B[1m Deploying OAI Object(s) PASS\u001B[0m')
|
||||
else:
|
||||
self.exitStatus = 1
|
||||
HTML.CreateHtmlTestRow('Could not deploy in time', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
logging.error('\u001B[1m Deploying OAI Object(s) FAILED\u001B[0m')
|
||||
|
||||
def UndeployGenObject(self, HTML):
|
||||
self.exitStatus = 0
|
||||
|
||||
if (self.ranAllowMerge):
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@ci-temp@" docker-compose.y*ml > docker-compose-ci.yml'
|
||||
else:
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@develop@" docker-compose.y*ml > docker-compose-ci.yml'
|
||||
logging.debug(cmd)
|
||||
subprocess.run(cmd, shell=True)
|
||||
|
||||
# if the containers are running, recover the logs!
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
anyLogs = False
|
||||
for state in deployStatus.split('\n'):
|
||||
res = re.search('Name|----------', state)
|
||||
if res is not None:
|
||||
continue
|
||||
if len(state) == 0:
|
||||
continue
|
||||
res = re.search('^(?P<container_name>[a-zA-Z0-9\-\_]+) ', state)
|
||||
if res is not None:
|
||||
anyLogs = True
|
||||
cName = res.group('container_name')
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
if anyLogs:
|
||||
cmd = 'mkdir -p ../cmake_targets/log && mv ' + self.yamlPath[0] + '/*.log ../cmake_targets/log'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down'
|
||||
logging.debug(cmd)
|
||||
try:
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
|
||||
except Exception as e:
|
||||
self.exitStatus = 1
|
||||
logging.error('Could not undeploy')
|
||||
HTML.CreateHtmlTestRow('Could not undeploy', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
logging.error('\u001B[1m Undeploying OAI Object(s) FAILED\u001B[0m')
|
||||
return
|
||||
|
||||
HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
logging.info('\u001B[1m Undeploying OAI Object(s) PASS\u001B[0m')
|
||||
|
||||
def PingFromContainer(self, HTML):
|
||||
self.exitStatus = 0
|
||||
cmd = 'mkdir -p ../cmake_targets/log'
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
|
||||
cmd = 'docker exec ' + self.pingContName + ' /bin/bash -c "ping ' + self.pingOptions + '" 2>&1 | tee ../cmake_targets/log/ping_' + HTML.testCase_id + '.log'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
|
||||
|
||||
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus)
|
||||
if result is None:
|
||||
self.PingExit(HTML, False, 'Packet Loss Not Found')
|
||||
return
|
||||
|
||||
packetloss = result.group('packetloss')
|
||||
if float(packetloss) == 100:
|
||||
self.PingExit(HTML, False, 'Packet Loss is 100%')
|
||||
return
|
||||
|
||||
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', deployStatus)
|
||||
if result is None:
|
||||
self.PingExit(HTML, False, 'Ping RTT_Min RTT_Avg RTT_Max Not Found!')
|
||||
return
|
||||
|
||||
rtt_min = result.group('rtt_min')
|
||||
rtt_avg = result.group('rtt_avg')
|
||||
rtt_max = result.group('rtt_max')
|
||||
pal_msg = 'Packet Loss : ' + packetloss + '%'
|
||||
min_msg = 'RTT(Min) : ' + rtt_min + ' ms'
|
||||
avg_msg = 'RTT(Avg) : ' + rtt_avg + ' ms'
|
||||
max_msg = 'RTT(Max) : ' + rtt_max + ' ms'
|
||||
|
||||
message = 'ping result\n'
|
||||
message += ' ' + pal_msg + '\n'
|
||||
message += ' ' + min_msg + '\n'
|
||||
message += ' ' + avg_msg + '\n'
|
||||
message += ' ' + max_msg + '\n'
|
||||
packetLossOK = True
|
||||
if float(packetloss) > float(self.pingLossThreshold):
|
||||
message += '\nPacket Loss too high'
|
||||
packetLossOK = False
|
||||
elif float(packetloss) > 0:
|
||||
message += '\nPacket Loss is not 0%'
|
||||
self.PingExit(HTML, packetLossOK, message)
|
||||
|
||||
if packetLossOK:
|
||||
logging.debug('\u001B[1;37;44m ping result \u001B[0m')
|
||||
logging.debug('\u001B[1;34m ' + pal_msg + '\u001B[0m')
|
||||
logging.debug('\u001B[1;34m ' + min_msg + '\u001B[0m')
|
||||
logging.debug('\u001B[1;34m ' + avg_msg + '\u001B[0m')
|
||||
logging.debug('\u001B[1;34m ' + max_msg + '\u001B[0m')
|
||||
logging.info('\u001B[1m Ping Test PASS\u001B[0m')
|
||||
|
||||
def PingExit(self, HTML, status, message):
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">UE\n' + message + '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
if status:
|
||||
HTML.CreateHtmlTestRowQueue(self.pingOptions, 'OK', 1, html_queue)
|
||||
else:
|
||||
self.exitStatus = 1
|
||||
logging.error('\u001B[1;37;41m ' + message + ' \u001B[0m')
|
||||
HTML.CreateHtmlTestRowQueue(self.pingOptions, 'KO', 1, html_queue)
|
||||
|
||||
def IperfFromContainer(self, HTML):
|
||||
self.exitStatus = 0
|
||||
|
||||
cmd = 'mkdir -p ../cmake_targets/log'
|
||||
logStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
|
||||
# Start the server process
|
||||
cmd = 'docker exec -d ' + self.svrContName + ' /bin/bash -c "nohup iperf ' + self.svrOptions + ' > /tmp/iperf_server.log 2>&1"'
|
||||
logging.debug(cmd)
|
||||
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
time.sleep(5)
|
||||
|
||||
# Start the client process
|
||||
cmd = 'docker exec ' + self.cliContName + ' /bin/bash -c "iperf ' + self.cliOptions + '" 2>&1 | tee ../cmake_targets/log/iperf_client_' + HTML.testCase_id + '.log'
|
||||
logging.debug(cmd)
|
||||
clientStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
|
||||
|
||||
# Stop the server process
|
||||
cmd = 'docker exec ' + self.svrContName + ' /bin/bash -c "pkill iperf"'
|
||||
logging.debug(cmd)
|
||||
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
time.sleep(5)
|
||||
cmd = 'docker cp ' + self.svrContName + ':/tmp/iperf_server.log ../cmake_targets/log/iperf_server_' + HTML.testCase_id + '.log'
|
||||
logging.debug(cmd)
|
||||
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
|
||||
# Analyze client output
|
||||
result = re.search('Server Report:', clientStatus)
|
||||
if result is None:
|
||||
result = re.search('read failed: Connection refused', clientStatus)
|
||||
if result is not None:
|
||||
message = 'Could not connect to iperf server!'
|
||||
else:
|
||||
message = 'Server Report and Connection refused Not Found!'
|
||||
self.IperfExit(HTML, False, message)
|
||||
return
|
||||
|
||||
# Computing the requested bandwidth in float
|
||||
result = re.search('-b (?P<iperf_bandwidth>[0-9\.]+)[KMG]', self.cliOptions)
|
||||
if result is not None:
|
||||
req_bandwidth = result.group('iperf_bandwidth')
|
||||
req_bw = float(req_bandwidth)
|
||||
result = re.search('-b [0-9\.]+K', self.cliOptions)
|
||||
if result is not None:
|
||||
req_bandwidth = '%.1f Kbits/sec' % req_bw
|
||||
req_bw = req_bw * 1000
|
||||
result = re.search('-b [0-9\.]+M', self.cliOptions)
|
||||
if result is not None:
|
||||
req_bandwidth = '%.1f Mbits/sec' % req_bw
|
||||
req_bw = req_bw * 1000000
|
||||
|
||||
reportLine = None
|
||||
reportLineFound = False
|
||||
for iLine in clientStatus.split('\n'):
|
||||
if reportLineFound:
|
||||
reportLine = iLine
|
||||
reportLineFound = False
|
||||
res = re.search('Server Report:', iLine)
|
||||
if res is not None:
|
||||
reportLineFound = True
|
||||
result = None
|
||||
if reportLine is not None:
|
||||
result = re.search('(?:|\[ *\d+\].*) (?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(\d+\/ ..\d+) +(\((?P<packetloss>[0-9\.]+)%\))', reportLine)
|
||||
iperfStatus = True
|
||||
if result is not None:
|
||||
bitrate = result.group('bitrate')
|
||||
packetloss = result.group('packetloss')
|
||||
jitter = result.group('jitter')
|
||||
logging.debug('\u001B[1;37;44m iperf result \u001B[0m')
|
||||
iperfStatus = True
|
||||
msg = 'Req Bitrate : ' + req_bandwidth + '\n'
|
||||
logging.debug('\u001B[1;34m Req Bitrate : ' + req_bandwidth + '\u001B[0m')
|
||||
if bitrate is not None:
|
||||
msg += 'Bitrate : ' + bitrate + '\n'
|
||||
logging.debug('\u001B[1;34m Bitrate : ' + bitrate + '\u001B[0m')
|
||||
result = re.search('(?P<real_bw>[0-9\.]+) [KMG]bits/sec', str(bitrate))
|
||||
if result is not None:
|
||||
actual_bw = float(str(result.group('real_bw')))
|
||||
result = re.search('[0-9\.]+ K', bitrate)
|
||||
if result is not None:
|
||||
actual_bw = actual_bw * 1000
|
||||
result = re.search('[0-9\.]+ M', bitrate)
|
||||
if result is not None:
|
||||
actual_bw = actual_bw * 1000000
|
||||
br_loss = 100 * actual_bw / req_bw
|
||||
if br_loss < 90:
|
||||
iperfStatus = False
|
||||
bitperf = '%.2f ' % br_loss
|
||||
msg += 'Bitrate Perf: ' + bitperf + '%\n'
|
||||
logging.debug('\u001B[1;34m Bitrate Perf: ' + bitperf + '%\u001B[0m')
|
||||
if packetloss is not None:
|
||||
msg += 'Packet Loss : ' + packetloss + '%\n'
|
||||
logging.debug('\u001B[1;34m Packet Loss : ' + packetloss + '%\u001B[0m')
|
||||
if float(packetloss) > float(5):
|
||||
msg += 'Packet Loss too high!\n'
|
||||
logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m')
|
||||
iperfStatus = False
|
||||
if jitter is not None:
|
||||
msg += 'Jitter : ' + jitter + '\n'
|
||||
logging.debug('\u001B[1;34m Jitter : ' + jitter + '\u001B[0m')
|
||||
self.IperfExit(HTML, iperfStatus, msg)
|
||||
else:
|
||||
logging.error('problem?')
|
||||
if iperfStatus:
|
||||
logging.info('\u001B[1m Iperf Test PASS\u001B[0m')
|
||||
|
||||
def IperfExit(self, HTML, status, message):
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">UE\n' + message + '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
if status:
|
||||
HTML.CreateHtmlTestRowQueue(self.cliOptions, 'OK', 1, html_queue)
|
||||
else:
|
||||
self.exitStatus = 1
|
||||
HTML.CreateHtmlTestRowQueue(self.cliOptions, 'KO', 1, html_queue)
|
||||
|
||||
@@ -6,10 +6,8 @@ eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
eNB_ID = 0xe01;
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
@@ -128,24 +126,25 @@ eNBs =
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size= 5;
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
//SSB central frequency of NR secondary cell group (for ENDC NSA)
|
||||
nr_scg_ssb_freq = 641272;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
@@ -175,6 +174,7 @@ eNBs =
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
@@ -185,10 +185,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -5,110 +5,106 @@ Asn1_verbosity = "none";
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
# real_time choice in {hard, rt-preempt, no}
|
||||
real_time = "no";
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe01;
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = (
|
||||
{ mcc = 222; mnc = 01; mnc_length = 2; }
|
||||
);
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 222; mnc = 01; mnc_length = 2; } );
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
// In seconds
|
||||
rrc_inactivity_threshold = 0;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
nb_antenna_ports = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
prach_root = 0;
|
||||
tx_gain = 90;
|
||||
rx_gain = 115;
|
||||
pbch_repetition = "FALSE";
|
||||
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
node_function = "3GPP_eNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 115;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower= -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/*
|
||||
srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;
|
||||
srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;
|
||||
*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -96;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -96;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
@@ -120,25 +116,25 @@ eNBs =
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/*
|
||||
rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
@@ -190,7 +186,7 @@ eNBs =
|
||||
);
|
||||
|
||||
///X2
|
||||
enable_x2 = "yes";
|
||||
enable_x2 = "yes";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
@@ -198,39 +194,19 @@ eNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="high";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="debug";
|
||||
rlc_log_verbosity ="high";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="high";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
MACRLCs =
|
||||
(
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
@@ -238,37 +214,52 @@ MACRLCs = (
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 160;
|
||||
puCch10xSnr = 160;
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
L1s =
|
||||
(
|
||||
{
|
||||
num_cc = 1;
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 3
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
RUs =
|
||||
(
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 3
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 115;
|
||||
eNB_instances = [0];
|
||||
# clock_src = "external";
|
||||
eNB_instances = [0];
|
||||
# clock_src = "external";
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
THREAD_STRUCT =
|
||||
(
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "eth0";
|
||||
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
@@ -286,4 +277,5 @@ log_config :
|
||||
pdcp_log_verbosity ="high";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ gNBs =
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_GNB";
|
||||
gNB_name = "gNB-Eurecom-5GNRBox";
|
||||
|
||||
@@ -185,103 +184,102 @@ gNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
# mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
# ipv6 = "192:168:30::17";
|
||||
# port = 36412 ;
|
||||
# active = "yes";
|
||||
# preference = "ipv4";
|
||||
# }
|
||||
# );
|
||||
|
||||
///X2
|
||||
enable_x2 = "yes";
|
||||
enable_x2 = "yes";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
target_enb_x2_ip_address = (
|
||||
{ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
target_enb_x2_ip_address = ( { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
|
||||
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
|
||||
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
}
|
||||
{
|
||||
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";
|
||||
pusch_proc_threads = 6;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 6;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 3
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 111;
|
||||
eNB_instances = [0];
|
||||
# clock_src = "external";
|
||||
}
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 3
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 111;
|
||||
eNB_instances = [0];
|
||||
# clock_src = "external";
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
//parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
uicc: {
|
||||
opc = "testopc";
|
||||
opc = "testopc";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
uicc0 = {
|
||||
imsi = "@FULL_IMSI@";
|
||||
key = "@FULL_KEY@";
|
||||
opc= "@OPC@";
|
||||
dnn= "@DNN@";
|
||||
nssai_sst=@NSSAI_SST@;
|
||||
nssai_sd=@NSSAI_SD@;
|
||||
}
|
||||
+4
-1
@@ -182,9 +182,12 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
|
||||
if (ADBIPAddress != 'none'):
|
||||
if (ADBIPAddress != 'none') and (ADBIPAddress != 'modules'):
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_Smartphones) + ' UE(s) is(are) connected to ADB bench server</h2>\n')
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_CATM_Modules) + ' CAT-M UE(s) is(are) connected to bench server</h2>\n')
|
||||
elif (ADBIPAddress == 'modules'):
|
||||
self.htmlUEConnected = 1
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 commercial module is connected to CI bench</h2>\n')
|
||||
else:
|
||||
self.htmlUEConnected = 1
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 OAI UE(s) is(are) connected to CI bench</h2>\n')
|
||||
|
||||
+69
-5
@@ -65,6 +65,7 @@ import xml.etree.ElementTree as ET
|
||||
import logging
|
||||
import datetime
|
||||
import signal
|
||||
import subprocess
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
@@ -372,6 +373,41 @@ def GetParametersFromXML(action):
|
||||
if (string_field is not None):
|
||||
CONTAINERS.yamlPath[CONTAINERS.eNB_instance] = string_field
|
||||
|
||||
elif action == 'DeployGenObject' or action == 'UndeployGenObject':
|
||||
string_field=test.findtext('yaml_path')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.yamlPath[0] = string_field
|
||||
string_field=test.findtext('services')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.services[0] = string_field
|
||||
string_field=test.findtext('nb_healthy')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.nb_healthy[0] = int(string_field)
|
||||
|
||||
elif action == 'PingFromContainer':
|
||||
string_field = test.findtext('container_name')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.pingContName = string_field
|
||||
string_field = test.findtext('options')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.pingOptions = string_field
|
||||
string_field = test.findtext('loss_threshold')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.pingLossThreshold = string_field
|
||||
|
||||
elif action == 'IperfFromContainer':
|
||||
string_field = test.findtext('server_container_name')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.svrContName = string_field
|
||||
string_field = test.findtext('server_options')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.svrOptions = string_field
|
||||
string_field = test.findtext('client_container_name')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.cliContName = string_field
|
||||
string_field = test.findtext('client_options')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.cliOptions = string_field
|
||||
|
||||
else: # ie action == 'Run_PhySim':
|
||||
ldpc.runargs = test.findtext('physim_run_args')
|
||||
@@ -479,6 +515,8 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
|
||||
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
if RAN.eNBIPAddress == 'none':
|
||||
sys.exit(0)
|
||||
RAN.eNB_instance=0
|
||||
RAN.eNB_serverId[0]='0'
|
||||
RAN.eNBSourceCodePath='/tmp/'
|
||||
@@ -514,11 +552,18 @@ elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
|
||||
if (RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '') and (CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == ''):
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
if RAN.eNBIPAddress == 'none':
|
||||
sys.exit(0)
|
||||
CiTestObj.LogCollectBuild(RAN)
|
||||
elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
|
||||
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
if RAN.eNBIPAddress == 'none':
|
||||
cmd = 'zip -r enb.log.' + RAN.BuildId + '.zip cmake_targets/log'
|
||||
logging.debug(cmd)
|
||||
zipStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=60)
|
||||
sys.exit(0)
|
||||
RAN.LogCollecteNB()
|
||||
elif re.match('^LogCollectHSS$', mode, re.IGNORECASE):
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||
@@ -573,7 +618,7 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
|
||||
if foundCount != HTML.nbTestXMLfiles:
|
||||
HTML.nbTestXMLfiles=foundCount
|
||||
|
||||
if (CiTestObj.ADBIPAddress != 'none'):
|
||||
if (CiTestObj.ADBIPAddress != 'none') and (CiTestObj.ADBIPAddress != 'modules'):
|
||||
terminate_ue_flag = False
|
||||
CiTestObj.GetAllUEDevices(terminate_ue_flag)
|
||||
CiTestObj.GetAllCatMDevices(terminate_ue_flag)
|
||||
@@ -677,10 +722,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
|
||||
signal.signal(signal.SIGUSR1, receive_signal)
|
||||
|
||||
if (CiTestObj.ADBIPAddress != 'none'):
|
||||
if (CiTestObj.ADBIPAddress != 'none') and (CiTestObj.ADBIPAddress != 'modules'):
|
||||
terminate_ue_flag = False
|
||||
CiTestObj.GetAllUEDevices(terminate_ue_flag)
|
||||
CiTestObj.GetAllCatMDevices(terminate_ue_flag)
|
||||
elif (CiTestObj.ADBIPAddress == 'modules'):
|
||||
CiTestObj.UEDevices.append('COTS-Module')
|
||||
else:
|
||||
CiTestObj.UEDevices.append('OAI-UE')
|
||||
HTML.SethtmlUEConnected(len(CiTestObj.UEDevices) + len(CiTestObj.CatMDevices))
|
||||
@@ -714,7 +761,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
CiTestObj.ShowTestID()
|
||||
GetParametersFromXML(action)
|
||||
if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE' or action == 'DataDisable_UE' or action == 'DataEnable_UE' or action == 'CheckStatusUE':
|
||||
if (CiTestObj.ADBIPAddress != 'none'):
|
||||
if (CiTestObj.ADBIPAddress != 'none') and (CiTestObj.ADBIPAddress != 'modules'):
|
||||
#in these cases, having no devices is critical, GetAllUEDevices function has to manage it as a critical error, reason why terminate_ue_flag is set to True
|
||||
terminate_ue_flag = True
|
||||
# Now we stop properly the test-suite --> clean reporting
|
||||
@@ -799,7 +846,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
CiTestObj.Perform_X2_Handover(HTML,RAN,EPC)
|
||||
elif action == 'Build_PhySim':
|
||||
HTML=ldpc.Build_PhySim(HTML,CONST)
|
||||
if ldpc.exitStatus==1:sys.exit()
|
||||
if ldpc.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'Run_PhySim':
|
||||
HTML=ldpc.Run_PhySim(HTML,CONST,id)
|
||||
elif action == 'Build_Image':
|
||||
@@ -812,9 +860,25 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
SCA.CppCheckAnalysis(HTML)
|
||||
elif action == 'Deploy_Run_PhySim':
|
||||
PHYSIM.Deploy_PhySim(HTML, RAN)
|
||||
elif action == 'DeployGenObject':
|
||||
CONTAINERS.DeployGenObject(HTML)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'UndeployGenObject':
|
||||
CONTAINERS.UndeployGenObject(HTML)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'PingFromContainer':
|
||||
CONTAINERS.PingFromContainer(HTML)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'IperfFromContainer':
|
||||
CONTAINERS.IperfFromContainer(HTML)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
else:
|
||||
sys.exit('Invalid class (action) from xml')
|
||||
if not RAN.prematureExit:
|
||||
if RAN.prematureExit:
|
||||
if CiTestObj.testCase_id == CiTestObj.testMinStableId:
|
||||
logging.debug('Scenario has reached minimal stability point')
|
||||
CiTestObj.testStabilityPointReached = True
|
||||
|
||||
@@ -41,3 +41,7 @@
|
||||
- Undeploy_Object
|
||||
- Cppcheck_Analysis
|
||||
- Deploy_Run_PhySim
|
||||
- DeployGenObject
|
||||
- UndeployGenObject
|
||||
- PingFromContainer
|
||||
- IperfFromContainer
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-5gnr</htmlTabRef>
|
||||
<htmlTabName>Testing 5G NR RF sim in containers</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000001
|
||||
000002
|
||||
000003
|
||||
020001
|
||||
020002
|
||||
030001
|
||||
030002
|
||||
100001
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<container_name>rfsim5g-oai-nr-ue</container_name>
|
||||
<options>-I oaitun_ue1 -c 20 192.168.72.135</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020002">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<container_name>rfsim5g-oai-ext-dn</container_name>
|
||||
<options>-c 20 12.1.1.2</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030001">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Downlink</desc>
|
||||
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
|
||||
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 400K</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030002">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Uplink</desc>
|
||||
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 20K</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-5gnr-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 5G RF</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100002
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="100002">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,504 @@
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr style="border-collapse: collapse; border: none;">
|
||||
<td style="border-collapse: collapse; border: none;">
|
||||
<a href="http://www.openairinterface.org/">
|
||||
<img src="../../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">OAI Full Stack 4G-LTE RF simulation with containers</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
This page is only valid for an `Ubuntu18` host.
|
||||
|
||||
**TABLE OF CONTENTS**
|
||||
|
||||
1. [Retrieving the images on Docker-Hub](#1-retrieving-the-images-on-docker-hub)
|
||||
2. [Deploy containers](#2-deploy-containers)
|
||||
1. [Deploy and Configure Cassandra Database](#21-deploy-and-configure-cassandra-database)
|
||||
2. [Deploy OAI CN4G containers](#22-deploy-oai-cn4g-containers)
|
||||
3. [Deploy OAI eNB in RF simulator mode](#23-deploy-oai-enb-in-rf-simulator-mode)
|
||||
4. [Deploy OAI LTE UE in RF simulator mode](#24-deploy-oai-lte-ue-in-rf-simulator-mode)
|
||||
3. [Check traffic](#3-check-traffic)
|
||||
4. [Un-deployment](#4-un-deployment)
|
||||
5. [Explanation on the configuration](#5-explanation-on-the-configuration)
|
||||
1. [UE IMSI and Keys](#51-ue-imsi-and-keys)
|
||||
2. [PLMN and TAI](#52-plmn-and-tai)
|
||||
3. [Access to Internet](#53-access-to-internet)
|
||||
|
||||
# 1. Retrieving the images on Docker-Hub #
|
||||
|
||||
Currently the images are hosted under the user account `rdefosseoai`.
|
||||
|
||||
This may change in the future.
|
||||
|
||||
Once again you may need to log on [docker-hub](https://hub.docker.com/) if your organization has reached pulling limit as `anonymous`.
|
||||
|
||||
```bash
|
||||
$ docker login
|
||||
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
|
||||
Username:
|
||||
Password:
|
||||
```
|
||||
|
||||
Now pull images.
|
||||
|
||||
```bash
|
||||
$ docker pull cassandra:2.1
|
||||
$ docker pull rdefosseoai/oai-hss:latest
|
||||
$ docker pull rdefosseoai/oai-mme:latest
|
||||
$ docker pull rdefosseoai/oai-spgwc:latest
|
||||
$ docker pull rdefosseoai/oai-spgwu-tiny:latest
|
||||
|
||||
$ docker pull rdefosseoai/oai-enb:develop
|
||||
$ docker pull rdefosseoai/oai-lte-ue:develop
|
||||
```
|
||||
|
||||
And **re-tag** them for tutorials' docker-compose file to work.
|
||||
|
||||
```bash
|
||||
$ docker image tag rdefosseoai/oai-spgwc:latest oai-spgwc:latest
|
||||
$ docker image tag rdefosseoai/oai-hss:latest oai-hss:latest
|
||||
$ docker image tag rdefosseoai/oai-spgwu-tiny:latest oai-spgwu-tiny:latest
|
||||
$ docker image tag rdefosseoai/oai-mme:latest oai-mme:latest
|
||||
|
||||
$ docker image tag rdefosseoai/oai-enb:develop oai-enb:develop
|
||||
$ docker image tag rdefosseoai/oai-lte-ue:develop oai-lte-ue:develop
|
||||
```
|
||||
|
||||
```bash
|
||||
$ docker logout
|
||||
```
|
||||
|
||||
How to build the Traffic-Generator image is explained [here](https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/GENERATE_TRAFFIC.md#1-build-a-traffic-generator-image).
|
||||
|
||||
# 2. Deploy containers #
|
||||
|
||||
**CAUTION: this SHALL be done in multiple steps.**
|
||||
|
||||
**Just `docker-compose up -d` WILL NOT WORK!**
|
||||
|
||||
All the following commands **SHALL** be run from the `ci-scripts/yaml_files/4g_rfsimulator` folder.
|
||||
|
||||
## 2.1. Deploy and Configure Cassandra Database ##
|
||||
|
||||
It is very crutial that the Cassandra DB is fully configured before you do anything else!
|
||||
|
||||
```bash
|
||||
$ cd ci-scripts/yaml_files/4g_rfsimulator
|
||||
$ docker-compose up -d db_init
|
||||
Creating network "rfsim4g-oai-private-net" with the default driver
|
||||
Creating network "rfsim4g-oai-public-net" with the default driver
|
||||
Creating rfsim4g-cassandra ... done
|
||||
Creating rfsim4g-db-init ... done
|
||||
|
||||
$ docker logs rfsim4g-db-init --follow
|
||||
Connection error: ('Unable to connect to any servers', {'192.168.68.2': error(111, "Tried connecting to [('192.168.68.2', 9042)]. Last error: Connection refused")})
|
||||
...
|
||||
Connection error: ('Unable to connect to any servers', {'192.168.68.2': error(111, "Tried connecting to [('192.168.68.2', 9042)]. Last error: Connection refused")})
|
||||
OK
|
||||
```
|
||||
|
||||
**You SHALL wait until you HAVE the `OK` message in the logs!**
|
||||
|
||||
```bash
|
||||
$ docker rm rfsim4g-db-init
|
||||
```
|
||||
|
||||
At this point, you can prepare a capture on the newly-created public docker bridge:
|
||||
|
||||
```bash
|
||||
$ ifconfig rfsim4g-public
|
||||
inet 192.168.61.1 netmask 255.255.255.192 broadcast 192.168.61.63
|
||||
ether 02:42:8f:dd:ba:5a txqueuelen 0 (Ethernet)
|
||||
RX packets 0 bytes 0 (0.0 B)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 0 bytes 0 (0.0 B)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
$ sudo tshark -i rfsim4g-public -f 'port 3868 or port 2123 or port 36412 or port 36422 or port 46520 or port 8805' -w /tmp/my-oai-control-plane.pcap
|
||||
```
|
||||
|
||||
**BE CAREFUL: please use that filter or you will also capture the data-plane with IQ samples between `eNB` and `LTE-UE`.**
|
||||
|
||||
**and your capture WILL become huge (10s of Gbytes).**
|
||||
|
||||
## 2.2. Deploy OAI CN4G containers ##
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d oai_mme oai_spgwu trf_gen
|
||||
rfsim4g-cassandra is up-to-date
|
||||
Creating rfsim4g-trf-gen ... done
|
||||
Creating rfsim4g-oai-hss ... done
|
||||
Creating rfsim4g-oai-mme ... done
|
||||
Creating rfsim4g-oai-spgwc ... done
|
||||
Creating rfsim4g-oai-spgwu-tiny ... done
|
||||
```
|
||||
|
||||
You shall wait until all containers are `healthy`. About 10 seconds!
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------------------------------
|
||||
rfsim4g-cassandra docker-entrypoint.sh cassa ... Up (healthy) 7000/tcp, 7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp
|
||||
rfsim4g-oai-hss /openair-hss/bin/entrypoin ... Up (healthy) 5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp
|
||||
rfsim4g-oai-mme /openair-mme/bin/entrypoin ... Up (healthy) 2123/udp, 3870/tcp, 5870/tcp
|
||||
rfsim4g-oai-spgwc /openair-spgwc/bin/entrypo ... Up (healthy) 2123/udp, 8805/udp
|
||||
rfsim4g-oai-spgwu-tiny /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim4g-trf-gen /bin/bash -c ip route add ... Up (healthy)
|
||||
```
|
||||
|
||||
## 2.3. Deploy OAI eNB in RF simulator mode ##
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d enb
|
||||
Creating rfsim4g-oai-enb ... done
|
||||
```
|
||||
|
||||
Again wait for the healthy state:
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------------------------------
|
||||
rfsim4g-cassandra docker-entrypoint.sh cassa ... Up (healthy) 7000/tcp, 7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp
|
||||
rfsim4g-oai-enb /opt/oai-enb/bin/entrypoin ... Up (healthy) 2152/udp, 36412/udp, 36422/udp
|
||||
rfsim4g-oai-hss /openair-hss/bin/entrypoin ... Up (healthy) 5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp
|
||||
rfsim4g-oai-mme /openair-mme/bin/entrypoin ... Up (healthy) 2123/udp, 3870/tcp, 5870/tcp
|
||||
rfsim4g-oai-spgwc /openair-spgwc/bin/entrypo ... Up (healthy) 2123/udp, 8805/udp
|
||||
rfsim4g-oai-spgwu-tiny /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim4g-trf-gen /bin/bash -c ip route add ... Up (healthy)
|
||||
```
|
||||
|
||||
Check if the eNB connected to MME:
|
||||
|
||||
```bash
|
||||
$ docker logs rfsim4g-oai-mme
|
||||
...
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0039 ======================================= STATISTICS ============================================
|
||||
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0042 | Current Status| Added since last display| Removed since last display |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0048 Connected eNBs | 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0054 Attached UEs | 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0060 Connected UEs | 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0066 Default Bearers| 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0072 S1-U Bearers | 0 | 0 | 0 |
|
||||
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0075 ======================================= STATISTICS ============================================
|
||||
|
||||
DEBUG SCTP rc/sctp/sctp_primitives_server.c:0469 Client association changed: 0
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0101 ----------------------
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0102 SCTP Status:
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0103 assoc id .....: 675
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0104 state ........: 4
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0105 instrms ......: 2
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0106 outstrms .....: 2
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0108 fragmentation : 1452
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0109 pending data .: 0
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0110 unack data ...: 0
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0111 rwnd .........: 106496
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0112 peer info :
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0114 state ....: 2
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0116 cwnd .....: 4380
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0118 srtt .....: 0
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0120 rto ......: 3000
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0122 mtu ......: 1500
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0123 ----------------------
|
||||
DEBUG SCTP rc/sctp/sctp_primitives_server.c:0479 New connection
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0205 ----------------------
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0206 Local addresses:
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0217 - [192.168.61.3]
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0234 ----------------------
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0151 ----------------------
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0152 Peer addresses:
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0163 - [192.168.61.20]
|
||||
DEBUG SCTP enair-mme/src/sctp/sctp_common.c:0178 ----------------------
|
||||
DEBUG SCTP rc/sctp/sctp_primitives_server.c:0554 SCTP RETURNING!!
|
||||
DEBUG SCTP rc/sctp/sctp_primitives_server.c:0547 [675][44] Msg of length 51 received from port 36412, on stream 0, PPID 18
|
||||
DEBUG SCTP rc/sctp/sctp_primitives_server.c:0554 SCTP RETURNING!!
|
||||
DEBUG S1AP mme/src/s1ap/s1ap_mme_handlers.c:2826 Create eNB context for assoc_id: 675
|
||||
DEBUG S1AP mme/src/s1ap/s1ap_mme_handlers.c:0361 S1-Setup-Request macroENB_ID.size 3 (should be 20)
|
||||
DEBUG S1AP mme/src/s1ap/s1ap_mme_handlers.c:0321 New s1 setup request incoming from macro eNB id: 00e01
|
||||
DEBUG S1AP mme/src/s1ap/s1ap_mme_handlers.c:0423 Adding eNB to the list of served eNBs
|
||||
DEBUG S1AP mme/src/s1ap/s1ap_mme_handlers.c:0438 Adding eNB id 3585 to the list of served eNBs
|
||||
DEBUG SCTP rc/sctp/sctp_primitives_server.c:0283 [44][675] Sending buffer 0x7f9394009f90 of 27 bytes on stream 0 with ppid 18
|
||||
DEBUG SCTP rc/sctp/sctp_primitives_server.c:0296 Successfully sent 27 bytes on stream 0
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0039 ======================================= STATISTICS ============================================
|
||||
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0042 | Current Status| Added since last display| Removed since last display |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0048 Connected eNBs | 1 | 1 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0054 Attached UEs | 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0060 Connected UEs | 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0066 Default Bearers| 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0072 S1-U Bearers | 0 | 0 | 0 |
|
||||
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0075 ======================================= STATISTICS ============================================
|
||||
...
|
||||
```
|
||||
|
||||
## 2.4. Deploy OAI LTE UE in RF simulator mode ##
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d oai_ue0
|
||||
Creating rfsim4g-oai-lte-ue0 ... done
|
||||
```
|
||||
|
||||
Again a bit of patience:
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------------------------------
|
||||
rfsim4g-cassandra docker-entrypoint.sh cassa ... Up (healthy) 7000/tcp, 7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp
|
||||
rfsim4g-oai-enb /opt/oai-enb/bin/entrypoin ... Up (healthy) 2152/udp, 36412/udp, 36422/udp
|
||||
rfsim4g-oai-hss /openair-hss/bin/entrypoin ... Up (healthy) 5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp
|
||||
rfsim4g-oai-lte-ue0 /opt/oai-lte-ue/bin/entryp ... Up (healthy) 10000/tcp
|
||||
rfsim4g-oai-mme /openair-mme/bin/entrypoin ... Up (healthy) 2123/udp, 3870/tcp, 5870/tcp
|
||||
rfsim4g-oai-spgwc /openair-spgwc/bin/entrypo ... Up (healthy) 2123/udp, 8805/udp
|
||||
rfsim4g-oai-spgwu-tiny /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim4g-trf-gen /bin/bash -c ip route add ... Up (healthy)
|
||||
Creating rfsim4g-oai-enb ... done
|
||||
```
|
||||
|
||||
Making sure the OAI UE is connected:
|
||||
|
||||
```bash
|
||||
$ docker logs rfsim4g-oai-enb
|
||||
...
|
||||
[RRC] RRCConnectionReconfiguration Encoded 1098 bits (138 bytes)
|
||||
[RRC] [eNB 0] Frame 0, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes 138, UE id 617b)
|
||||
[RRC] sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB
|
||||
[PDCP] [FRAME 00000][eNB][MOD 00][RNTI 617b][SRB 02] Action ADD LCID 2 (SRB id 2) configured with SN size 5 bits and RLC AM
|
||||
[PDCP] [FRAME 00000][eNB][MOD 00][RNTI 617b][DRB 01] Action ADD LCID 3 (DRB id 1) configured with SN size 12 bits and RLC AM
|
||||
[SCTP] Successfully sent 46 bytes on stream 1 for assoc_id 676
|
||||
[RRC] [FRAME 00000][eNB][MOD 00][RNTI 617b] UE State = RRC_RECONFIGURED (default DRB, xid 0)
|
||||
[PDCP] [FRAME 00000][eNB][MOD 00][RNTI 617b][SRB 02] Action MODIFY LCID 2 RB id 2 reconfigured with SN size 5 and RLC AM
|
||||
[PDCP] [FRAME 00000][eNB][MOD 00][RNTI 617b][DRB 01] Action MODIFY LCID 3 RB id 1 reconfigured with SN size 1 and RLC AM
|
||||
[RRC] [eNB 0] Frame 0 CC 0 : SRB2 is now active
|
||||
[RRC] [eNB 0] Frame 0 : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete from UE rnti 617b, reconfiguring DRB 1/LCID 3
|
||||
[RRC] [eNB 0] Frame 0 : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete, reconfiguring DRB 1/LCID 3
|
||||
[MAC] UE 0 RNTI 617b adding LC 3 idx 2 to scheduling control (total 3)
|
||||
[MAC] Added physicalConfigDedicated 0x7f98e0004950 for 0.0
|
||||
[S1AP] initial_ctxt_resp_p: e_rab ID 5, enb_addr 192.168.61.20, SIZE 4
|
||||
[SCTP] Successfully sent 40 bytes on stream 1 for assoc_id 676
|
||||
[SCTP] Successfully sent 61 bytes on stream 1 for assoc_id 676
|
||||
...
|
||||
```
|
||||
|
||||
On the MME:
|
||||
|
||||
```bash
|
||||
$ docker logs rfsim4g-oai-mme
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0039 ======================================= STATISTICS ============================================
|
||||
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0042 | Current Status| Added since last display| Removed since last display |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0048 Connected eNBs | 1 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0054 Attached UEs | 1 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0060 Connected UEs | 1 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0066 Default Bearers| 0 | 0 | 0 |
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0072 S1-U Bearers | 0 | 0 | 0 |
|
||||
|
||||
DEBUG MME-AP src/mme_app/mme_app_statistics.c:0075 ======================================= STATISTICS ============================================
|
||||
```
|
||||
|
||||
On the LTE UE:
|
||||
|
||||
```bash
|
||||
$ docker exec rfsim4g-oai-lte-ue0 /bin/bash -c "ifconfig"
|
||||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.61.30 netmask 255.255.255.192 broadcast 192.168.61.63
|
||||
ether 02:42:c0:a8:3d:1e txqueuelen 0 (Ethernet)
|
||||
RX packets 1109931 bytes 8078031934 (8.0 GB)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 1232068 bytes 7798928848 (7.7 GB)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
|
||||
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
|
||||
inet 127.0.0.1 netmask 255.0.0.0
|
||||
loop txqueuelen 1000 (Local Loopback)
|
||||
RX packets 0 bytes 0 (0.0 B)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 0 bytes 0 (0.0 B)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
|
||||
oaitun_ue1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
|
||||
inet 12.0.0.2 netmask 255.0.0.0 destination 12.0.0.2
|
||||
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
|
||||
RX packets 0 bytes 0 (0.0 B)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 0 bytes 0 (0.0 B)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
|
||||
oaitun_uem1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
|
||||
inet 10.0.2.2 netmask 255.255.255.0 destination 10.0.2.2
|
||||
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
|
||||
RX packets 0 bytes 0 (0.0 B)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 0 bytes 0 (0.0 B)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
```
|
||||
|
||||
The tunnel `oaitun_ue1` SHALL be mounted and with an IP address in the `12.0.0.xxx` range.
|
||||
|
||||
# 3. Check traffic #
|
||||
|
||||
```bash
|
||||
$ docker exec rfsim4g-oai-lte-ue0 /bin/bash -c "ping -c 2 www.lemonde.fr"
|
||||
PING s2.shared.global.fastly.net (151.101.122.217) 56(84) bytes of data.
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=1 ttl=54 time=12.9 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=2 ttl=54 time=12.9 ms
|
||||
|
||||
--- s2.shared.global.fastly.net ping statistics ---
|
||||
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
|
||||
rtt min/avg/max/mdev = 12.940/12.965/12.990/0.025 ms
|
||||
|
||||
$ docker exec rfsim4g-oai-lte-ue0 /bin/bash -c "ping -I oaitun_ue1 -c 2 www.lemonde.fr"
|
||||
PING s2.shared.global.fastly.net (151.101.122.217) from 12.0.0.2 oaitun_ue1: 56(84) bytes of data.
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=1 ttl=53 time=23.6 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=2 ttl=53 time=29.5 ms
|
||||
|
||||
--- s2.shared.global.fastly.net ping statistics ---
|
||||
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
|
||||
rtt min/avg/max/mdev = 23.659/26.626/29.593/2.967 ms
|
||||
```
|
||||
|
||||
The 1st ping command is NOT using the OAI stack. My network infrastructure has a response of `13 ms` to reach this website.
|
||||
|
||||
The 2nd ping command is using the OAI stack. So the stack takes `26.6 - 12.9 = 13.7 ms`.
|
||||
|
||||
# 4. Un-deployment #
|
||||
|
||||
```bash
|
||||
$ docker-compose down
|
||||
Stopping rfsim4g-oai-lte-ue0 ... done
|
||||
Stopping rfsim4g-oai-enb ... done
|
||||
Stopping rfsim4g-oai-spgwu-tiny ... done
|
||||
Stopping rfsim4g-oai-spgwc ... done
|
||||
Stopping rfsim4g-oai-mme ... done
|
||||
Stopping rfsim4g-oai-hss ... done
|
||||
Stopping rfsim4g-trf-gen ... done
|
||||
Stopping rfsim4g-cassandra ... done
|
||||
Removing rfsim4g-oai-lte-ue0 ... done
|
||||
Removing rfsim4g-oai-enb ... done
|
||||
Removing rfsim4g-oai-spgwu-tiny ... done
|
||||
Removing rfsim4g-oai-spgwc ... done
|
||||
Removing rfsim4g-oai-mme ... done
|
||||
Removing rfsim4g-oai-hss ... done
|
||||
Removing rfsim4g-trf-gen ... done
|
||||
Removing rfsim4g-cassandra ... done
|
||||
Removing network rfsim4g-oai-private-net
|
||||
Removing network rfsim4g-oai-public-net
|
||||
```
|
||||
|
||||
# 5. Explanation on the configuration #
|
||||
|
||||
With a single `docker-compose.yml` file, it is easier to explain how I made the full connection.
|
||||
|
||||
Try to modify as little as possible. And if you don't understand a field/value, you'd better NOT modify it.
|
||||
|
||||
## 5.1. UE IMSI and Keys ##
|
||||
|
||||
in HSS config:
|
||||
|
||||
```yaml
|
||||
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
|
||||
LTE_K: fec86ba6eb707ed08905757b1bb44b8f
|
||||
APN1: oai.ipv4
|
||||
APN2: internet
|
||||
FIRST_IMSI: 208960100000001
|
||||
NB_USERS: 10
|
||||
```
|
||||
|
||||
in UE config:
|
||||
|
||||
```yaml
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
SHORT_IMSI: '0100000001'
|
||||
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
|
||||
OPC: 'c42449363bbad02b66d16bc975d77cc1'
|
||||
MSISDN: '001011234561010'
|
||||
HPLMN: 20896
|
||||
```
|
||||
|
||||
As you can see: `LTE_K` and `LTE_KEY` are the same value. And `OP_KEY` and `OPC` can be deduced from each other. Look in HSS logs.
|
||||
|
||||
```bash
|
||||
$ docker logs rfsim4g-oai-hss
|
||||
...
|
||||
Compute opc:
|
||||
K: FEC86BA6EB707ED08905757B1BB44B8F <== `LTE_K`
|
||||
In: 1006020F0A478BF6B699F15C062E42B3 <== `OP_KEY`
|
||||
Rinj: D4224B3931FD5BDDD0489A9573F93E72
|
||||
Out: C42449363BBAD02B66D16BC975D77CC1 <== `OPC`
|
||||
...
|
||||
```
|
||||
|
||||
In HSS, I've provisioned 10 users starting at `208960100000001` (`FIRST_IMSI` and `NB_USERS`).
|
||||
|
||||
My 1st UE IMSI is an aggregation of `MCC`, `MNC`, `SHORT_IMSI`.
|
||||
|
||||
## 5.2. PLMN and TAI ##
|
||||
|
||||
in MME config:
|
||||
|
||||
```yaml
|
||||
REALM: openairinterface.org
|
||||
..
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MME_GID: 32768
|
||||
MME_CODE: 3
|
||||
TAC_0: 1
|
||||
TAC_1: 2
|
||||
TAC_2: 3
|
||||
MME_FQDN: mme.openairinterface.org
|
||||
```
|
||||
|
||||
in SPGW-C/-U configs:
|
||||
|
||||
```yaml
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC03: '096'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
```
|
||||
|
||||
in eNB config:
|
||||
|
||||
```yaml
|
||||
MCC: '208'
|
||||
MNC: '96'
|
||||
MNC_LENGTH: 2
|
||||
TAC: 1
|
||||
```
|
||||
|
||||
The values SHALL match, and `TAC` shall match `TAC_0` from MME.
|
||||
|
||||
## 5.3. Access to Internet ##
|
||||
|
||||
In my traffic test, I was able to ping outside of my local network.
|
||||
|
||||
in SPGW-C config:
|
||||
|
||||
```yaml
|
||||
DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
|
||||
PUSH_PROTOCOL_OPTION: 'true'
|
||||
```
|
||||
|
||||
in SPGW-U config:
|
||||
|
||||
```yaml
|
||||
NETWORK_UE_NAT_OPTION: 'yes'
|
||||
```
|
||||
|
||||
Please put your own DNS server IP adress.
|
||||
|
||||
And you may have to play with `PUSH_PROTOCOL_OPTION` and `NETWORK_UE_NAT_OPTION` depending on your network.
|
||||
|
||||
@@ -32,7 +32,7 @@ services:
|
||||
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
|
||||
|
||||
oai_hss:
|
||||
image: oai-hss:develop-2021-06-14
|
||||
image: oai-hss:latest
|
||||
container_name: rfsim4g-oai-hss
|
||||
privileged: true
|
||||
depends_on: [cassandra]
|
||||
@@ -59,7 +59,7 @@ services:
|
||||
retries: 5
|
||||
|
||||
oai_mme:
|
||||
image: oai-mme:production
|
||||
image: oai-mme:latest
|
||||
container_name: rfsim4g-oai-mme
|
||||
privileged: true
|
||||
depends_on: [oai_hss]
|
||||
@@ -116,7 +116,7 @@ services:
|
||||
retries: 5
|
||||
|
||||
oai_spgwc:
|
||||
image: oai-spgwc:develop-2021-06-14
|
||||
image: oai-spgwc:latest
|
||||
privileged: true
|
||||
depends_on: [oai_mme]
|
||||
container_name: rfsim4g-oai-spgwc
|
||||
@@ -148,7 +148,7 @@ services:
|
||||
retries: 5
|
||||
|
||||
oai_spgwu:
|
||||
image: oai-spgwu-tiny:develop-2021-06-14
|
||||
image: oai-spgwu-tiny:latest
|
||||
privileged: true
|
||||
container_name: rfsim4g-oai-spgwu-tiny
|
||||
depends_on: [oai_spgwc]
|
||||
@@ -177,19 +177,6 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
flexran_rtc:
|
||||
image: flexran-rtc:production
|
||||
privileged: true
|
||||
container_name: rfsim4g-flexran-rtc
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.10
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep rt_controller"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
trf_gen:
|
||||
image: trf-gen:production
|
||||
privileged: true
|
||||
@@ -235,6 +222,11 @@ services:
|
||||
FLEXRAN_INTERFACE_NAME: eth0
|
||||
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_ue0:
|
||||
image: oai-lte-ue:develop
|
||||
@@ -257,6 +249,11 @@ services:
|
||||
MSISDN: '001011234561010'
|
||||
HPLMN: 20896
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep lte-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
private_net:
|
||||
@@ -264,9 +261,12 @@ networks:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-private"
|
||||
public_net:
|
||||
name: rfsim4g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.61.0/26
|
||||
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim4g-public"
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr style="border-collapse: collapse; border: none;">
|
||||
<td style="border-collapse: collapse; border: none;">
|
||||
<a href="http://www.openairinterface.org/">
|
||||
<img src="../../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">OAI Full Stack 5G-NR RF simulation with containers</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
This page is only valid for an `Ubuntu18` host.
|
||||
|
||||
**TABLE OF CONTENTS**
|
||||
|
||||
1. [Retrieving the images on Docker-Hub](#1-retrieving-the-images-on-docker-hub)
|
||||
2. [Deploy containers](#2-deploy-containers)
|
||||
1. [Deploy OAI 5G Core Network](#21-deploy-oai-5g-core-network)
|
||||
2. [Deploy OAI gNB in RF simulator mode and in Standalone Mode](#22-deploy-oai-gnb-in-rf-simulator-mode-and-in-standalone-mode)
|
||||
3. [Deploy OAI NR-UE in RF simulator mode and in Standalone Mode](#23-deploy-oai-nr-ue-in-rf-simulator-mode-and-in-standalone-mode)
|
||||
3. [Check traffic](#3-check-traffic)
|
||||
1. [Check your Internet connectivity](#31-check-your-internet-connectivity)
|
||||
2. [Start the iperf server inside the NR-UE container](#32-start-the-iperf-server-inside-the-nr-ue-container)
|
||||
3. [Start the iperf client inside the ext-dn container](#33-start-the-iperf-client-inside-the-ext-dn-container)
|
||||
4. [Un-deployment](#4-un-deployment)
|
||||
|
||||
# 1. Retrieving the images on Docker-Hub #
|
||||
|
||||
Currently the images are hosted under the user account `rdefosseoai`.
|
||||
|
||||
This may change in the future.
|
||||
|
||||
Once again you may need to log on [docker-hub](https://hub.docker.com/) if your organization has reached pulling limit as `anonymous`.
|
||||
|
||||
```bash
|
||||
$ docker login
|
||||
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
|
||||
Username:
|
||||
Password:
|
||||
```
|
||||
|
||||
Now pull images.
|
||||
|
||||
```bash
|
||||
$ docker pull mysql:5.7
|
||||
$ docker pull rdefosseoai/oai-amf:latest
|
||||
$ docker pull rdefosseoai/oai-nrf:latest
|
||||
$ docker pull rdefosseoai/oai-smf:latest
|
||||
$ docker pull rdefosseoai/oai-spgwu-tiny:latest
|
||||
|
||||
$ docker pull rdefosseoai/oai-gnb:develop
|
||||
$ docker pull rdefosseoai/oai-nr-ue:develop
|
||||
```
|
||||
|
||||
And **re-tag** them for tutorials' docker-compose file to work.
|
||||
|
||||
```bash
|
||||
$ docker image tag rdefosseoai/oai-amf:latest oai-amf:latest
|
||||
$ docker image tag rdefosseoai/oai-nrf:latest oai-nrf:latest
|
||||
$ docker image tag rdefosseoai/oai-smf:latest oai-smf:latest
|
||||
$ docker image tag rdefosseoai/oai-spgwu-tiny:latest oai-spgwu-tiny:latest
|
||||
|
||||
$ docker image tag rdefosseoai/oai-gnb:develop oai-gnb:develop
|
||||
$ docker image tag rdefosseoai/oai-nr-ue:develop oai-nr-ue:develop
|
||||
```
|
||||
|
||||
```bash
|
||||
$ docker logout
|
||||
```
|
||||
|
||||
# 2. Deploy containers #
|
||||
|
||||

|
||||
|
||||
**CAUTION: this SHALL be done in multiple steps.**
|
||||
|
||||
**Just `docker-compose up -d` WILL NOT WORK!**
|
||||
|
||||
All the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_rfsimulator` folder.
|
||||
|
||||
## 2.1. Deploy OAI 5G Core Network ##
|
||||
|
||||
```bash
|
||||
$ cd ci-scripts/yaml_files/5g_rfsimulator
|
||||
$ docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn
|
||||
Creating network "rfsim5g-oai-public-net" with driver "bridge"
|
||||
Creating network "rfsim5g-oai-traffic_net-net" with driver "bridge"
|
||||
Creating rfsim5g-oai-nrf ... done
|
||||
Creating rfsim5g-mysql ... done
|
||||
Creating rfsim5g-oai-spgwu ... done
|
||||
Creating rfsim5g-oai-amf ... done
|
||||
Creating rfsim5g-oai-smf ... done
|
||||
Creating rfsim5g-oai-ext-dn ... done
|
||||
```
|
||||
|
||||
Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
At this point, you can prepare a capture on the newly-created public docker bridges:
|
||||
|
||||
```bash
|
||||
$ ifconfig
|
||||
...
|
||||
rfsim5g-public: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.71.129 netmask 255.255.255.192 broadcast 192.168.71.191
|
||||
inet6 fe80::42:c4ff:fe2b:3d38 prefixlen 64 scopeid 0x20<link>
|
||||
ether 02:42:c4:2b:3d:38 txqueuelen 0 (Ethernet)
|
||||
RX packets 4 bytes 112 (112.0 B)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 7 bytes 626 (626.0 B)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
|
||||
rfsim5g-traffic: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.72.129 netmask 255.255.255.192 broadcast 192.168.72.191
|
||||
inet6 fe80::42:b5ff:fed3:e732 prefixlen 64 scopeid 0x20<link>
|
||||
ether 02:42:b5:d3:e7:32 txqueuelen 0 (Ethernet)
|
||||
RX packets 2652 bytes 142335 (142.3 KB)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 3999 bytes 23367972 (23.3 MB)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
...
|
||||
```
|
||||
|
||||
## 2.2. Deploy OAI gNB in RF simulator mode and in Standalone Mode ##
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d oai-gnb
|
||||
rfsim5g-oai-nrf is up-to-date
|
||||
rfsim5g-oai-spgwu is up-to-date
|
||||
rfsim5g-oai-ext-dn is up-to-date
|
||||
Creating rfsim5g-oai-gnb ... done
|
||||
```
|
||||
|
||||
Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
rfsim5g-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
## 2.3. Deploy OAI NR-UE in RF simulator mode and in Standalone Mode ##
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d oai-nr-ue
|
||||
rfsim5g-mysql is up-to-date
|
||||
rfsim5g-oai-nrf is up-to-date
|
||||
rfsim5g-oai-spgwu is up-to-date
|
||||
rfsim5g-oai-ext-dn is up-to-date
|
||||
rfsim5g-oai-gnb is up-to-date
|
||||
Creating rfsim5g-oai-nr-ue ... done
|
||||
```
|
||||
|
||||
Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
rfsim5g-oai-nr-ue /opt/oai-nr-ue/bin/entrypo ... Up (healthy)
|
||||
rfsim5g-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
Making sure the OAI UE is connected:
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-nr-ue /bin/bash
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
|
||||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.71.137 netmask 255.255.255.192 broadcast 192.168.71.191
|
||||
ether 02:42:c0:a8:47:89 txqueuelen 0 (Ethernet)
|
||||
RX packets 224259 bytes 5821372018 (5.8 GB)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 235916 bytes 7848786376 (7.8 GB)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
|
||||
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
|
||||
inet 127.0.0.1 netmask 255.0.0.0
|
||||
loop txqueuelen 1000 (Local Loopback)
|
||||
RX packets 0 bytes 0 (0.0 B)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 0 bytes 0 (0.0 B)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
|
||||
oaitun_ue1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
|
||||
inet 12.1.1.2 netmask 255.255.255.0 destination 12.1.1.2
|
||||
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
|
||||
RX packets 0 bytes 0 (0.0 B)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 0 bytes 0 (0.0 B)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
```
|
||||
|
||||
**CAUTION: THESE NEXT FEW COMMANDS ARE A HACK. RAN developers SHALL FIX THIS!**
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-nr-ue /bin/bash
|
||||
|
||||
# Check the current routes
|
||||
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ip route
|
||||
default via 192.168.71.129 dev eth0
|
||||
12.1.1.0/24 dev oaitun_ue1 proto kernel scope link src 12.1.1.2
|
||||
192.168.71.128/26 dev eth0 proto kernel scope link src 192.168.71.137
|
||||
|
||||
# Remove the default and PDN routes
|
||||
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ip route del default
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ip route del 12.1.1.0/24
|
||||
|
||||
# Force the default route through oaitun_ue1 tunnel
|
||||
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ip route add default via 12.1.1.2 dev oaitun_ue1
|
||||
|
||||
# Check the new routes
|
||||
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ip route
|
||||
default via 12.1.1.2 dev oaitun_ue1
|
||||
192.168.71.128/26 dev eth0 proto kernel scope link src 192.168.71.137
|
||||
```
|
||||
|
||||
# 3. Check traffic #
|
||||
|
||||
## 3.1. Check your Internet connectivity ##
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-nr-ue /bin/bash
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ping -I oaitun_ue1 -c 10 www.lemonde.fr
|
||||
PING s2.shared.global.fastly.net (151.101.122.217) from 12.1.1.2 oaitun_ue1: 56(84) bytes of data.
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=1 ttl=53 time=64.5 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=2 ttl=53 time=37.0 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=3 ttl=53 time=43.2 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=4 ttl=53 time=43.2 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=5 ttl=53 time=54.3 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=6 ttl=53 time=24.0 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=7 ttl=53 time=32.5 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=8 ttl=53 time=37.0 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=9 ttl=53 time=41.2 ms
|
||||
64 bytes from 151.101.122.217 (151.101.122.217): icmp_seq=10 ttl=53 time=50.3 ms
|
||||
|
||||
--- s2.shared.global.fastly.net ping statistics ---
|
||||
10 packets transmitted, 10 received, 0% packet loss, time 9011ms
|
||||
rtt min/avg/max/mdev = 24.035/42.765/64.557/10.904 ms
|
||||
```
|
||||
|
||||
If it does not work, certainly you need to modify the DNS values in the docker-compose.
|
||||
|
||||
But you can also check with the `ext-dn` container (IP address is `192.168.72.135` in docker-compose)
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-nr-ue /bin/bash
|
||||
root@bb4d400a832d# ping -I oaitun_ue1 -c 2 192.168.72.135
|
||||
PING 192.168.72.135 (192.168.72.135) from 12.1.1.2 oaitun_ue1: 56(84) bytes of data.
|
||||
64 bytes from 192.168.72.135: icmp_seq=1 ttl=63 time=10.9 ms
|
||||
64 bytes from 192.168.72.135: icmp_seq=2 ttl=63 time=16.5 ms
|
||||
|
||||
--- 192.168.72.135 ping statistics ---
|
||||
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
|
||||
rtt min/avg/max/mdev = 10.939/13.747/16.556/2.810 ms
|
||||
```
|
||||
|
||||
Let now try to check UDP traffic in Downlink.
|
||||
|
||||
You will need 2 terminals: one in the NR-UE container, one in the ext-dn container.
|
||||
|
||||
## 3.2. Start the `iperf` server inside the NR-UE container ##
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-nr-ue /bin/bash
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# iperf -B 12.1.1.2 -u -i 1 -s
|
||||
------------------------------------------------------------
|
||||
Server listening on UDP port 5001
|
||||
Binding to local address 12.1.1.2
|
||||
Receiving 1470 byte datagrams
|
||||
UDP buffer size: 208 KByte (default)
|
||||
------------------------------------------------------------
|
||||
```
|
||||
|
||||
## 3.3. Start the `iperf` client inside the ext-dn container ##
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-ext-dn /bin/bash
|
||||
root@f239e31a0bd0:/# iperf -c 12.1.1.2 -u -i 1 -t 20 -b 500K
|
||||
------------------------------------------------------------
|
||||
Client connecting to 12.1.1.2, UDP port 5001
|
||||
Sending 1470 byte datagrams, IPG target: 22968.75 us (kalman adjust)
|
||||
UDP buffer size: 208 KByte (default)
|
||||
------------------------------------------------------------
|
||||
[ 3] local 192.168.72.135 port 58800 connected with 12.1.1.2 port 5001
|
||||
[ ID] Interval Transfer Bandwidth
|
||||
[ 3] 0.0- 1.0 sec 64.6 KBytes 529 Kbits/sec
|
||||
[ 3] 1.0- 2.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 2.0- 3.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 3.0- 4.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 4.0- 5.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 5.0- 6.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 6.0- 7.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 7.0- 8.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 8.0- 9.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 9.0-10.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 10.0-11.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 11.0-12.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 12.0-13.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 13.0-14.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 14.0-15.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 15.0-16.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 16.0-17.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 17.0-18.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 18.0-19.0 sec 63.2 KBytes 517 Kbits/sec
|
||||
[ 3] 19.0-20.0 sec 61.7 KBytes 506 Kbits/sec
|
||||
[ 3] 0.0-20.0 sec 1.22 MBytes 512 Kbits/sec
|
||||
[ 3] Sent 872 datagrams
|
||||
[ 3] Server Report:
|
||||
[ 3] 0.0-20.0 sec 1.22 MBytes 510 Kbits/sec 0.000 ms 3/ 872 (0%)
|
||||
```
|
||||
|
||||
Back on your NR-UE terminal you shall see:
|
||||
|
||||
```bash
|
||||
[ 3] local 12.1.1.2 port 5001 connected with 192.168.72.135 port 58800
|
||||
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
|
||||
[ 3] 0.0- 1.0 sec 63.2 KBytes 517 Kbits/sec 1.113 ms 0/ 44 (0%)
|
||||
[ 3] 1.0- 2.0 sec 61.7 KBytes 506 Kbits/sec 1.466 ms 0/ 43 (0%)
|
||||
[ 3] 2.0- 3.0 sec 63.2 KBytes 517 Kbits/sec 1.770 ms 0/ 44 (0%)
|
||||
[ 3] 3.0- 4.0 sec 61.7 KBytes 506 Kbits/sec 1.378 ms 0/ 43 (0%)
|
||||
[ 3] 4.0- 5.0 sec 63.2 KBytes 517 Kbits/sec 1.614 ms 0/ 44 (0%)
|
||||
[ 3] 5.0- 6.0 sec 63.2 KBytes 517 Kbits/sec 1.427 ms 0/ 44 (0%)
|
||||
[ 3] 6.0- 7.0 sec 60.3 KBytes 494 Kbits/sec 1.507 ms 1/ 43 (2.3%)
|
||||
[ 3] 7.0- 8.0 sec 63.2 KBytes 517 Kbits/sec 1.409 ms 0/ 44 (0%)
|
||||
[ 3] 8.0- 9.0 sec 61.7 KBytes 506 Kbits/sec 1.525 ms 0/ 43 (0%)
|
||||
[ 3] 9.0-10.0 sec 63.2 KBytes 517 Kbits/sec 1.393 ms 0/ 44 (0%)
|
||||
[ 3] 10.0-11.0 sec 61.7 KBytes 506 Kbits/sec 1.377 ms 0/ 43 (0%)
|
||||
[ 3] 11.0-12.0 sec 63.2 KBytes 517 Kbits/sec 1.501 ms 0/ 44 (0%)
|
||||
[ 3] 12.0-13.0 sec 61.7 KBytes 506 Kbits/sec 1.788 ms 0/ 43 (0%)
|
||||
[ 3] 13.0-14.0 sec 63.2 KBytes 517 Kbits/sec 1.466 ms 0/ 44 (0%)
|
||||
[ 3] 14.0-15.0 sec 61.7 KBytes 506 Kbits/sec 1.381 ms 0/ 43 (0%)
|
||||
[ 3] 15.0-16.0 sec 61.7 KBytes 506 Kbits/sec 1.417 ms 1/ 44 (2.3%)
|
||||
[ 3] 16.0-17.0 sec 61.7 KBytes 506 Kbits/sec 1.569 ms 0/ 43 (0%)
|
||||
[ 3] 17.0-18.0 sec 63.2 KBytes 517 Kbits/sec 1.492 ms 1/ 45 (2.2%)
|
||||
[ 3] 18.0-19.0 sec 61.7 KBytes 506 Kbits/sec 1.376 ms 0/ 43 (0%)
|
||||
[ 3] 19.0-20.0 sec 61.7 KBytes 506 Kbits/sec 1.589 ms 0/ 43 (0%)
|
||||
[ 3] 0.0-20.0 sec 1.22 MBytes 510 Kbits/sec 1.551 ms 3/ 872 (0.34%)
|
||||
```
|
||||
|
||||
The `500 Kbits/sec` value may change depending on your CPU power!
|
||||
|
||||
# 4. Un-deployment #
|
||||
|
||||
```bash
|
||||
$ docker-compose down
|
||||
Stopping rfsim5g-oai-nr-ue ... done
|
||||
Stopping rfsim5g-oai-gnb ... done
|
||||
Stopping rfsim5g-oai-ext-dn ... done
|
||||
Stopping rfsim5g-oai-smf ... done
|
||||
Stopping rfsim5g-oai-amf ... done
|
||||
Stopping rfsim5g-oai-spgwu ... done
|
||||
Stopping rfsim5g-oai-nrf ... done
|
||||
Stopping rfsim5g-mysql ... done
|
||||
Removing rfsim5g-oai-nr-ue ... done
|
||||
Removing rfsim5g-oai-gnb ... done
|
||||
Removing rfsim5g-oai-ext-dn ... done
|
||||
Removing rfsim5g-oai-smf ... done
|
||||
Removing rfsim5g-oai-amf ... done
|
||||
Removing rfsim5g-oai-spgwu ... done
|
||||
Removing rfsim5g-oai-nrf ... done
|
||||
Removing rfsim5g-mysql ... done
|
||||
Removing network rfsim5g-oai-public-net
|
||||
Removing network rfsim5g-oai-traffic_net-net
|
||||
```
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
AMF_PORT_FOR_NGAP=38412
|
||||
AMF_PORT_FOR_N11_HTTP=80
|
||||
AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'})
|
||||
AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'})
|
||||
N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP")
|
||||
N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $N2_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening"
|
||||
fi
|
||||
|
||||
if [[ -z $N11_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening"
|
||||
fi
|
||||
|
||||
#host="${MYSQL_SERVER}"
|
||||
#user="${MYSQL_USER:-root}"
|
||||
#export MYSQL_PWD="${MYSQL_PASS}"
|
||||
|
||||
#args=(
|
||||
# -h"$host"
|
||||
# -u"$user"
|
||||
# --silent
|
||||
#)
|
||||
|
||||
#if ! command -v mysql &> /dev/null; then
|
||||
# echo "Installing mysql command"
|
||||
# apt update
|
||||
# apt-get -y install mysql-client
|
||||
#else
|
||||
# if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
# database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
# if [[ -z $database_check ]]; then
|
||||
# echo "Healthcheck error: oai_db not populated"
|
||||
# STATUS=1
|
||||
# fi
|
||||
# STATUS=0
|
||||
# else
|
||||
# echo "Healthcheck error: Mysql port inactive"
|
||||
# STATUS=1
|
||||
# fi
|
||||
#fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -0,0 +1,293 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oai-nrf:latest
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
|
||||
- NRF_API_VERSION=v1
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
volumes:
|
||||
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:5.7
|
||||
volumes:
|
||||
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oai-amf:latest
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
- SST_0=1
|
||||
- SD_0=1
|
||||
- SST_1=1
|
||||
- SD_1=12
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=0.0.0.0
|
||||
- SMF_HTTP_VERSION_0=v1
|
||||
- SELECTED_0=true
|
||||
- SMF_INSTANCE_ID_1=2
|
||||
- SMF_FQDN_1=oai-smf
|
||||
- SMF_IPV4_ADDR_1=0.0.0.0
|
||||
- SMF_HTTP_VERSION_1=v1
|
||||
- SELECTED_1=false
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_PORT=80
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- AUSF_IPV4_ADDRESS=127.0.0.1
|
||||
- AUSF_PORT=80
|
||||
- AUSF_API_VERSION=v1
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oai-smf:latest
|
||||
entrypoint: /bin/bash -c "/openair-smf/bin/oai_smf -c /openair-smf/bin/oai-smf.conf -o"
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- SMF_INTERFACE_PORT_FOR_SBI=80
|
||||
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
|
||||
- SMF_API_VERSION=v1
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=0.0.0.0
|
||||
- AMF_PORT=80
|
||||
- AMF_API_VERSION=v1
|
||||
- AMF_FQDN=oai-amf
|
||||
- UDM_IPV4_ADDRESS=127.0.0.1
|
||||
- UDM_PORT=80
|
||||
- UDM_API_VERSION=v1
|
||||
- UDM_FQDN=localhost
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
|
||||
- ./oai-smf.conf:/openair-smf/bin/oai-smf.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oai-spgwu-tiny:latest
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- SPGWC0_IP_ADDRESS=192.168.71.133
|
||||
- BYPASS_UL_PFCP_RULES=no
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- MNC03=099
|
||||
- TAC=1
|
||||
- GTP_EXTENSION_HEADER_PRESENT=yes
|
||||
- GW_ID=1
|
||||
- REALM=openairinterface.org
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=1
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
volumes:
|
||||
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
oai-ext-dn:
|
||||
image: ubuntu:bionic
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
entrypoint: /bin/bash -c \
|
||||
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-gnb:
|
||||
image: oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
RFSIMULATOR: server
|
||||
USE_SA_TDD_MONO: 'yes'
|
||||
GNB_NAME: gnb-rfsim
|
||||
TAC: 1
|
||||
MCC: '208'
|
||||
MNC: '99'
|
||||
MNC_LENGTH: 2
|
||||
NSSAI_SST: 1
|
||||
NSSAI_SD0: 1
|
||||
NSSAI_SD1: 112233
|
||||
AMF_IP_ADDRESS: 192.168.71.132
|
||||
GNB_NGA_IF_NAME: eth0
|
||||
GNB_NGA_IP_ADDRESS: 192.168.71.136
|
||||
GNB_NGU_IF_NAME: eth0
|
||||
GNB_NGU_IP_ADDRESS: 192.168.71.136
|
||||
USE_ADDITIONAL_OPTIONS: --sa -E --rfsim
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.136
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-nr-ue:
|
||||
image: oai-nr-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
RFSIMULATOR: 192.168.71.136
|
||||
FULL_IMSI: '208990100001100'
|
||||
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
|
||||
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
|
||||
DNN: oai
|
||||
NSSAI_SST: 1
|
||||
NSSAI_SD: 1
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.137
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic_net-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
|
||||
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="$(hostname --ip-address || echo '127.0.0.1')"
|
||||
user="${MYSQL_USER:-root}"
|
||||
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
|
||||
|
||||
args=(
|
||||
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
|
||||
-h"$host"
|
||||
-u"$user"
|
||||
--silent
|
||||
)
|
||||
|
||||
STATUS=0
|
||||
if command -v mysqladmin &> /dev/null; then
|
||||
if mysqladmin "${args[@]}" ping > /dev/null; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
else
|
||||
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
exit $STATUS
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $NRF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -0,0 +1,133 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
SMF =
|
||||
{
|
||||
FQDN = "oai-smf-svc";
|
||||
INSTANCE = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
INTERFACES :
|
||||
{
|
||||
N4 :
|
||||
{
|
||||
# SMF binded interface for N4 communication (UPF)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
};
|
||||
|
||||
SBI :
|
||||
{
|
||||
# SMF binded interface for SBI interface (e.g., communication with AMF, UDM)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
HTTP2_PORT = 9090; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR SMF API VERSION CONFIG HERE
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
# Pool of UE assigned IP addresses
|
||||
# Do not make IP pools overlap
|
||||
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
|
||||
IP_ADDRESS_POOL :
|
||||
{
|
||||
IPV4_LIST = (
|
||||
{RANGE = "12.1.1.2 - 12.1.1.128";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
{RANGE = "12.1.1.129 - 12.1.1.224";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
{RANGE = "10.10.10.2 - 10.10.10.253";} # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
|
||||
|
||||
);
|
||||
IPV6_LIST = (
|
||||
{PREFIX = "2001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
{PREFIX = "3001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
{PREFIX = "4001:1:2::/64";} # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
|
||||
);
|
||||
};
|
||||
|
||||
DNN_LIST = (
|
||||
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
|
||||
{DNN_NI = "default"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1},
|
||||
{DNN_NI = "carrier.com"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
|
||||
{DNN_NI = "oai"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1}
|
||||
);
|
||||
|
||||
# DNS address communicated to UEs
|
||||
DEFAULT_DNS_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # YOUR DNS CONFIG HERE
|
||||
|
||||
SUPPORT_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
REGISTER_NRF = "yes"; # Set to yes if SMF resgisters to an NRF
|
||||
DISCOVER_UPF = "yes"; # Set to yes to enable UPF discovery and selection
|
||||
FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # Non standard feature, normally should be set to "no",
|
||||
# but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling
|
||||
USE_LOCAL_SUBSCRIPTION_INFO = "yes"; # Set to yes if SMF uses local subscription information instead of from an UDM
|
||||
USE_FQDN_DNS = "yes"; # Set to yes if AMF/UDM/NRF/UPF will relying on a DNS to resolve FQDN
|
||||
}
|
||||
|
||||
AMF :
|
||||
{
|
||||
IPV4_ADDRESS = "0.0.0.0"; # YOUR AMF CONFIG HERE
|
||||
PORT = 80; # YOUR AMF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR AMF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-amf" # YOUR AMF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UDM :
|
||||
{
|
||||
IPV4_ADDRESS = "127.0.0.1"; # YOUR UDM CONFIG HERE
|
||||
PORT = 80; # YOUR UDM CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "localhost" # YOUR UDM FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.71.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UPF_LIST = (
|
||||
{IPV4_ADDRESS = "192.168.71.134" ; FQDN = "oai-spgwu"} # YOUR UPF CONFIG HERE
|
||||
);
|
||||
|
||||
LOCAL_CONFIGURATION :
|
||||
{
|
||||
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
|
||||
{ NSSAI_SST = 222, NSSAI_SD = "123", DNN = "default", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 7, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"},
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "1", DNN = "oai", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"}
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
+217
File diff suppressed because one or more lines are too long
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI")
|
||||
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
#NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
#if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
# STATUS=-1
|
||||
# echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
#fi
|
||||
#
|
||||
if [[ -z $SMF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=-1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SGW_PORT_FOR_S1U_S12_S4_UP=2152
|
||||
SGW_PORT_FOR_SX=8805
|
||||
SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'})
|
||||
SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'})
|
||||
S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP")
|
||||
SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening."
|
||||
fi
|
||||
|
||||
if [[ -z $SX_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SX port $SGW_PORT_FOR_SX is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
+239
-277
@@ -124,13 +124,13 @@ if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
|
||||
|
||||
# for ubuntu 17.10, directories are different
|
||||
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")
|
||||
|
||||
|
||||
include_directories("/usr/include/x86_64-linux-gnu")
|
||||
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
|
||||
list(APPEND ATLAS_LIBRARIES cblas)
|
||||
list(APPEND ATLAS_LIBRARIES atlas)
|
||||
list(APPEND ATLAS_LIBRARIES lapack)
|
||||
|
||||
|
||||
else()
|
||||
message("No Blas/Atlas libs found, some targets will fail")
|
||||
endif()
|
||||
@@ -155,8 +155,6 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
|
||||
|
||||
project (OpenAirInterface)
|
||||
|
||||
|
||||
|
||||
##############################################
|
||||
# Base CUDA setting
|
||||
##############################################
|
||||
@@ -257,6 +255,7 @@ macro(add_list_string_option name val helpstr)
|
||||
endif()
|
||||
endmacro(add_list_string_option)
|
||||
|
||||
# this function should produce the same value as the macro MAKE_VERSION defined in the C code (file types.h)
|
||||
function(make_version VERSION_VALUE)
|
||||
math(EXPR RESULT "0")
|
||||
foreach (ARG ${ARGN})
|
||||
@@ -309,49 +308,38 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
|
||||
endif()
|
||||
|
||||
#
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
|
||||
# add autotools definitions that were maybe used!
|
||||
if (CUDA_FOUND)
|
||||
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
|
||||
set(CUDA_CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D CUDA_FLAG"
|
||||
)
|
||||
set(CUDA_CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D CUDA_FLAG"
|
||||
)
|
||||
add_definitions("-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP")
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER} -D CUDA_FLAG"
|
||||
)
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER} -D CUDA_FLAG"
|
||||
)
|
||||
else (CUDA_FOUND)
|
||||
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER}"
|
||||
)
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER}"
|
||||
)
|
||||
endif ()
|
||||
set(commonOpts "-pipe -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic")
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=gnu99 -funroll-loops")
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=c++11")
|
||||
|
||||
# cuda compiler bug (limitation) on complex macro definition
|
||||
if (CUDA_FOUND)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCUDA_FLAG")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCUDA_FLAG")
|
||||
endif()
|
||||
|
||||
if (SANITIZE_ADDRESS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-common")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-common")
|
||||
endif ()
|
||||
|
||||
add_definitions("-DASN_DISABLE_OER_SUPPORT")
|
||||
|
||||
#########################
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ggdb3 -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
|
||||
#########################
|
||||
# set a flag for changes in the source code
|
||||
# these changes are related to hardcoded path to include .h files
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -Og -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")
|
||||
set(debugOpt "-ggdb3 -DMALLOC_CHECK_=3 -fno-delete-null-pointer-checks")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${debugOpt} -O0")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${debugOpt} -O2")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
||||
|
||||
set(GIT_BRANCH "UNKNOWN")
|
||||
set(GIT_COMMIT_HASH "UNKNOWN")
|
||||
@@ -385,7 +373,6 @@ if(GIT_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# Below is a hard-coded info
|
||||
set (FIRMWARE_VERSION "No svn information")
|
||||
add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
|
||||
@@ -406,14 +393,12 @@ add_boolean_option(PDCP_MSG_PRINT False "print PDCP messages to /tmp/pdcp.l
|
||||
add_boolean_option(DEBUG_PDCP_PAYLOAD False "print PDCP PDU to stdout") # if true, make sure that global and PDCP log levels are trace
|
||||
add_boolean_option(DEBUG_MAC_INTERFACE False "print MAC-RLC PDU exchange to stdout") # if true, make sure that global and PDCP log levels are trace
|
||||
add_boolean_option(TRACE_RLC_PAYLOAD False "print RLC PDU to stdout") # if true, make sure that global and PDCP log levels are trace
|
||||
add_boolean_option(TEST_OMG False "???")
|
||||
add_boolean_option(DEBUG_OMG False "???")
|
||||
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
|
||||
add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" )
|
||||
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs")
|
||||
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
|
||||
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
|
||||
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
|
||||
add_boolean_option(DEBUG_CONSOLE False "disables stdout/stderr buffering")
|
||||
|
||||
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
||||
add_library(ITTI
|
||||
@@ -421,8 +406,6 @@ add_library(ITTI
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
)
|
||||
add_dependencies(ITTI rrc_flag)
|
||||
set(ITTI_LIB ITTI)
|
||||
|
||||
|
||||
##################################################
|
||||
# ASN.1 grammar C code generation & dependencies #
|
||||
@@ -837,11 +820,11 @@ if (${RU} STREQUAL 0)
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
|
||||
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "asn1c: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
|
||||
|
||||
add_custom_target (
|
||||
f1_flag ALL
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
|
||||
@@ -852,15 +835,13 @@ if (${RU} STREQUAL 0)
|
||||
${F1AP_ASN_GENERATED_C_FILES}
|
||||
)
|
||||
add_dependencies (F1AP_LIB f1_flag)
|
||||
|
||||
include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
|
||||
include_directories ("${F1AP_DIR}")
|
||||
|
||||
file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
|
||||
add_library(F1AP
|
||||
${F1AP_C_FILES}
|
||||
)
|
||||
|
||||
|
||||
include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
|
||||
include_directories ("${F1AP_DIR}")
|
||||
|
||||
file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
|
||||
add_library(F1AP ${F1AP_C_FILES} )
|
||||
|
||||
endif (${RU} STREQUAL 0)
|
||||
|
||||
# Hardware dependant options
|
||||
@@ -873,22 +854,22 @@ add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF
|
||||
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
|
||||
#NOKIA config enhancement
|
||||
set (CONFIG_ROOTDIR
|
||||
${OPENAIR_DIR}/common/config
|
||||
)
|
||||
${OPENAIR_DIR}/common/config
|
||||
)
|
||||
set (CONFIG_SOURCES
|
||||
${CONFIG_ROOTDIR}/config_load_configmodule.c
|
||||
${CONFIG_ROOTDIR}/config_userapi.c
|
||||
${CONFIG_ROOTDIR}/config_cmdline.c
|
||||
)
|
||||
${CONFIG_ROOTDIR}/config_load_configmodule.c
|
||||
${CONFIG_ROOTDIR}/config_userapi.c
|
||||
${CONFIG_ROOTDIR}/config_cmdline.c
|
||||
)
|
||||
set (CONFIG_LIBCONFIG_SOURCES
|
||||
${CONFIG_ROOTDIR}/libconfig/config_libconfig.c
|
||||
)
|
||||
${CONFIG_ROOTDIR}/libconfig/config_libconfig.c
|
||||
)
|
||||
add_library(CONFIG_LIB ${CONFIG_SOURCES})
|
||||
add_library(params_libconfig MODULE ${CONFIG_LIBCONFIG_SOURCES} )
|
||||
target_link_libraries(params_libconfig config)
|
||||
# shared library loader
|
||||
set (SHLIB_LOADER_SOURCES
|
||||
${OPENAIR_DIR}/common/utils/load_module_shlib.c
|
||||
${OPENAIR_DIR}/common/utils/load_module_shlib.c
|
||||
)
|
||||
# include RF devices / transport protocols library modules
|
||||
######################################################################
|
||||
@@ -927,8 +908,8 @@ add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} )
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||
set(option_HWIRISLIB_lib "-l SoapySDR")
|
||||
set(HWLIB_IRIS_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
|
||||
)
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
|
||||
)
|
||||
add_library(oai_irisdevif MODULE ${HWLIB_IRIS_SOURCE})
|
||||
target_include_directories(oai_irisdevif PRIVATE /usr/local/lib/SoapySDR/modules0.7/)
|
||||
target_link_libraries(oai_irisdevif SoapySDR)
|
||||
@@ -1035,7 +1016,6 @@ add_boolean_option(ENABLE_VCD False "always true now, time measure
|
||||
add_boolean_option(ENABLE_VCD_FIFO False "time measurements of proc calls and var displays sent to FIFO (one more thread)")
|
||||
add_boolean_option(LINUX False "used in weird memcpy() in pdcp.c ???")
|
||||
add_boolean_option(LINUX_LIST False "used only in lists.c: either use OAI implementation of lists or Linux one (should be True, but it is False")
|
||||
add_boolean_option(OPENAIR_LTE True "Seems legacy: keep it to true")
|
||||
|
||||
##########################
|
||||
# PHY options
|
||||
@@ -1044,10 +1024,7 @@ add_boolean_option(DRIVER2013 True "only relevant for EXMIMO")
|
||||
add_boolean_option(EXMIMO_IOT True "????")
|
||||
add_boolean_option(LOCALIZATION False "???")
|
||||
add_integer_option(MAX_NUM_CCs 1 "????")
|
||||
add_boolean_option(MU_RECEIVER False "????")
|
||||
add_boolean_option(PHYSIM False "for L1 simulators (dlsim, ulsim, ...)")
|
||||
add_boolean_option(PHY_CONTEXT True "not clear: must remain False for dlsim")
|
||||
add_boolean_option(PHY_EMUL False "not clear: must remain False for dlsim")
|
||||
add_boolean_option(SMBV False "Rohde&Schwarz SMBV100A vector signal generator")
|
||||
add_boolean_option(DEBUG_PHY False "Enable PHY layer debugging options")
|
||||
add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures")
|
||||
@@ -1389,42 +1366,42 @@ target_link_libraries (msc LFDS)
|
||||
include_directories(${OPENAIR_DIR}/common/utils/msc)
|
||||
|
||||
set(UTIL_SRC
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli.c
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli_cmd.c
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli_server.c
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli.c
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli_cmd.c
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli_server.c
|
||||
${OPENAIR2_DIR}/UTIL/FIFO/pad_list.c
|
||||
${OPENAIR2_DIR}/UTIL/LISTS/list.c
|
||||
${OPENAIR2_DIR}/UTIL/LISTS/list2.c
|
||||
${OPENAIR_DIR}/common/utils/LOG/log.c
|
||||
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
|
||||
${OPENAIR2_DIR}/UTIL/MATH/oml.c
|
||||
# ${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_generate_report.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_filename.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_XML.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_save_XML.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/common.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/grid.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/job.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/mobility_parser.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/omg.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/omg_hashtable.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/rwalk.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/rwp.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/static.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/steadystaterwp.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/trace.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/trace_hashtable.c
|
||||
# ${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_generate_report.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_filename.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_XML.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_save_XML.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/common.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/grid.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/job.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/mobility_parser.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/omg.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/omg_hashtable.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/rwalk.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/rwp.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/static.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/steadystaterwp.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/trace.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/trace_hashtable.c
|
||||
${OPENAIR2_DIR}/UTIL/OPT/probe.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_tx.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_kpi.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_models.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_form.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_rx.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_tx.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_kpi.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_models.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_form.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_rx.c
|
||||
)
|
||||
add_library(UTIL ${UTIL_SRC})
|
||||
add_dependencies(UTIL rrc_flag)
|
||||
@@ -1506,7 +1483,6 @@ set(SCHED_SRC_NR_UE
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/pucch_power_control_ue_nr.c
|
||||
)
|
||||
add_library(SCHED_NR_UE_LIB ${SCHED_SRC_NR_UE})
|
||||
|
||||
@@ -1515,7 +1491,7 @@ add_library(SCHED_NR_UE_LIB ${SCHED_SRC_NR_UE})
|
||||
#################################
|
||||
set(NFAPI_COMMON_SRC
|
||||
${NFAPI_DIR}/common/src/debug.c
|
||||
)
|
||||
)
|
||||
add_library(NFAPI_COMMON_LIB ${NFAPI_COMMON_SRC})
|
||||
|
||||
include_directories(${NFAPI_DIR}/common/public_inc)
|
||||
@@ -2173,7 +2149,6 @@ set (MISC_NFAPI_LTE
|
||||
${OPENAIR1_DIR}/SCHED/nfapi_lte_dummy.c
|
||||
)
|
||||
|
||||
|
||||
add_library(MISC_NFAPI_LTE_LIB
|
||||
${MISC_NFAPI_LTE}
|
||||
)
|
||||
@@ -2182,7 +2157,6 @@ set (MISC_NFAPI_NR
|
||||
${OPENAIR1_DIR}/SCHED/nfapi_nr_dummy.c
|
||||
)
|
||||
|
||||
|
||||
add_library(MISC_NFAPI_NR_LIB
|
||||
${MISC_NFAPI_NR}
|
||||
)
|
||||
@@ -2265,8 +2239,8 @@ set(GTPV1U_DIR ${OPENAIR3_DIR}/GTPV1-U)
|
||||
add_library (GTPV1U_OCP
|
||||
${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
|
||||
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
||||
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
|
||||
)
|
||||
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
|
||||
)
|
||||
target_compile_definitions(GTPV1U_OCP PUBLIC NEW_GTPU)
|
||||
add_dependencies(GTPV1U_OCP rrc_flag)
|
||||
include_directories(${OPENAIR3_DIR}/ocp-gtp)
|
||||
@@ -2282,7 +2256,7 @@ set (NR_GTPV1U_SRC
|
||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uMsg.c
|
||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1u.c
|
||||
${GTPV1U_DIR}/gtpv1u_teid_pool.c
|
||||
)
|
||||
)
|
||||
add_library(NR_GTPV1U ${NR_GTPV1U_SRC})
|
||||
add_dependencies(NR_GTPV1U rrc_flag)
|
||||
|
||||
@@ -2304,7 +2278,6 @@ add_dependencies(SCTP_CLIENT rrc_flag)
|
||||
add_library(UDP ${OPENAIR3_DIR}/UDP/udp_eNB_task.c)
|
||||
add_dependencies(UDP rrc_flag)
|
||||
|
||||
|
||||
set(NAS_SRC ${OPENAIR3_DIR}/NAS/)
|
||||
set(libnas_api_OBJS
|
||||
${NAS_SRC}COMMON/API/NETWORK/as_message.c
|
||||
@@ -2463,171 +2436,171 @@ set (libnas_utils_OBJS
|
||||
${NAS_SRC}COMMON/UTIL/OctetString.c
|
||||
)
|
||||
|
||||
set(libnas_ue_api_OBJS
|
||||
${NAS_SRC}UE/API/USER/at_command.c
|
||||
${NAS_SRC}UE/API/USER/at_error.c
|
||||
${NAS_SRC}UE/API/USER/at_response.c
|
||||
${NAS_SRC}UE/API/USER/user_api.c
|
||||
${NAS_SRC}UE/API/USER/user_indication.c
|
||||
${NAS_SRC}UE/API/USIM/aka_functions.c
|
||||
${NAS_SRC}UE/API/USIM/usim_api.c
|
||||
set(libnas_ue_api_OBJS
|
||||
${NAS_SRC}UE/API/USER/at_command.c
|
||||
${NAS_SRC}UE/API/USER/at_error.c
|
||||
${NAS_SRC}UE/API/USER/at_response.c
|
||||
${NAS_SRC}UE/API/USER/user_api.c
|
||||
${NAS_SRC}UE/API/USER/user_indication.c
|
||||
${NAS_SRC}UE/API/USIM/aka_functions.c
|
||||
${NAS_SRC}UE/API/USIM/usim_api.c
|
||||
)
|
||||
set(libnas_ue_emm_OBJS
|
||||
${NAS_SRC}UE/EMM/Attach.c
|
||||
${NAS_SRC}UE/EMM/Authentication.c
|
||||
${NAS_SRC}UE/EMM/Detach.c
|
||||
${NAS_SRC}UE/EMM/emm_main.c
|
||||
${NAS_SRC}UE/EMM/EmmStatusHdl.c
|
||||
${NAS_SRC}UE/EMM/Identification.c
|
||||
${NAS_SRC}UE/EMM/IdleMode.c
|
||||
${NAS_SRC}UE/EMM/LowerLayer.c
|
||||
${NAS_SRC}UE/EMM/SecurityModeControl.c
|
||||
${NAS_SRC}UE/EMM/ServiceRequestHdl.c
|
||||
${NAS_SRC}UE/EMM/TrackingAreaUpdate.c
|
||||
set(libnas_ue_emm_OBJS
|
||||
${NAS_SRC}UE/EMM/Attach.c
|
||||
${NAS_SRC}UE/EMM/Authentication.c
|
||||
${NAS_SRC}UE/EMM/Detach.c
|
||||
${NAS_SRC}UE/EMM/emm_main.c
|
||||
${NAS_SRC}UE/EMM/EmmStatusHdl.c
|
||||
${NAS_SRC}UE/EMM/Identification.c
|
||||
${NAS_SRC}UE/EMM/IdleMode.c
|
||||
${NAS_SRC}UE/EMM/LowerLayer.c
|
||||
${NAS_SRC}UE/EMM/SecurityModeControl.c
|
||||
${NAS_SRC}UE/EMM/ServiceRequestHdl.c
|
||||
${NAS_SRC}UE/EMM/TrackingAreaUpdate.c
|
||||
)
|
||||
set(libnas_ue_emm_sap_OBJS
|
||||
${NAS_SRC}UE/EMM/SAP/emm_as.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredAttachNeeded.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregistered.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredLimitedService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNoImsi.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNormalService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredPlmnSearch.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_esm.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_fsm.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmNull.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_recv.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_reg.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegistered.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredLimitedService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredNoCellAvailable.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredNormalService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredPlmnSearch.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredUpdateNeeded.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_sap.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_send.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmServiceRequestInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c
|
||||
set(libnas_ue_emm_sap_OBJS
|
||||
${NAS_SRC}UE/EMM/SAP/emm_as.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredAttachNeeded.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregistered.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredLimitedService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNoImsi.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNormalService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredPlmnSearch.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_esm.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_fsm.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmNull.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_recv.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_reg.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegistered.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredLimitedService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredNoCellAvailable.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredNormalService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredPlmnSearch.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredUpdateNeeded.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_sap.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_send.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmServiceRequestInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c
|
||||
)
|
||||
set (libnas_ue_esm_OBJS
|
||||
${NAS_SRC}UE/ESM/DedicatedEpsBearerContextActivation.c
|
||||
${NAS_SRC}UE/ESM/DefaultEpsBearerContextActivation.c
|
||||
${NAS_SRC}UE/ESM/EpsBearerContextDeactivation.c
|
||||
${NAS_SRC}UE/ESM/esm_ebr.c
|
||||
${NAS_SRC}UE/ESM/esm_ebr_context.c
|
||||
${NAS_SRC}UE/ESM/esm_ip.c
|
||||
${NAS_SRC}UE/ESM/esm_main.c
|
||||
${NAS_SRC}UE/ESM/esm_pt.c
|
||||
${NAS_SRC}UE/ESM/EsmStatusHdl.c
|
||||
${NAS_SRC}UE/ESM/PdnConnectivity.c
|
||||
${NAS_SRC}UE/ESM/PdnDisconnect.c
|
||||
set (libnas_ue_esm_OBJS
|
||||
${NAS_SRC}UE/ESM/DedicatedEpsBearerContextActivation.c
|
||||
${NAS_SRC}UE/ESM/DefaultEpsBearerContextActivation.c
|
||||
${NAS_SRC}UE/ESM/EpsBearerContextDeactivation.c
|
||||
${NAS_SRC}UE/ESM/esm_ebr.c
|
||||
${NAS_SRC}UE/ESM/esm_ebr_context.c
|
||||
${NAS_SRC}UE/ESM/esm_ip.c
|
||||
${NAS_SRC}UE/ESM/esm_main.c
|
||||
${NAS_SRC}UE/ESM/esm_pt.c
|
||||
${NAS_SRC}UE/ESM/EsmStatusHdl.c
|
||||
${NAS_SRC}UE/ESM/PdnConnectivity.c
|
||||
${NAS_SRC}UE/ESM/PdnDisconnect.c
|
||||
)
|
||||
set(libnas_ue_esm_sap_OBJS
|
||||
${NAS_SRC}UE/ESM/SAP/esm_recv.c
|
||||
${NAS_SRC}UE/ESM/SAP/esm_send.c
|
||||
${NAS_SRC}UE/ESM/SAP/esm_sap.c
|
||||
set(libnas_ue_esm_sap_OBJS
|
||||
${NAS_SRC}UE/ESM/SAP/esm_recv.c
|
||||
${NAS_SRC}UE/ESM/SAP/esm_send.c
|
||||
${NAS_SRC}UE/ESM/SAP/esm_sap.c
|
||||
)
|
||||
|
||||
set(libnrnas_emm_msg_OBJS
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationRequest.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationAccept.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSIdentityResponse.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSAuthenticationResponse.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSNASSecurityModeComplete.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationComplete.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSUplinkNasTransport.c
|
||||
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishRequest.c
|
||||
set(libnrnas_emm_msg_OBJS
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationRequest.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationAccept.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSIdentityResponse.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSAuthenticationResponse.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSNASSecurityModeComplete.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationComplete.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSUplinkNasTransport.c
|
||||
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishRequest.c
|
||||
)
|
||||
|
||||
set(libnrnas_ies_OBJS
|
||||
${NAS_SRC}COMMON/IES/ExtendedProtocolDiscriminator.c
|
||||
${NAS_SRC}COMMON/IES/FGSMobileIdentity.c
|
||||
${NAS_SRC}COMMON/IES/FGSRegistrationType.c
|
||||
${NAS_SRC}COMMON/IES/SpareHalfOctet.c
|
||||
${NAS_SRC}COMMON/IES/FGSRegistrationResult.c
|
||||
${NAS_SRC}COMMON/IES/FGMMCapability.c
|
||||
${NAS_SRC}COMMON/IES/NrUESecurityCapability.c
|
||||
${NAS_SRC}COMMON/IES/FGCNasMessageContainer.c
|
||||
${NAS_SRC}COMMON/IES/SORTransparentContainer.c
|
||||
set(libnrnas_ies_OBJS
|
||||
${NAS_SRC}COMMON/IES/ExtendedProtocolDiscriminator.c
|
||||
${NAS_SRC}COMMON/IES/FGSMobileIdentity.c
|
||||
${NAS_SRC}COMMON/IES/FGSRegistrationType.c
|
||||
${NAS_SRC}COMMON/IES/SpareHalfOctet.c
|
||||
${NAS_SRC}COMMON/IES/FGSRegistrationResult.c
|
||||
${NAS_SRC}COMMON/IES/FGMMCapability.c
|
||||
${NAS_SRC}COMMON/IES/NrUESecurityCapability.c
|
||||
${NAS_SRC}COMMON/IES/FGCNasMessageContainer.c
|
||||
${NAS_SRC}COMMON/IES/SORTransparentContainer.c
|
||||
)
|
||||
|
||||
add_library(LIB_NAS_SIMUE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
${NAS_SRC}UE/nas_parser.c
|
||||
${NAS_SRC}UE/nas_proc.c
|
||||
${NAS_SRC}UE/nas_user.c
|
||||
${NAS_SRC}NR_UE/nr_nas_msg_sim.c
|
||||
${libnas_api_OBJS}
|
||||
${libnas_ue_api_OBJS}
|
||||
${libnas_emm_msg_OBJS}
|
||||
${libnas_esm_msg_OBJS}
|
||||
${libnas_ies_OBJS}
|
||||
${libnas_utils_OBJS}
|
||||
${libnas_ue_emm_OBJS}
|
||||
${libnas_ue_emm_sap_OBJS}
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
${libnrnas_emm_msg_OBJS}
|
||||
${libnrnas_ies_OBJS}
|
||||
add_library(LIB_NAS_SIMUE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
${NAS_SRC}UE/nas_parser.c
|
||||
${NAS_SRC}UE/nas_proc.c
|
||||
${NAS_SRC}UE/nas_user.c
|
||||
${NAS_SRC}NR_UE/nr_nas_msg_sim.c
|
||||
${libnas_api_OBJS}
|
||||
${libnas_ue_api_OBJS}
|
||||
${libnas_emm_msg_OBJS}
|
||||
${libnas_esm_msg_OBJS}
|
||||
${libnas_ies_OBJS}
|
||||
${libnas_utils_OBJS}
|
||||
${libnas_ue_emm_OBJS}
|
||||
${libnas_ue_emm_sap_OBJS}
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
${libnrnas_emm_msg_OBJS}
|
||||
${libnrnas_ies_OBJS}
|
||||
)
|
||||
add_dependencies(LIB_NAS_SIMUE rrc_flag)
|
||||
set(NAS_SIM_LIB LIB_NAS_SIMUE)
|
||||
add_dependencies(LIB_NAS_SIMUE rrc_flag)
|
||||
set(NAS_SIM_LIB LIB_NAS_SIMUE)
|
||||
|
||||
add_library(LIB_NAS_UE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
${NAS_SRC}UE/nas_parser.c
|
||||
${NAS_SRC}UE/nas_proc.c
|
||||
${NAS_SRC}UE/nas_user.c
|
||||
${libnas_api_OBJS}
|
||||
${libnas_ue_api_OBJS}
|
||||
${libnas_emm_msg_OBJS}
|
||||
${libnas_esm_msg_OBJS}
|
||||
${libnas_ies_OBJS}
|
||||
${libnas_utils_OBJS}
|
||||
${libnas_ue_emm_OBJS}
|
||||
${libnas_ue_emm_sap_OBJS}
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
add_library(LIB_NAS_UE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
${NAS_SRC}UE/nas_parser.c
|
||||
${NAS_SRC}UE/nas_proc.c
|
||||
${NAS_SRC}UE/nas_user.c
|
||||
${libnas_api_OBJS}
|
||||
${libnas_ue_api_OBJS}
|
||||
${libnas_emm_msg_OBJS}
|
||||
${libnas_esm_msg_OBJS}
|
||||
${libnas_ies_OBJS}
|
||||
${libnas_utils_OBJS}
|
||||
${libnas_ue_emm_OBJS}
|
||||
${libnas_ue_emm_sap_OBJS}
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
)
|
||||
add_dependencies(LIB_NAS_UE rrc_flag)
|
||||
set(NAS_UE_LIB LIB_NAS_UE)
|
||||
add_dependencies(LIB_NAS_UE rrc_flag)
|
||||
set(NAS_UE_LIB LIB_NAS_UE)
|
||||
|
||||
|
||||
include_directories(${NAS_SRC}NR_UE)
|
||||
include_directories(${NAS_SRC}UE)
|
||||
include_directories(${NAS_SRC}UE/API/USER)
|
||||
include_directories(${NAS_SRC}UE/API/USIM)
|
||||
include_directories(${NAS_SRC}UE/EMM)
|
||||
include_directories(${NAS_SRC}UE/EMM/SAP)
|
||||
include_directories(${NAS_SRC}UE/ESM)
|
||||
include_directories(${NAS_SRC}UE/ESM/SAP)
|
||||
include_directories(${NAS_SRC}NR_UE)
|
||||
include_directories(${NAS_SRC}UE)
|
||||
include_directories(${NAS_SRC}UE/API/USER)
|
||||
include_directories(${NAS_SRC}UE/API/USIM)
|
||||
include_directories(${NAS_SRC}UE/EMM)
|
||||
include_directories(${NAS_SRC}UE/EMM/SAP)
|
||||
include_directories(${NAS_SRC}UE/ESM)
|
||||
include_directories(${NAS_SRC}UE/ESM/SAP)
|
||||
|
||||
# nbiot
|
||||
add_definitions("-DNUMBER_OF_UE_MAX_NB_IoT=16")
|
||||
set (NBIOT_SOURCES
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_config.c
|
||||
)
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_config.c
|
||||
)
|
||||
add_library(NB_IoT MODULE ${NBIOT_SOURCES} )
|
||||
|
||||
# shared library loader
|
||||
set (SHLIB_LOADER_SOURCES
|
||||
${OPENAIR_DIR}/common/utils/load_module_shlib.c
|
||||
)
|
||||
${OPENAIR_DIR}/common/utils/load_module_shlib.c
|
||||
)
|
||||
|
||||
add_library(LIB_5GNAS_GNB
|
||||
${NAS_SRC}/COMMON/nr_common.c
|
||||
${NAS_SRC}/gNB/network_process_nas.c
|
||||
${NAS_SRC}/NR_UE/ue_process_nas.c
|
||||
${OPENAIR3_DIR}//UICC/usim_interface.c
|
||||
)
|
||||
${NAS_SRC}/COMMON/nr_common.c
|
||||
${NAS_SRC}/gNB/network_process_nas.c
|
||||
${NAS_SRC}/NR_UE/ue_process_nas.c
|
||||
${OPENAIR3_DIR}//UICC/usim_interface.c
|
||||
)
|
||||
target_link_libraries(LIB_5GNAS_GNB SECU_CN ${CRYPTO_LIBRARIES})
|
||||
|
||||
# Make lfds as a own source code (even if it is a outside library)
|
||||
@@ -2859,10 +2832,9 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer)
|
||||
|
||||
target_link_libraries (lte-softmodem
|
||||
-Wl,--start-group
|
||||
|
||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB NR_GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
||||
@@ -2905,7 +2877,7 @@ target_link_libraries (ocp-enb
|
||||
|
||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB NR_GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||
|
||||
@@ -2920,7 +2892,7 @@ add_executable(cu_test
|
||||
)
|
||||
target_link_libraries(cu_test
|
||||
${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
|
||||
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB}
|
||||
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ITTI
|
||||
)
|
||||
|
||||
add_executable(du_test
|
||||
@@ -2934,7 +2906,7 @@ add_executable(du_test
|
||||
)
|
||||
target_link_libraries(du_test
|
||||
${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
|
||||
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB}
|
||||
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ITTI
|
||||
)
|
||||
|
||||
add_executable(oairu
|
||||
@@ -3002,7 +2974,7 @@ target_link_libraries (lte-uesoftmodem
|
||||
|
||||
NR_GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
||||
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
@@ -3045,7 +3017,7 @@ target_compile_definitions(nr-softmodem PUBLIC NEW_GTPU)
|
||||
target_link_libraries (nr-softmodem
|
||||
-Wl,--start-group
|
||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA
|
||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||
ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
@@ -3084,7 +3056,7 @@ add_executable(ocp-gnb
|
||||
target_link_libraries (ocp-gnb
|
||||
-Wl,--start-group
|
||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA
|
||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||
ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
|
||||
-Wl,--end-group z dl)
|
||||
@@ -3130,9 +3102,9 @@ target_link_libraries (nr-uesoftmodem
|
||||
RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
|
||||
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
|
||||
NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||
NFAPI_USER_LIB S1AP_LIB S1AP_ENB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB}
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
@@ -3158,7 +3130,7 @@ add_executable(dlsim_tm4
|
||||
${T_SOURCE}
|
||||
)
|
||||
target_link_libraries (dlsim_tm4
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ITTI -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
|
||||
)
|
||||
|
||||
@@ -3201,14 +3173,6 @@ target_link_libraries(smallblocktest
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
|
||||
# temp_C_flag = CMAKE_C_FLAGS
|
||||
#set(CMAKE_C_FLAGS " ")
|
||||
set (TEMP_C_FLAG ${CMAKE_C_FLAGS})
|
||||
set (CMAKE_C_FLAGS ${CUDA_CMAKE_C_FLAGS})
|
||||
|
||||
set (TEMP_CXX_FLAG ${CMAKE_CXX_FLAGS})
|
||||
set (CMAKE_CXX_FLAGS ${CUDA_CMAKE_CXX_FLAGS})
|
||||
if (CUDA_FOUND)
|
||||
###################################################
|
||||
# For CUDA library
|
||||
@@ -3239,8 +3203,6 @@ else (CUDA_FOUND)
|
||||
)
|
||||
|
||||
endif ()
|
||||
set (CMAKE_C_FLAGS ${TEMP_C_FLAG})
|
||||
set (CMAKE_CXX_FLAGS ${TEMP_CXX_FLAG})
|
||||
|
||||
|
||||
# add_executable(ldpctest
|
||||
@@ -3268,7 +3230,7 @@ add_executable(nr_dlschsim
|
||||
)
|
||||
target_link_libraries(nr_dlschsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||
)
|
||||
|
||||
add_executable(nr_pbchsim
|
||||
@@ -3283,7 +3245,7 @@ add_executable(nr_pbchsim
|
||||
)
|
||||
target_link_libraries(nr_pbchsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||
)
|
||||
|
||||
#PUCCH ---> Prashanth
|
||||
@@ -3300,7 +3262,7 @@ add_executable(nr_pucchsim
|
||||
)
|
||||
target_link_libraries(nr_pucchsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||
)
|
||||
|
||||
add_executable(nr_dlsim
|
||||
@@ -3319,7 +3281,7 @@ add_executable(nr_dlsim
|
||||
)
|
||||
target_link_libraries(nr_dlsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} ${OPENSSL_LIBRARIES} dl
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||
)
|
||||
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
|
||||
@@ -3338,7 +3300,7 @@ add_executable(nr_prachsim
|
||||
${SHLIB_LOADER_SOURCES})
|
||||
target_link_libraries(nr_prachsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} ${OPENSSL_LIBRARIES} dl)
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl)
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
@@ -3352,7 +3314,7 @@ add_executable(nr_ulschsim
|
||||
)
|
||||
target_link_libraries(nr_ulschsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||
)
|
||||
|
||||
add_executable(nr_ulsim
|
||||
@@ -3371,7 +3333,7 @@ add_executable(nr_ulsim
|
||||
)
|
||||
target_link_libraries(nr_ulsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} ${OPENSSL_LIBRARIES} dl
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||
)
|
||||
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
|
||||
@@ -3393,7 +3355,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
)
|
||||
target_link_libraries (${myExe}
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ITTI LFDS7 -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||
)
|
||||
|
||||
@@ -3408,7 +3370,7 @@ add_executable(test_epc_generate_scenario
|
||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||
)
|
||||
target_link_libraries (test_epc_generate_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP NR_GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP NR_GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ITTI ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
add_executable(test_epc_play_scenario
|
||||
@@ -3427,7 +3389,7 @@ add_executable(test_epc_play_scenario
|
||||
)
|
||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||
target_link_libraries (test_epc_play_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP NR_GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP NR_GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ITTI ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
|
||||
@@ -3529,7 +3491,7 @@ endfunction(make_driver name dir src)
|
||||
# nashmesh module
|
||||
################
|
||||
list(APPEND nasmesh_src device.c common.c ioctl.c classifier.c tool.c mesh.c)
|
||||
set(module_cc_opt "${module_cc_opt} -DNAS_NETLINK -DPDCP_USE_NETLINK -D${MKVER}")
|
||||
set(module_cc_opt "${module_cc_opt} -DNAS_NETLINK -DPDCP_USE_NETLINK")
|
||||
# legacy Makefile was using NAS_NETLINK flag, but other drivers the hereafter flag
|
||||
# so, this cmake use OAI_NW_DRIVER_USE_NETLINK everywhere
|
||||
if (OAI_NW_DRIVER_USE_NETLINK)
|
||||
@@ -3583,7 +3545,7 @@ target_compile_definitions(nr-ittisim PUBLIC NEW_GTPU)
|
||||
target_link_libraries (nr-ittisim
|
||||
-Wl,--start-group
|
||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA
|
||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
|
||||
ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
|
||||
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
||||
PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE
|
||||
|
||||
@@ -83,9 +83,14 @@ char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) {
|
||||
}
|
||||
|
||||
if (*ptr == NULL) {
|
||||
*ptr = malloc(length>40?length:40);
|
||||
// LTS: dummy fix, waiting Francois full fix in 4G branch
|
||||
// the issue is we don't know at this point the size we will get
|
||||
// for parmeters on the command line,
|
||||
// The length sould probably managed, in a later version
|
||||
// 100 is a very large value for a string parameter of today OAI
|
||||
if (length<100)
|
||||
length=100;
|
||||
*ptr = malloc(length);
|
||||
|
||||
if ( *ptr != NULL) {
|
||||
memset(*ptr,0,length);
|
||||
|
||||
@@ -196,6 +196,26 @@ uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports) {
|
||||
|
||||
if (dmrs_ports == 0) return 0; // dci 1_0
|
||||
int p = -1;
|
||||
int found = -1;
|
||||
for (int i=0; i<12; i++) { // loop over dmrs ports
|
||||
if((dmrs_ports>>i)&0x01) { // check if current bit is 1
|
||||
found++;
|
||||
if (found == nl) { // found antenna port number corresponding to current layer
|
||||
p = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(p>-1,"No dmrs port corresponding to layer %d found\n",nl);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
int get_subband_size(int NPRB,int size) {
|
||||
// implements table 5.2.1.4-2 from 36.214
|
||||
//
|
||||
|
||||
@@ -62,7 +62,7 @@ uint8_t nr_get_Qm(uint8_t Imcs, uint8_t table_idx);
|
||||
uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx);
|
||||
int get_subband_size(int NPRB,int size);
|
||||
void SLIV2SL(int SLIV,int *S,int *L);
|
||||
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN yum install -y python3-pip && \
|
||||
pip3 install --ignore-installed pyyaml && \
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
|
||||
@@ -48,6 +46,7 @@ RUN yum update -y && \
|
||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||
lksctp-tools \
|
||||
nettle \
|
||||
procps-ng \
|
||||
atlas \
|
||||
net-tools \
|
||||
iputils \
|
||||
|
||||
@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN apt-get install -y python3-pip && \
|
||||
pip3 install --ignore-installed pyyaml && \
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-enb
|
||||
@@ -51,6 +49,7 @@ RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
software-properties-common \
|
||||
procps \
|
||||
libsctp1 \
|
||||
libnettle6 \
|
||||
libblas3 \
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM localhost/ran-build:latest AS gnb-build
|
||||
FROM ran-build:latest AS gnb-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
@@ -37,11 +37,7 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --gNB --ninja -w USRP --verbose-ci
|
||||
|
||||
#debug
|
||||
#RUN ldconfig -v
|
||||
#RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15
|
||||
#RUN ls -lst /oai-ran/targets/bin
|
||||
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
|
||||
@@ -49,6 +45,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
|
||||
RUN yum repolist --disablerepo=* && \
|
||||
yum update -y && \
|
||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||
procps-ng \
|
||||
libXpm \
|
||||
libX11 \
|
||||
atlas \
|
||||
@@ -62,6 +59,7 @@ RUN yum repolist --disablerepo=* && \
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
@@ -99,23 +97,10 @@ COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
||||
|
||||
RUN ldconfig
|
||||
#debug
|
||||
#RUN ldd /opt/oai-gnb/bin/nr-softmodem.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
|
||||
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libcoding.so
|
||||
#RUN ldd /usr/local/lib/libparams_libconfig.so
|
||||
#RUN ldd /usr/local/lib/libdfts.so
|
||||
#RUN ldd /usr/local/lib/libldpc.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
|
||||
#RUN ldd /usr/local/lib/libldpc_orig.so
|
||||
|
||||
# Copy the relevant configuration files for gNB
|
||||
WORKDIR /opt/oai-gnb/etc
|
||||
COPY --from=gnb-build /oai-ran/ci-scripts/conf_files/gnb.* .
|
||||
COPY --from=gnb-build /oai-ran/docker/etc .
|
||||
|
||||
WORKDIR /opt/oai-gnb
|
||||
#EXPOSE 2152/udp # S1U, GTP/UDP
|
||||
@@ -125,6 +110,5 @@ WORKDIR /opt/oai-gnb
|
||||
#EXPOSE 50000/udp # IF5 / ORI (control)
|
||||
#EXPOSE 50001/udp # IF5 / ECPRI (data)
|
||||
|
||||
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
|
||||
CMD ["sleep", "infinity"]
|
||||
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem.Rel15", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-build:latest AS gnb-build
|
||||
FROM ran-build:latest AS gnb-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
@@ -37,23 +37,20 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --gNB --ninja -w USRP --verbose-ci
|
||||
|
||||
#debug
|
||||
RUN ldconfig -v
|
||||
RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15
|
||||
RUN ls -lst /oai-ran/targets/bin
|
||||
RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-gnb
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
software-properties-common \
|
||||
procps \
|
||||
libsctp1 \
|
||||
tzdata \
|
||||
libnettle6 \
|
||||
libblas3 \
|
||||
libatlas3-base \
|
||||
@@ -76,6 +73,7 @@ RUN apt-get update && \
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
@@ -96,23 +94,10 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
|
||||
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
|
||||
RUN ldconfig
|
||||
#debug
|
||||
#RUN ldd /opt/oai-gnb/bin/nr-softmodem.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
|
||||
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libcoding.so
|
||||
#RUN ldd /usr/local/lib/libparams_libconfig.so
|
||||
#RUN ldd /usr/local/lib/libdfts.so
|
||||
#RUN ldd /usr/local/lib/libldpc.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
|
||||
#RUN ldd /usr/local/lib/libldpc_orig.so
|
||||
|
||||
# Copy the relevant configuration files for gNB
|
||||
WORKDIR /opt/oai-gnb/etc
|
||||
COPY --from=gnb-build /oai-ran/ci-scripts/conf_files/gnb.* ./
|
||||
COPY --from=gnb-build /oai-ran/docker/etc .
|
||||
|
||||
WORKDIR /opt/oai-gnb
|
||||
#EXPOSE 2152/udp # S1U, GTP/UDP
|
||||
@@ -122,6 +107,5 @@ WORKDIR /opt/oai-gnb
|
||||
#EXPOSE 50000/udp # IF5 / ORI (control)
|
||||
#EXPOSE 50001/udp # IF5 / ECPRI (data)
|
||||
|
||||
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
|
||||
CMD ["sleep", "infinity"]
|
||||
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem.Rel15", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
|
||||
@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --RU --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN yum install -y python3-pip && \
|
||||
pip3 install --ignore-installed pyyaml && \
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru
|
||||
@@ -48,6 +46,7 @@ ENV TZ=Europe/Paris
|
||||
RUN yum update -y && \
|
||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||
tzdata \
|
||||
procps-ng \
|
||||
atlas \
|
||||
net-tools \
|
||||
iputils \
|
||||
|
||||
@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --RU --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN apt-get install -y python3-pip && \
|
||||
pip3 install --ignore-installed pyyaml && \
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-lte-ru
|
||||
@@ -50,6 +48,7 @@ RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
tzdata \
|
||||
procps \
|
||||
software-properties-common \
|
||||
libblas3 \
|
||||
libatlas3-base \
|
||||
|
||||
@@ -48,6 +48,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
|
||||
RUN yum update -y && \
|
||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||
lksctp-tools \
|
||||
procps-ng \
|
||||
nettle \
|
||||
atlas \
|
||||
iproute \
|
||||
|
||||
@@ -52,6 +52,7 @@ RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
software-properties-common \
|
||||
procps \
|
||||
libsctp1 \
|
||||
libnettle6 \
|
||||
liblapacke \
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM localhost/ran-build:latest AS nr-ue-build
|
||||
FROM ran-build:latest AS nr-ue-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
@@ -37,18 +37,15 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --nrUE --ninja -w USRP --verbose-ci
|
||||
|
||||
# debug
|
||||
#RUN ldconfig -v
|
||||
#RUN ldd /oai-ran/targets/bin/nr-uesoftmodem.Rel15
|
||||
#RUN ls -lst /oai-ran/targets/bin
|
||||
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-ue
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN yum update -y && \
|
||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||
lksctp-tools \
|
||||
procps-ng \
|
||||
tzdata \
|
||||
nettle \
|
||||
net-tools \
|
||||
iputils \
|
||||
@@ -61,6 +58,10 @@ RUN yum update -y && \
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/bin
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/nr-uesoftmodem.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/docker/scripts/nr_ue_entrypoint.sh entrypoint.sh
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
@@ -98,24 +99,11 @@ COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
||||
|
||||
RUN ldconfig
|
||||
#RUN ldd /opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
|
||||
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libcoding.so
|
||||
#RUN ldd /usr/local/lib/libparams_libconfig.so
|
||||
#RUN ldd /usr/local/lib/libdfts.so
|
||||
#RUN ldd /usr/local/lib/libldpc.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
|
||||
#RUN ldd /usr/local/lib/libldpc_orig.so
|
||||
|
||||
# Copy the relevant configuration files for eNB
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
|
||||
|
||||
WORKDIR /opt/oai-nr-ue
|
||||
#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
|
||||
#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
|
||||
CMD ["sleep", "infinity"]
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue-sim.conf"]
|
||||
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-build:latest AS nr-ue-build
|
||||
FROM ran-build:latest AS nr-ue-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
@@ -37,23 +37,18 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --nrUE --ninja -w USRP --verbose-ci
|
||||
|
||||
# debug
|
||||
#RUN ldconfig -v
|
||||
#RUN ldd /oai-ran/targets/bin/nr-uesoftmodem.Rel15
|
||||
#RUN ls -lst /oai-ran/targets/bin
|
||||
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-nr-ue
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
software-properties-common \
|
||||
libsctp1 \
|
||||
procps \
|
||||
tzdata \
|
||||
libnettle6 \
|
||||
liblapacke \
|
||||
libatlas3-base \
|
||||
@@ -62,6 +57,7 @@ RUN apt-get update && \
|
||||
net-tools \
|
||||
iputils-ping \
|
||||
iproute2 \
|
||||
iperf \
|
||||
libyaml-0-2 && \
|
||||
# Install UHD driver from ettus ppa
|
||||
# At time of writing, it is 3.14
|
||||
@@ -76,6 +72,10 @@ RUN apt-get update && \
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/bin
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/nr-uesoftmodem.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/docker/scripts/nr_ue_entrypoint.sh entrypoint.sh
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
@@ -96,25 +96,7 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
|
||||
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
|
||||
RUN ldconfig
|
||||
#debug
|
||||
#RUN ldd /opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
|
||||
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
|
||||
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
|
||||
#RUN ldd /usr/local/lib/libcoding.so
|
||||
#RUN ldd /usr/local/lib/libparams_libconfig.so
|
||||
#RUN ldd /usr/local/lib/libdfts.so
|
||||
#RUN ldd /usr/local/lib/libldpc.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim.so
|
||||
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
|
||||
#RUN ldd /usr/local/lib/libldpc_orig.so
|
||||
|
||||
# Copy the relevant configuration files for eNB
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
|
||||
|
||||
WORKDIR /opt/oai-nr-ue
|
||||
#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
|
||||
#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
|
||||
CMD ["sleep", "infinity"]
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue-sim.conf"]
|
||||
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM localhost/ran-build:develop AS phy-sim-build
|
||||
FROM ran-build:develop AS phy-sim-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
|
||||
@@ -44,8 +44,11 @@ RUN rm -f /etc/rhsm-host && \
|
||||
file \
|
||||
psmisc \
|
||||
git \
|
||||
# python3-pip and pyyaml are used for conf template generation
|
||||
python3-pip \
|
||||
#unzip is needed for protobuf
|
||||
unzip && \
|
||||
pip3 install --ignore-installed pyyaml && \
|
||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
|
||||
@@ -42,7 +42,10 @@ RUN apt-get update && \
|
||||
git \
|
||||
xxd \
|
||||
#unzip is needed for protobuf
|
||||
unzip
|
||||
unzip \
|
||||
# python3-pip for conf template generation
|
||||
python3-pip && \
|
||||
pip3 install --ignore-installed pyyaml
|
||||
|
||||
# In some network environments, GIT proxy is required
|
||||
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
|
||||
@@ -56,4 +59,3 @@ RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai -I -w USRP
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ set -euo pipefail
|
||||
|
||||
PREFIX=/opt/oai-enb
|
||||
RRC_INACTIVITY_THRESHOLD=${RRC_INACTIVITY_THRESHOLD:-0}
|
||||
ENABLE_MEASUREMENT_REPORTS=${ENABLE_MEASUREMENT_REPORTS:-no}
|
||||
ENABLE_X2=${ENABLE_X2:-no}
|
||||
|
||||
# Based another env var, pick one template to use
|
||||
if [[ -v USE_FDD_CU ]]; then ln -s $PREFIX/etc/cu.fdd.conf $PREFIX/etc/enb.conf; fi
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
- key: bands
|
||||
env: "@UTRA_BAND_ID@"
|
||||
|
||||
- filePrefix: enb.band7.tm1.25PRB.usrpb210
|
||||
- filePrefix: enb.band7.tm1.fr1.25PRB.usrpb210.conf
|
||||
outputfilename: "enb.fdd.conf"
|
||||
config:
|
||||
- key: Active_eNBs
|
||||
@@ -147,6 +147,10 @@
|
||||
env: "@NID_CELL@"
|
||||
- key: N_RB_DL
|
||||
env: "@NB_PRB@"
|
||||
- key: enable_measurement_reports
|
||||
env: "@ENABLE_MEASUREMENT_REPORTS@"
|
||||
- key: enable_x2
|
||||
env: "@ENABLE_X2@"
|
||||
- key: ipv4
|
||||
env: "@MME_S1C_IP_ADDRESS@"
|
||||
- key: ENB_INTERFACE_NAME_FOR_S1_MME
|
||||
|
||||
@@ -48,18 +48,20 @@ def main():
|
||||
"du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"rru.fdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"enb.band7.tm1.fr1.25PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"rcc.band7.tm1.if4p5.lo.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"rcc.band40.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gnb.band78.tm1.fr1.106PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gnb.band78.sa.fr1.106PRB.usrpn310.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
|
||||
}
|
||||
print('inputfile = ' + inputfile)
|
||||
if filePrefix in prefix_outputfile:
|
||||
outputfile1 = prefix_outputfile[filePrefix]
|
||||
|
||||
|
||||
directory = f'{data[0]["paths"]["dest_dir"]}'
|
||||
if not os.path.exists(directory):
|
||||
os.makedirs(directory, exist_ok=True)
|
||||
@@ -71,11 +73,21 @@ def main():
|
||||
if re.search(r'EHPLMN_LIST', line):
|
||||
outputfile.write(line)
|
||||
continue
|
||||
if re.search(r'sd = 0x1;', line):
|
||||
templine = re.sub(r'sd = 0x1;', 'sd = 0x@NSSAI_SD0@;', line)
|
||||
outputfile.write(templine)
|
||||
continue
|
||||
if re.search(r'sd = 0x112233;', line):
|
||||
templine = re.sub(r'sd = 0x112233;', 'sd = 0x@NSSAI_SD1@;', line)
|
||||
outputfile.write(templine)
|
||||
continue
|
||||
for key in config["config"]:
|
||||
if line.find(key["key"]) >= 0:
|
||||
count += 1
|
||||
if re.search(r'preference', line):
|
||||
templine = line
|
||||
elif re.search(r'mnc_length', line) and key["key"] == "mnc":
|
||||
continue
|
||||
elif re.search(r'plmn_list', line):
|
||||
templine = re.sub(r'[0-9]+', '""', line)
|
||||
templine = re.sub(r'\"\"', key["env"]["mcc"], templine, 1)
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PREFIX=/opt/oai-gnb
|
||||
ENABLE_X2=${ENABLE_X2:-yes}
|
||||
|
||||
# Based another env var, pick one template to use
|
||||
if [[ -v USE_NSA_TDD_MONO ]]; then ln -s $PREFIX/etc/gnb.nsa.tdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_TDD_MONO ]]; then ln -s $PREFIX/etc/gnb.sa.tdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
|
||||
# Only this template will be manipulated
|
||||
CONFIG_FILES=`ls $PREFIX/etc/gnb.conf || true`
|
||||
|
||||
for c in ${CONFIG_FILES}; do
|
||||
# grep variable names (format: ${VAR}) from template to be rendered
|
||||
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
|
||||
|
||||
# create sed expressions for substituting each occurrence of ${VAR}
|
||||
# with the value of the environment variable "VAR"
|
||||
EXPRESSIONS=""
|
||||
for v in ${VARS}; do
|
||||
NEW_VAR=`echo $v | sed -e "s#@##g"`
|
||||
if [[ "${!NEW_VAR}x" == "x" ]]; then
|
||||
echo "Error: Environment variable '${NEW_VAR}' is not set." \
|
||||
"Config file '$(basename $c)' requires all of $VARS."
|
||||
exit 1
|
||||
fi
|
||||
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
|
||||
done
|
||||
EXPRESSIONS="${EXPRESSIONS#';'}"
|
||||
|
||||
# render template and inline replace config file
|
||||
sed -i "${EXPRESSIONS}" ${c}
|
||||
done
|
||||
|
||||
# Load the USRP binaries
|
||||
if [[ -v USE_B2XX ]]; then
|
||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
||||
elif [[ -v USE_X3XX ]]; then
|
||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
||||
elif [[ -v USE_N3XX ]]; then
|
||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
||||
fi
|
||||
|
||||
echo "=================================="
|
||||
echo "== Starting gNB soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
|
||||
new_args=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
new_args+=("$1")
|
||||
shift
|
||||
done
|
||||
for word in ${USE_ADDITIONAL_OPTIONS}; do
|
||||
new_args+=("$word")
|
||||
done
|
||||
echo "${new_args[@]}"
|
||||
exec "${new_args[@]}"
|
||||
else
|
||||
echo "$@"
|
||||
exec "$@"
|
||||
fi
|
||||
@@ -0,0 +1,92 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
---
|
||||
- paths:
|
||||
source_dir: "ci-scripts/conf_files/"
|
||||
dest_dir: docker/etc
|
||||
|
||||
- configurations:
|
||||
- filePrefix: gnb.band78.tm1.fr1.106PRB.usrpb210.conf
|
||||
outputfilename: "gnb.nsa.tdd.conf"
|
||||
config:
|
||||
- key: Active_gNBs
|
||||
env: "@GNB_NAME@"
|
||||
- key: gNB_name
|
||||
env: "@GNB_NAME@"
|
||||
- key: plmn_list
|
||||
env:
|
||||
mcc: "@MCC@"
|
||||
mnc: "@MNC@"
|
||||
mnc_length: "@MNC_LENGTH@"
|
||||
- key: tracking_area_code
|
||||
env: "@TAC@"
|
||||
- key: enable_x2
|
||||
env: "@ENABLE_X2@"
|
||||
- key: ipv4
|
||||
env: "@ENB_X2_IP_ADDRESS@"
|
||||
- key: GNB_INTERFACE_NAME_FOR_S1_MME
|
||||
env: "@GNB_S1C_IF_NAME@"
|
||||
- key: GNB_IPV4_ADDRESS_FOR_S1_MME
|
||||
env: "@GNB_S1C_IP_ADDRESS@"
|
||||
- key: GNB_INTERFACE_NAME_FOR_S1U
|
||||
env: "@GNB_S1U_IF_NAME@"
|
||||
- key: GNB_IPV4_ADDRESS_FOR_S1U
|
||||
env: "@GNB_S1U_IP_ADDRESS@"
|
||||
- key: GNB_IPV4_ADDRESS_FOR_X2C
|
||||
env: "@GNB_X2_IP_ADDRESS@"
|
||||
- key: rrc_inactivity_threshold
|
||||
env: "@RRC_INACTIVITY_THRESHOLD@"
|
||||
- key: FLEXRAN_ENABLED
|
||||
env: "@FLEXRAN_ENABLED@"
|
||||
- key: FLEXRAN_INTERFACE_NAME
|
||||
env: "@FLEXRAN_INTERFACE_NAME@"
|
||||
- key: FLEXRAN_IPV4_ADDRESS
|
||||
env: "@FLEXRAN_IPV4_ADDRESS@"
|
||||
|
||||
- filePrefix: gnb.band78.sa.fr1.106PRB.usrpn310.conf
|
||||
outputfilename: "gnb.sa.tdd.conf"
|
||||
config:
|
||||
- key: Active_gNBs
|
||||
env: "@GNB_NAME@"
|
||||
- key: gNB_name
|
||||
env: "@GNB_NAME@"
|
||||
- key: mcc
|
||||
env: "@MCC@"
|
||||
- key: mnc
|
||||
env: "@MNC@"
|
||||
- key: mnc_length
|
||||
env: "@MNC_LENGTH@"
|
||||
- key: tracking_area_code
|
||||
env: "@TAC@"
|
||||
- key: sst
|
||||
env: "@NSSAI_SST@"
|
||||
- key: ipv4
|
||||
env: "@AMF_IP_ADDRESS@"
|
||||
- key: GNB_INTERFACE_NAME_FOR_NG_AMF
|
||||
env: "@GNB_NGA_IF_NAME@"
|
||||
- key: GNB_IPV4_ADDRESS_FOR_NG_AMF
|
||||
env: "@GNB_NGA_IP_ADDRESS@"
|
||||
- key: GNB_INTERFACE_NAME_FOR_NGU
|
||||
env: "@GNB_NGU_IF_NAME@"
|
||||
- key: GNB_IPV4_ADDRESS_FOR_NGU
|
||||
env: "@GNB_NGU_IP_ADDRESS@"
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PREFIX=/opt/oai-nr-ue
|
||||
|
||||
# Based another env var, pick one template to use
|
||||
#if [[ -v USE_NFAPI ]]; then ln -s $PREFIX/etc/ue.nfapi.conf $PREFIX/etc/ue.conf; fi
|
||||
|
||||
# Only this template will be manipulated and the USIM one!
|
||||
CONFIG_FILES=`ls $PREFIX/etc/ue.conf $PREFIX/etc/nr-ue-sim.conf || true`
|
||||
|
||||
for c in ${CONFIG_FILES}; do
|
||||
# grep variable names (format: ${VAR}) from template to be rendered
|
||||
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
|
||||
|
||||
# create sed expressions for substituting each occurrence of ${VAR}
|
||||
# with the value of the environment variable "VAR"
|
||||
EXPRESSIONS=""
|
||||
for v in ${VARS}; do
|
||||
NEW_VAR=`echo $v | sed -e "s#@##g"`
|
||||
if [[ "${!NEW_VAR}x" == "x" ]]; then
|
||||
echo "Error: Environment variable '${NEW_VAR}' is not set." \
|
||||
"Config file '$(basename $c)' requires all of $VARS."
|
||||
exit 1
|
||||
fi
|
||||
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
|
||||
done
|
||||
EXPRESSIONS="${EXPRESSIONS#';'}"
|
||||
|
||||
# render template and inline replace config file
|
||||
sed -i "${EXPRESSIONS}" ${c}
|
||||
done
|
||||
|
||||
# Load the USRP binaries
|
||||
if [[ -v USE_B2XX ]]; then
|
||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
||||
elif [[ -v USE_X3XX ]]; then
|
||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
||||
elif [[ -v USE_N3XX ]]; then
|
||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
||||
fi
|
||||
|
||||
# in case we have conf file, append
|
||||
new_args=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
new_args+=("$1")
|
||||
shift
|
||||
done
|
||||
|
||||
echo "=================================="
|
||||
echo "== Starting NR UE soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
|
||||
for word in ${USE_ADDITIONAL_OPTIONS}; do
|
||||
new_args+=("$word")
|
||||
done
|
||||
echo "${new_args[@]}"
|
||||
exec "${new_args[@]}"
|
||||
else
|
||||
echo "${new_args[@]}"
|
||||
exec "${new_args[@]}"
|
||||
fi
|
||||
+236
-244
@@ -114,8 +114,7 @@ extern int numerology;
|
||||
|
||||
extern void wait_gNBs(void);
|
||||
|
||||
int attach_rru(RU_t *ru)
|
||||
{
|
||||
int attach_rru(RU_t *ru) {
|
||||
ssize_t msg_len,len;
|
||||
RRU_CONFIG_msg_t rru_config_msg;
|
||||
int received_capabilities=0;
|
||||
@@ -183,8 +182,7 @@ int attach_rru(RU_t *ru)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int connect_rau(RU_t *ru)
|
||||
{
|
||||
int connect_rau(RU_t *ru) {
|
||||
RRU_CONFIG_msg_t rru_config_msg;
|
||||
ssize_t msg_len;
|
||||
int tick_received = 0;
|
||||
@@ -281,22 +279,20 @@ int connect_rau(RU_t *ru)
|
||||
/* Southbound Fronthaul functions, RCC/RAU */
|
||||
|
||||
// southbound IF5 fronthaul for 16-bit OAI format
|
||||
void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
send_IF5(ru, timestamp, slot, &ru->seqno, IF5_RRH_GW_DL);
|
||||
}
|
||||
|
||||
// southbound IF4p5 fronthaul
|
||||
void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
LOG_D(PHY,"Sending IF4p5 for frame %d subframe %d\n",ru->proc.frame_tx,ru->proc.tti_tx);
|
||||
|
||||
|
||||
if ((nr_slot_select(cfg,ru->proc.frame_tx,ru->proc.tti_tx)&NR_DOWNLINK_SLOT) > 0)
|
||||
send_IF4p5(ru,frame, slot, IF4p5_PDLFFT);
|
||||
}
|
||||
@@ -307,8 +303,7 @@ void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
// Synchronous if5 from south
|
||||
void fh_if5_south_in(RU_t *ru,
|
||||
int *frame,
|
||||
int *tti)
|
||||
{
|
||||
int *tti) {
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
recv_IF5(ru, &proc->timestamp_rx, *tti, IF5_RRH_GW_UL);
|
||||
@@ -338,8 +333,7 @@ void fh_if5_south_in(RU_t *ru,
|
||||
// Synchronous if4p5 from south
|
||||
void fh_if4p5_south_in(RU_t *ru,
|
||||
int *frame,
|
||||
int *slot)
|
||||
{
|
||||
int *slot) {
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
int f,sl;
|
||||
@@ -636,7 +630,6 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
ru->nb_rx);
|
||||
}
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
||||
proc->timestamp_rx = ts-ru->ts_offset;
|
||||
|
||||
@@ -649,6 +642,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
proc->timestamp_rx = 0;
|
||||
} else {
|
||||
samples_per_slot_prev = fp->get_samples_per_slot((*slot-1)%fp->slots_per_frame,fp);
|
||||
|
||||
if (proc->timestamp_rx - old_ts != samples_per_slot_prev) {
|
||||
LOG_D(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",proc->timestamp_rx - old_ts - samples_per_slot_prev,ru->ts_offset);
|
||||
ru->ts_offset += (proc->timestamp_rx - old_ts - samples_per_slot_prev);
|
||||
@@ -678,7 +672,8 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
}
|
||||
|
||||
if (proc->frame_rx != *frame) {
|
||||
LOG_E(PHY,"Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d, proc->tti_rx %d, slot %d)\n",(long long unsigned int)proc->timestamp_rx,proc->frame_rx,*frame,proc->tti_rx,*slot);
|
||||
LOG_E(PHY,"Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d, proc->tti_rx %d, slot %d)\n",(long long unsigned int)proc->timestamp_rx,proc->frame_rx,
|
||||
*frame,proc->tti_rx,*slot);
|
||||
exit_fun("Exiting");
|
||||
}
|
||||
} else {
|
||||
@@ -706,7 +701,6 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
int i,txsymb;
|
||||
T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(slot),
|
||||
T_INT(0), T_BUFFER(&ru->common.txdata[0][fp->get_samples_slot_timestamp(slot,fp,0)], fp->samples_per_subframe * 4));
|
||||
|
||||
int slot_type = nr_slot_select(cfg,frame,slot%fp->slots_per_frame);
|
||||
int prevslot_type = nr_slot_select(cfg,frame,(slot+(fp->slots_per_frame-1))%fp->slots_per_frame);
|
||||
int nextslot_type = nr_slot_select(cfg,frame,(slot+1)%fp->slots_per_frame);
|
||||
@@ -716,20 +710,23 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
|
||||
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
|
||||
if (slot_type == NR_DOWNLINK_SLOT || slot_type == NR_MIXED_SLOT || IS_SOFTMODEM_RFSIM) {
|
||||
|
||||
if (cfg->cell_config.frame_duplex_type.value == TDD){
|
||||
if (cfg->cell_config.frame_duplex_type.value == TDD) {
|
||||
if(slot_type == NR_MIXED_SLOT) {
|
||||
txsymb = 0;
|
||||
|
||||
for(int symbol_count = 0; symbol_count<NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
|
||||
if (cfg->tdd_table.max_tdd_periodicity_list[slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value == 0)
|
||||
txsymb++;
|
||||
}
|
||||
|
||||
AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb);
|
||||
|
||||
if(slot%(fp->slots_per_subframe/2))
|
||||
siglen = txsymb * (fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
||||
else
|
||||
siglen = (fp->ofdm_symbol_size + fp->nb_prefix_samples0) + (txsymb - 1) * (fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
||||
//+ ru->end_of_burst_delay;
|
||||
|
||||
//+ ru->end_of_burst_delay;
|
||||
flags = 3; // end of burst
|
||||
}
|
||||
|
||||
@@ -745,11 +742,13 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
// bit 11 enables the gpio programming
|
||||
// currently we switch beams every 10 slots (should = 1 TDD period in FR2) and we take the beam index of the first symbol of the first slot of this period
|
||||
int beam=0;
|
||||
|
||||
if (slot%10==0) {
|
||||
if ( ru->common.beam_id && (ru->common.beam_id[0][slot*fp->symbols_per_slot] < 8)) {
|
||||
beam = ru->common.beam_id[0][slot*fp->symbols_per_slot] | 8;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (slot==0 || slot==40) beam=0|8;
|
||||
if (slot==10 || slot==50) beam=1|8;
|
||||
@@ -757,30 +756,29 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
if (slot==30 || slot==70) beam=3|8;
|
||||
*/
|
||||
flags |= beam<<8;
|
||||
|
||||
LOG_D(HW,"slot %d, beam %d\n",slot,ru->common.beam_id[0][slot*fp->symbols_per_slot]);
|
||||
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS, flags );
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS, flags );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, slot );
|
||||
|
||||
for (i=0; i<ru->nb_tx; i++)
|
||||
txp[i] = (void *)&ru->common.txdata[i][fp->get_samples_slot_timestamp(slot,fp,0)-sf_extension];
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp-ru->openair0_cfg.tx_sample_advance)&0xffffffff );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
||||
// prepare tx buffer pointers
|
||||
txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension,
|
||||
txp,
|
||||
siglen+sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
LOG_D(PHY,"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %di, returned %d\n",ru->idx,
|
||||
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot, txs);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
//AssertFatal(txs == 0,"trx write function error %d\n", txs);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp-ru->openair0_cfg.tx_sample_advance)&0xffffffff );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
||||
// prepare tx buffer pointers
|
||||
txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension,
|
||||
txp,
|
||||
siglen+sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
LOG_D(PHY,"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %di, returned %d\n",ru->idx,
|
||||
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot, txs);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
//AssertFatal(txs == 0,"trx write function error %d\n", txs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,78 +793,83 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
|
||||
if (mu == NR_MU_0) {
|
||||
switch(N_RB) {
|
||||
case 270:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=92.16e6;
|
||||
cfg->samples_per_frame = 921600;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
} else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
}
|
||||
case 216:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=46.08e6;
|
||||
cfg->samples_per_frame = 460800;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
}
|
||||
else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
}
|
||||
break;
|
||||
case 106:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=23.04e6;
|
||||
cfg->samples_per_frame = 230400;
|
||||
cfg->tx_bw = 20e6;
|
||||
cfg->rx_bw = 20e6;
|
||||
}
|
||||
else {
|
||||
cfg->sample_rate=30.72e6;
|
||||
cfg->samples_per_frame = 307200;
|
||||
cfg->tx_bw = 20e6;
|
||||
cfg->rx_bw = 20e6;
|
||||
}
|
||||
break;
|
||||
case 52:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=11.52e6;
|
||||
cfg->samples_per_frame = 115200;
|
||||
cfg->tx_bw = 10e6;
|
||||
cfg->rx_bw = 10e6;
|
||||
}
|
||||
else {
|
||||
cfg->sample_rate=15.36e6;
|
||||
cfg->samples_per_frame = 153600;
|
||||
cfg->tx_bw = 10e6;
|
||||
cfg->rx_bw = 10e6;
|
||||
}
|
||||
case 25:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=5.76e6;
|
||||
cfg->samples_per_frame = 57600;
|
||||
cfg->tx_bw = 5e6;
|
||||
cfg->rx_bw = 5e6;
|
||||
}
|
||||
else {
|
||||
cfg->sample_rate=7.68e6;
|
||||
cfg->samples_per_frame = 76800;
|
||||
cfg->tx_bw = 5e6;
|
||||
cfg->rx_bw = 5e6;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
|
||||
case 270:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=92.16e6;
|
||||
cfg->samples_per_frame = 921600;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
} else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
}
|
||||
|
||||
case 216:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=46.08e6;
|
||||
cfg->samples_per_frame = 460800;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
} else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 106:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=23.04e6;
|
||||
cfg->samples_per_frame = 230400;
|
||||
cfg->tx_bw = 20e6;
|
||||
cfg->rx_bw = 20e6;
|
||||
} else {
|
||||
cfg->sample_rate=30.72e6;
|
||||
cfg->samples_per_frame = 307200;
|
||||
cfg->tx_bw = 20e6;
|
||||
cfg->rx_bw = 20e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 52:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=11.52e6;
|
||||
cfg->samples_per_frame = 115200;
|
||||
cfg->tx_bw = 10e6;
|
||||
cfg->rx_bw = 10e6;
|
||||
} else {
|
||||
cfg->sample_rate=15.36e6;
|
||||
cfg->samples_per_frame = 153600;
|
||||
cfg->tx_bw = 10e6;
|
||||
cfg->rx_bw = 10e6;
|
||||
}
|
||||
|
||||
case 25:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=5.76e6;
|
||||
cfg->samples_per_frame = 57600;
|
||||
cfg->tx_bw = 5e6;
|
||||
cfg->rx_bw = 5e6;
|
||||
} else {
|
||||
cfg->sample_rate=7.68e6;
|
||||
cfg->samples_per_frame = 76800;
|
||||
cfg->tx_bw = 5e6;
|
||||
cfg->rx_bw = 5e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
|
||||
}
|
||||
} else if (mu == NR_MU_1) {
|
||||
switch(N_RB) {
|
||||
|
||||
case 273:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=184.32e6;
|
||||
@@ -952,34 +955,38 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
}
|
||||
} else if (mu == NR_MU_3) {
|
||||
switch(N_RB) {
|
||||
case 66:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=184.32e6;
|
||||
cfg->samples_per_frame = 1843200;
|
||||
cfg->tx_bw = 100e6;
|
||||
cfg->rx_bw = 100e6;
|
||||
} else {
|
||||
cfg->sample_rate = 122.88e6;
|
||||
cfg->samples_per_frame = 1228800;
|
||||
cfg->tx_bw = 100e6;
|
||||
cfg->rx_bw = 100e6;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=92.16e6;
|
||||
cfg->samples_per_frame = 921600;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
} else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
|
||||
case 66:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=184.32e6;
|
||||
cfg->samples_per_frame = 1843200;
|
||||
cfg->tx_bw = 100e6;
|
||||
cfg->rx_bw = 100e6;
|
||||
} else {
|
||||
cfg->sample_rate = 122.88e6;
|
||||
cfg->samples_per_frame = 1228800;
|
||||
cfg->tx_bw = 100e6;
|
||||
cfg->rx_bw = 100e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 32:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=92.16e6;
|
||||
cfg->samples_per_frame = 921600;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
} else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 50e6;
|
||||
cfg->rx_bw = 50e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
|
||||
}
|
||||
} else {
|
||||
AssertFatal(0 == 1,"Numerology %d not supported for the moment\n",mu);
|
||||
@@ -999,7 +1006,7 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
if (ru->if_frequency == 0) {
|
||||
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
|
||||
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
||||
} else if (ru->if_freq_offset){
|
||||
} else if (ru->if_freq_offset) {
|
||||
cfg->tx_freq[i] = (double)(ru->if_frequency);
|
||||
cfg->rx_freq[i] = (double)(ru->if_frequency + ru->if_freq_offset);
|
||||
LOG_I(PHY, "Setting IF TX frequency to %lu Hz with IF RX frequency offset %d Hz\n", ru->if_frequency, ru->if_freq_offset);
|
||||
@@ -1007,14 +1014,15 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
cfg->tx_freq[i] = (double)ru->if_frequency;
|
||||
cfg->rx_freq[i] = (double)(ru->if_frequency+fp->ul_CarrierFreq-fp->dl_CarrierFreq);
|
||||
}
|
||||
|
||||
cfg->tx_gain[i] = ru->att_tx;
|
||||
cfg->rx_gain[i] = ru->max_rxgain-ru->att_rx;
|
||||
cfg->configFilename = rf_config_file;
|
||||
LOG_I(PHY, "Channel %d: setting tx_gain offset %f, rx_gain offset %f, tx_freq %lu Hz, rx_freq %lu Hz\n",
|
||||
i, cfg->tx_gain[i],
|
||||
cfg->rx_gain[i],
|
||||
(unsigned long)cfg->tx_freq[i],
|
||||
(unsigned long)cfg->rx_freq[i]);
|
||||
i, cfg->tx_gain[i],
|
||||
cfg->rx_gain[i],
|
||||
(unsigned long)cfg->tx_freq[i],
|
||||
(unsigned long)cfg->rx_freq[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1042,40 +1050,42 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
|
||||
if (config->cell_config.frame_duplex_type.value == TDD) {
|
||||
int N_TA_offset = config->carrier_config.uplink_frequency.value < 6000000 ? 400 : 431; // reference samples for 25600Tc @ 30.72 Ms/s for FR1, same @ 61.44 Ms/s for FR2
|
||||
|
||||
double factor=1;
|
||||
|
||||
switch (mu) {
|
||||
case 0: //15 kHz scs
|
||||
AssertFatal(N_TA_offset == 400, "scs_common 15kHz only for FR1\n");
|
||||
factor = fp->samples_per_subframe / 30720.0;
|
||||
break;
|
||||
|
||||
case 1: //30 kHz sc
|
||||
AssertFatal(N_TA_offset == 400, "scs_common 30kHz only for FR1\n");
|
||||
factor = fp->samples_per_subframe / 30720.0;
|
||||
break;
|
||||
|
||||
case 2: //60 kHz scs
|
||||
AssertFatal(1==0, "scs_common should not be 60 kHz\n");
|
||||
break;
|
||||
|
||||
case 3: //120 kHz scs
|
||||
AssertFatal(N_TA_offset == 431, "scs_common 120kHz only for FR2\n");
|
||||
factor = fp->samples_per_subframe / 61440.0;
|
||||
break;
|
||||
|
||||
case 4: //240 kHz scs
|
||||
AssertFatal(N_TA_offset == 431, "scs_common 240kHz only for FR2\n");
|
||||
factor = fp->samples_per_subframe / 61440.0;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0, "Invalid scs_common!\n");
|
||||
}
|
||||
|
||||
ru->N_TA_offset = (int)(N_TA_offset * factor);
|
||||
|
||||
LOG_I(PHY,"RU %d Setting N_TA_offset to %d samples (factor %f, UL Freq %d, N_RB %d, mu %d)\n",ru->idx,ru->N_TA_offset,factor,
|
||||
config->carrier_config.uplink_frequency.value, N_RB, mu);
|
||||
}
|
||||
else ru->N_TA_offset = 0;
|
||||
config->carrier_config.uplink_frequency.value, N_RB, mu);
|
||||
} else ru->N_TA_offset = 0;
|
||||
|
||||
|
||||
if (ru->openair0_cfg.mmapped_dma == 1) {
|
||||
// replace RX signal buffers with mmaped HW versions
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
@@ -1120,7 +1130,6 @@ void *ru_stats_thread(void *param) {
|
||||
sleep(1);
|
||||
|
||||
if (opp_enabled == 1) {
|
||||
|
||||
if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx",NULL,NULL);
|
||||
|
||||
if (ru->feptx_ofdm) {
|
||||
@@ -1133,6 +1142,7 @@ void *ru_stats_thread(void *param) {
|
||||
if (ru->fh_north_asynch_in) print_meas(&ru->rx_fhaul,"rx_fhaul",NULL,NULL);
|
||||
|
||||
print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
|
||||
|
||||
if (ru->fh_north_out) {
|
||||
print_meas(&ru->compression,"compression",NULL,NULL);
|
||||
print_meas(&ru->transport,"transport",NULL,NULL);
|
||||
@@ -1144,7 +1154,6 @@ void *ru_stats_thread(void *param) {
|
||||
}
|
||||
|
||||
void ru_tx_func(void *param) {
|
||||
|
||||
processingData_RU_t *info = (processingData_RU_t *) param;
|
||||
RU_t *ru = info->ru;
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
@@ -1167,14 +1176,11 @@ void ru_tx_func(void *param) {
|
||||
} else {
|
||||
if(frame_tx == print_frame) {
|
||||
for (int i=0; i<ru->nb_tx; i++) {
|
||||
|
||||
if(slot_tx == 0) {
|
||||
sprintf(filename,"gNBdataF_frame%d_sl%d.m", print_frame, slot_tx);
|
||||
LOG_M(filename,"txdataF_frame",&ru->gNB_list[0]->common_vars.txdataF[i][0],fp->samples_per_frame_wCP, 1, 1);
|
||||
|
||||
sprintf(filename,"tx%ddataF_frame%d_sl%d.m", i, print_frame, slot_tx);
|
||||
LOG_M(filename,"txdataF_frame",&ru->common.txdataF[i][0],fp->samples_per_frame_wCP, 1, 1);
|
||||
|
||||
sprintf(filename,"tx%ddataF_BF_frame%d_sl%d.m", i, print_frame, slot_tx);
|
||||
LOG_M(filename,"txdataF_BF_frame",&ru->common.txdataF_BF[i][0],fp->samples_per_subframe_wCP, 1, 1);
|
||||
}
|
||||
@@ -1211,18 +1217,13 @@ void *ru_thread( void *param ) {
|
||||
int frame = 1023;
|
||||
char threadname[40];
|
||||
int aa;
|
||||
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
|
||||
// set default return value
|
||||
ru_thread_status = 0;
|
||||
// set default return value
|
||||
sprintf(threadname,"ru_thread %u",ru->idx);
|
||||
|
||||
|
||||
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
|
||||
|
||||
memcpy((void*)&ru->config,(void*)&RC.gNB[0]->gNB_config,sizeof(ru->config));
|
||||
memcpy((void *)&ru->config,(void *)&RC.gNB[0]->gNB_config,sizeof(ru->config));
|
||||
|
||||
if(emulate_rf) {
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
@@ -1268,12 +1269,11 @@ void *ru_thread( void *param ) {
|
||||
pthread_cond_signal(&RC.ru_cond);
|
||||
pthread_mutex_unlock(&RC.ru_mutex);
|
||||
wait_sync("ru_thread");
|
||||
|
||||
notifiedFIFO_elt_t *msg = newNotifiedFIFO_elt(sizeof(processingData_L1_t),0,gNB->resp_L1,rx_func);
|
||||
notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1_t),0,gNB->resp_L1_tx,tx_func);
|
||||
notifiedFIFO_elt_t *msgRUTx = newNotifiedFIFO_elt(sizeof(processingData_L1_t),0,gNB->resp_RU_tx,ru_tx_func);
|
||||
processingData_L1_t *syncMsg;
|
||||
notifiedFIFO_elt_t *res;
|
||||
notifiedFIFO_elt_t *res;
|
||||
pushNotifiedFIFO(gNB->resp_L1,msg); // to unblock the process in the beginning
|
||||
pushNotifiedFIFO(gNB->resp_L1_tx,msgL1Tx); // to unblock the process in the beginning
|
||||
pushNotifiedFIFO(gNB->resp_RU_tx,msgRUTx); // to unblock the process in the beginning
|
||||
@@ -1287,12 +1287,11 @@ void *ru_thread( void *param ) {
|
||||
} else LOG_I(PHY,"RU %d no rf device\n",ru->idx);
|
||||
|
||||
// start trx write thread
|
||||
if(usrp_tx_thread == 1){
|
||||
if (ru->start_write_thread){
|
||||
if(ru->start_write_thread(ru) != 0){
|
||||
if(usrp_tx_thread == 1) {
|
||||
if (ru->start_write_thread) {
|
||||
if(ru->start_write_thread(ru) != 0) {
|
||||
LOG_E(HW,"Could not start tx write thread\n");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
LOG_I(PHY,"tx write thread ready\n");
|
||||
}
|
||||
}
|
||||
@@ -1313,76 +1312,75 @@ void *ru_thread( void *param ) {
|
||||
|
||||
// synchronization on input FH interface, acquire signals/data and block
|
||||
LOG_D(PHY,"[RU_thread] read data: frame_rx = %d, tti_rx = %d\n", frame, slot);
|
||||
|
||||
if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&slot);
|
||||
else AssertFatal(1==0, "No fronthaul interface at south port");
|
||||
|
||||
proc->timestamp_tx = proc->timestamp_rx + (sf_ahead*fp->samples_per_subframe);
|
||||
proc->frame_tx = (proc->tti_rx > (fp->slots_per_frame-1-(fp->slots_per_subframe*sf_ahead))) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
|
||||
proc->tti_tx = (proc->tti_rx + (fp->slots_per_subframe*sf_ahead))%fp->slots_per_frame;
|
||||
|
||||
LOG_D(PHY,"AFTER fh_south_in - SFN/SL:%d%d RU->proc[RX:%d.%d TX:%d.%d] RC.gNB[0]:[RX:%d%d TX(SFN):%d]\n",
|
||||
frame,slot,
|
||||
proc->frame_rx,proc->tti_rx,
|
||||
proc->frame_tx,proc->tti_tx,
|
||||
RC.gNB[0]->proc.frame_rx,RC.gNB[0]->proc.slot_rx,
|
||||
RC.gNB[0]->proc.frame_tx);
|
||||
RC.gNB[0]->proc.frame_tx);
|
||||
|
||||
if (ru->idx!=0) proc->frame_tx = (proc->frame_tx+proc->frame_offset)&1023;
|
||||
|
||||
// do RX front-end processing (frequency-shift, dft) if needed
|
||||
|
||||
int slot_type = nr_slot_select(cfg,proc->frame_rx,proc->tti_rx);
|
||||
|
||||
if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
|
||||
|
||||
if (ru->feprx) {
|
||||
ru->feprx(ru,proc->tti_rx);
|
||||
//LOG_M("rxdata.m","rxs",ru->common.rxdata[0],1228800,1,1);
|
||||
ru->feprx(ru,proc->tti_rx);
|
||||
//LOG_M("rxdata.m","rxs",ru->common.rxdata[0],1228800,1,1);
|
||||
LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
|
||||
LOG_D(PHY,"Copying rxdataF from RU to gNB\n");
|
||||
|
||||
LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
|
||||
LOG_D(PHY,"Copying rxdataF from RU to gNB\n");
|
||||
|
||||
for (aa=0;aa<ru->nb_rx;aa++)
|
||||
memcpy((void*)RC.gNB[0]->common_vars.rxdataF[aa],
|
||||
(void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
if (IS_SOFTMODEM_DOSCOPE && RC.gNB[0]->scopeData)
|
||||
((scopeData_t*)RC.gNB[0]->scopeData)->slotFunc(ru->common.rxdataF[0],proc->tti_rx, RC.gNB[0]->scopeData);
|
||||
// Do PRACH RU processing
|
||||
for (aa=0; aa<ru->nb_rx; aa++)
|
||||
memcpy((void *)RC.gNB[0]->common_vars.rxdataF[aa],
|
||||
(void *)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
|
||||
int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST);
|
||||
uint8_t prachStartSymbol,N_dur;
|
||||
if (prach_id>=0) {
|
||||
if (IS_SOFTMODEM_DOSCOPE && RC.gNB[0]->scopeData)
|
||||
((scopeData_t *)RC.gNB[0]->scopeData)->slotFunc(ru->common.rxdataF[0],proc->tti_rx, RC.gNB[0]->scopeData);
|
||||
|
||||
T(T_GNB_PHY_PRACH_INPUT_SIGNAL, T_INT(proc->frame_rx), T_INT(proc->tti_rx), T_INT(0),
|
||||
T_BUFFER(&ru->common.rxdata[0][fp->get_samples_slot_timestamp(proc->tti_rx-1,fp,0)]/*-ru->N_TA_offset*/, fp->get_samples_per_slot(proc->tti_rx,fp)*4*2));
|
||||
// Do PRACH RU processing
|
||||
int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST);
|
||||
uint8_t prachStartSymbol,N_dur;
|
||||
|
||||
N_dur = get_nr_prach_duration(ru->prach_list[prach_id].fmt);
|
||||
/*
|
||||
get_nr_prach_info_from_index(ru->config.prach_config.prach_ConfigurationIndex.value,
|
||||
proc->frame_rx,proc->tti_rx,
|
||||
ru->config.carrier_config.dl_frequency.value,
|
||||
fp->numerology_index,
|
||||
fp->frame_type,
|
||||
&format,
|
||||
&start_symbol,
|
||||
&N_t_slot,
|
||||
&N_dur,
|
||||
&RA_sfn_index,
|
||||
&N_RA_slot,
|
||||
&config_period);
|
||||
*/
|
||||
for (int prach_oc = 0; prach_oc<ru->prach_list[prach_id].num_prach_ocas; prach_oc++) {
|
||||
prachStartSymbol = ru->prach_list[prach_id].prachStartSymbol+prach_oc*N_dur;
|
||||
//comment FK: the standard 38.211 section 5.3.2 has one extra term +14*N_RA_slot. This is because there prachStartSymbol is given wrt to start of the 15kHz slot or 60kHz slot. Here we work slot based, so this function is anyway only called in slots where there is PRACH. Its up to the MAC to schedule another PRACH PDU in the case there are there N_RA_slot \in {0,1}.
|
||||
if (prach_id>=0) {
|
||||
T(T_GNB_PHY_PRACH_INPUT_SIGNAL, T_INT(proc->frame_rx), T_INT(proc->tti_rx), T_INT(0),
|
||||
T_BUFFER(&ru->common.rxdata[0][fp->get_samples_slot_timestamp(proc->tti_rx-1,fp,0)]/*-ru->N_TA_offset*/, fp->get_samples_per_slot(proc->tti_rx,fp)*4*2));
|
||||
N_dur = get_nr_prach_duration(ru->prach_list[prach_id].fmt);
|
||||
|
||||
rx_nr_prach_ru(ru,
|
||||
ru->prach_list[prach_id].fmt, //could also use format
|
||||
ru->prach_list[prach_id].numRA,
|
||||
prachStartSymbol,
|
||||
prach_oc,
|
||||
proc->frame_rx,proc->tti_rx);
|
||||
}
|
||||
free_nr_ru_prach_entry(ru,prach_id);
|
||||
}
|
||||
/*
|
||||
get_nr_prach_info_from_index(ru->config.prach_config.prach_ConfigurationIndex.value,
|
||||
proc->frame_rx,proc->tti_rx,
|
||||
ru->config.carrier_config.dl_frequency.value,
|
||||
fp->numerology_index,
|
||||
fp->frame_type,
|
||||
&format,
|
||||
&start_symbol,
|
||||
&N_t_slot,
|
||||
&N_dur,
|
||||
&RA_sfn_index,
|
||||
&N_RA_slot,
|
||||
&config_period);
|
||||
*/
|
||||
for (int prach_oc = 0; prach_oc<ru->prach_list[prach_id].num_prach_ocas; prach_oc++) {
|
||||
prachStartSymbol = ru->prach_list[prach_id].prachStartSymbol+prach_oc*N_dur;
|
||||
//comment FK: the standard 38.211 section 5.3.2 has one extra term +14*N_RA_slot. This is because there prachStartSymbol is given wrt to start of the 15kHz slot or 60kHz slot. Here we work slot based, so this function is anyway only called in slots where there is PRACH. Its up to the MAC to schedule another PRACH PDU in the case there are there N_RA_slot \in {0,1}.
|
||||
rx_nr_prach_ru(ru,
|
||||
ru->prach_list[prach_id].fmt, //could also use format
|
||||
ru->prach_list[prach_id].numRA,
|
||||
prachStartSymbol,
|
||||
prach_oc,
|
||||
proc->frame_rx,proc->tti_rx);
|
||||
}
|
||||
|
||||
free_nr_ru_prach_entry(ru,prach_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1397,7 +1395,6 @@ void *ru_thread( void *param ) {
|
||||
syncMsg->timestamp_tx = proc->timestamp_tx;
|
||||
res->key = proc->tti_rx;
|
||||
pushTpool(gNB->threadPool, res);
|
||||
|
||||
}
|
||||
|
||||
printf( "Exiting ru_thread \n");
|
||||
@@ -1411,7 +1408,6 @@ void *ru_thread( void *param ) {
|
||||
delNotifiedFIFO_elt(msg);
|
||||
delNotifiedFIFO_elt(msgL1Tx);
|
||||
delNotifiedFIFO_elt(msgRUTx);
|
||||
|
||||
ru_thread_status = 0;
|
||||
return &ru_thread_status;
|
||||
}
|
||||
@@ -1502,8 +1498,7 @@ void kill_NR_RU_proc(int inst) {
|
||||
}
|
||||
}
|
||||
|
||||
int check_capabilities(RU_t *ru,RRU_capabilities_t *cap)
|
||||
{
|
||||
int check_capabilities(RU_t *ru,RRU_capabilities_t *cap) {
|
||||
FH_fmt_options_t fmt = cap->FH_fmt;
|
||||
int i;
|
||||
int found_band=0;
|
||||
@@ -1559,8 +1554,7 @@ char rru_formats[3][20] = {"OAI_IF5","MBP_IF5","OAI_IF4p5"};
|
||||
char ru_if_formats[4][20] = {"LOCAL_RF","REMOTE_OAI_IF5","REMOTE_MBP_IF5","REMOTE_OAI_IF4p5"};
|
||||
|
||||
void configure_ru(int idx,
|
||||
void *arg)
|
||||
{
|
||||
void *arg) {
|
||||
RU_t *ru = RC.ru[idx];
|
||||
RRU_config_t *config = (RRU_config_t *)arg;
|
||||
RRU_capabilities_t *capabilities = (RRU_capabilities_t *)arg;
|
||||
@@ -1733,26 +1727,25 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_north_out = NULL; // no outgoing fronthaul to north
|
||||
ru->nr_start_if = NULL; // no if interface
|
||||
ru->rfdevice.host_type = RAU_HOST;
|
||||
|
||||
ru->fh_south_in = rx_rf; // local synchronous RF RX
|
||||
ru->fh_south_out = tx_rf; // local synchronous RF TX
|
||||
ru->start_rf = start_rf; // need to start the local RF interface
|
||||
ru->stop_rf = stop_rf;
|
||||
ru->start_write_thread = start_write_thread; // starting RF TX in different thread
|
||||
printf("configuring ru_id %u (start_rf %p)\n", ru->idx, start_rf);
|
||||
ru->fh_south_in = rx_rf; // local synchronous RF RX
|
||||
ru->fh_south_out = tx_rf; // local synchronous RF TX
|
||||
ru->start_rf = start_rf; // need to start the local RF interface
|
||||
ru->stop_rf = stop_rf;
|
||||
ru->start_write_thread = start_write_thread; // starting RF TX in different thread
|
||||
printf("configuring ru_id %u (start_rf %p)\n", ru->idx, start_rf);
|
||||
}
|
||||
|
||||
/*
|
||||
printf("configuring ru_id %u (start_rf %p)\n", ru->idx, start_rf);
|
||||
fill_rf_config(ru,rf_config_file);
|
||||
init_frame_parms(&ru->frame_parms,1);
|
||||
nr_phy_init_RU(ru);
|
||||
printf("configuring ru_id %u (start_rf %p)\n", ru->idx, start_rf);
|
||||
fill_rf_config(ru,rf_config_file);
|
||||
init_frame_parms(&ru->frame_parms,1);
|
||||
nr_phy_init_RU(ru);
|
||||
|
||||
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||
if (setup_RU_buffers(ru)!=0) {
|
||||
printf("Exiting, cannot initialize RU Buffers\n");
|
||||
exit(-1);
|
||||
}
|
||||
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||
if (setup_RU_buffers(ru)!=0) {
|
||||
printf("Exiting, cannot initialize RU Buffers\n");
|
||||
exit(-1);
|
||||
}
|
||||
*/
|
||||
break;
|
||||
|
||||
@@ -1808,9 +1801,12 @@ void set_function_spec_param(RU_t *ru) {
|
||||
|
||||
if (ru->ifdevice.get_internal_parameter != NULL) {
|
||||
void *t = ru->ifdevice.get_internal_parameter("fh_if4p5_south_in");
|
||||
|
||||
if (t != NULL)
|
||||
ru->fh_south_in = t;
|
||||
|
||||
t = ru->ifdevice.get_internal_parameter("fh_if4p5_south_out");
|
||||
|
||||
if (t != NULL)
|
||||
ru->fh_south_out = t;
|
||||
}
|
||||
@@ -1824,8 +1820,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
} // switch on interface type
|
||||
}
|
||||
|
||||
void init_NR_RU(char *rf_config_file)
|
||||
{
|
||||
void init_NR_RU(char *rf_config_file) {
|
||||
int ru_id;
|
||||
RU_t *ru;
|
||||
PHY_VARS_gNB *gNB_RC;
|
||||
@@ -1840,7 +1835,6 @@ void init_NR_RU(char *rf_config_file)
|
||||
printf("configuring RU from file\n");
|
||||
NRRCconfig_RU();
|
||||
LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_nr_L1_inst,RC.nb_RU,get_nprocs());
|
||||
|
||||
LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU);
|
||||
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
@@ -1902,8 +1896,7 @@ void init_NR_RU(char *rf_config_file)
|
||||
}
|
||||
|
||||
|
||||
void stop_RU(int nb_ru)
|
||||
{
|
||||
void stop_RU(int nb_ru) {
|
||||
for (int inst = 0; inst < nb_ru; inst++) {
|
||||
LOG_I(PHY, "Stopping RU %d processing threads\n", inst);
|
||||
kill_NR_RU_proc(inst);
|
||||
@@ -1913,8 +1906,7 @@ void stop_RU(int nb_ru)
|
||||
|
||||
/* --------------------------------------------------------*/
|
||||
/* from here function to use configuration module */
|
||||
static void NRRCconfig_RU(void)
|
||||
{
|
||||
static void NRRCconfig_RU(void) {
|
||||
int i = 0, j = 0;
|
||||
paramdef_t RUParams[] = RUPARAMS_DESC;
|
||||
paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
|
||||
@@ -1958,8 +1950,7 @@ static void NRRCconfig_RU(void)
|
||||
} else {
|
||||
LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LOG_I(PHY,"Setting clock source to internal\n");
|
||||
RC.ru[j]->openair0_cfg.clock_source = internal;
|
||||
}
|
||||
@@ -1977,10 +1968,9 @@ static void NRRCconfig_RU(void)
|
||||
} else {
|
||||
LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LOG_I(PHY,"Setting time source to internal\n");
|
||||
RC.ru[j]->openair0_cfg.time_source = internal;
|
||||
RC.ru[j]->openair0_cfg.time_source = internal;
|
||||
}
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
|
||||
@@ -2065,8 +2055,10 @@ static void NRRCconfig_RU(void)
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_BF_WEIGHTS_LIST_IDX)) {
|
||||
RC.ru[j]->nb_bfw = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].numelt;
|
||||
|
||||
for (i=0; i<RC.ru[j]->num_gNB; i++) {
|
||||
RC.ru[j]->bw_list[i] = (int32_t *)malloc16_clear((RC.ru[j]->nb_bfw)*sizeof(int32_t));
|
||||
|
||||
for (int b=0; b<RC.ru[j]->nb_bfw; b++) RC.ru[j]->bw_list[i][b] = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].iptr[b];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,4 @@ extern int emulate_rf;
|
||||
extern int numerology;
|
||||
extern int usrp_tx_thread;
|
||||
|
||||
extern volatile int start_eNB;
|
||||
extern volatile int start_UE;
|
||||
|
||||
#endif
|
||||
|
||||
+42
-66
@@ -53,6 +53,7 @@
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
#include "gnb_config.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include <targets/RT/USER/lte-softmodem.h>
|
||||
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
@@ -170,15 +171,15 @@ int split73=0;
|
||||
void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) {
|
||||
AssertFatal(false, "Must not be called in this context\n");
|
||||
}
|
||||
void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask, uint16_t rnti, int32_t stat) {
|
||||
AssertFatal(false, "Must not be called in this context\n");
|
||||
void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask,
|
||||
uint16_t rnti, int32_t stat) {
|
||||
AssertFatal(false, "Must not be called in this context\n");
|
||||
}
|
||||
|
||||
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
|
||||
extern void init_eNB_afterRU(void);
|
||||
extern void *udp_eNB_task(void *args_p);
|
||||
|
||||
int transmission_mode=1;
|
||||
@@ -307,44 +308,40 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb);
|
||||
itti_wait_ready(1);
|
||||
|
||||
|
||||
if (gnb_nb > 0) {
|
||||
/* Last task to create, others task must be ready before its start */
|
||||
/*if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
|
||||
LOG_E(GNB_APP, "Create task for gNB APP failed\n");
|
||||
return -1;
|
||||
}*/
|
||||
if(itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0){
|
||||
if(itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (is_x2ap_enabled()) {
|
||||
if(itti_create_task(TASK_X2AP, x2ap_task, NULL) < 0){
|
||||
LOG_E(X2AP, "Create task for X2AP failed\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(itti_create_task(TASK_X2AP, x2ap_task, NULL) < 0) {
|
||||
LOG_E(X2AP, "Create task for X2AP failed\n");
|
||||
}
|
||||
} else {
|
||||
LOG_I(X2AP, "X2AP is disabled.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
paramdef_t NETParams[] = GNBNETPARAMS_DESC;
|
||||
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
|
||||
sprintf(aprefix,"%s.[%i].%s",GNB_CONFIG_STRING_GNB_LIST,0,GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG);
|
||||
config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix);
|
||||
config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix);
|
||||
|
||||
for(int i = GNB_INTERFACE_NAME_FOR_NG_AMF_IDX; i <= GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX; i++){
|
||||
if( NETParams[i].strptr == NULL){
|
||||
for(int i = GNB_INTERFACE_NAME_FOR_NG_AMF_IDX; i <= GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX; i++) {
|
||||
if( NETParams[i].strptr == NULL) {
|
||||
LOG_E(NGAP, "No configuration in the file.\n");
|
||||
NGAP_CONF_MODE = 0;
|
||||
}
|
||||
else {
|
||||
NGAP_CONF_MODE = 0;
|
||||
} else {
|
||||
LOG_D(NGAP, "Configuration in the file: %s.\n",*NETParams[i].strptr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (gnb_nb > 0) {
|
||||
/*
|
||||
@@ -353,17 +350,16 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
return -1;
|
||||
}
|
||||
*/
|
||||
if(NGAP_CONF_MODE){
|
||||
if(NGAP_CONF_MODE) {
|
||||
if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) {
|
||||
LOG_E(NGAP, "Create task for NGAP failed\n");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
LOG_E(NGAP, "Ngap task not created\n");
|
||||
LOG_E(NGAP, "Ngap task not created\n");
|
||||
}
|
||||
|
||||
|
||||
if(!emulate_rf){
|
||||
if(!emulate_rf) {
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
@@ -384,12 +380,14 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
}
|
||||
|
||||
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
|
||||
|
||||
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
|
||||
LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n");
|
||||
return -1;
|
||||
}
|
||||
//Use check on x2ap to consider the NSA scenario and check on AMF_MODE_ENABLED for the SA scenario
|
||||
if(is_x2ap_enabled() || AMF_MODE_ENABLED){
|
||||
|
||||
//Use check on x2ap to consider the NSA scenario and check on AMF_MODE_ENABLED for the SA scenario
|
||||
if(is_x2ap_enabled() || AMF_MODE_ENABLED) {
|
||||
if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
return -1;
|
||||
@@ -402,18 +400,12 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
|
||||
|
||||
static void get_options(void) {
|
||||
|
||||
|
||||
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ;
|
||||
|
||||
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
|
||||
get_common_options(SOFTMODEM_GNB_BIT );
|
||||
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
|
||||
|
||||
|
||||
|
||||
|
||||
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) {
|
||||
memset((void *)&RC,0,sizeof(RC));
|
||||
/* Read RC configuration file */
|
||||
@@ -426,13 +418,11 @@ static void get_options(void) {
|
||||
if(parallel_config != NULL) set_parallel_conf(parallel_config);
|
||||
|
||||
if(worker_config != NULL) set_worker_conf(worker_config);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void set_default_frame_parms(nfapi_nr_config_request_scf_t *config[MAX_NUM_CCs],
|
||||
NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs])
|
||||
{
|
||||
NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
|
||||
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
frame_parms[CC_id] = (NR_DL_FRAME_PARMS *) malloc(sizeof(NR_DL_FRAME_PARMS));
|
||||
config[CC_id] = (nfapi_nr_config_request_scf_t *) malloc(sizeof(nfapi_nr_config_request_scf_t));
|
||||
@@ -507,10 +497,9 @@ void wait_gNBs(void) {
|
||||
waiting=0;
|
||||
|
||||
for (i=0; i<RC.nb_nr_L1_inst; i++) {
|
||||
|
||||
if (RC.gNB[i]->configured==0) {
|
||||
waiting=1;
|
||||
break;
|
||||
waiting=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -567,11 +556,8 @@ int stop_L1L2(module_id_t gnb_id) {
|
||||
LOG_I(GNB_APP, "calling kill_NR_RU_proc() for instance %d\n", gnb_id);
|
||||
kill_NR_RU_proc(gnb_id);
|
||||
oai_exit = 0;
|
||||
|
||||
//free_transport(RC.gNB[gnb_id]);
|
||||
//free_transport(RC.gNB[gnb_id]);
|
||||
phy_free_nr_gNB(RC.gNB[gnb_id]);
|
||||
|
||||
|
||||
nr_phy_free_RU(RC.ru[gnb_id]);
|
||||
free_lte_top();
|
||||
return 0;
|
||||
@@ -586,17 +572,13 @@ int restart_L1L2(module_id_t gnb_id) {
|
||||
LOG_W(GNB_APP, "restarting nr-softmodem\n");
|
||||
/* block threads */
|
||||
sync_var = -1;
|
||||
|
||||
RC.gNB[gnb_id]->configured = 0;
|
||||
|
||||
|
||||
RC.ru_mask |= (1 << ru->idx);
|
||||
set_function_spec_param(RC.ru[gnb_id]);
|
||||
LOG_I(GNB_APP, "attempting to create ITTI tasks\n");
|
||||
// No more rrc thread, as many race conditions are hidden behind
|
||||
rrc_enb_init();
|
||||
itti_mark_task_ready(TASK_RRC_ENB);
|
||||
|
||||
/* pass a reconfiguration request which will configure everything down to
|
||||
* RC.eNB[i][j]->frame_parms, too */
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, 0, RRC_CONFIGURATION_REQ);
|
||||
@@ -633,7 +615,8 @@ void init_pdcp(void) {
|
||||
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
// pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
printf("IS_SOFTMODEM_NOS1 option enabled \n");
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
|
||||
@@ -656,16 +639,15 @@ void init_pdcp(void) {
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
int main( int argc, char **argv ) {
|
||||
int ru_id, CC_id = 0;
|
||||
|
||||
start_background_system();
|
||||
|
||||
///static configuration for NR at the moment
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == NULL) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
set_softmodem_sighandler();
|
||||
#ifdef DEBUG_CONSOLE
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
@@ -709,19 +691,16 @@ int main( int argc, char **argv )
|
||||
itti_init(TASK_MAX, tasks_info);
|
||||
// initialize mscgen log after ITTI
|
||||
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
|
||||
|
||||
|
||||
init_opt();
|
||||
|
||||
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
if(!IS_SOFTMODEM_NOS1)
|
||||
netlink_init();
|
||||
|
||||
if(!IS_SOFTMODEM_NOS1)
|
||||
netlink_init();
|
||||
|
||||
#if defined(PDCP_USE_NETLINK_QUEUES)
|
||||
pdcp_netlink_init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PACKAGE_VERSION
|
||||
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
||||
#endif
|
||||
@@ -730,9 +709,8 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
if (RC.nb_nr_L1_inst > 0)
|
||||
RCconfig_NR_L1();
|
||||
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
|
||||
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
|
||||
/* Start the agent. If it is turned off in the configuration, it won't start */
|
||||
/*
|
||||
RCconfig_nr_flexran();
|
||||
@@ -740,15 +718,13 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
for (i = 0; i < RC.nb_nr_L1_inst; i++) {
|
||||
flexran_agent_start(i);
|
||||
}
|
||||
*/
|
||||
|
||||
*/
|
||||
// init UE_PF_PO and mutex lock
|
||||
pthread_mutex_init(&ue_pf_po_mutex, NULL);
|
||||
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs);
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
|
||||
usleep(1000);
|
||||
|
||||
if (NFAPI_MODE) {
|
||||
@@ -819,6 +795,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
printf("RC.nb_RU:%d\n", RC.nb_RU);
|
||||
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
|
||||
printf("ALL RUs ready - init gNBs\n");
|
||||
|
||||
if(IS_SOFTMODEM_DOSCOPE) {
|
||||
sleep(1);
|
||||
scopeParms_t p;
|
||||
@@ -844,6 +821,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
pthread_cond_broadcast(&sync_cond);
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
}
|
||||
|
||||
printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
|
||||
end_configmodule();
|
||||
printf("Called end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
|
||||
@@ -855,7 +833,6 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
printf("Returned from ITTI signal handler\n");
|
||||
oai_exit=1;
|
||||
printf("oai_exit=%d\n",oai_exit);
|
||||
|
||||
// stop threads
|
||||
/*#ifdef XFORMS
|
||||
|
||||
@@ -889,8 +866,8 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
/* release memory used by the RU/gNB threads (incomplete), after all
|
||||
* threads have been stopped (they partially use the same memory) */
|
||||
for (int inst = 0; inst < NB_gNB_INST; inst++) {
|
||||
//free_transport(RC.gNB[inst]);
|
||||
phy_free_nr_gNB(RC.gNB[inst]);
|
||||
//free_transport(RC.gNB[inst]);
|
||||
phy_free_nr_gNB(RC.gNB[inst]);
|
||||
}
|
||||
|
||||
for (int inst = 0; inst < NB_RU; inst++) {
|
||||
@@ -914,7 +891,6 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
|
||||
}
|
||||
|
||||
|
||||
logClean();
|
||||
printf("Bye.\n");
|
||||
return 0;
|
||||
|
||||
+9
-6
@@ -220,7 +220,6 @@ static void UE_synch(void *arg) {
|
||||
LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
|
||||
|
||||
uint64_t dl_carrier, ul_carrier;
|
||||
double rx_gain_off = 0;
|
||||
nr_get_carrier_frequencies(&UE->frame_parms, &dl_carrier, &ul_carrier);
|
||||
|
||||
if (nr_initial_sync(&syncD->proc, UE, 2) == 0) {
|
||||
@@ -230,7 +229,7 @@ static void UE_synch(void *arg) {
|
||||
|
||||
// rerun with new cell parameters and frequency-offset
|
||||
// todo: the freq_offset computed on DL shall be scaled before being applied to UL
|
||||
nr_rf_card_config(&openair0_cfg[UE->rf_map.card], rx_gain_off, ul_carrier, dl_carrier, freq_offset);
|
||||
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], ul_carrier, dl_carrier, freq_offset);
|
||||
|
||||
LOG_I(PHY,"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %f (DL %f Hz, UL %f Hz)\n",
|
||||
hw_slot_offset,
|
||||
@@ -264,7 +263,7 @@ static void UE_synch(void *arg) {
|
||||
|
||||
freq_offset *= -1;
|
||||
|
||||
nr_rf_card_config(&openair0_cfg[UE->rf_map.card], rx_gain_off, ul_carrier, dl_carrier, freq_offset);
|
||||
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], ul_carrier, dl_carrier, freq_offset);
|
||||
|
||||
LOG_I(PHY, "Initial sync failed: trying carrier off %d Hz\n", freq_offset);
|
||||
|
||||
@@ -307,11 +306,12 @@ void processSlotTX(void *arg) {
|
||||
ul_indication.frame_tx = proc->frame_tx;
|
||||
ul_indication.slot_tx = proc->nr_slot_tx;
|
||||
ul_indication.thread_id = proc->thread_id;
|
||||
ul_indication.ue_sched_mode = rxtxD->ue_sched_mode;
|
||||
|
||||
UE->if_inst->ul_indication(&ul_indication);
|
||||
}
|
||||
|
||||
if (UE->mode != loop_through_memory) {
|
||||
if ((UE->mode != loop_through_memory) && (rxtxD->ue_sched_mode != NOT_PUSCH)) {
|
||||
phy_procedures_nrUE_TX(UE,proc,0);
|
||||
}
|
||||
}
|
||||
@@ -358,6 +358,9 @@ void processSlotRX(void *arg) {
|
||||
nr_pdcp_tick(proc->frame_rx, proc->nr_slot_rx / UE->frame_parms.slots_per_subframe);
|
||||
}
|
||||
}
|
||||
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
|
||||
rxtxD->ue_sched_mode = NOT_PUSCH;
|
||||
processSlotTX(rxtxD);
|
||||
|
||||
// Wait for PUSCH processing to finish
|
||||
notifiedFIFO_elt_t *res;
|
||||
@@ -365,6 +368,7 @@ void processSlotRX(void *arg) {
|
||||
delNotifiedFIFO_elt(res);
|
||||
|
||||
} else {
|
||||
rxtxD->ue_sched_mode = SCHED_ALL;
|
||||
processSlotTX(rxtxD);
|
||||
}
|
||||
|
||||
@@ -373,8 +377,7 @@ void processSlotRX(void *arg) {
|
||||
if (get_softmodem_params()->usim_test==0) {
|
||||
pucch_procedures_ue_nr(UE,
|
||||
gNB_id,
|
||||
proc,
|
||||
FALSE);
|
||||
proc);
|
||||
}
|
||||
|
||||
LOG_D(PHY, "Sending Uplink data \n");
|
||||
|
||||
@@ -105,8 +105,6 @@ int config_sync_var=-1;
|
||||
|
||||
|
||||
RAN_CONTEXT_t RC;
|
||||
volatile int start_eNB = 0;
|
||||
volatile int start_UE = 0;
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
|
||||
@@ -375,7 +373,8 @@ void init_openair0(void) {
|
||||
|
||||
nr_get_carrier_frequencies(frame_parms, &dl_carrier, &ul_carrier);
|
||||
|
||||
nr_rf_card_config(&openair0_cfg[card], rx_gain_off, ul_carrier, dl_carrier, freq_off);
|
||||
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
|
||||
nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off);
|
||||
|
||||
openair0_cfg[card].configFilename = get_softmodem_params()->rf_config_file;
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ extern RAN_CONTEXT_t RC;
|
||||
#include "openair1/SCHED_NR/fapi_nr_l1.h"
|
||||
#include "openair1/PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "openair1/PHY/defs_gNB.h"
|
||||
#include <openair1/SCHED/fapi_l1.h>
|
||||
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto.h>
|
||||
#include <targets/RT/USER/lte-softmodem.h>
|
||||
|
||||
|
||||
#define NUM_P5_PHY 2
|
||||
@@ -74,45 +77,6 @@ extern int nfapi_sync_var;
|
||||
|
||||
extern int sync_var;
|
||||
|
||||
extern void init_eNB_afterRU(void);
|
||||
extern void init_UE_stub(int nb_inst,int,int);
|
||||
extern void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB, int frame, int subframe, L1_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu);
|
||||
extern void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, nfapi_ul_config_request_pdu_t *ul_config_pdu, uint16_t frame,uint8_t subframe,uint8_t srs_present);
|
||||
extern void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, L1_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu, uint8_t codeword_index, uint8_t *sdu);
|
||||
extern void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, L1_rxtx_proc_t *proc, nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
|
||||
extern void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, L1_rxtx_proc_t *proc, nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
|
||||
extern void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu, uint8_t *sdu);
|
||||
extern void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
|
||||
int frame, int slot,
|
||||
nfapi_nr_ul_dci_request_pdus_t *ul_dci_request_pdu);
|
||||
extern void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB,
|
||||
int frame, int slot,
|
||||
nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu);
|
||||
extern void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
|
||||
nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu,
|
||||
uint8_t *sdu);
|
||||
extern void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdu);
|
||||
extern void nr_fill_ulsch(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_pusch_pdu_t *ulsch_pdu);
|
||||
extern void nr_fill_pucch(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_pucch_pdu_t *pucch_pdu);
|
||||
extern void nr_fill_prach(PHY_VARS_gNB *gNB,
|
||||
int SFN,
|
||||
int Slot,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu);
|
||||
extern void nr_fill_prach_ru(RU_t *ru,
|
||||
int SFN,
|
||||
int Slot,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu);
|
||||
|
||||
|
||||
|
||||
|
||||
nfapi_tx_request_pdu_t *tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus]
|
||||
uint8_t nr_tx_pdus[32][16][4096];
|
||||
nfapi_nr_pdu_t *tx_data_request[1023][20][10]; //[frame][slot][max_num_pdus]
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include <targets/RT/USER/lte-softmodem.h>
|
||||
|
||||
#include "common/ran_context.h"
|
||||
|
||||
@@ -196,7 +197,6 @@ int vnf_unpack_vendor_extension_tlv(nfapi_tl_t *tl, uint8_t **ppReadPackedMessag
|
||||
void install_nr_schedule_handlers(NR_IF_Module_t *if_inst);
|
||||
void install_schedule_handlers(IF_Module_t *if_inst);
|
||||
extern int single_thread_flag;
|
||||
extern void init_eNB_afterRU(void);
|
||||
extern uint16_t sf_ahead;
|
||||
extern uint16_t slot_ahead;
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ typedef struct {
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t harq_pid;
|
||||
uint8_t ack_nack;
|
||||
uint32_t pdu_length;
|
||||
uint8_t* pdu;
|
||||
} fapi_nr_pdsch_pdu_t;
|
||||
@@ -112,20 +114,14 @@ typedef struct {
|
||||
uint8_t ssb_length;
|
||||
uint16_t cell_id;
|
||||
uint16_t ssb_start_subcarrier;
|
||||
short rsrp_dBm;
|
||||
} fapi_nr_ssb_pdu_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t pdu_length;
|
||||
uint8_t* pdu;
|
||||
uint32_t sibs_mask;
|
||||
} fapi_nr_sib_pdu_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t pdu_type;
|
||||
union {
|
||||
fapi_nr_pdsch_pdu_t pdsch_pdu;
|
||||
fapi_nr_ssb_pdu_t ssb_pdu;
|
||||
fapi_nr_sib_pdu_t sib_pdu;
|
||||
};
|
||||
} fapi_nr_rx_indication_body_t;
|
||||
|
||||
@@ -187,87 +183,33 @@ typedef struct {
|
||||
} fapi_nr_ul_config_prach_pdu;
|
||||
|
||||
typedef struct {
|
||||
|
||||
pucch_format_nr_t format; /* format 0 1 2 3 4 */
|
||||
uint8_t initialCyclicShift; /* x x */
|
||||
uint8_t nrofSymbols; /* x x x x x */
|
||||
uint8_t startingSymbolIndex; /* x x x x x */
|
||||
uint8_t timeDomainOCC; /* x */
|
||||
uint8_t nrofPRBs; /* x x */
|
||||
uint16_t startingPRB; /* maxNrofPhysicalResourceBlocks = 275 */
|
||||
uint8_t occ_length; /* x */
|
||||
uint8_t occ_Index; /* x */
|
||||
|
||||
feature_status_t intraSlotFrequencyHopping;
|
||||
uint16_t secondHopPRB;
|
||||
|
||||
/*
|
||||
-- Enabling inter-slot frequency hopping when PUCCH Format 1, 3 or 4 is repeated over multiple slots.
|
||||
-- The field is not applicable for format 2.
|
||||
*/
|
||||
feature_status_t interslotFrequencyHopping;
|
||||
/*
|
||||
-- Enabling 2 DMRS symbols per hop of a PUCCH Format 3 or 4 if both hops are more than X symbols when FH is enabled (X=4).
|
||||
-- Enabling 4 DMRS sybmols for a PUCCH Format 3 or 4 with more than 2X+1 symbols when FH is disabled (X=4).
|
||||
-- Corresponds to L1 parameter 'PUCCH-F3-F4-additional-DMRS' (see 38.213, section 9.2.1)
|
||||
-- The field is not applicable for format 1 and 2.
|
||||
*/
|
||||
enable_feature_t additionalDMRS;
|
||||
/*
|
||||
-- Max coding rate to determine how to feedback UCI on PUCCH for format 2, 3 or 4
|
||||
-- Corresponds to L1 parameter 'PUCCH-F2-maximum-coderate', 'PUCCH-F3-maximum-coderate' and 'PUCCH-F4-maximum-coderate'
|
||||
-- (see 38.213, section 9.2.5)
|
||||
-- The field is not applicable for format 1.
|
||||
*/
|
||||
PUCCH_MaxCodeRate_t maxCodeRate;
|
||||
/*
|
||||
-- Number of slots with the same PUCCH F1, F3 or F4. When the field is absent the UE applies the value n1.
|
||||
-- Corresponds to L1 parameter 'PUCCH-F1-number-of-slots', 'PUCCH-F3-number-of-slots' and 'PUCCH-F4-number-of-slots'
|
||||
-- (see 38.213, section 9.2.6)
|
||||
-- The field is not applicable for format 2.
|
||||
*/
|
||||
uint8_t nrofSlots;
|
||||
/*
|
||||
-- Enabling pi/2 BPSK for UCI symbols instead of QPSK for PUCCH.
|
||||
-- Corresponds to L1 parameter 'PUCCH-PF3-PF4-pi/2PBSK' (see 38.213, section 9.2.5)
|
||||
-- The field is not applicable for format 1 and 2.
|
||||
*/
|
||||
feature_status_t pi2PBSK;
|
||||
/*
|
||||
-- Enabling simultaneous transmission of CSI and HARQ-ACK feedback with or without SR with PUCCH Format 2, 3 or 4
|
||||
-- Corresponds to L1 parameter 'PUCCH-F2-Simultaneous-HARQ-ACK-CSI', 'PUCCH-F3-Simultaneous-HARQ-ACK-CSI' and
|
||||
-- 'PUCCH-F4-Simultaneous-HARQ-ACK-CSI' (see 38.213, section 9.2.5)
|
||||
-- When the field is absent the UE applies the value OFF
|
||||
-- The field is not applicable for format 1.
|
||||
*/
|
||||
enable_feature_t simultaneousHARQ_ACK_CSI;
|
||||
/*
|
||||
-- Configuration of group- and sequence hopping for all the PUCCH formats 0, 1, 3 and 4. "neither" implies neither group
|
||||
-- or sequence hopping is enabled. "enable" enables group hopping and disables sequence hopping. "disable"” disables group
|
||||
-- hopping and enables sequence hopping. Corresponds to L1 parameter 'PUCCH-GroupHopping' (see 38.211, section 6.4.1.3)
|
||||
pucch-GroupHopping ENUMERATED { neither, enable, disable },
|
||||
*/
|
||||
pucch_GroupHopping_t pucch_GroupHopping;
|
||||
/*
|
||||
-- Cell-Specific scrambling ID for group hoppping and sequence hopping if enabled.
|
||||
-- Corresponds to L1 parameter 'HoppingID' (see 38.211, section 6.3.2.2)
|
||||
hoppingId BIT STRING (SIZE (10)) OPTIONAL, -- Need R
|
||||
*/
|
||||
uint16_t hoppingId;
|
||||
/*
|
||||
-- Power control parameter P0 for PUCCH transmissions. Value in dBm. Only even values (step size 2) allowed.
|
||||
-- Corresponds to L1 parameter 'p0-nominal-pucch' (see 38.213, section 7.2)
|
||||
p0-nominal INTEGER (-202..24) OPTIONAL, -- Need R
|
||||
*/
|
||||
int8_t p0_nominal;
|
||||
|
||||
int8_t deltaF_PUCCH_f[NUMBER_PUCCH_FORMAT_NR];
|
||||
uint8_t p0_PUCCH_Id; /* INTEGER (1..8) */
|
||||
int8_t p0_PUCCH_Value;
|
||||
// pathlossReferenceRSs SEQUENCE (SIZE (1..maxNrofPUCCH-PathlossReferenceRSs)) OF PUCCH-PathlossReferenceRS OPTIONAL, -- Need M
|
||||
int8_t twoPUCCH_PC_AdjustmentStates;
|
||||
|
||||
} fapi_nr_ul_config_pucch_pdu;
|
||||
uint16_t rnti;
|
||||
uint16_t bwp_size;
|
||||
uint16_t bwp_start;
|
||||
uint8_t format_type;
|
||||
uint8_t start_symbol_index;
|
||||
uint8_t nr_of_symbols;
|
||||
uint16_t prb_start;
|
||||
uint16_t prb_size;
|
||||
uint32_t hopping_id;
|
||||
uint8_t freq_hop_flag;
|
||||
uint8_t group_hop_flag;
|
||||
uint8_t sequence_hop_flag;
|
||||
uint16_t second_hop_prb;
|
||||
uint16_t initial_cyclic_shift;
|
||||
uint8_t time_domain_occ_idx;
|
||||
uint8_t add_dmrs_flag;
|
||||
uint16_t dmrs_scrambling_id;
|
||||
uint16_t data_scrambling_id;
|
||||
uint8_t dmrs_cyclic_shift;
|
||||
uint8_t pi_2bpsk;
|
||||
uint8_t mcs;
|
||||
uint8_t pre_dft_occ_idx;
|
||||
uint8_t pre_dft_occ_len;
|
||||
int16_t pucch_tx_power;
|
||||
uint32_t n_bit;
|
||||
uint64_t payload;
|
||||
} fapi_nr_ul_config_pucch_pdu;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -459,11 +401,8 @@ typedef struct {
|
||||
uint8_t tb2_rv;
|
||||
uint8_t harq_process_nbr;
|
||||
vrb_to_prb_mapping_t vrb_to_prb_mapping;
|
||||
uint8_t dai;
|
||||
double scaling_factor_S;
|
||||
int8_t accumulated_delta_PUCCH;
|
||||
uint8_t pucch_resource_id;
|
||||
uint8_t pdsch_to_harq_feedback_time_ind;
|
||||
uint8_t n_dmrs_cdm_groups;
|
||||
uint8_t dmrs_ports[10];
|
||||
uint8_t n_front_load_symb;
|
||||
@@ -510,437 +449,6 @@ typedef struct {
|
||||
} fapi_nr_dl_config_request_t;
|
||||
|
||||
|
||||
//
|
||||
// P5
|
||||
//
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_coreset_t coreset;
|
||||
|
||||
uint8_t monitoring_slot_peridicity;
|
||||
uint8_t monitoring_slot_offset;
|
||||
uint16_t duration;
|
||||
uint16_t monitoring_symbols_within_slot;
|
||||
uint8_t number_of_candidates[5]; // aggregation level 1, 2, 4, 8, 16
|
||||
|
||||
uint8_t dci_2_0_number_of_candidates[5]; // aggregation level 1, 2, 4, 8, 16
|
||||
uint8_t dci_2_3_monitorying_periodicity;
|
||||
uint8_t dci_2_3_number_of_candidates;
|
||||
|
||||
} fapi_nr_search_space_t;
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_search_space_t search_space_sib1;
|
||||
fapi_nr_search_space_t search_space_others_sib;
|
||||
fapi_nr_search_space_t search_space_paging;
|
||||
//fapi_nr_coreset_t coreset_ra; // common coreset
|
||||
fapi_nr_search_space_t search_space_ra;
|
||||
} fapi_nr_pdcch_config_common_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t k0;
|
||||
uint8_t mapping_type;
|
||||
uint8_t symbol_starting;
|
||||
uint8_t symbol_length;
|
||||
} fapi_nr_pdsch_time_domain_resource_allocation_t;
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_pdsch_time_domain_resource_allocation_t allocation_list[FAPI_NR_MAX_NUM_DL_ALLOCATIONS];
|
||||
} fapi_nr_pdsch_config_common_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t prach_configuration_index;
|
||||
uint8_t msg1_fdm;
|
||||
uint8_t msg1_frequency_start;
|
||||
uint8_t zero_correlation_zone_config;
|
||||
uint8_t preamble_received_target_power;
|
||||
uint8_t preamble_transmission_max;
|
||||
uint8_t power_ramping_step;
|
||||
uint8_t ra_window_size;
|
||||
|
||||
uint8_t total_number_of_preamble;
|
||||
uint8_t ssb_occasion_per_rach;
|
||||
uint8_t cb_preamble_per_ssb;
|
||||
|
||||
uint8_t group_a_msg3_size;
|
||||
uint8_t group_a_number_of_preamble;
|
||||
uint8_t group_b_power_offset;
|
||||
uint8_t contention_resolution_timer;
|
||||
uint8_t rsrp_threshold_ssb;
|
||||
uint8_t rsrp_threshold_ssb_sul;
|
||||
uint8_t prach_length; // l839, l139
|
||||
uint8_t prach_root_sequence_index; // 0 - 837 for l839, 0 - 137 for l139
|
||||
uint8_t msg1_subcarrier_spacing;
|
||||
uint8_t restrictedset_config;
|
||||
uint8_t msg3_transform_precoding;
|
||||
} fapi_nr_rach_config_common_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t k2;
|
||||
uint8_t mapping_type;
|
||||
uint8_t symbol_starting;
|
||||
uint8_t symbol_length;
|
||||
} fapi_nr_pusch_time_domain_resource_allocation_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t group_hopping_enabled_transform_precoding;
|
||||
fapi_nr_pusch_time_domain_resource_allocation_t allocation_list[FAPI_NR_MAX_NUM_UL_ALLOCATIONS];
|
||||
uint8_t msg3_delta_preamble;
|
||||
uint8_t p0_nominal_with_grant;
|
||||
} fapi_nr_pusch_config_common_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t pucch_resource_common;
|
||||
uint8_t pucch_group_hopping;
|
||||
uint8_t hopping_id;
|
||||
uint8_t p0_nominal;
|
||||
} fapi_nr_pucch_config_common_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
fapi_nr_pdcch_config_common_t pdcch_config_common;
|
||||
fapi_nr_pdsch_config_common_t pdsch_config_common;
|
||||
|
||||
} fapi_nr_dl_bwp_common_config_t;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t int_rnti;
|
||||
uint8_t time_frequency_set;
|
||||
uint8_t dci_payload_size;
|
||||
uint8_t serving_cell_id[FAPI_NR_MAX_NUM_SERVING_CELLS]; // interrupt configuration per serving cell
|
||||
uint8_t position_in_dci[FAPI_NR_MAX_NUM_SERVING_CELLS]; // interrupt configuration per serving cell
|
||||
} fapi_nr_downlink_preemption_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t tpc_index;
|
||||
uint8_t tpc_index_sul;
|
||||
uint8_t target_cell;
|
||||
} fapi_nr_pusch_tpc_command_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t tpc_index_pcell;
|
||||
uint8_t tpc_index_pucch_scell;
|
||||
} fapi_nr_pucch_tpc_command_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t starting_bit_of_format_2_3;
|
||||
uint8_t feild_type_format_2_3;
|
||||
} fapi_nr_srs_tpc_command_config_t;
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_downlink_preemption_t downlink_preemption;
|
||||
fapi_nr_pusch_tpc_command_config_t tpc_pusch;
|
||||
fapi_nr_pucch_tpc_command_config_t tpc_pucch;
|
||||
fapi_nr_srs_tpc_command_config_t tpc_srs;
|
||||
} fapi_nr_pdcch_config_dedicated_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t dmrs_type;
|
||||
uint8_t dmrs_addition_position;
|
||||
uint8_t max_length;
|
||||
uint16_t scrambling_id0;
|
||||
uint16_t scrambling_id1;
|
||||
uint8_t ptrs_frequency_density[2]; // phase tracking rs
|
||||
uint8_t ptrs_time_density[3]; // phase tracking rs
|
||||
uint8_t ptrs_epre_ratio; // phase tracking rs
|
||||
uint8_t ptrs_resource_element_offset; // phase tracking rs
|
||||
} fapi_nr_dmrs_downlink_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t bwp_or_cell_level;
|
||||
uint8_t pattern_type;
|
||||
uint32_t resource_blocks[9]; // bitmaps type 275 bits
|
||||
uint8_t slot_type; // bitmaps type one/two slot(s)
|
||||
uint32_t symbols_in_resouece_block; // bitmaps type 14/28 bits
|
||||
uint8_t periodic; // bitmaps type
|
||||
uint32_t pattern[2]; // bitmaps type 2/4/5/8/10/20/40 bits
|
||||
|
||||
fapi_nr_coreset_t coreset; // coreset
|
||||
|
||||
uint8_t subcarrier_spacing;
|
||||
uint8_t mode;
|
||||
} fapi_nr_rate_matching_pattern_group_t;
|
||||
|
||||
typedef struct {
|
||||
// resource mapping
|
||||
uint8_t row; // row1/row2/row4/other
|
||||
uint16_t frequency_domain_allocation; // 4/12/3/6 bits
|
||||
uint8_t number_of_ports;
|
||||
uint8_t first_ofdm_symbol_in_time_domain;
|
||||
uint8_t first_ofdm_symbol_in_time_domain2;
|
||||
uint8_t cdm_type;
|
||||
uint8_t density; // .5/1/3
|
||||
uint8_t density_dot5_type; // even/odd PRBs
|
||||
|
||||
uint8_t frequency_band_starting_rb; // freqBand
|
||||
uint8_t frequency_band_number_of_rb; // freqBand
|
||||
|
||||
// periodicityAndOffset
|
||||
uint8_t periodicity; // slot4/5/8/10/16/20/32/40/64/80/160/320/640
|
||||
uint32_t offset; // 0..639 bits
|
||||
} fapi_nr_zp_csi_rs_resource_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t data_scrambling_id_pdsch;
|
||||
fapi_nr_dmrs_downlink_config_t dmrs_dl_for_pdsch_mapping_type_a;
|
||||
fapi_nr_dmrs_downlink_config_t dmrs_dl_for_pdsch_mapping_type_b;
|
||||
uint8_t vrb_to_prb_interleaver;
|
||||
uint8_t resource_allocation;
|
||||
fapi_nr_pdsch_time_domain_resource_allocation_t allocation_list[FAPI_NR_MAX_NUM_DL_ALLOCATIONS];
|
||||
uint8_t pdsch_aggregation_factor;
|
||||
fapi_nr_rate_matching_pattern_group_t rate_matching_pattern_group1;
|
||||
fapi_nr_rate_matching_pattern_group_t rate_matching_pattern_group2;
|
||||
uint8_t rbg_size;
|
||||
uint8_t mcs_table;
|
||||
uint8_t max_num_of_code_word_scheduled_by_dci;
|
||||
uint8_t bundle_size; // prb_bundling static
|
||||
uint8_t bundle_size_set1; // prb_bundling dynamic
|
||||
uint8_t bundle_size_set2; // prb_bundling dynamic
|
||||
fapi_nr_zp_csi_rs_resource_t periodically_zp_csi_rs_resource_set[FAPI_NR_MAX_NUM_ZP_CSI_RS_RESOURCE_PER_SET];
|
||||
} fapi_nr_pdsch_config_dedicated_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t starting_prb;
|
||||
uint8_t intra_slot_frequency_hopping;
|
||||
uint16_t second_hop_prb;
|
||||
uint8_t format; // pucch format 0..4
|
||||
uint8_t initial_cyclic_shift;
|
||||
uint8_t number_of_symbols;
|
||||
uint8_t starting_symbol_index;
|
||||
uint8_t time_domain_occ;
|
||||
uint8_t number_of_prbs;
|
||||
uint8_t occ_length;
|
||||
uint8_t occ_index;
|
||||
} fapi_nr_pucch_resource_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t periodicity;
|
||||
uint8_t number_of_harq_process;
|
||||
fapi_nr_pucch_resource_t n1_pucch_an;
|
||||
} fapi_nr_sps_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t beam_failure_instance_max_count;
|
||||
uint8_t beam_failure_detection_timer;
|
||||
} fapi_nr_radio_link_monitoring_config_t;
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_pdcch_config_dedicated_t pdcch_config_dedicated;
|
||||
fapi_nr_pdsch_config_dedicated_t pdsch_config_dedicated;
|
||||
fapi_nr_sps_config_t sps_config;
|
||||
fapi_nr_radio_link_monitoring_config_t radio_link_monitoring_config;
|
||||
|
||||
} fapi_nr_dl_bwp_dedicated_config_t;
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_rach_config_common_t rach_config_common;
|
||||
fapi_nr_pusch_config_common_t pusch_config_common;
|
||||
fapi_nr_pucch_config_common_t pucch_config_common;
|
||||
|
||||
} fapi_nr_ul_bwp_common_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t inter_slot_frequency_hopping;
|
||||
uint8_t additional_dmrs;
|
||||
uint8_t max_code_rate;
|
||||
uint8_t number_of_slots;
|
||||
uint8_t pi2bpsk;
|
||||
uint8_t simultaneous_harq_ack_csi;
|
||||
} fapi_nr_pucch_format_config_t;
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_pucch_format_config_t format1;
|
||||
fapi_nr_pucch_format_config_t format2;
|
||||
fapi_nr_pucch_format_config_t format3;
|
||||
fapi_nr_pucch_format_config_t format4;
|
||||
fapi_nr_pucch_resource_t multi_csi_pucch_resources[2];
|
||||
uint8_t dl_data_to_ul_ack[8];
|
||||
// pucch power control
|
||||
uint8_t deltaF_pucch_f0;
|
||||
uint8_t deltaF_pucch_f1;
|
||||
uint8_t deltaF_pucch_f2;
|
||||
uint8_t deltaF_pucch_f3;
|
||||
uint8_t deltaF_pucch_f4;
|
||||
uint8_t two_pucch_pc_adjusment_states;
|
||||
} fapi_nr_pucch_config_dedicated_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t dmrs_type;
|
||||
uint8_t dmrs_addition_position;
|
||||
uint8_t ptrs_uplink_config; // to indicate if PTRS Uplink is configured of not
|
||||
uint8_t ptrs_type; //cp-OFDM, dft-S-OFDM
|
||||
uint16_t ptrs_frequency_density[2];
|
||||
uint8_t ptrs_time_density[3];
|
||||
uint8_t ptrs_max_number_of_ports;
|
||||
uint8_t ptrs_resource_element_offset;
|
||||
uint8_t ptrs_power;
|
||||
uint16_t ptrs_sample_density[5];
|
||||
uint8_t ptrs_time_density_transform_precoding;
|
||||
|
||||
uint8_t max_length;
|
||||
uint16_t scrambling_id0;
|
||||
uint16_t scrambling_id1;
|
||||
uint8_t npusch_identity;
|
||||
uint8_t disable_sequence_group_hopping;
|
||||
uint8_t sequence_hopping_enable;
|
||||
} fapi_nr_dmrs_uplink_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t tpc_accmulation;
|
||||
uint8_t msg3_alpha;
|
||||
uint8_t p0_nominal_with_grant;
|
||||
uint8_t two_pusch_pc_adjustments_states;
|
||||
uint8_t delta_mcs;
|
||||
} fapi_nr_pusch_power_control_t;
|
||||
|
||||
typedef enum {tx_config_codebook = 1, tx_config_nonCodebook = 2} tx_config_t;
|
||||
typedef enum {transform_precoder_enabled = 0, transform_precoder_disabled = 1} transform_precoder_t;
|
||||
typedef enum {
|
||||
codebook_subset_fullyAndPartialAndNonCoherent = 1,
|
||||
codebook_subset_partialAndNonCoherent = 2,
|
||||
codebook_subset_nonCoherent = 3} codebook_subset_t;
|
||||
typedef struct {
|
||||
uint16_t data_scrambling_identity;
|
||||
tx_config_t tx_config;
|
||||
fapi_nr_dmrs_uplink_config_t dmrs_ul_for_pusch_mapping_type_a;
|
||||
fapi_nr_dmrs_uplink_config_t dmrs_ul_for_pusch_mapping_type_b;
|
||||
fapi_nr_pusch_power_control_t pusch_power_control;
|
||||
uint8_t frequency_hopping;
|
||||
uint16_t frequency_hopping_offset_lists[4];
|
||||
uint8_t resource_allocation;
|
||||
fapi_nr_pusch_time_domain_resource_allocation_t allocation_list[FAPI_NR_MAX_NUM_UL_ALLOCATIONS];
|
||||
uint8_t pusch_aggregation_factor;
|
||||
uint8_t mcs_table;
|
||||
uint8_t mcs_table_transform_precoder;
|
||||
transform_precoder_t transform_precoder;
|
||||
codebook_subset_t codebook_subset;
|
||||
uint8_t max_rank;
|
||||
uint8_t rbg_size;
|
||||
|
||||
//uci-OnPUSCH
|
||||
uint8_t uci_on_pusch_type; //dynamic, semi-static
|
||||
uint8_t beta_offset_ack_index1[4];
|
||||
uint8_t beta_offset_ack_index2[4];
|
||||
uint8_t beta_offset_ack_index3[4];
|
||||
uint8_t beta_offset_csi_part1_index1[4];
|
||||
uint8_t beta_offset_csi_part1_index2[4];
|
||||
uint8_t beta_offset_csi_part2_index1[4];
|
||||
uint8_t beta_offset_csi_part2_index2[4];
|
||||
|
||||
uint8_t tp_pi2BPSK;
|
||||
} fapi_nr_pusch_config_dedicated_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t frequency_hopping;
|
||||
fapi_nr_dmrs_uplink_config_t cg_dmrs_configuration;
|
||||
uint8_t mcs_table;
|
||||
uint8_t mcs_table_transform_precoder;
|
||||
|
||||
//uci-OnPUSCH
|
||||
uint8_t uci_on_pusch_type; //dynamic, semi-static
|
||||
uint8_t beta_offset_ack_index1[4];
|
||||
uint8_t beta_offset_ack_index2[4];
|
||||
uint8_t beta_offset_ack_index3[4];
|
||||
uint8_t beta_offset_csi_part1_index1[4];
|
||||
uint8_t beta_offset_csi_part1_index2[4];
|
||||
uint8_t beta_offset_csi_part2_index1[4];
|
||||
uint8_t beta_offset_csi_part2_index2[4];
|
||||
|
||||
uint8_t resource_allocation;
|
||||
// rgb-Size structure missing in spec.
|
||||
uint8_t power_control_loop_to_use;
|
||||
// p0-PUSCH-Alpha
|
||||
uint8_t p0;
|
||||
uint8_t alpha;
|
||||
|
||||
uint8_t transform_precoder;
|
||||
uint8_t number_of_harq_process;
|
||||
uint8_t rep_k;
|
||||
uint8_t rep_k_rv;
|
||||
uint8_t periodicity;
|
||||
uint8_t configured_grant_timer;
|
||||
// rrc-ConfiguredUplinkGrant
|
||||
uint16_t time_domain_offset;
|
||||
uint8_t time_domain_allocation;
|
||||
uint32_t frequency_domain_allocation;
|
||||
uint8_t antenna_ports;
|
||||
uint8_t dmrs_seq_initialization;
|
||||
uint8_t precoding_and_number_of_layers;
|
||||
uint8_t srs_resource_indicator;
|
||||
uint8_t mcs_and_tbs;
|
||||
uint8_t frequency_hopping_offset;
|
||||
uint8_t path_loss_reference_index;
|
||||
|
||||
} fapi_nr_configured_grant_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t qcl_type1_serving_cell_index;
|
||||
uint8_t qcl_type1_bwp_id;
|
||||
uint8_t qcl_type1_rs_type; // csi-rs or ssb
|
||||
uint8_t qcl_type1_nzp_csi_rs_resource_id;
|
||||
uint8_t qcl_type1_ssb_index;
|
||||
uint8_t qcl_type1_type;
|
||||
|
||||
uint8_t qcl_type2_serving_cell_index;
|
||||
uint8_t qcl_type2_bwp_id;
|
||||
uint8_t qcl_type2_rs_type; // csi-rs or ssb
|
||||
uint8_t qcl_type2_nzp_csi_rs_resource_id;
|
||||
uint8_t qcl_type2_ssb_index;
|
||||
uint8_t qcl_type2_type;
|
||||
|
||||
} fapi_nr_tci_state_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t root_sequence_index;
|
||||
// rach genertic
|
||||
uint8_t prach_configuration_index;
|
||||
uint8_t msg1_fdm;
|
||||
uint8_t msg1_frequency_start;
|
||||
uint8_t zero_correlation_zone_config;
|
||||
uint8_t preamble_received_target_power;
|
||||
uint8_t preamble_transmission_max;
|
||||
uint8_t power_ramping_step;
|
||||
uint8_t ra_window_size;
|
||||
|
||||
uint8_t rsrp_threshold_ssb;
|
||||
// PRACH-ResourceDedicatedBFR
|
||||
uint8_t bfr_ssb_index[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
uint8_t bfr_ssb_ra_preamble_index[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
// NZP-CSI-RS-Resource
|
||||
uint8_t bfr_csi_rs_nzp_resource_mapping[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
uint8_t bfr_csi_rs_power_control_offset[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
uint8_t bfr_csi_rs_power_control_offset_ss[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
uint16_t bfr_csi_rs_scrambling_id[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
uint8_t bfr_csi_rs_resource_periodicity[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
uint16_t bfr_csi_rs_resource_offset[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
fapi_nr_tci_state_t qcl_infomation_periodic_csi_rs[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
|
||||
uint8_t bfr_csirs_ra_occasions[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS];
|
||||
uint8_t bfr_csirs_ra_preamble_index[FAPI_NR_MAX_NUM_CANDIDATE_BEAMS][FAPI_NR_MAX_RA_OCCASION_PER_CSIRS];
|
||||
|
||||
uint8_t ssb_per_rach_occasion;
|
||||
uint8_t ra_ssb_occasion_mask_index;
|
||||
fapi_nr_search_space_t recovery_search_space;
|
||||
// RA-Prioritization
|
||||
uint8_t power_ramping_step_high_priority;
|
||||
uint8_t scaling_factor_bi;
|
||||
uint8_t beam_failure_recovery_timer;
|
||||
} fapi_nr_beam_failure_recovery_config_t;
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_pucch_config_dedicated_t pucch_config_dedicated;
|
||||
fapi_nr_pusch_config_dedicated_t pusch_config_dedicated;
|
||||
fapi_nr_configured_grant_config_t configured_grant_config;
|
||||
// SRS-Config
|
||||
uint8_t srs_tpc_accumulation;
|
||||
fapi_nr_beam_failure_recovery_config_t beam_failure_recovery_config;
|
||||
|
||||
} fapi_nr_ul_bwp_dedicated_config_t;
|
||||
|
||||
#define FAPI_NR_CONFIG_REQUEST_MASK_PBCH 0x01
|
||||
#define FAPI_NR_CONFIG_REQUEST_MASK_DL_BWP_COMMON 0x02
|
||||
#define FAPI_NR_CONFIG_REQUEST_MASK_UL_BWP_COMMON 0x04
|
||||
|
||||
@@ -2727,7 +2727,7 @@ typedef struct {
|
||||
} nfapi_cqi_indication_rel8_t;
|
||||
#define NFAPI_CQI_INDICATION_REL8_TAG 0x202f
|
||||
|
||||
#define NFAPI_CC_MAX 4
|
||||
#define NFAPI_CC_MAX MAX_NUM_CCs
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
|
||||
+783
-969
File diff suppressed because it is too large
Load Diff
+1638
-1893
File diff suppressed because it is too large
Load Diff
+2368
-2785
File diff suppressed because it is too large
Load Diff
Executable → Regular
+6269
-7176
File diff suppressed because it is too large
Load Diff
@@ -373,10 +373,10 @@ char interleave_compact_byte(short *base_interleaver,unsigned char *input, unsig
|
||||
short *ptr_intl=base_interleaver;
|
||||
#if defined(__x86_64) || defined(__i386__)
|
||||
#ifndef __AVX2__
|
||||
__m128i tmp;
|
||||
__m128i tmp={0};
|
||||
uint16_t *systematic2_ptr=(uint16_t *) output;
|
||||
#else
|
||||
__m256i tmp;
|
||||
__m256i tmp={0};
|
||||
uint32_t *systematic2_ptr=(uint32_t *) output;
|
||||
#endif
|
||||
#elif defined(__arm__)
|
||||
|
||||
@@ -933,7 +933,7 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y,
|
||||
uint32_t db;
|
||||
|
||||
|
||||
__m256i tmp, zeros=_mm256_setzero_si256();
|
||||
__m256i tmp={0}, zeros=_mm256_setzero_si256();
|
||||
|
||||
|
||||
int offset8_flag=0;
|
||||
|
||||
@@ -1105,7 +1105,7 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y,
|
||||
uint8_t temp;
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i *yp128;
|
||||
__m128i tmp, zeros=_mm_setzero_si128();
|
||||
__m128i tmp={0}, zeros=_mm_setzero_si128();
|
||||
__m128i tmpe;
|
||||
#elif defined(__arm__)
|
||||
int16x8_t *yp128;
|
||||
|
||||
@@ -819,7 +819,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i *yp128;
|
||||
__m128i tmp128[(n+8)>>3];
|
||||
__m128i tmp, zeros=_mm_setzero_si128();
|
||||
__m128i tmp={0}, zeros=_mm_setzero_si128();
|
||||
#elif defined(__arm__)
|
||||
int8x16_t *yp128;
|
||||
int8x16_t tmp128[(n+8)>>3];
|
||||
|
||||
+20
-15
@@ -121,6 +121,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
int i;
|
||||
int Ptx=cfg->carrier_config.num_tx_ant.value;
|
||||
int Prx=cfg->carrier_config.num_rx_ant.value;
|
||||
int max_ul_mimo_layers = 4;
|
||||
|
||||
AssertFatal(Ptx>0 && Ptx<9,"Ptx %d is not supported\n",Ptx);
|
||||
AssertFatal(Prx>0 && Prx<9,"Prx %d is not supported\n",Prx);
|
||||
@@ -293,27 +294,30 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
init_prach_list(gNB);
|
||||
|
||||
int N_RB_UL = cfg->carrier_config.ul_grid_size[cfg->ssb_config.scs_common.value].value;
|
||||
int n_buf = Prx*max_ul_mimo_layers;
|
||||
|
||||
for (int ULSCH_id=0; ULSCH_id<gNB->number_of_nr_ulsch_max; ULSCH_id++) {
|
||||
pusch_vars[ULSCH_id] = (NR_gNB_PUSCH *)malloc16_clear( sizeof(NR_gNB_PUSCH) );
|
||||
pusch_vars[ULSCH_id]->rxdataF_ext = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->rxdataF_ext2 = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates_ext = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates_ext = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ptrs_phase_per_slot = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates_time = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->rxdataF_comp = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_mag0 = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_magb0 = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_mag = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_magb = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->rho = (int32_t **)malloc16_clear(Prx*sizeof(int32_t*) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates_ext = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates_ext = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ptrs_phase_per_slot = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates_time = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->rxdataF_comp = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_mag0 = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_magb0 = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_mag = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->ul_ch_magb = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
|
||||
pusch_vars[ULSCH_id]->rho = (int32_t **)malloc16_clear(n_buf*sizeof(int32_t*) );
|
||||
|
||||
for (i=0; i<Prx; i++) {
|
||||
pusch_vars[ULSCH_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*N_RB_UL*12*fp->symbols_per_slot );
|
||||
pusch_vars[ULSCH_id]->rxdataF_ext2[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*N_RB_UL*12*fp->symbols_per_slot );
|
||||
}
|
||||
for (i=0; i<n_buf; i++) {
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2*fp->symbols_per_slot );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*N_RB_UL*12*fp->symbols_per_slot );
|
||||
pusch_vars[ULSCH_id]->ul_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
|
||||
@@ -339,7 +343,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
{
|
||||
//NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
|
||||
NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
|
||||
NR_gNB_COMMON *const common_vars = &gNB->common_vars;
|
||||
NR_gNB_PUSCH **const pusch_vars = gNB->pusch_vars;
|
||||
/*LTE_eNB_SRS *const srs_vars = gNB->srs_vars;
|
||||
@@ -380,9 +384,11 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
free_and_zero(prach_vars->rxsigF[0]);
|
||||
*/
|
||||
for (int ULSCH_id=0; ULSCH_id<gNB->number_of_nr_ulsch_max; ULSCH_id++) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int i = 0; i < fp->nb_antennas_rx; i++) {
|
||||
free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext[i]);
|
||||
free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext2[i]);
|
||||
}
|
||||
for (int i = 0; i < 4*fp->nb_antennas_rx; i++) {
|
||||
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_estimates[i]);
|
||||
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_estimates_ext[i]);
|
||||
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_estimates_time[i]);
|
||||
@@ -396,7 +402,6 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_magb[i]);
|
||||
free_and_zero(pusch_vars[ULSCH_id]->rho[i]);
|
||||
}
|
||||
|
||||
free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext);
|
||||
free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext2);
|
||||
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_estimates);
|
||||
|
||||
@@ -181,6 +181,16 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////PUCCH init/////////////////////////
|
||||
///////////
|
||||
for (th_id = 0; th_id < RX_NB_TH_MAX; th_id++) {
|
||||
for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
|
||||
ue->pucch_vars[th_id][gNB_id] = (NR_UE_PUCCH *)malloc16(sizeof(NR_UE_PUCCH));
|
||||
for (i=0; i<2; i++)
|
||||
ue->pucch_vars[th_id][gNB_id]->active[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -198,9 +198,8 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg,
|
||||
|
||||
fp->slots_per_frame = 10* fp->slots_per_subframe;
|
||||
|
||||
fp->nb_antenna_ports_gNB = 1; // It corresponds to the number of common antenna ports
|
||||
fp->nb_antennas_rx = cfg->carrier_config.num_rx_ant.value; // It denotes the number of rx antennas at gNB
|
||||
fp->nb_antennas_tx = cfg->carrier_config.num_tx_ant.value; // It corresponds to pdsch_AntennaPorts
|
||||
fp->nb_antennas_tx = cfg->carrier_config.num_tx_ant.value; // It corresponds to pdsch_AntennaPorts (logical antenna ports)
|
||||
|
||||
fp->symbols_per_slot = ((Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
|
||||
fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
|
||||
|
||||
@@ -35,7 +35,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
|
||||
#define SCALE 0x3FFF
|
||||
|
||||
static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
//static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
|
||||
extern unsigned short dftsizes[34];
|
||||
extern int16_t *ul_ref_sigs_rx[30][2][34];
|
||||
|
||||
@@ -1234,7 +1234,7 @@ void dlsch_channel_compensation(int **rxdataF_ext,
|
||||
unsigned short rb;
|
||||
unsigned char aatx,aarx,symbol_mod,pilots=0;
|
||||
__m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0};
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) {
|
||||
@@ -1657,11 +1657,11 @@ void dlsch_channel_compensation_core(int **rxdataF_ext,
|
||||
int length_mod8 = 0;
|
||||
int length2;
|
||||
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0};
|
||||
int aatx = 0, aarx = 0;
|
||||
|
||||
for (aatx=0; aatx<n_tx; aatx++) {
|
||||
__m128i QAM_amp128b;
|
||||
__m128i QAM_amp128b={0};
|
||||
|
||||
if (mod_order == 4) {
|
||||
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
|
||||
@@ -2004,7 +2004,7 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
|
||||
__m128i *dl_ch0_128,*dl_ch1_128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
|
||||
unsigned char aarx=0,symbol_mod,pilots=0;
|
||||
int precoded_signal_strength=0;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0};
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp)))
|
||||
@@ -2411,7 +2411,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int **rxdataF_comp0 = pdsch_vars->rxdataF_comp0;
|
||||
int **rxdataF_comp1 = pdsch_vars->rxdataF_comp1[harq_pid][round];
|
||||
unsigned char *pmi_ext = pdsch_vars->pmi_ext;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp1_128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128={0},QAM_amp1_128={0};
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp)))
|
||||
|
||||
@@ -328,7 +328,7 @@ void mch_channel_compensation(int **rxdataF_ext,
|
||||
int aarx,nre,i;
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
|
||||
#elif defined(__arm__)
|
||||
#endif
|
||||
|
||||
@@ -455,7 +455,7 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
|
||||
int aarx,nre,i;
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
|
||||
#elif defined(__arm__)
|
||||
#endif
|
||||
/*if ((symbol == 2) || (symbol == 6) || (symbol == 10))
|
||||
|
||||
@@ -52,8 +52,7 @@
|
||||
|
||||
|
||||
|
||||
void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch)
|
||||
{
|
||||
void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch) {
|
||||
int i;
|
||||
int r;
|
||||
|
||||
@@ -68,6 +67,7 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch)
|
||||
free16(ulsch->harq_processes[i]->b,MAX_ULSCH_PAYLOAD_BYTES);
|
||||
ulsch->harq_processes[i]->b = NULL;
|
||||
}
|
||||
|
||||
for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) {
|
||||
if (ulsch->harq_processes[i]->c[r]) {
|
||||
free16(ulsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
|
||||
@@ -79,51 +79,47 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch)
|
||||
ulsch->harq_processes[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
free16(ulsch,sizeof(LTE_UE_ULSCH_t));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag)
|
||||
{
|
||||
|
||||
LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag) {
|
||||
LTE_UE_ULSCH_t *ulsch;
|
||||
unsigned char exit_flag = 0,i,j,r;
|
||||
unsigned char bw_scaling =1;
|
||||
|
||||
switch (N_RB_UL) {
|
||||
case 6:
|
||||
bw_scaling =16;
|
||||
break;
|
||||
case 6:
|
||||
bw_scaling =16;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
bw_scaling =4;
|
||||
break;
|
||||
case 25:
|
||||
bw_scaling =4;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
bw_scaling =2;
|
||||
break;
|
||||
|
||||
default:
|
||||
bw_scaling =1;
|
||||
break;
|
||||
case 50:
|
||||
bw_scaling =2;
|
||||
break;
|
||||
|
||||
default:
|
||||
bw_scaling =1;
|
||||
break;
|
||||
}
|
||||
|
||||
ulsch = (LTE_UE_ULSCH_t *)malloc16(sizeof(LTE_UE_ULSCH_t));
|
||||
|
||||
if (ulsch) {
|
||||
memset(ulsch,0,sizeof(LTE_UE_ULSCH_t));
|
||||
|
||||
ulsch->Mlimit = 4;
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
|
||||
ulsch->harq_processes[i] = (LTE_UL_UE_HARQ_t *)malloc16(sizeof(LTE_UL_UE_HARQ_t));
|
||||
|
||||
// printf("ulsch->harq_processes[%d] %p\n",i,ulsch->harq_processes[i]);
|
||||
if (ulsch->harq_processes[i]) {
|
||||
memset(ulsch->harq_processes[i], 0, sizeof(LTE_UL_UE_HARQ_t));
|
||||
ulsch->harq_processes[i]->b = (unsigned char*)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
ulsch->harq_processes[i]->b = (unsigned char *)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
|
||||
if (ulsch->harq_processes[i]->b)
|
||||
memset(ulsch->harq_processes[i]->b,0,MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
@@ -134,7 +130,7 @@ LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag)
|
||||
|
||||
if (abstraction_flag==0) {
|
||||
for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) {
|
||||
ulsch->harq_processes[i]->c[r] = (unsigned char*)malloc16(((r==0)?8:0) + 3+768); // account for filler in first segment and CRCs for multiple segment case
|
||||
ulsch->harq_processes[i]->c[r] = (unsigned char *)malloc16(((r==0)?8:0) + 3+768); // account for filler in first segment and CRCs for multiple segment case
|
||||
|
||||
if (ulsch->harq_processes[i]->c[r])
|
||||
memset(ulsch->harq_processes[i]->c[r],0,((r==0)?8:0) + 3+768);
|
||||
@@ -167,8 +163,6 @@ LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag)
|
||||
LOG_E(PHY,"new_ue_ulsch exit flag, size of %d , %zu\n",exit_flag, sizeof(LTE_UE_ULSCH_t));
|
||||
free_ue_ulsch(ulsch);
|
||||
return(NULL);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -179,15 +173,12 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
uint8_t subframe_rx,
|
||||
uint8_t tmode,
|
||||
uint8_t control_only_flag,
|
||||
uint8_t Nbundled)
|
||||
{
|
||||
|
||||
uint8_t Nbundled) {
|
||||
time_stats_t *seg_stats=&ue->ulsch_segmentation_stats;
|
||||
time_stats_t *rm_stats=&ue->ulsch_rate_matching_stats;
|
||||
time_stats_t *te_stats=&ue->ulsch_turbo_encoding_stats;
|
||||
time_stats_t *i_stats=&ue->ulsch_interleaving_stats;
|
||||
time_stats_t *m_stats=&ue->ulsch_multiplexing_stats;
|
||||
|
||||
// uint16_t offset;
|
||||
uint32_t crc=1;
|
||||
uint32_t A;
|
||||
@@ -237,7 +228,6 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI, VCD_FUNCTION_IN);
|
||||
rnti = ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->crnti;
|
||||
fill_CQI(ulsch,meas,0,harq_pid,ue->frame_parms.N_RB_DL,rnti, tmode,ue->sinr_eff);
|
||||
|
||||
LOG_D(PHY,"ULSCH Encoding rnti %x \n", rnti);
|
||||
print_CQI(ulsch->o,ulsch->uci_format,0,ue->frame_parms.N_RB_DL);
|
||||
|
||||
@@ -246,6 +236,7 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
//LOG_I(PHY,"XXX saving pmi for DL %x\n",pmi2hex_2Ar1(((wideband_cqi_rank1_2A_5MHz *)ulsch->o)->pmi));
|
||||
dlsch[0]->pmi_alloc = ((wideband_cqi_rank1_2A_5MHz *)ulsch->o)->pmi;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI, VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
@@ -268,17 +259,15 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
if (control_only_flag == 0) {
|
||||
A=ulsch->harq_processes[harq_pid]->TBS;
|
||||
Q_m = get_Qm_ul(ulsch->harq_processes[harq_pid]->mcs);
|
||||
|
||||
ulsch->harq_processes[harq_pid]->control_only = 0;
|
||||
|
||||
#ifdef DEBUG_ULSCH_CODING
|
||||
printf("[PHY][UE] ULSCH coding : A %d, Qm %d, mcs %d, harq_pid %d, round %d, RV %d\n",
|
||||
ulsch->harq_processes[harq_pid]->TBS,
|
||||
Q_m,
|
||||
ulsch->harq_processes[harq_pid]->mcs,
|
||||
harq_pid,
|
||||
ulsch->harq_processes[harq_pid]->round,
|
||||
ulsch->harq_processes[harq_pid]->rvidx);
|
||||
ulsch->harq_processes[harq_pid]->TBS,
|
||||
Q_m,
|
||||
ulsch->harq_processes[harq_pid]->mcs,
|
||||
harq_pid,
|
||||
ulsch->harq_processes[harq_pid]->round,
|
||||
ulsch->harq_processes[harq_pid]->rvidx);
|
||||
|
||||
for (i=0; i<ulsch->harq_processes[harq_pid]->O_ACK; i++)
|
||||
printf("ulsch_coding: o_ACK[%d] %d\n",i,ulsch->o_ACK[i]);
|
||||
@@ -301,16 +290,13 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
#endif
|
||||
|
||||
if (ulsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
|
||||
|
||||
start_meas(seg_stats);
|
||||
// Add 24-bit crc (polynomial A) to payload
|
||||
crc = crc24a(a,
|
||||
A)>>8;
|
||||
|
||||
a[A>>3] = ((uint8_t*)&crc)[2];
|
||||
a[1+(A>>3)] = ((uint8_t*)&crc)[1];
|
||||
a[2+(A>>3)] = ((uint8_t*)&crc)[0];
|
||||
|
||||
a[A>>3] = ((uint8_t *)&crc)[2];
|
||||
a[1+(A>>3)] = ((uint8_t *)&crc)[1];
|
||||
a[2+(A>>3)] = ((uint8_t *)&crc)[0];
|
||||
ulsch->harq_processes[harq_pid]->B = A+24;
|
||||
ulsch->harq_processes[harq_pid]->b = a;
|
||||
lte_segmentation(ulsch->harq_processes[harq_pid]->b,
|
||||
@@ -322,7 +308,6 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
&ulsch->harq_processes[harq_pid]->Kplus,
|
||||
&ulsch->harq_processes[harq_pid]->Kminus,
|
||||
&ulsch->harq_processes[harq_pid]->F);
|
||||
|
||||
stop_meas(seg_stats);
|
||||
|
||||
for (r=0; r<ulsch->harq_processes[harq_pid]->C; r++) {
|
||||
@@ -332,25 +317,20 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
Kr = ulsch->harq_processes[harq_pid]->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
|
||||
#ifdef DEBUG_ULSCH_CODING
|
||||
printf("Generating Code Segment %d (%d bits)\n",r,Kr);
|
||||
// generate codewords
|
||||
|
||||
printf("bits_per_codeword (Kr)= %d\n",Kr);
|
||||
printf("N_RB = %d\n",ulsch->harq_processes[harq_pid]->nb_rb);
|
||||
printf("Ncp %d\n",frame_parms->Ncp);
|
||||
printf("Qm %d\n",Q_m);
|
||||
#endif
|
||||
|
||||
// offset=0;
|
||||
|
||||
|
||||
start_meas(te_stats);
|
||||
encoder(ulsch->harq_processes[harq_pid]->c[r],
|
||||
Kr>>3,
|
||||
&ulsch->harq_processes[harq_pid]->d[r][96],
|
||||
(r==0) ? ulsch->harq_processes[harq_pid]->F : 0
|
||||
Kr>>3,
|
||||
&ulsch->harq_processes[harq_pid]->d[r][96],
|
||||
(r==0) ? ulsch->harq_processes[harq_pid]->F : 0
|
||||
);
|
||||
stop_meas(te_stats);
|
||||
#ifdef DEBUG_ULSCH_CODING
|
||||
@@ -366,7 +346,6 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
ulsch->harq_processes[harq_pid]->w[r]);
|
||||
stop_meas(i_stats);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ulsch->harq_processes[harq_pid]->C == 0) {
|
||||
@@ -392,7 +371,6 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
|
||||
ulsch->harq_processes[harq_pid]->sumKr = sumKr;
|
||||
// Compute Q_ri (p. 23 36-212)
|
||||
|
||||
Qprime = ulsch->O_RI*ulsch->harq_processes[harq_pid]->Msc_initial*ulsch->harq_processes[harq_pid]->Nsymb_initial * ulsch->beta_offset_ri_times8;
|
||||
|
||||
if (Qprime > 0) {
|
||||
@@ -407,7 +385,6 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
|
||||
Q_RI = Q_m*Qprime;
|
||||
Qprime_RI = Qprime;
|
||||
|
||||
// Compute Q_ack (p. 23 36-212)
|
||||
Qprime = ulsch->harq_processes[harq_pid]->O_ACK*ulsch->harq_processes[harq_pid]->Msc_initial*ulsch->harq_processes[harq_pid]->Nsymb_initial * ulsch->beta_offset_harqack_times8;
|
||||
|
||||
@@ -423,20 +400,18 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
|
||||
Q_ACK = Qprime * Q_m;
|
||||
Qprime_ACK = Qprime;
|
||||
|
||||
LOG_D(PHY,"UE (%x/%d) O_ACK %d, Mcs_initial %d, Nsymb_initial %d, beta_offset_harqack*8 %d, sum Kr %d, Qprime_ACK %d, Q_ACK %d\n",
|
||||
rnti, harq_pid,
|
||||
ulsch->harq_processes[harq_pid]->O_ACK,
|
||||
ulsch->harq_processes[harq_pid]->Msc_initial,
|
||||
ulsch->harq_processes[harq_pid]->Nsymb_initial,
|
||||
ulsch->beta_offset_harqack_times8,
|
||||
sumKr,
|
||||
Qprime_ACK,
|
||||
Q_ACK);
|
||||
rnti, harq_pid,
|
||||
ulsch->harq_processes[harq_pid]->O_ACK,
|
||||
ulsch->harq_processes[harq_pid]->Msc_initial,
|
||||
ulsch->harq_processes[harq_pid]->Nsymb_initial,
|
||||
ulsch->beta_offset_harqack_times8,
|
||||
sumKr,
|
||||
Qprime_ACK,
|
||||
Q_ACK);
|
||||
|
||||
// Compute Q_cqi, assume O>11, p. 26 36-212
|
||||
if (control_only_flag == 0) {
|
||||
|
||||
if (ulsch->O < 12)
|
||||
L=0;
|
||||
else
|
||||
@@ -446,13 +421,13 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
Qprime = (ulsch->O + L) * ulsch->harq_processes[harq_pid]->Msc_initial*ulsch->harq_processes[harq_pid]->Nsymb_initial * ulsch->beta_offset_cqi_times8;
|
||||
else
|
||||
Qprime = 0;
|
||||
LOG_D(PHY,"Qprime %d, O_RI %d + %d, Msc %d, Nym %d beta %d\n",
|
||||
Qprime,
|
||||
ulsch->O, L,
|
||||
ulsch->harq_processes[harq_pid]->Msc_initial,
|
||||
ulsch->harq_processes[harq_pid]->Nsymb_initial,
|
||||
ulsch->beta_offset_cqi_times8);
|
||||
|
||||
LOG_D(PHY,"Qprime %d, O_RI %d + %d, Msc %d, Nym %d beta %d\n",
|
||||
Qprime,
|
||||
ulsch->O, L,
|
||||
ulsch->harq_processes[harq_pid]->Msc_initial,
|
||||
ulsch->harq_processes[harq_pid]->Nsymb_initial,
|
||||
ulsch->beta_offset_cqi_times8);
|
||||
|
||||
if (Qprime > 0) {
|
||||
if ((Qprime % (8*sumKr)) > 0)
|
||||
@@ -463,31 +438,29 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
|
||||
G = ulsch->harq_processes[harq_pid]->nb_rb * (12 * Q_m) * (ulsch->Nsymb_pusch);
|
||||
LOG_D(PHY,"G: rb %d * ( 12 * Qm %d ) * nsymb %d, Qprime %d, O_RI %d\n", ulsch->harq_processes[harq_pid]->nb_rb, Q_m, ulsch->Nsymb_pusch, Qprime, ulsch->O_RI);
|
||||
|
||||
if (Qprime > (G - ulsch->O_RI))
|
||||
Qprime = G - ulsch->O_RI;
|
||||
|
||||
Q_CQI = Q_m * Qprime;
|
||||
Qprime_CQI = Qprime;
|
||||
|
||||
|
||||
|
||||
G = G - Q_RI - Q_CQI;
|
||||
LOG_D(PHY,"new G: %d, Q_RI %d Q_CQI %d\n", G , Q_RI , Q_CQI);
|
||||
LOG_D(PHY,"new G: %d, Q_RI %d Q_CQI %d\n", G, Q_RI, Q_CQI);
|
||||
ulsch->harq_processes[harq_pid]->G = G;
|
||||
|
||||
/*
|
||||
LOG_I(PHY,"ULSCH Encoding G %d, Q_RI %d (O_RI%d, Msc_initial %d, Nsymb_initial%d, beta_offset_ri_times8 %d), Q_CQI %d, Q_ACK %d \n",G,Q_RI,ulsch->O_RI,ulsch->harq_processes[harq_pid]->Msc_initial,ulsch->harq_processes[harq_pid]->Nsymb_initial,ulsch->beta_offset_ri_times8,Q_CQI,Q_ACK);
|
||||
/*
|
||||
LOG_I(PHY,"ULSCH Encoding G %d, Q_RI %d (O_RI%d, Msc_initial %d, Nsymb_initial%d, beta_offset_ri_times8 %d), Q_CQI %d, Q_ACK %d \n",G,Q_RI,ulsch->O_RI,ulsch->harq_processes[harq_pid]->Msc_initial,ulsch->harq_processes[harq_pid]->Nsymb_initial,ulsch->beta_offset_ri_times8,Q_CQI,Q_ACK);
|
||||
|
||||
LOG_I(PHY,"ULSCH Encoding (Nid_cell %d, rnti %x): harq_pid %d round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d\n",
|
||||
frame_parms->Nid_cell,ulsch->rnti,
|
||||
harq_pid,
|
||||
ulsch->harq_processes[harq_pid]->round,
|
||||
ulsch->harq_processes[harq_pid]->rvidx,
|
||||
ulsch->harq_processes[harq_pid]->mcs,
|
||||
ulsch->O_RI,
|
||||
ulsch->harq_processes[harq_pid]->O_ACK,
|
||||
G);
|
||||
*/
|
||||
LOG_I(PHY,"ULSCH Encoding (Nid_cell %d, rnti %x): harq_pid %d round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d\n",
|
||||
frame_parms->Nid_cell,ulsch->rnti,
|
||||
harq_pid,
|
||||
ulsch->harq_processes[harq_pid]->round,
|
||||
ulsch->harq_processes[harq_pid]->rvidx,
|
||||
ulsch->harq_processes[harq_pid]->mcs,
|
||||
ulsch->O_RI,
|
||||
ulsch->harq_processes[harq_pid]->O_ACK,
|
||||
G);
|
||||
*/
|
||||
|
||||
if ((int)G < 0) {
|
||||
LOG_E(PHY,"FATAL: ulsch_coding.c G < 0 (%d) : Q_RI %d, Q_CQI %d, O %d, betaCQI_times8 %d)\n",G,Q_RI,Q_CQI,ulsch->O,ulsch->beta_offset_cqi_times8);
|
||||
@@ -495,26 +468,21 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
// Data and control multiplexing (5.2.2.7 36-212)
|
||||
|
||||
H = G + Q_CQI;
|
||||
Hprime = H/Q_m;
|
||||
|
||||
|
||||
|
||||
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
|
||||
// outputs for each code segment, see Section 5.1.5 p.20
|
||||
|
||||
for (r=0; r<ulsch->harq_processes[harq_pid]->C; r++) {
|
||||
#ifdef DEBUG_ULSCH_CODING
|
||||
printf("Rate Matching, Code segment %d (coded bits (G) %d,unpunctured/repeated bits per code segment %d,mod_order %d, nb_rb %d)...\n",
|
||||
r,
|
||||
G,
|
||||
Kr*3,
|
||||
Q_m,ulsch->harq_processes[harq_pid]->nb_rb);
|
||||
r,
|
||||
G,
|
||||
Kr*3,
|
||||
Q_m,ulsch->harq_processes[harq_pid]->nb_rb);
|
||||
#endif
|
||||
|
||||
start_meas(rm_stats);
|
||||
r_offset += lte_rate_matching_turbo(ulsch->harq_processes[harq_pid]->RTC[r],
|
||||
G,
|
||||
@@ -529,7 +497,7 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
1,
|
||||
r,
|
||||
ulsch->harq_processes[harq_pid]->nb_rb);
|
||||
//ulsch->harq_processes[harq_pid]->mcs); // r
|
||||
//ulsch->harq_processes[harq_pid]->mcs); // r
|
||||
stop_meas(rm_stats);
|
||||
#ifdef DEBUG_ULSCH_CODING
|
||||
|
||||
@@ -544,7 +512,6 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
Hprime = H/Q_m;
|
||||
}
|
||||
|
||||
|
||||
// Do CQI coding
|
||||
if ((ulsch->O>1) && (ulsch->O < 12)) {
|
||||
LOG_E(PHY,"short CQI sizes not supported yet\n");
|
||||
@@ -558,23 +525,18 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
printf("crc(cqi) tx : %x\n",crc);
|
||||
#endif
|
||||
memset((void *)&ulsch->o_d[0],LTE_NULL,96);
|
||||
|
||||
ccodelte_encode(ulsch->O,
|
||||
1,
|
||||
o_flip,
|
||||
&ulsch->o_d[96],
|
||||
0);
|
||||
|
||||
|
||||
o_RCC = sub_block_interleaving_cc(8+ulsch->O,
|
||||
&ulsch->o_d[96],
|
||||
ulsch->o_w);
|
||||
|
||||
lte_rate_matching_cc(o_RCC,
|
||||
Q_CQI,
|
||||
ulsch->o_w,
|
||||
ulsch->q);
|
||||
|
||||
}
|
||||
|
||||
i=0;
|
||||
@@ -582,29 +544,29 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
// Do RI coding
|
||||
if (ulsch->O_RI == 1) {
|
||||
switch (Q_m) {
|
||||
case 2:
|
||||
ulsch->q_RI[0] = ulsch->o_RI[0];
|
||||
ulsch->q_RI[1] = PUSCH_y;//ulsch->o_RI[0];
|
||||
len_RI=2;
|
||||
break;
|
||||
case 2:
|
||||
ulsch->q_RI[0] = ulsch->o_RI[0];
|
||||
ulsch->q_RI[1] = PUSCH_y;//ulsch->o_RI[0];
|
||||
len_RI=2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
ulsch->q_RI[0] = ulsch->o_RI[0];
|
||||
ulsch->q_RI[1] = PUSCH_y;//1;
|
||||
ulsch->q_RI[2] = PUSCH_x;//ulsch->o_RI[0];
|
||||
ulsch->q_RI[3] = PUSCH_x;//1;
|
||||
len_RI=4;
|
||||
break;
|
||||
case 4:
|
||||
ulsch->q_RI[0] = ulsch->o_RI[0];
|
||||
ulsch->q_RI[1] = PUSCH_y;//1;
|
||||
ulsch->q_RI[2] = PUSCH_x;//ulsch->o_RI[0];
|
||||
ulsch->q_RI[3] = PUSCH_x;//1;
|
||||
len_RI=4;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
ulsch->q_RI[0] = ulsch->o_RI[0];
|
||||
ulsch->q_RI[1] = PUSCH_y;//1;
|
||||
ulsch->q_RI[2] = PUSCH_x;//1;
|
||||
ulsch->q_RI[3] = PUSCH_x;//ulsch->o_RI[0];
|
||||
ulsch->q_RI[4] = PUSCH_x;//1;
|
||||
ulsch->q_RI[5] = PUSCH_x;//1;
|
||||
len_RI=6;
|
||||
break;
|
||||
case 6:
|
||||
ulsch->q_RI[0] = ulsch->o_RI[0];
|
||||
ulsch->q_RI[1] = PUSCH_y;//1;
|
||||
ulsch->q_RI[2] = PUSCH_x;//1;
|
||||
ulsch->q_RI[3] = PUSCH_x;//ulsch->o_RI[0];
|
||||
ulsch->q_RI[4] = PUSCH_x;//1;
|
||||
ulsch->q_RI[5] = PUSCH_x;//1;
|
||||
len_RI=6;
|
||||
break;
|
||||
}
|
||||
} else if (ulsch->O_RI>1) {
|
||||
LOG_E(PHY,"RI cannot be more than 1 bit yet\n");
|
||||
@@ -616,35 +578,35 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
wACK_idx = (ulsch->bundling==0) ? 4 : ((Nbundled-1)&3);
|
||||
#ifdef DEBUG_ULSCH_CODING
|
||||
printf("ulsch_coding.c: Bundling %d, Nbundled %d, wACK_idx %d\n",
|
||||
ulsch->bundling,Nbundled,wACK_idx);
|
||||
ulsch->bundling,Nbundled,wACK_idx);
|
||||
#endif
|
||||
|
||||
// 1-bit ACK/NAK
|
||||
if (ulsch->harq_processes[harq_pid]->O_ACK == 1) {
|
||||
switch (Q_m) {
|
||||
case 2:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->bundling==0)? PUSCH_y : ((ulsch->o_ACK[0]+wACK[wACK_idx][1])&1);//ulsch->o_ACK[0];
|
||||
len_ACK = 2;
|
||||
break;
|
||||
case 2:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->bundling==0)? PUSCH_y : ((ulsch->o_ACK[0]+wACK[wACK_idx][1])&1);//ulsch->o_ACK[0];
|
||||
len_ACK = 2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->bundling==0)? PUSCH_y : ((ulsch->o_ACK[0]+wACK[wACK_idx][1])&1);
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;
|
||||
len_ACK = 4;
|
||||
break;
|
||||
case 4:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->bundling==0)? PUSCH_y : ((ulsch->o_ACK[0]+wACK[wACK_idx][1])&1);
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;
|
||||
len_ACK = 4;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->bundling==0)? PUSCH_y : ((ulsch->o_ACK[0]+wACK[wACK_idx][1])&1);
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;
|
||||
ulsch->q_ACK[4] = PUSCH_x;
|
||||
ulsch->q_ACK[6] = PUSCH_x;
|
||||
len_ACK = 6;
|
||||
break;
|
||||
case 6:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->bundling==0)? PUSCH_y : ((ulsch->o_ACK[0]+wACK[wACK_idx][1])&1);
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;
|
||||
ulsch->q_ACK[4] = PUSCH_x;
|
||||
ulsch->q_ACK[6] = PUSCH_x;
|
||||
len_ACK = 6;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,56 +615,53 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
ack_parity = (ulsch->o_ACK[0]+ulsch->o_ACK[1])&1;
|
||||
|
||||
switch (Q_m) {
|
||||
case 2:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->o_ACK[1]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[2] = (ack_parity+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[3] = (ulsch->o_ACK[0]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[4] = (ulsch->o_ACK[1]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[5] = (ack_parity+wACK[wACK_idx][1])&1;
|
||||
len_ACK = 6;
|
||||
break;
|
||||
case 2:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->o_ACK[1]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[2] = (ack_parity+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[3] = (ulsch->o_ACK[0]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[4] = (ulsch->o_ACK[1]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[5] = (ack_parity+wACK[wACK_idx][1])&1;
|
||||
len_ACK = 6;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->o_ACK[1]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;//1;
|
||||
ulsch->q_ACK[4] = (ack_parity+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[5] = (ulsch->o_ACK[0]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[6] = PUSCH_x;
|
||||
ulsch->q_ACK[7] = PUSCH_x;//1;
|
||||
ulsch->q_ACK[8] = (ulsch->o_ACK[1]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[9] = (ack_parity+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[10] = PUSCH_x;
|
||||
ulsch->q_ACK[11] = PUSCH_x;//1;
|
||||
len_ACK = 12;
|
||||
break;
|
||||
case 4:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->o_ACK[1]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;//1;
|
||||
ulsch->q_ACK[4] = (ack_parity+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[5] = (ulsch->o_ACK[0]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[6] = PUSCH_x;
|
||||
ulsch->q_ACK[7] = PUSCH_x;//1;
|
||||
ulsch->q_ACK[8] = (ulsch->o_ACK[1]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[9] = (ack_parity+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[10] = PUSCH_x;
|
||||
ulsch->q_ACK[11] = PUSCH_x;//1;
|
||||
len_ACK = 12;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->o_ACK[1]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;
|
||||
ulsch->q_ACK[4] = PUSCH_x;
|
||||
ulsch->q_ACK[5] = PUSCH_x;
|
||||
|
||||
ulsch->q_ACK[6] = (ack_parity+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[7] = (ulsch->o_ACK[0]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[8] = PUSCH_x;
|
||||
ulsch->q_ACK[9] = PUSCH_x;
|
||||
ulsch->q_ACK[10] = PUSCH_x;
|
||||
ulsch->q_ACK[11] = PUSCH_x;
|
||||
|
||||
ulsch->q_ACK[12] = (ulsch->o_ACK[1]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[13] = (ack_parity+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[14] = PUSCH_x;
|
||||
ulsch->q_ACK[15] = PUSCH_x;
|
||||
ulsch->q_ACK[16] = PUSCH_x;
|
||||
ulsch->q_ACK[17] = PUSCH_x;
|
||||
len_ACK = 18;
|
||||
|
||||
break;
|
||||
case 6:
|
||||
ulsch->q_ACK[0] = (ulsch->o_ACK[0]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[1] = (ulsch->o_ACK[1]+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[2] = PUSCH_x;
|
||||
ulsch->q_ACK[3] = PUSCH_x;
|
||||
ulsch->q_ACK[4] = PUSCH_x;
|
||||
ulsch->q_ACK[5] = PUSCH_x;
|
||||
ulsch->q_ACK[6] = (ack_parity+wACK[wACK_idx][0])&1;
|
||||
ulsch->q_ACK[7] = (ulsch->o_ACK[0]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[8] = PUSCH_x;
|
||||
ulsch->q_ACK[9] = PUSCH_x;
|
||||
ulsch->q_ACK[10] = PUSCH_x;
|
||||
ulsch->q_ACK[11] = PUSCH_x;
|
||||
ulsch->q_ACK[12] = (ulsch->o_ACK[1]+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[13] = (ack_parity+wACK[wACK_idx][1])&1;
|
||||
ulsch->q_ACK[14] = PUSCH_x;
|
||||
ulsch->q_ACK[15] = PUSCH_x;
|
||||
ulsch->q_ACK[16] = PUSCH_x;
|
||||
ulsch->q_ACK[17] = PUSCH_x;
|
||||
len_ACK = 18;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,23 +671,17 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
// channel multiplexing/interleaving
|
||||
|
||||
start_meas(m_stats);
|
||||
Hpp = Hprime + Q_RI;
|
||||
|
||||
Cmux = ulsch->Nsymb_pusch;
|
||||
Rmux = Hpp*Q_m/Cmux;
|
||||
Rmux_prime = Rmux/Q_m;
|
||||
|
||||
Qprime_RI = Q_RI / Q_m;
|
||||
Qprime_ACK = Q_ACK / Q_m;
|
||||
Qprime_CQI = Q_CQI / Q_m;
|
||||
|
||||
// printf("Qprime_CQI = %d\n",Qprime_CQI);
|
||||
// RI BITS
|
||||
|
||||
memset(y,LTE_NULL,Q_m*Hpp);
|
||||
|
||||
if (frame_parms->Ncp == 0)
|
||||
@@ -747,10 +700,8 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
}
|
||||
|
||||
j=(j+3)&3;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// CQI and Data bits
|
||||
j=0;
|
||||
/*
|
||||
@@ -775,7 +726,6 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
*/
|
||||
|
||||
for (i=0; i<Qprime_CQI; i++) {
|
||||
|
||||
while (y[Q_m*j] != LTE_NULL) j++;
|
||||
|
||||
for (q=0; q<Q_m; q++) {
|
||||
@@ -789,47 +739,44 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
j2 = j*Q_m;
|
||||
|
||||
switch (Q_m) {
|
||||
case 2:
|
||||
for (iprime=0; iprime<(Hprime-Qprime_CQI)<<1; iprime+=2) {
|
||||
while (y[j2] != LTE_NULL) j2+=2;
|
||||
|
||||
case 2:
|
||||
y[j2] = ulsch->e[iprime];
|
||||
y[1+j2] = ulsch->e[1+iprime];
|
||||
j2+=2;
|
||||
}
|
||||
|
||||
for (iprime=0; iprime<(Hprime-Qprime_CQI)<<1; iprime+=2) {
|
||||
while (y[j2] != LTE_NULL) j2+=2;
|
||||
break;
|
||||
|
||||
y[j2] = ulsch->e[iprime];
|
||||
y[1+j2] = ulsch->e[1+iprime];
|
||||
j2+=2;
|
||||
}
|
||||
case 4:
|
||||
for (iprime=0; iprime<(Hprime-Qprime_CQI)<<2; iprime+=4) {
|
||||
while (y[j2] != LTE_NULL) j2+=4;
|
||||
|
||||
break;
|
||||
y[j2] = ulsch->e[iprime];
|
||||
y[1+j2] = ulsch->e[1+iprime];
|
||||
y[2+j2] = ulsch->e[2+iprime];
|
||||
y[3+j2] = ulsch->e[3+iprime];
|
||||
j2+=4;
|
||||
}
|
||||
|
||||
case 4:
|
||||
for (iprime=0; iprime<(Hprime-Qprime_CQI)<<2; iprime+=4) {
|
||||
while (y[j2] != LTE_NULL) j2+=4;
|
||||
break;
|
||||
|
||||
y[j2] = ulsch->e[iprime];
|
||||
y[1+j2] = ulsch->e[1+iprime];
|
||||
y[2+j2] = ulsch->e[2+iprime];
|
||||
y[3+j2] = ulsch->e[3+iprime];
|
||||
j2+=4;
|
||||
}
|
||||
case 6:
|
||||
for (iprime=0; iprime<(Hprime-Qprime_CQI)*6; iprime+=6) {
|
||||
while (y[j2] != LTE_NULL) j2+=6;
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
for (iprime=0; iprime<(Hprime-Qprime_CQI)*6; iprime+=6) {
|
||||
while (y[j2] != LTE_NULL) j2+=6;
|
||||
|
||||
y[j2] = ulsch->e[iprime];
|
||||
y[1+j2] = ulsch->e[1+iprime];
|
||||
y[2+j2] = ulsch->e[2+iprime];
|
||||
y[3+j2] = ulsch->e[3+iprime];
|
||||
y[4+j2] = ulsch->e[4+iprime];
|
||||
y[5+j2] = ulsch->e[5+iprime];
|
||||
j2+=6;
|
||||
}
|
||||
|
||||
break;
|
||||
y[j2] = ulsch->e[iprime];
|
||||
y[1+j2] = ulsch->e[1+iprime];
|
||||
y[2+j2] = ulsch->e[2+iprime];
|
||||
y[3+j2] = ulsch->e[3+iprime];
|
||||
y[4+j2] = ulsch->e[4+iprime];
|
||||
y[5+j2] = ulsch->e[5+iprime];
|
||||
j2+=6;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// HARQ-ACK Bits (Note these overwrite some bits)
|
||||
@@ -848,57 +795,56 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
y[q+(Q_m*((r*Cmux) + columnset[j]))] = ulsch->q_ACK[(q+(Q_m*i))%len_ACK];
|
||||
#ifdef DEBUG_ULSCH_CODING
|
||||
printf("ulsch_coding.c: ACK %d => y[%d]=%d (i %d, r*Cmux %d, columnset %d)\n",q+(Q_m*i),
|
||||
q+(Q_m*((r*Cmux) + columnset[j])),ulsch->q_ACK[(q+(Q_m*i))%len_ACK],
|
||||
i,r*Cmux,columnset[j]);
|
||||
q+(Q_m*((r*Cmux) + columnset[j])),ulsch->q_ACK[(q+(Q_m*i))%len_ACK],
|
||||
i,r*Cmux,columnset[j]);
|
||||
#endif
|
||||
}
|
||||
|
||||
j=(j+3)&3;
|
||||
|
||||
}
|
||||
|
||||
// write out buffer
|
||||
j=0;
|
||||
|
||||
switch (Q_m) {
|
||||
case 2:
|
||||
for (i=0; i<Cmux; i++)
|
||||
for (r=0; r<Rmux_prime; r++) {
|
||||
yptr=&y[((r*Cmux)+i)<<1];
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
}
|
||||
case 2:
|
||||
for (i=0; i<Cmux; i++)
|
||||
for (r=0; r<Rmux_prime; r++) {
|
||||
yptr=&y[((r*Cmux)+i)<<1];
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
for (i=0; i<Cmux; i++)
|
||||
for (r=0; r<Rmux_prime; r++) {
|
||||
yptr = &y[((r*Cmux)+i)<<2];
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
}
|
||||
case 4:
|
||||
for (i=0; i<Cmux; i++)
|
||||
for (r=0; r<Rmux_prime; r++) {
|
||||
yptr = &y[((r*Cmux)+i)<<2];
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
for (i=0; i<Cmux; i++)
|
||||
for (r=0; r<Rmux_prime; r++) {
|
||||
yptr = &y[((r*Cmux)+i)*6];
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
}
|
||||
case 6:
|
||||
for (i=0; i<Cmux; i++)
|
||||
for (r=0; r<Rmux_prime; r++) {
|
||||
yptr = &y[((r*Cmux)+i)*6];
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
ulsch->h[j++] = *yptr++;
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
stop_meas(m_stats);
|
||||
|
||||
@@ -147,7 +147,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) {
|
||||
//
|
||||
// Todo:
|
||||
// - averaging IIR filter for RX power and noise
|
||||
void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol){
|
||||
void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol, uint8_t nrOfLayers){
|
||||
|
||||
int rx_power_tot[NUMBER_OF_NR_ULSCH_MAX];
|
||||
int rx_power[NUMBER_OF_NR_ULSCH_MAX][NB_ANTENNAS_RX];
|
||||
@@ -167,9 +167,9 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq
|
||||
|
||||
rx_power[ulsch_id][aarx] = 0;
|
||||
|
||||
for (int aatx = 0; aatx < fp->nb_antennas_tx; aatx++){
|
||||
for (int aatx = 0; aatx < nrOfLayers; aatx++){
|
||||
|
||||
meas->rx_spatial_power[ulsch_id][aatx][aarx] = (signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][ch_offset], N_RB_UL * NR_NB_SC_PER_RB));
|
||||
meas->rx_spatial_power[ulsch_id][aatx][aarx] = (signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aatx*fp->nb_antennas_rx+aarx][ch_offset], N_RB_UL * NR_NB_SC_PER_RB));
|
||||
|
||||
if (meas->rx_spatial_power[ulsch_id][aatx][aarx] < 0) {
|
||||
meas->rx_spatial_power[ulsch_id][aatx][aarx] = 0;
|
||||
|
||||
@@ -131,8 +131,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
//------------------generate DMRS------------------//
|
||||
|
||||
if (pusch_pdu->transform_precoding == transform_precoder_disabled) {
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, (pusch_pdu->bwp_start + pusch_pdu->rb_start)*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type);
|
||||
// transform precoding = 1 means disabled
|
||||
if (pusch_pdu->transform_precoding == 1) {
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 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
|
||||
|
||||
@@ -173,7 +175,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
pil = (int16_t *)&pilot[0];
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+nushift)];
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset];
|
||||
re_offset = k;
|
||||
|
||||
memset(ul_ch,0,4*(gNB->frame_parms.ofdm_symbol_size));
|
||||
@@ -372,7 +374,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
// check if PRB crosses DC and improve estimates around DC
|
||||
if ((bwp_start_subcarrier < gNB->frame_parms.ofdm_symbol_size) && (bwp_start_subcarrier+nb_rb_pusch*12 >= gNB->frame_parms.ofdm_symbol_size)) {
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset];
|
||||
uint16_t idxDC = 2*(gNB->frame_parms.ofdm_symbol_size - bwp_start_subcarrier);
|
||||
uint16_t idxPil = idxDC/2;
|
||||
re_offset = k;
|
||||
@@ -423,7 +425,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_PUSCH
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset];
|
||||
for(uint16_t idxP=0; idxP<ceil((float)nb_rb_pusch*12/8); idxP++) {
|
||||
for(uint8_t idxI=0; idxI<16; idxI += 2) {
|
||||
printf("%d\t%d\t",ul_ch[idxP*16+idxI],ul_ch[idxP*16+idxI+1]);
|
||||
@@ -513,7 +515,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
ch_r,
|
||||
ul_ch);
|
||||
|
||||
ul_ch_128 = (__m128i *)&ul_ch_estimates[aarx][ch_offset];
|
||||
ul_ch_128 = (__m128i *)&ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset];
|
||||
|
||||
ul_ch_128[0] = _mm_slli_epi16 (ul_ch_128[0], 2);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
|
||||
void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb);
|
||||
|
||||
void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol);
|
||||
void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol, uint8_t nrOfLayers);
|
||||
|
||||
int nr_est_timing_advance_pusch(PHY_VARS_gNB* phy_vars_gNB, int UE_id);
|
||||
|
||||
|
||||
@@ -278,8 +278,9 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
||||
printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\tnb_re %d,nb_layers %d)\n",
|
||||
start_sc, rel15->StartSymbolIndex, rel15->rbSize, nb_re,rel15->nrOfLayers);
|
||||
#endif
|
||||
|
||||
for (int ap=0; ap<rel15->nrOfLayers; ap++) {
|
||||
|
||||
|
||||
// DMRS params for this ap
|
||||
get_Wt(Wt, ap, dmrs_Type);
|
||||
get_Wf(Wf, ap, dmrs_Type);
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
extern short nr_qpsk_mod_table[8];
|
||||
|
||||
uint8_t nr_pbch_payload_interleaving_pattern[32] = {16, 23, 18, 17, 8, 30, 10, 6, 24, 7, 0, 5, 3, 2, 1, 4,
|
||||
const uint8_t nr_pbch_payload_interleaving_pattern[32] = {16, 23, 18, 17, 8, 30, 10, 6, 24, 7, 0, 5, 3, 2, 1, 4,
|
||||
9, 11, 12, 13, 14, 15, 19, 20, 21, 22, 25, 26, 27, 28, 29, 31
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
|
||||
static void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
|
||||
uint32_t Nid,
|
||||
uint8_t nushift,
|
||||
uint16_t M,
|
||||
|
||||
@@ -78,19 +78,6 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
|
||||
nfapi_nr_config_request_scf_t *config,
|
||||
NR_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
/*!
|
||||
\fn int nr_pbch_scrambling
|
||||
\brief PBCH scrambling function
|
||||
@param
|
||||
*/
|
||||
void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
|
||||
uint32_t Nid,
|
||||
uint8_t nushift,
|
||||
uint16_t M,
|
||||
uint16_t length,
|
||||
uint8_t encoded,
|
||||
uint32_t unscrambling_mask);
|
||||
|
||||
/*!
|
||||
\fn int nr_generate_pbch
|
||||
\brief Generation of the PBCH
|
||||
@@ -178,6 +165,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
int32_t *avg,
|
||||
uint8_t symbol,
|
||||
uint32_t len,
|
||||
uint8_t nrOfLayers,
|
||||
unsigned short nb_rb);
|
||||
|
||||
/** \brief This function performs channel compensation (matched filtering) on the received RBs for this allocation. In addition, it computes the squared-magnitude of the channel with weightings for 16QAM/64QAM detection as well as dual-stream detection (cross-correlation)
|
||||
@@ -202,6 +190,7 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
||||
unsigned char symbol,
|
||||
uint8_t is_dmrs_symbol,
|
||||
unsigned char mod_order,
|
||||
uint8_t nrOfLayers,
|
||||
unsigned short nb_rb,
|
||||
unsigned char output_shift);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||
#include "PHY/NR_ESTIMATION/nr_ul_estimation.h"
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
//#define DEBUG_CH_COMP
|
||||
//#define DEBUG_RB_EXT
|
||||
@@ -467,6 +468,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
int32_t *avg,
|
||||
uint8_t symbol,
|
||||
uint32_t len,
|
||||
uint8_t nrOfLayers,
|
||||
unsigned short nb_rb)
|
||||
{
|
||||
|
||||
@@ -474,7 +476,6 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
|
||||
short rb;
|
||||
unsigned char aatx, aarx;
|
||||
char nb_antennas_ue_tx = 1;
|
||||
__m128i *ul_ch128, avg128U;
|
||||
|
||||
int16_t x = factor2(len);
|
||||
@@ -486,12 +487,12 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
int off = 0;
|
||||
#endif
|
||||
|
||||
for (aatx = 0; aatx < nb_antennas_ue_tx; aatx++)
|
||||
for (aatx = 0; aatx < nrOfLayers; aatx++)
|
||||
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
||||
//clear average level
|
||||
avg128U = _mm_setzero_si128();
|
||||
|
||||
ul_ch128=(__m128i *)&ul_ch_estimates_ext[(aatx<<1)+aarx][symbol*(off+(nb_rb*12))];
|
||||
ul_ch128=(__m128i *)&ul_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx+aarx][symbol*(off+(nb_rb*12))];
|
||||
|
||||
for (rb = 0; rb < len/12; rb++) {
|
||||
avg128U = _mm_add_epi32(avg128U, _mm_srai_epi32(_mm_madd_epi16(ul_ch128[0], ul_ch128[0]), x));
|
||||
@@ -500,10 +501,10 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
ul_ch128+=3;
|
||||
}
|
||||
|
||||
avg[(aatx<<1)+aarx] = (((int32_t*)&avg128U)[0] +
|
||||
((int32_t*)&avg128U)[1] +
|
||||
((int32_t*)&avg128U)[2] +
|
||||
((int32_t*)&avg128U)[3] ) / y;
|
||||
avg[aatx*frame_parms->nb_antennas_rx+aarx] = (((int32_t*)&avg128U)[0] +
|
||||
((int32_t*)&avg128U)[1] +
|
||||
((int32_t*)&avg128U)[2] +
|
||||
((int32_t*)&avg128U)[3]) / y;
|
||||
|
||||
}
|
||||
|
||||
@@ -519,13 +520,13 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
for (aatx=0; aatx<frame_parms->nb_antenna_ports_gNB; aatx++) {
|
||||
for (aatx=0; aatx<nrOfLayers; aatx++) {
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
//clear average level
|
||||
avg128U = vdupq_n_s32(0);
|
||||
// 5 is always a symbol with no pilots for both normal and extended prefix
|
||||
|
||||
ul_ch128 = (int16x4_t *)&ul_ch_estimates_ext[(aatx<<1)+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
ul_ch128 = (int16x4_t *)&ul_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
|
||||
for (rb = 0; rb < nb_rb; rb++) {
|
||||
// printf("rb %d : ",rb);
|
||||
@@ -535,7 +536,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
avg128U = vqaddq_s32(avg128U, vmull_s16(ul_ch128[2], ul_ch128[2]));
|
||||
avg128U = vqaddq_s32(avg128U, vmull_s16(ul_ch128[3], ul_ch128[3]));
|
||||
|
||||
if (((symbol_mod == 0) || (symbol_mod == (frame_parms->Ncp-1)))&&(frame_parms->nb_antenna_ports_gNB!=1)) {
|
||||
if (((symbol_mod == 0) || (symbol_mod == (frame_parms->Ncp-1)))&&(nrOfLayers!=1)) {
|
||||
ul_ch128+=4;
|
||||
} else {
|
||||
avg128U = vqaddq_s32(avg128U, vmull_s16(ul_ch128[4], ul_ch128[4]));
|
||||
@@ -557,10 +558,10 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
||||
else
|
||||
nre=12;
|
||||
|
||||
avg[(aatx<<1)+aarx] = (((int32_t*)&avg128U)[0] +
|
||||
((int32_t*)&avg128U)[1] +
|
||||
((int32_t*)&avg128U)[2] +
|
||||
((int32_t*)&avg128U)[3] ) / (nb_rb*nre);
|
||||
avg[aatx*frame_parms->nb_antennas_rx+aarx] = (((int32_t*)&avg128U)[0] +
|
||||
((int32_t*)&avg128U)[1] +
|
||||
((int32_t*)&avg128U)[2] +
|
||||
((int32_t*)&avg128U)[3]) / (nb_rb*nre);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -576,6 +577,7 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
||||
unsigned char symbol,
|
||||
uint8_t is_dmrs_symbol,
|
||||
unsigned char mod_order,
|
||||
uint8_t nrOfLayers,
|
||||
unsigned short nb_rb,
|
||||
unsigned char output_shift) {
|
||||
|
||||
@@ -627,12 +629,11 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
||||
|
||||
unsigned short rb;
|
||||
unsigned char aatx,aarx;
|
||||
char nb_antennas_ue_tx = 1;
|
||||
__m128i *ul_ch128,*ul_ch128_2,*ul_ch_mag128,*ul_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
|
||||
QAM_amp128b = _mm_setzero_si128();
|
||||
|
||||
for (aatx=0; aatx<nb_antennas_ue_tx; aatx++) {
|
||||
for (aatx=0; aatx<nrOfLayers; aatx++) {
|
||||
|
||||
if (mod_order == 4) {
|
||||
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
|
||||
@@ -646,11 +647,11 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
||||
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
|
||||
ul_ch128 = (__m128i *)&ul_ch_estimates_ext[(aatx<<1)+aarx][symbol*(off+(nb_rb*12))];
|
||||
ul_ch_mag128 = (__m128i *)&ul_ch_mag[(aatx<<1)+aarx][symbol*(off+(nb_rb*12))];
|
||||
ul_ch_mag128b = (__m128i *)&ul_ch_magb[(aatx<<1)+aarx][symbol*(off+(nb_rb*12))];
|
||||
ul_ch128 = (__m128i *)&ul_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx+aarx][symbol*(off+(nb_rb*12))];
|
||||
ul_ch_mag128 = (__m128i *)&ul_ch_mag[aatx*frame_parms->nb_antennas_rx+aarx][symbol*(off+(nb_rb*12))];
|
||||
ul_ch_mag128b = (__m128i *)&ul_ch_magb[aatx*frame_parms->nb_antennas_rx+aarx][symbol*(off+(nb_rb*12))];
|
||||
rxdataF128 = (__m128i *)&rxdataF_ext[aarx][symbol*(off+(nb_rb*12))];
|
||||
rxdataF_comp128 = (__m128i *)&rxdataF_comp[(aatx<<1)+aarx][symbol*(off+(nb_rb*12))];
|
||||
rxdataF_comp128 = (__m128i *)&rxdataF_comp[aatx*frame_parms->nb_antennas_rx+aarx][symbol*(off+(nb_rb*12))];
|
||||
|
||||
|
||||
for (rb=0; rb<nb_rb; rb++) {
|
||||
@@ -884,7 +885,7 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) {
|
||||
if (frame_parms->nb_antenna_ports_gNB==1) { // 10 out of 12 so don't reduce size
|
||||
if (nrOfLayers==1) { // 10 out of 12 so don't reduce size
|
||||
nb_rb=1+(5*nb_rb/6);
|
||||
}
|
||||
else {
|
||||
@@ -892,7 +893,7 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
||||
}
|
||||
}
|
||||
|
||||
for (aatx=0; aatx<frame_parms->nb_antenna_ports_gNB; aatx++) {
|
||||
for (aatx=0; aatx<nrOfLayers; aatx++) {
|
||||
if (mod_order == 4) {
|
||||
QAM_amp128 = vmovq_n_s16(QAM16_n1); // 2/sqrt(10)
|
||||
QAM_amp128b = vmovq_n_s16(0);
|
||||
@@ -903,11 +904,11 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
||||
// printf("comp: rxdataF_comp %p, symbol %d\n",rxdataF_comp[0],symbol);
|
||||
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
ul_ch128 = (int16x4_t*)&ul_ch_estimates_ext[(aatx<<1)+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
ul_ch_mag128 = (int16x8_t*)&ul_ch_mag[(aatx<<1)+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
ul_ch_mag128b = (int16x8_t*)&ul_ch_magb[(aatx<<1)+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
ul_ch128 = (int16x4_t*)&ul_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
ul_ch_mag128 = (int16x8_t*)&ul_ch_mag[aatx*frame_parms->nb_antennas_rx+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
ul_ch_mag128b = (int16x8_t*)&ul_ch_magb[aatx*frame_parms->nb_antennas_rx+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
rxdataF128 = (int16x4_t*)&rxdataF_ext[aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
rxdataF_comp128 = (int16x4x2_t*)&rxdataF_comp[(aatx<<1)+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
rxdataF_comp128 = (int16x4x2_t*)&rxdataF_comp[aatx*frame_parms->nb_antennas_rx+aarx][symbol*frame_parms->N_RB_UL*12];
|
||||
|
||||
for (rb=0; rb<nb_rb; rb++) {
|
||||
if (mod_order>2) {
|
||||
@@ -1166,10 +1167,10 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
uint8_t aarx, aatx;
|
||||
uint32_t nb_re_pusch, bwp_start_subcarrier;
|
||||
int avgs;
|
||||
int avg[4];
|
||||
char nb_antennas_ue_tx = 1;
|
||||
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id][0]->harq_processes[harq_pid]->ulsch_pdu;
|
||||
int avg[frame_parms->nb_antennas_rx*rel15_ul->nrOfLayers];
|
||||
|
||||
gNB->pusch_vars[ulsch_id]->dmrs_symbol = INVALID_VALUE;
|
||||
gNB->pusch_vars[ulsch_id]->cl_done = 0;
|
||||
@@ -1189,15 +1190,16 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
if (gNB->pusch_vars[ulsch_id]->dmrs_symbol == INVALID_VALUE)
|
||||
gNB->pusch_vars[ulsch_id]->dmrs_symbol = symbol;
|
||||
|
||||
nr_pusch_channel_estimation(gNB,
|
||||
slot,
|
||||
0, // p
|
||||
symbol,
|
||||
ulsch_id,
|
||||
bwp_start_subcarrier,
|
||||
rel15_ul);
|
||||
for (int nl=0; nl<rel15_ul->nrOfLayers; nl++)
|
||||
nr_pusch_channel_estimation(gNB,
|
||||
slot,
|
||||
get_dmrs_port(nl,rel15_ul->dmrs_ports),
|
||||
symbol,
|
||||
ulsch_id,
|
||||
bwp_start_subcarrier,
|
||||
rel15_ul);
|
||||
|
||||
nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol);
|
||||
nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol,rel15_ul->nrOfLayers);
|
||||
|
||||
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
||||
if (symbol == rel15_ul->start_symbol_index) {
|
||||
@@ -1278,13 +1280,14 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
avg,
|
||||
symbol,
|
||||
nb_re_pusch,
|
||||
rel15_ul->nrOfLayers,
|
||||
rel15_ul->rb_size);
|
||||
|
||||
avgs = 0;
|
||||
|
||||
for (aatx=0;aatx<nb_antennas_ue_tx;aatx++)
|
||||
for (aatx=0;aatx<rel15_ul->nrOfLayers;aatx++)
|
||||
for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++)
|
||||
avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
|
||||
avgs = cmax(avgs,avg[aatx*frame_parms->nb_antennas_rx+aarx]);
|
||||
|
||||
gNB->pusch_vars[ulsch_id]->log2_maxh = (log2_approx(avgs)/2)+3;
|
||||
gNB->pusch_vars[ulsch_id]->cl_done = 1;
|
||||
@@ -1299,11 +1302,12 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
gNB->pusch_vars[ulsch_id]->ul_ch_mag0,
|
||||
gNB->pusch_vars[ulsch_id]->ul_ch_magb0,
|
||||
gNB->pusch_vars[ulsch_id]->rxdataF_comp,
|
||||
(nb_antennas_ue_tx>1) ? gNB->pusch_vars[ulsch_id]->rho : NULL,
|
||||
(rel15_ul->nrOfLayers>1) ? gNB->pusch_vars[ulsch_id]->rho : NULL,
|
||||
frame_parms,
|
||||
symbol,
|
||||
dmrs_symbol_flag,
|
||||
rel15_ul->qam_mod_order,
|
||||
rel15_ul->nrOfLayers,
|
||||
rel15_ul->rb_size,
|
||||
gNB->pusch_vars[ulsch_id]->log2_maxh);
|
||||
stop_meas(&gNB->ulsch_channel_compensation_stats);
|
||||
@@ -1317,7 +1321,8 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
rel15_ul->rb_size);
|
||||
stop_meas(&gNB->ulsch_mrc_stats);
|
||||
|
||||
if (rel15_ul->transform_precoding == transform_precoder_enabled) {
|
||||
// transform precoding = 0 means enabled
|
||||
if (rel15_ul->transform_precoding == 0) {
|
||||
|
||||
#ifdef __AVX2__
|
||||
// For odd number of resource blocks need byte alignment to multiple of 8
|
||||
|
||||
@@ -963,7 +963,8 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
currentPtrDCI);
|
||||
|
||||
n_rnti = rel15->rnti;
|
||||
LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length);
|
||||
LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d)\n",
|
||||
proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length);
|
||||
if (crc == n_rnti) {
|
||||
LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %llx)\n",
|
||||
proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length,*(unsigned long long*)dci_estimation);
|
||||
@@ -978,6 +979,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
dci_ind->slot = proc->nr_slot_rx;
|
||||
dci_ind->dci_list[dci_ind->number_of_dcis].rnti = n_rnti;
|
||||
dci_ind->dci_list[dci_ind->number_of_dcis].n_CCE = CCEind;
|
||||
dci_ind->dci_list[dci_ind->number_of_dcis].N_CCE = L;
|
||||
dci_ind->dci_list[dci_ind->number_of_dcis].dci_format = rel15->dci_format_options[k];
|
||||
dci_ind->dci_list[dci_ind->number_of_dcis].payloadSize = dci_length;
|
||||
memcpy((void*)dci_ind->dci_list[dci_ind->number_of_dcis].payloadBits,(void*)dci_estimation,8);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -813,7 +813,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
|
||||
unsigned short rb;
|
||||
unsigned char aatx,aarx,atx;
|
||||
__m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*dl_ch_mag128r,*rxdataF128,*rxdataF_comp128,*rho128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b,QAM_amp128r;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0},QAM_amp128r={0};
|
||||
|
||||
uint32_t nb_rb_0 = length/12 + ((length%12)?1:0);
|
||||
for (aatx=0; aatx<nb_aatx; aatx++) {
|
||||
@@ -1305,7 +1305,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
|
||||
int length_mod8 = 0;
|
||||
int length2;
|
||||
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
|
||||
int aatx = 0, aarx = 0;
|
||||
|
||||
for (aatx=0; aatx<n_tx; aatx++) {
|
||||
@@ -2879,10 +2879,10 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp,
|
||||
*
|
||||
*
|
||||
**************************************************************************/
|
||||
__m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128b_0,*dl_ch_mag128r_0,*determ_fin_128;//*dl_ch_mag128_1,*dl_ch_mag128b_1,*dl_ch_mag128r_1
|
||||
__m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0=NULL,*dl_ch_mag128b_0=NULL,*dl_ch_mag128r_0=NULL,*determ_fin_128;//*dl_ch_mag128_1,*dl_ch_mag128b_1,*dl_ch_mag128r_1
|
||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3;
|
||||
__m128i *after_mf_a_128,*after_mf_b_128, *after_mf_c_128, *after_mf_d_128;
|
||||
__m128i QAM_amp128,QAM_amp128b,QAM_amp128r;
|
||||
__m128i QAM_amp128={0},QAM_amp128b={0},QAM_amp128r={0};
|
||||
|
||||
determ_fin_128 = (__m128i *)&determ_fin[0];
|
||||
|
||||
|
||||
@@ -374,8 +374,6 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames)
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
ue->is_synchronized_on_frame = is; // to notify on which of the two frames sync was successful
|
||||
|
||||
if (ue->UE_scan_carrier == 0) {
|
||||
|
||||
#if UE_AUTOTEST_TRACE
|
||||
|
||||
@@ -328,7 +328,7 @@ void nr_pbch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
|
||||
#endif
|
||||
}
|
||||
|
||||
void nr_pbch_unscrambling(NR_UE_PBCH *pbch,
|
||||
static void nr_pbch_unscrambling(NR_UE_PBCH *pbch,
|
||||
uint16_t Nid,
|
||||
uint8_t nushift,
|
||||
uint16_t M,
|
||||
@@ -549,7 +549,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
|
||||
|
||||
nr_ue_pbch_vars->pbch_a_prime = a_reversed;
|
||||
//payload un-scrambling
|
||||
memset(&nr_ue_pbch_vars->pbch_a_interleaved, 0, sizeof(uint32_t) );
|
||||
nr_ue_pbch_vars->pbch_a_interleaved=0;
|
||||
M = (Lmax == 64)? (NR_POLAR_PBCH_PAYLOAD_BITS - 6) : (NR_POLAR_PBCH_PAYLOAD_BITS - 3);
|
||||
nushift = ((nr_ue_pbch_vars->pbch_a_prime>>24)&1) ^ (((nr_ue_pbch_vars->pbch_a_prime>>6)&1)<<1);
|
||||
nr_pbch_unscrambling(nr_ue_pbch_vars,frame_parms->Nid_cell,nushift,M,NR_POLAR_PBCH_PAYLOAD_BITS,1,unscrambling_mask);
|
||||
@@ -607,7 +607,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
|
||||
uint16_t number_pdus = 1;
|
||||
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, number_pdus);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, NULL, number_pdus);
|
||||
|
||||
if (ue->if_inst && ue->if_inst->dl_indication)
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
|
||||
@@ -1476,11 +1476,13 @@ void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp,
|
||||
@param dl_Carrier DL carrier to be set
|
||||
@param freq_offset Freq offset to be set
|
||||
*/
|
||||
void nr_rf_card_config(openair0_config_t *openair0_cfg,
|
||||
double rx_gain_off,
|
||||
uint64_t ul_Carrier,
|
||||
uint64_t dl_Carrier,
|
||||
int freq_offset);
|
||||
void nr_rf_card_config_gain(openair0_config_t *openair0_cfg,
|
||||
double rx_gain_off);
|
||||
|
||||
void nr_rf_card_config_freq(openair0_config_t *openair0_cfg,
|
||||
uint64_t ul_Carrier,
|
||||
uint64_t dl_Carrier,
|
||||
int freq_offset);
|
||||
|
||||
|
||||
void print_CQI(void *o,UCI_format_t uci_format,uint8_t eNB_id,int N_RB_DL);
|
||||
|
||||
@@ -56,34 +56,6 @@ typedef enum {
|
||||
RETRANSMISSION_HARQ
|
||||
} harq_result_t;
|
||||
|
||||
//#if defined(UPGRADE_RAT_NR)
|
||||
#if 1
|
||||
typedef struct {
|
||||
/// HARQ process id
|
||||
uint8_t harq_id;
|
||||
/// HARQ rx status
|
||||
harq_result_t rx_status;
|
||||
/// ACK bits (after decoding) 0:NACK / 1:ACK / 2:DTX
|
||||
uint8_t ack;
|
||||
/// send status (for PUCCH)
|
||||
uint8_t send_harq_status;
|
||||
/// nCCE (for PUCCH)
|
||||
uint8_t nCCE;
|
||||
/// DAI value detected from DCI1/1a/1b/1d/2/2a/2b/2c. 0xff indicates not touched
|
||||
uint8_t vDAI_DL;
|
||||
/// DAI value detected from DCI0/4. 0xff indicates not touched
|
||||
uint8_t vDAI_UL;
|
||||
/// allow to define pucch parameters TS 38.213 9.2.3 UE procedure for reporting HARQ-ACK
|
||||
uint8_t pucch_resource_indicator;
|
||||
/// slot on which feedback ack should be send to network
|
||||
uint16_t slot_for_feedback_ack;
|
||||
/// index of a first CCE for the PDCCH reception
|
||||
uint8_t n_CCE;
|
||||
/// number of CCEs in a control resource set of a PDCCH reception conveying DCI format 1_0
|
||||
uint8_t N_CCE;
|
||||
} NR_UE_HARQ_STATUS_t;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
/// NDAPI struct for UE
|
||||
nfapi_nr_ue_pusch_pdu_t pusch_pdu;
|
||||
@@ -319,7 +291,7 @@ typedef struct {
|
||||
/// codeword this transport block is mapped to
|
||||
uint8_t codeword;
|
||||
/// HARQ-ACKs
|
||||
NR_UE_HARQ_STATUS_t harq_ack;
|
||||
uint8_t ack;
|
||||
/// PTRS Frequency Density
|
||||
uint8_t PTRSFreqDensity;
|
||||
/// PTRS Time Density
|
||||
|
||||
@@ -48,11 +48,9 @@ void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uin
|
||||
|
||||
}
|
||||
|
||||
void nr_rf_card_config(openair0_config_t *openair0_cfg,
|
||||
double rx_gain_offset,
|
||||
uint64_t ul_carrier,
|
||||
uint64_t dl_carrier,
|
||||
int freq_offset){
|
||||
|
||||
void nr_rf_card_config_gain(openair0_config_t *openair0_cfg,
|
||||
double rx_gain_off){
|
||||
|
||||
uint8_t mod_id = 0;
|
||||
uint8_t cc_id = 0;
|
||||
@@ -61,6 +59,36 @@ void nr_rf_card_config(openair0_config_t *openair0_cfg,
|
||||
double rx_gain = ue->rx_total_gain_dB;
|
||||
double tx_gain = ue->tx_total_gain_dB;
|
||||
|
||||
for (int i = rf_chain; i < rf_chain + 4; i++) {
|
||||
|
||||
if (tx_gain)
|
||||
openair0_cfg->tx_gain[i] = tx_gain;
|
||||
if (rx_gain)
|
||||
openair0_cfg->rx_gain[i] = rx_gain - rx_gain_off;
|
||||
|
||||
openair0_cfg->autocal[i] = 1;
|
||||
|
||||
if (i < openair0_cfg->rx_num_channels) {
|
||||
LOG_I(PHY, "HW: Configuring channel %d (rf_chain %d): setting tx_gain %f, rx_gain %f\n",
|
||||
i,
|
||||
rf_chain,
|
||||
openair0_cfg->tx_gain[i],
|
||||
openair0_cfg->rx_gain[i]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void nr_rf_card_config_freq(openair0_config_t *openair0_cfg,
|
||||
uint64_t ul_carrier,
|
||||
uint64_t dl_carrier,
|
||||
int freq_offset){
|
||||
|
||||
uint8_t mod_id = 0;
|
||||
uint8_t cc_id = 0;
|
||||
PHY_VARS_NR_UE *ue = PHY_vars_UE_g[mod_id][cc_id];
|
||||
int rf_chain = ue->rf_map.chain;
|
||||
|
||||
for (int i = rf_chain; i < rf_chain + 4; i++) {
|
||||
|
||||
if (i < openair0_cfg->rx_num_channels)
|
||||
@@ -73,22 +101,15 @@ void nr_rf_card_config(openair0_config_t *openair0_cfg,
|
||||
else
|
||||
openair0_cfg->tx_freq[i] = 0.0;
|
||||
|
||||
if (tx_gain)
|
||||
openair0_cfg->tx_gain[i] = tx_gain;
|
||||
if (rx_gain)
|
||||
openair0_cfg->rx_gain[i] = rx_gain - rx_gain_offset;
|
||||
|
||||
openair0_cfg->autocal[i] = 1;
|
||||
|
||||
if (i < openair0_cfg->rx_num_channels) {
|
||||
LOG_I(PHY, "HW: Configuring channel %d (rf_chain %d): setting tx_gain %f, rx_gain %f, tx_freq %f Hz, rx_freq %f Hz\n",
|
||||
LOG_I(PHY, "HW: Configuring channel %d (rf_chain %d): setting tx_freq %f Hz, rx_freq %f Hz\n",
|
||||
i,
|
||||
rf_chain,
|
||||
openair0_cfg->tx_gain[i],
|
||||
openair0_cfg->rx_gain[i],
|
||||
openair0_cfg->tx_freq[i],
|
||||
openair0_cfg->rx_freq[i]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,14 +252,15 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint8_t u = 0, v = 0;
|
||||
int16_t *dmrs_seq = NULL;
|
||||
|
||||
if (pusch_pdu->transform_precoding == transform_precoder_enabled) {
|
||||
// if transform precoding is enbaled (value 0)
|
||||
if (pusch_pdu->transform_precoding == 0) {
|
||||
|
||||
uint32_t nb_re_pusch=nb_rb * NR_NB_SC_PER_RB;
|
||||
uint32_t y_offset = 0;
|
||||
uint16_t num_dmrs_res_per_symbol = nb_rb*(NR_NB_SC_PER_RB/2);
|
||||
|
||||
// Calculate index to dmrs seq array based on number of DMRS Subcarriers on this symbol
|
||||
index = get_index_for_dmrs_lowpapr_seq(num_dmrs_res_per_symbol);
|
||||
index = get_index_for_dmrs_lowpapr_seq(num_dmrs_res_per_symbol);
|
||||
u = pusch_pdu->dfts_ofdm.low_papr_group_number;
|
||||
v = pusch_pdu->dfts_ofdm.low_papr_sequence_number;
|
||||
dmrs_seq = dmrs_lowpaprtype1_ul_ref_sig[u][v][index];
|
||||
@@ -297,7 +298,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
}
|
||||
|
||||
printf("NR_ULSCH_UE: numSym: %d, num_dmrs_sym: %d", number_of_symbols,number_dmrs_symbols);
|
||||
for (int ll = 0; ll < (number_of_symbols-number_dmrs_symbols); ll++) {
|
||||
for (int ll = 0; ll < (number_of_symbols-number_dmrs_symbols); ll++) {
|
||||
|
||||
nr_idft(&debug_symbols[offset], nb_re_pusch);
|
||||
|
||||
@@ -353,8 +354,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
if ((ul_dmrs_symb_pos >> l) & 0x01) {
|
||||
is_dmrs_sym = 1;
|
||||
|
||||
|
||||
if (pusch_pdu->transform_precoding == transform_precoder_disabled){
|
||||
// transform precoding disabled (value 1)
|
||||
if (pusch_pdu->transform_precoding == 1){
|
||||
|
||||
if (dmrs_type == pusch_dmrs_type1)
|
||||
dmrs_idx = (pusch_pdu->bwp_start + start_rb)*6;
|
||||
@@ -371,9 +372,9 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
}
|
||||
|
||||
|
||||
} else if (pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
|
||||
} else if (pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
|
||||
|
||||
AssertFatal(pusch_pdu->transform_precoding == transform_precoder_disabled, "PTRS NOT SUPPORTED IF TRANSFORM PRECODING IS ENABLED\n");
|
||||
AssertFatal(pusch_pdu->transform_precoding == 1, "PTRS NOT SUPPORTED IF TRANSFORM PRECODING IS ENABLED\n");
|
||||
|
||||
if(is_ptrs_symbol(l, ulsch_ue->ptrs_symbols)) {
|
||||
is_ptrs_sym = 1;
|
||||
@@ -404,8 +405,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
}
|
||||
|
||||
if (is_dmrs == 1) {
|
||||
|
||||
if (pusch_pdu->transform_precoding == transform_precoder_enabled) {
|
||||
// if transform precoding is enabled
|
||||
if (pusch_pdu->transform_precoding == 0) {
|
||||
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = (Wt[l_prime[0]]*Wf[k_prime]*AMP*dmrs_seq[2*dmrs_idx]) >> 15;
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1] = (Wt[l_prime[0]]*Wf[k_prime]*AMP*dmrs_seq[(2*dmrs_idx) + 1]) >> 15;
|
||||
|
||||
@@ -54,16 +54,10 @@
|
||||
void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
long pucch_GroupHopping,
|
||||
long hoppingId,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t m0,
|
||||
uint8_t mcs,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint16_t startingPRB,
|
||||
uint16_t secondHopPRB) {
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu) {
|
||||
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch0] start function at slot(nr_slot_tx)=%d\n",nr_slot_tx);
|
||||
#endif
|
||||
@@ -97,21 +91,31 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
|
||||
// the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1
|
||||
uint8_t u[2]={0,0},v[2]={0,0};
|
||||
|
||||
LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, mcs %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->mcs);
|
||||
|
||||
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch0] sequence generation: variable initialization for test\n");
|
||||
#endif
|
||||
// x_n contains the sequence r_u_v_alpha_delta(n)
|
||||
int16_t x_n_re[2][24],x_n_im[2][24];
|
||||
|
||||
uint16_t startingPRB = pucch_pdu->prb_start + pucch_pdu->bwp_start;
|
||||
pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||
|
||||
// we proceed to calculate alpha according to TS 38.211 Subclause 6.3.2.2.2
|
||||
int prb_offset[2]={startingPRB,startingPRB};
|
||||
nr_group_sequence_hopping(pucch_GroupHopping,hoppingId,0,nr_slot_tx,&u[0],&v[0]); // calculating u and v value
|
||||
if (startingPRB!=secondHopPRB) {
|
||||
nr_group_sequence_hopping(pucch_GroupHopping,hoppingId,1,nr_slot_tx,&u[1],&v[1]); // calculating u and v value
|
||||
prb_offset[1] = secondHopPRB;
|
||||
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,nr_slot_tx,&u[0],&v[0]); // calculating u and v value
|
||||
if (pucch_pdu->freq_hop_flag == 1) {
|
||||
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,1,nr_slot_tx,&u[1],&v[1]); // calculating u and v value
|
||||
prb_offset[1] = pucch_pdu->second_hop_prb;
|
||||
}
|
||||
for (int l=0; l<nrofSymbols; l++) {
|
||||
alpha = nr_cyclic_shift_hopping(hoppingId,m0,mcs,l,startingSymbolIndex,nr_slot_tx);
|
||||
for (int l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
||||
alpha = nr_cyclic_shift_hopping(pucch_pdu->hopping_id,
|
||||
pucch_pdu->initial_cyclic_shift,
|
||||
pucch_pdu->mcs,l,
|
||||
pucch_pdu->start_symbol_index,
|
||||
nr_slot_tx);
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch0] sequence generation \tu=%d \tv=%d \talpha=%lf \t(for symbol l=%d)\n",u[l],v[l],alpha,l);
|
||||
#endif
|
||||
@@ -135,8 +139,8 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
|
||||
uint32_t re_offset=0;
|
||||
uint8_t l2;
|
||||
|
||||
for (int l=0; l<nrofSymbols; l++) {
|
||||
l2=l+startingSymbolIndex;
|
||||
for (int l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
||||
l2=l+pucch_pdu->start_symbol_index;
|
||||
re_offset = (12*prb_offset[l]) + frame_parms->first_carrier_offset;
|
||||
if (re_offset>= frame_parms->ofdm_symbol_size)
|
||||
re_offset-=frame_parms->ofdm_symbol_size;
|
||||
@@ -168,20 +172,20 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
|
||||
void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint64_t payload,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t m0,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint16_t startingPRB,
|
||||
uint16_t startingPRB_intraSlotHopping,
|
||||
uint8_t timeDomainOCC,
|
||||
uint8_t nr_bit) {
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu) {
|
||||
|
||||
uint16_t m0 = pucch_pdu->initial_cyclic_shift;
|
||||
uint64_t payload = pucch_pdu->payload;
|
||||
uint8_t startingSymbolIndex = pucch_pdu->start_symbol_index;
|
||||
uint8_t nrofSymbols = pucch_pdu->nr_of_symbols;
|
||||
uint16_t startingPRB = pucch_pdu->prb_start + pucch_pdu->bwp_start;
|
||||
uint8_t timeDomainOCC = pucch_pdu->time_domain_occ_idx;
|
||||
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch1] start function at slot(nr_slot_tx)=%d payload=%lu m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d startingPRB_intraSlotHopping=%d timeDomainOCC=%d nr_bit=%d\n",
|
||||
nr_slot_tx,payload,m0,nrofSymbols,startingSymbolIndex,startingPRB,startingPRB_intraSlotHopping,timeDomainOCC,nr_bit);
|
||||
printf("\t [nr_generate_pucch1] start function at slot(nr_slot_tx)=%d payload=%lu m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d second_hop_prb=%d timeDomainOCC=%d nr_bit=%d\n",
|
||||
nr_slot_tx,payload,m0,nrofSymbols,startingSymbolIndex,startingPRB,pucch_pdu->second_hop_prb,timeDomainOCC,pucch_pdu->n_bit);
|
||||
#endif
|
||||
/*
|
||||
* Implement TS 38.211 Subclause 6.3.2.4.1 Sequence modulation
|
||||
@@ -190,12 +194,12 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
|
||||
int16_t d_re=0, d_im=0;
|
||||
|
||||
if (nr_bit == 1) { // using BPSK if M_bit=1 according to TC 38.211 Subclause 5.1.2
|
||||
if (pucch_pdu->n_bit == 1) { // using BPSK if M_bit=1 according to TC 38.211 Subclause 5.1.2
|
||||
d_re = (payload&1)==0 ? (int16_t)(((int32_t)amp*ONE_OVER_SQRT2)>>15) : -(int16_t)(((int32_t)amp*ONE_OVER_SQRT2)>>15);
|
||||
d_im = (payload&1)==0 ? (int16_t)(((int32_t)amp*ONE_OVER_SQRT2)>>15) : -(int16_t)(((int32_t)amp*ONE_OVER_SQRT2)>>15);
|
||||
}
|
||||
|
||||
if (nr_bit == 2) { // using QPSK if M_bit=2 according to TC 38.211 Subclause 5.1.2
|
||||
if (pucch_pdu->n_bit == 2) { // using QPSK if M_bit=2 according to TC 38.211 Subclause 5.1.2
|
||||
if (((payload&1)==0) && (((payload>>1)&1)==0)) {
|
||||
d_re = (int16_t)(((int32_t)amp*ONE_OVER_SQRT2)>>15); // 32767/sqrt(2) = 23170 (ONE_OVER_SQRT2)
|
||||
d_im = (int16_t)(((int32_t)amp*ONE_OVER_SQRT2)>>15);
|
||||
@@ -256,7 +260,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
//uint8_t PUCCH_Frequency_Hopping = 0 ; // from higher layers
|
||||
uint8_t intraSlotFrequencyHopping = 0;
|
||||
|
||||
if (startingPRB != startingPRB_intraSlotHopping) {
|
||||
if (pucch_pdu->freq_hop_flag) {
|
||||
intraSlotFrequencyHopping=1;
|
||||
}
|
||||
|
||||
@@ -287,8 +291,9 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
printf("\t [nr_generate_pucch1] entering function nr_group_sequence_hopping with n_hop=%d, nr_slot_tx=%d\n",
|
||||
n_hop,nr_slot_tx);
|
||||
#endif
|
||||
nr_group_sequence_hopping(ue->pucch_config_common_nr->pucch_GroupHopping,ue->pucch_config_common_nr->hoppingId,n_hop,nr_slot_tx,&u,&v); // calculating u and v value
|
||||
alpha = nr_cyclic_shift_hopping(ue->pucch_config_common_nr->hoppingId,m0,mcs,l,lprime,nr_slot_tx);
|
||||
pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,n_hop,nr_slot_tx,&u,&v); // calculating u and v value
|
||||
alpha = nr_cyclic_shift_hopping(pucch_pdu->hopping_id,m0,mcs,l,lprime,nr_slot_tx);
|
||||
|
||||
for (int n=0; n<12; n++) {
|
||||
r_u_v_alpha_delta_re[n] = (int16_t)(((((int32_t)(round(32767*cos(alpha*n))) * table_5_2_2_2_2_Re[u][n])>>15)
|
||||
@@ -441,7 +446,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
if ((intraSlotFrequencyHopping == 1) && (l<floor(nrofSymbols/2))) { // intra-slot hopping enabled, we need to calculate new offset PRB
|
||||
startingPRB = startingPRB + startingPRB_intraSlotHopping;
|
||||
startingPRB = startingPRB + pucch_pdu->second_hop_prb;
|
||||
}
|
||||
|
||||
if ((startingPRB < (frame_parms->N_RB_DL>>1)) && ((frame_parms->N_RB_DL & 1) == 0)) { // if number RBs in bandwidth is even and current PRB is lower band
|
||||
@@ -834,7 +839,7 @@ inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,
|
||||
c = (uint8_t)((s>>i)&1);
|
||||
btildep[i] = (((B>>i)&1) ^ c);
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t\t\t btilde[%d]=%lx from unscrambled bit %d and scrambling %d (%x)\n",i+(iprime<<5),btilde[i],((B>>i)&1),c,s>>i);
|
||||
printf("\t\t\t btilde[%d]=%x from unscrambled bit %d and scrambling %d (%x)\n",i+(iprime<<5),btilde[i],((B>>i)&1),c,s>>i);
|
||||
#endif
|
||||
}
|
||||
M_bit3-=32;
|
||||
@@ -848,7 +853,7 @@ inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,
|
||||
}
|
||||
void nr_uci_encoding(uint64_t payload,
|
||||
uint8_t nr_bit,
|
||||
pucch_format_nr_t fmt,
|
||||
int fmt,
|
||||
uint8_t is_pi_over_2_bpsk_enabled,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t nrofPRB,
|
||||
@@ -868,9 +873,9 @@ void nr_uci_encoding(uint64_t payload,
|
||||
// E is the rate matching output sequence length as given in TS 38.212 subclause 6.3.1.4.1
|
||||
uint16_t E=0,E_init;
|
||||
|
||||
if (fmt == pucch_format2_nr) E = 16*nrofSymbols*nrofPRB;
|
||||
if (fmt == 2) E = 16*nrofSymbols*nrofPRB;
|
||||
|
||||
if (fmt == pucch_format3_nr) {
|
||||
if (fmt == 3) {
|
||||
E_init = (is_pi_over_2_bpsk_enabled == 0) ? 24:12;
|
||||
|
||||
if (nrofSymbols == 4) {
|
||||
@@ -895,7 +900,7 @@ void nr_uci_encoding(uint64_t payload,
|
||||
}
|
||||
}
|
||||
|
||||
if (fmt == pucch_format4_nr) {
|
||||
if (fmt == 4) {
|
||||
E_init = (is_pi_over_2_bpsk_enabled == 0) ? 24:12;
|
||||
|
||||
if (nrofSymbols == 4) {
|
||||
@@ -953,28 +958,24 @@ void nr_uci_encoding(uint64_t payload,
|
||||
}
|
||||
//#if 0
|
||||
void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
uint16_t crnti,
|
||||
uint32_t dmrs_scrambling_id,
|
||||
uint32_t data_scrambling_id,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint64_t payload,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint8_t nrofPRB,
|
||||
uint16_t startingPRB,
|
||||
uint8_t nr_bit) {
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu) {
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch2] start function at slot(nr_slot_tx)=%d with payload=%lu and nr_bit=%d\n",nr_slot_tx, payload, nr_bit);
|
||||
printf("\t [nr_generate_pucch2] start function at slot(nr_slot_tx)=%d with payload=%lu and nr_bit=%d\n",nr_slot_tx, pucch_pdu->payload, pucch_pdu->n_bit);
|
||||
#endif
|
||||
// b is the block of bits transmitted on the physical channel after payload coding
|
||||
uint64_t b[16]; // limit to 1024-bit encoded length
|
||||
// M_bit is the number of bits of block b (payload after encoding)
|
||||
uint16_t M_bit;
|
||||
nr_uci_encoding(payload,nr_bit,pucch_format2_nr,0,nrofSymbols,nrofPRB,1,0,0,&b[0],&M_bit);
|
||||
nr_uci_encoding(pucch_pdu->payload,
|
||||
pucch_pdu->n_bit,
|
||||
2,0,
|
||||
pucch_pdu->nr_of_symbols,
|
||||
pucch_pdu->prb_size,
|
||||
1,0,0,&b[0],&M_bit);
|
||||
/*
|
||||
* Implementing TS 38.211
|
||||
* Subclauses 6.3.2.5.1 Scrambling (PUCCH format 2)
|
||||
@@ -989,14 +990,14 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
*/
|
||||
uint8_t *btilde = malloc(sizeof(int8_t)*M_bit);
|
||||
// rnti is given by the C-RNTI
|
||||
uint16_t rnti=crnti;
|
||||
uint16_t rnti=pucch_pdu->rnti;
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch2] rnti = %d ,\n",rnti);
|
||||
#endif
|
||||
/*
|
||||
* Implementing TS 38.211 Subclause 6.3.2.5.1 scrambling format 2
|
||||
*/
|
||||
nr_pucch2_3_4_scrambling(M_bit,rnti,data_scrambling_id,&b[0],btilde);
|
||||
nr_pucch2_3_4_scrambling(M_bit,rnti,pucch_pdu->data_scrambling_id,&b[0],btilde);
|
||||
/*
|
||||
* Implementing TS 38.211 Subclause 6.3.2.5.2 modulation format 2
|
||||
* btilde shall be modulated as described in subclause 5.1 using QPSK
|
||||
@@ -1042,9 +1043,12 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
uint32_t x1, x2, s=0;
|
||||
int i=0;
|
||||
int m=0;
|
||||
uint8_t startingSymbolIndex = pucch_pdu->start_symbol_index;
|
||||
uint16_t startingPRB = pucch_pdu->prb_start + pucch_pdu->bwp_start;
|
||||
|
||||
for (int l=0; l<nrofSymbols; l++) {
|
||||
x2 = (((1<<17)*((14*nr_slot_tx) + (l+startingSymbolIndex) + 1)*((2*dmrs_scrambling_id) + 1)) + (2*dmrs_scrambling_id))%(1U<<31); // c_init calculation according to TS38.211 subclause
|
||||
for (int l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
||||
// c_init calculation according to TS38.211 subclause
|
||||
x2 = (((1<<17)*((14*nr_slot_tx) + (l+startingSymbolIndex) + 1)*((2*pucch_pdu->dmrs_scrambling_id) + 1)) + (2*pucch_pdu->dmrs_scrambling_id))%(1U<<31);
|
||||
|
||||
int reset = 1;
|
||||
for (int ii=0; ii<=(startingPRB>>2); ii++) {
|
||||
@@ -1052,7 +1056,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
reset = 0;
|
||||
}
|
||||
m = 0;
|
||||
for (int rb=0; rb<nrofPRB; rb++) {
|
||||
for (int rb=0; rb<pucch_pdu->prb_size; rb++) {
|
||||
//startingPRB = startingPRB + rb;
|
||||
if (((rb+startingPRB) < (frame_parms->N_RB_DL>>1)) && ((frame_parms->N_RB_DL & 1) == 0)) { // if number RBs in bandwidth is even and current PRB is lower band
|
||||
re_offset = ((l+startingSymbolIndex)*frame_parms->ofdm_symbol_size) + (12*(rb+startingPRB)) + frame_parms->first_carrier_offset;
|
||||
@@ -1124,52 +1128,53 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
//#if 0
|
||||
void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
uint16_t crnti,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
pucch_format_nr_t fmt,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint64_t payload,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint8_t nrofPRB,
|
||||
uint16_t startingPRB,
|
||||
uint16_t startingPRB_intraSlotHopping,
|
||||
uint8_t nr_bit,
|
||||
uint8_t occ_length_format4,
|
||||
uint8_t occ_index_format4) {
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu) {
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch3_4] start function at slot(nr_slot_tx)=%d with payload=%lu and nr_bit=%d\n", nr_slot_tx, payload, nr_bit);
|
||||
printf("\t [nr_generate_pucch3_4] start function at slot(nr_slot_tx)=%d with payload=%lu and nr_bit=%d\n", nr_slot_tx, pucch_pdu->payload, pucch_pdu->n_bit);
|
||||
#endif
|
||||
// b is the block of bits transmitted on the physical channel after payload coding
|
||||
uint64_t b[16];
|
||||
// M_bit is the number of bits of block b (payload after encoding)
|
||||
uint16_t M_bit;
|
||||
// parameter PUCCH-F4-preDFT-OCC-length set of {2,4} -> to use table -1 or -2
|
||||
uint8_t n_SF_PUCCH_s = 2; // in format 4, n_SF_PUCCH_s = {2,4}, provided by higher layer parameter PUCCH-F4-preDFT-OCC-length (in format 3 n_SF_PUCCH_s=1), FIXME!!!
|
||||
uint8_t is_pi_over_2_bpsk_enabled = 0; // this value has to be provided by higher layers parameter
|
||||
// in format 4, n_SF_PUCCH_s = {2,4}, provided by higher layer parameter PUCCH-F4-preDFT-OCC-length (in format 3 n_SF_PUCCH_s=1)
|
||||
uint8_t n_SF_PUCCH_s;
|
||||
if (pucch_pdu->format_type == 3)
|
||||
n_SF_PUCCH_s = 1;
|
||||
else
|
||||
n_SF_PUCCH_s = pucch_pdu->pre_dft_occ_len;
|
||||
uint8_t is_pi_over_2_bpsk_enabled = pucch_pdu->pi_2bpsk;
|
||||
// Intra-slot frequency hopping shall be assumed when the higher-layer parameter intraSlotFrequencyHopping is provided,
|
||||
// regardless of whether the frequency-hop distance is zero or not,
|
||||
// otherwise no intra-slot frequency hopping shall be assumed
|
||||
//uint8_t PUCCH_Frequency_Hopping = 0 ; // from higher layers
|
||||
uint8_t intraSlotFrequencyHopping = 0;
|
||||
|
||||
if (startingPRB != startingPRB_intraSlotHopping) {
|
||||
if (pucch_pdu->freq_hop_flag) {
|
||||
intraSlotFrequencyHopping=1;
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch3_4] intraSlotFrequencyHopping=%d \n",intraSlotFrequencyHopping);
|
||||
#endif
|
||||
}
|
||||
|
||||
// add_dmrs indicates if we are using or not Additional DM-RS for formats 3 and 4. From higher layers. FIXME!!!
|
||||
uint8_t add_dmrs = 0;
|
||||
uint8_t nrofSymbols = pucch_pdu->nr_of_symbols;
|
||||
uint16_t nrofPRB = pucch_pdu->prb_size;
|
||||
uint16_t startingPRB = pucch_pdu->prb_start + pucch_pdu->bwp_start;
|
||||
uint8_t add_dmrs = pucch_pdu->add_dmrs_flag;
|
||||
|
||||
//nrofPRB = 2; // only for test purposes
|
||||
if (fmt == pucch_format4_nr) nrofPRB = 1;
|
||||
|
||||
nr_uci_encoding(payload,nr_bit,fmt,is_pi_over_2_bpsk_enabled,nrofSymbols,nrofPRB,n_SF_PUCCH_s,intraSlotFrequencyHopping,add_dmrs,&b[0],&M_bit);
|
||||
nr_uci_encoding(pucch_pdu->payload,
|
||||
pucch_pdu->n_bit,
|
||||
pucch_pdu->format_type,
|
||||
is_pi_over_2_bpsk_enabled,
|
||||
nrofSymbols,nrofPRB,
|
||||
n_SF_PUCCH_s,
|
||||
intraSlotFrequencyHopping,
|
||||
add_dmrs,
|
||||
&b[0],&M_bit);
|
||||
/*
|
||||
* Implementing TS 38.211
|
||||
* Subclauses 6.3.2.6.1 Scrambling (PUCCH formats 3 and 4)
|
||||
@@ -1184,7 +1189,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
*/
|
||||
uint8_t *btilde = malloc(sizeof(int8_t)*M_bit);
|
||||
// rnti is given by the C-RNTI
|
||||
uint16_t rnti=crnti, n_id=0;
|
||||
uint16_t rnti=pucch_pdu->rnti, n_id=0;
|
||||
#ifdef DEBUG_NR_PUCCH_TX
|
||||
printf("\t [nr_generate_pucch3_4] rnti = %d ,\n",rnti);
|
||||
#endif
|
||||
@@ -1300,12 +1305,11 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{0, 0, 0, 1, 1, 1, 0, 0, 0,-1,-1,-1}
|
||||
};
|
||||
//uint8_t occ_Length = occ_length_format4; // higher layer parameter occ-Length
|
||||
uint8_t occ_Index = occ_index_format4; // higher layer parameter occ-Index
|
||||
|
||||
uint8_t occ_Index = pucch_pdu->pre_dft_occ_idx; // higher layer parameter occ-Index
|
||||
|
||||
//occ_Index = 1; //only for testing purposes; to be removed FIXME!!!
|
||||
if (fmt == pucch_format3_nr) { // no block-wise spreading for format 3
|
||||
n_SF_PUCCH_s = 1;
|
||||
if (pucch_pdu->format_type == 3) { // no block-wise spreading for format 3
|
||||
|
||||
for (int l=0; l < floor(m_symbol/(12*nrofPRB)); l++) {
|
||||
for (int k=0; k < (12*nrofPRB); k++) {
|
||||
@@ -1319,7 +1323,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
if (fmt == pucch_format4_nr) {
|
||||
if (pucch_pdu->format_type == 4) {
|
||||
nrofPRB = 1;
|
||||
|
||||
for (int l=0; l < floor((n_SF_PUCCH_s*m_symbol)/(12*nrofPRB)); l++) {
|
||||
@@ -1414,9 +1418,9 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
uint8_t m0;
|
||||
uint8_t mcs=0;
|
||||
|
||||
if (fmt == pucch_format3_nr) m0 = 0;
|
||||
if (pucch_pdu->format_type == 3) m0 = 0;
|
||||
|
||||
if (fmt == pucch_format4_nr) {
|
||||
if (pucch_pdu->format_type == 4) {
|
||||
if (n_SF_PUCCH_s == 2) {
|
||||
m0 = (occ_Index == 0) ? 0 : 6;
|
||||
}
|
||||
@@ -1456,7 +1460,8 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
for (int l=0; l<nrofSymbols; l++) {
|
||||
if ((intraSlotFrequencyHopping == 1) && (l >= (int)floor(nrofSymbols/2))) n_hop = 1; // n_hop = 1 for second hop
|
||||
|
||||
nr_group_sequence_hopping(ue->pucch_config_common_nr->pucch_GroupHopping,ue->pucch_config_common_nr->hoppingId,n_hop,nr_slot_tx,&u,&v); // calculating u and v value
|
||||
pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,n_hop,nr_slot_tx,&u,&v); // calculating u and v value
|
||||
|
||||
// Next we proceed to calculate base sequence for DM-RS signal, according to TS 38.211 subclause 6.4.1.33
|
||||
if (nrofPRB >= 3) { // TS 38.211 subclause 5.2.2.1 (Base sequences of length 36 or larger) applies
|
||||
@@ -1501,12 +1506,13 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t startingSymbolIndex = pucch_pdu->start_symbol_index;
|
||||
uint16_t j=0;
|
||||
alpha = nr_cyclic_shift_hopping(ue->pucch_config_common_nr->hoppingId,m0,mcs,l,startingSymbolIndex,nr_slot_tx);
|
||||
alpha = nr_cyclic_shift_hopping(pucch_pdu->hopping_id,m0,mcs,l,startingSymbolIndex,nr_slot_tx);
|
||||
|
||||
for (int rb=0; rb<nrofPRB; rb++) {
|
||||
if ((intraSlotFrequencyHopping == 1) && (l<floor(nrofSymbols/2))) { // intra-slot hopping enabled, we need to calculate new offset PRB
|
||||
startingPRB = startingPRB + startingPRB_intraSlotHopping;
|
||||
startingPRB = startingPRB + pucch_pdu->second_hop_prb;
|
||||
}
|
||||
|
||||
//startingPRB = startingPRB + rb;
|
||||
|
||||
@@ -49,65 +49,30 @@
|
||||
void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
long pucch_GroupHopping,
|
||||
long hoppingId,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t m0,
|
||||
uint8_t mcs,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint16_t startingPRB,
|
||||
uint16_t secondHopPRB);
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu);
|
||||
|
||||
void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint64_t payload,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t m0,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint16_t startingPRB,
|
||||
uint16_t startingPRB_intraSlotHopping,
|
||||
uint8_t timeDomainOCC,
|
||||
uint8_t nr_bit);
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu);
|
||||
|
||||
void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
uint16_t crnti,
|
||||
uint32_t dmrs_scrambling_id,
|
||||
uint32_t data_scrambling_id,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint64_t payload,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint8_t nrofPRB,
|
||||
uint16_t startingPRB,
|
||||
uint8_t nr_bit);
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu);
|
||||
|
||||
void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
uint16_t crnti,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
pucch_format_nr_t fmt,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint64_t payload,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint8_t nrofPRB,
|
||||
uint16_t startingPRB,
|
||||
uint16_t startingPRB_intraSlotHopping,
|
||||
uint8_t nr_bit,
|
||||
uint8_t occ_length_format4,
|
||||
uint8_t occ_index_format4);
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_pdu);
|
||||
|
||||
// tables for mcs values for different payloads
|
||||
static const uint8_t table1_mcs[]={0,6,3,9};
|
||||
|
||||
@@ -894,7 +894,7 @@ void phy_scope_nrUE(OAI_phy_scope_t *form,
|
||||
static void *nrUEscopeThread(void *arg) {
|
||||
PHY_VARS_NR_UE *ue=(PHY_VARS_NR_UE *)arg;
|
||||
size_t stksize;
|
||||
pthread_attr_t atr;
|
||||
pthread_attr_t atr={0};
|
||||
pthread_attr_getstacksize(&atr, &stksize);
|
||||
pthread_attr_setstacksize(&atr,32*1024*1024 );
|
||||
int fl_argc=1;
|
||||
|
||||
@@ -235,6 +235,11 @@ typedef struct {
|
||||
int32_t *txdataF_layers[NR_MAX_NB_LAYERS];
|
||||
} NR_UE_PUSCH;
|
||||
|
||||
typedef struct {
|
||||
bool active[2];
|
||||
fapi_nr_ul_config_pucch_pdu pucch_pdu[2];
|
||||
} NR_UE_PUCCH;
|
||||
|
||||
typedef struct {
|
||||
/// \brief Holds the transmit data in time domain.
|
||||
/// For IFFT_FPGA this points to the same memory as PHY_vars->tx_vars[a].TX_DMA_BUFFER.
|
||||
@@ -761,8 +766,6 @@ typedef struct {
|
||||
int UE_fo_compensation;
|
||||
/// \brief Indicator that UE is synchronized to a gNB
|
||||
int is_synchronized;
|
||||
/// \brief Indicates on which frame is synchronized in a two frame synchronization
|
||||
int is_synchronized_on_frame;
|
||||
/// \brief Indicator that UE lost frame synchronization
|
||||
int lost_sync;
|
||||
/// Data structure for UE process scheduling
|
||||
@@ -810,6 +813,7 @@ typedef struct {
|
||||
NR_UE_PDCCH *pdcch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_PUSCH *pusch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_PUCCH *pucch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_DLSCH_t *dlsch[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX][NR_MAX_NB_CODEWORDS]; // two RxTx Threads
|
||||
NR_UE_ULSCH_t *ulsch[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX][NR_MAX_NB_CODEWORDS]; // two code words
|
||||
NR_UE_DLSCH_t *dlsch_SI[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
@@ -960,15 +964,10 @@ typedef struct {
|
||||
/// PUSCH contention-based access vars
|
||||
PUSCH_CA_CONFIG_DEDICATED pusch_ca_config_dedicated[NUMBER_OF_eNB_MAX]; // lola
|
||||
|
||||
/// PUCCH variables
|
||||
|
||||
PUCCH_CONFIG_DEDICATED pucch_config_dedicated[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
|
||||
//#if defined(UPGRADE_RAT_NR)
|
||||
#if 1
|
||||
SystemInformationBlockType1_nr_t systemInformationBlockType1_nr;
|
||||
PUCCH_ConfigCommon_nr_t pucch_config_common_nr[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
PUCCH_Config_t pucch_config_dedicated_nr[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
#endif
|
||||
|
||||
uint8_t ncs_cell[20][7];
|
||||
@@ -1072,6 +1071,7 @@ typedef struct {
|
||||
typedef struct nr_rxtx_thread_data_s {
|
||||
UE_nr_rxtx_proc_t proc;
|
||||
PHY_VARS_NR_UE *UE;
|
||||
NR_UE_SCHED_MODE_t ue_sched_mode;
|
||||
notifiedFIFO_t txFifo;
|
||||
} nr_rxtx_thread_data_t;
|
||||
|
||||
|
||||
@@ -427,23 +427,10 @@ typedef struct {
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define MAX_NR_OF_PUCCH_P0_PER_SET (8)
|
||||
#define NUMBER_PUCCH_FORMAT_NR (5)
|
||||
|
||||
typedef int8_t power_level_t; /* INTEGER (-16..15) */
|
||||
|
||||
typedef struct {
|
||||
uint8_t p0_PUCCH_Id; /* INTEGER (1..8) */
|
||||
power_level_t p0_PUCCH_Value;
|
||||
} P0_PUCCH_t;
|
||||
|
||||
typedef struct {
|
||||
power_level_t deltaF_PUCCH_f[NUMBER_PUCCH_FORMAT_NR];
|
||||
P0_PUCCH_t *p0_Set[MAX_NR_OF_PUCCH_P0_PER_SET];
|
||||
// pathlossReferenceRSs SEQUENCE (SIZE (1..maxNrofPUCCH-PathlossReferenceRSs)) OF PUCCH-PathlossReferenceRS OPTIONAL, -- Need M
|
||||
int8_t twoPUCCH_PC_AdjustmentStates;
|
||||
|
||||
} PUCCH_PowerControl_t;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -633,9 +620,10 @@ typedef struct {
|
||||
PUCCH_FormatConfig_t *formatConfig[NUMBER_PUCCH_FORMAT_NR-1]; /* format 0 is not there */
|
||||
uint8_t dl_DataToUL_ACK[NB_DL_DATA_TO_UL_ACK]; /* table TS 38.213 Table 9.2.3-1: Mapping of PSDCH-to-HARQ_feedback timing indicator field values to numbers of slots */
|
||||
void *spatial_Relation_Info[MAX_NR_OF_SPATIAL_RELATION_INFOS];
|
||||
PUCCH_PowerControl_t pucch_PowerControl;
|
||||
} PUCCH_Config_t;
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* FUNCTIONALITY : Scheduling Request Configuration (SR)
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
#define __openair_TYPES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+c)
|
||||
|
||||
#endif /*__openair_TYPES_H__ */
|
||||
|
||||
@@ -61,6 +61,8 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
uint16_t frame,uint8_t subframe,uint8_t srs_present);
|
||||
|
||||
void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
|
||||
void handle_ulsch_harq_pdu(
|
||||
PHY_VARS_eNB *eNB,
|
||||
int UE_id,
|
||||
@@ -68,7 +70,9 @@ void handle_ulsch_harq_pdu(
|
||||
nfapi_ul_config_ulsch_harq_information *harq_information,
|
||||
uint16_t frame,
|
||||
uint8_t subframe);
|
||||
|
||||
void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu,
|
||||
uint8_t *sdu) ;
|
||||
void handle_ulsch_cqi_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe);
|
||||
|
||||
void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_config_harq_information *harq_information);
|
||||
|
||||
@@ -49,9 +49,6 @@
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
extern int oai_nfapi_nr_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
|
||||
|
||||
void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
|
||||
|
||||
uint16_t max_preamble[4]={0},max_preamble_energy[4]={0},max_preamble_delay[4]={0};
|
||||
|
||||
@@ -575,8 +575,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
|
||||
if (pucch) {
|
||||
if ((pucch->active == 1) &&
|
||||
(pucch->frame == frame_rx) &&
|
||||
(pucch->slot == slot_rx) ) {
|
||||
(pucch->frame == frame_rx) &&
|
||||
(pucch->slot == slot_rx) ) {
|
||||
|
||||
pucch_decode_done = 1;
|
||||
|
||||
@@ -597,7 +597,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
LOG_D(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
|
||||
|
||||
nr_decode_pucch0(gNB,
|
||||
frame_rx,
|
||||
frame_rx,
|
||||
slot_rx,
|
||||
uci_pdu_format0,
|
||||
pucch_pdu);
|
||||
@@ -639,9 +639,9 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
(ulsch->rnti > 0)) {
|
||||
// for for an active HARQ process
|
||||
for (harq_pid=0;harq_pid<NR_MAX_ULSCH_HARQ_PROCESSES;harq_pid++) {
|
||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
|
||||
if ((ulsch_harq->status == NR_ACTIVE) &&
|
||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
|
||||
if ((ulsch_harq->status == NR_ACTIVE) &&
|
||||
(ulsch_harq->frame == frame_rx) &&
|
||||
(ulsch_harq->slot == slot_rx) &&
|
||||
(ulsch_harq->handled == 0)){
|
||||
|
||||
@@ -417,6 +417,7 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
||||
uint8_t gNB_id,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
NR_UE_DLSCH_t *dlsch0,
|
||||
NR_UE_DLSCH_t *dlsch1,
|
||||
uint16_t n_pdus);
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ const char *ul_pdu_type[]={"PRACH", "PUCCH", "PUSCH", "SRS"};
|
||||
|
||||
int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
|
||||
bool found = false;
|
||||
if(scheduled_response != NULL){
|
||||
|
||||
module_id_t module_id = scheduled_response->module_id;
|
||||
@@ -59,7 +60,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
NR_UE_DLSCH_t *dlsch0 = NULL;
|
||||
NR_UE_PDCCH *pdcch_vars = PHY_vars_UE_g[module_id][cc_id]->pdcch_vars[thread_id][0];
|
||||
NR_UE_ULSCH_t *ulsch0 = PHY_vars_UE_g[module_id][cc_id]->ulsch[thread_id][0][0];
|
||||
NR_DL_FRAME_PARMS frame_parms = PHY_vars_UE_g[module_id][cc_id]->frame_parms;
|
||||
NR_UE_PUCCH *pucch_vars = PHY_vars_UE_g[module_id][cc_id]->pucch_vars[thread_id][0];
|
||||
|
||||
if(scheduled_response->dl_config != NULL){
|
||||
fapi_nr_dl_config_request_t *dl_config = scheduled_response->dl_config;
|
||||
@@ -118,26 +119,19 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
dlsch0_harq->mcs = dlsch_config_pdu->mcs;
|
||||
dlsch0_harq->rvidx = dlsch_config_pdu->rv;
|
||||
dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
|
||||
dlsch0_harq->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id;
|
||||
dlsch0_harq->harq_ack.slot_for_feedback_ack = (slot+dlsch_config_pdu->pdsch_to_harq_feedback_time_ind)%frame_parms.slots_per_frame;
|
||||
|
||||
//get nrOfLayers from DCI info
|
||||
uint8_t Nl = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (dlsch_config_pdu->dmrs_ports[i] >= i) Nl += 1;
|
||||
}
|
||||
dlsch0_harq->Nl = Nl;
|
||||
|
||||
dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
|
||||
dlsch0_harq->harq_ack.rx_status = downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch0->rnti_type);
|
||||
downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch0->rnti_type);
|
||||
if (dlsch0_harq->status != ACTIVE) {
|
||||
// dlsch0_harq->status not ACTIVE may be due to false retransmission. Reset the
|
||||
// following flag to skip PDSCH procedures in that case.
|
||||
dlsch0->active = 0;
|
||||
dlsch0_harq->harq_ack.ack = 1;
|
||||
dlsch0_harq->harq_ack.send_harq_status = 1;
|
||||
}
|
||||
dlsch0_harq->harq_ack.vDAI_DL = dlsch_config_pdu->dai;
|
||||
/* PTRS */
|
||||
dlsch0_harq->PTRSFreqDensity = dlsch_config_pdu->PTRSFreqDensity;
|
||||
dlsch0_harq->PTRSTimeDensity = dlsch_config_pdu->PTRSTimeDensity;
|
||||
@@ -145,7 +139,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
dlsch0_harq->nEpreRatioOfPDSCHToPTRS = dlsch_config_pdu->nEpreRatioOfPDSCHToPTRS;
|
||||
dlsch0_harq->PTRSReOffset = dlsch_config_pdu->PTRSReOffset;
|
||||
dlsch0_harq->pduBitmap = dlsch_config_pdu->pduBitmap;
|
||||
LOG_D(MAC, ">>>> \tdlsch0->g_pucch = %d\tdlsch0_harq.mcs = %d\tpdsch_to_harq_feedback_time_ind = %d\tslot_for_feedback_ack = %d\n", dlsch0->g_pucch, dlsch0_harq->mcs, dlsch_config_pdu->pdsch_to_harq_feedback_time_ind, dlsch0_harq->harq_ack.slot_for_feedback_ack);
|
||||
LOG_D(MAC, ">>>> \tdlsch0->g_pucch = %d\tdlsch0_harq.mcs = %d\n", dlsch0->g_pucch, dlsch0_harq->mcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,7 +155,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
AssertFatal(ul_config->ul_config_list[i].pdu_type <= FAPI_NR_UL_CONFIG_TYPES,"pdu_type %d out of bounds\n",ul_config->ul_config_list[i].pdu_type);
|
||||
LOG_D(PHY, "In %s: processing %s PDU of %d total UL PDUs (ul_config %p) \n", __FUNCTION__, ul_pdu_type[ul_config->ul_config_list[i].pdu_type - 1], ul_config->number_pdus, ul_config);
|
||||
|
||||
uint8_t pdu_type = ul_config->ul_config_list[i].pdu_type, pucch_resource_id, current_harq_pid, format, gNB_id = 0;
|
||||
uint8_t pdu_type = ul_config->ul_config_list[i].pdu_type, current_harq_pid, gNB_id = 0;
|
||||
/* PRACH */
|
||||
//NR_PRACH_RESOURCES_t *prach_resources;
|
||||
fapi_nr_ul_config_prach_pdu *prach_config_pdu;
|
||||
@@ -169,9 +163,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu;
|
||||
/* PUCCH */
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_config_pdu;
|
||||
PUCCH_ConfigCommon_nr_t *pucch_config_common_nr;
|
||||
PUCCH_Config_t *pucch_config_dedicated_nr;
|
||||
PUCCH_format_t *format_params;
|
||||
|
||||
switch (pdu_type){
|
||||
|
||||
@@ -209,47 +200,19 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
break;
|
||||
|
||||
case (FAPI_NR_UL_CONFIG_TYPE_PUCCH):
|
||||
// pucch config pdu
|
||||
found = false;
|
||||
pucch_config_pdu = &ul_config->ul_config_list[i].pucch_config_pdu;
|
||||
pucch_resource_id = 0; //FIXME!!!
|
||||
format = 1; // FIXME!!!
|
||||
pucch_config_common_nr = &PHY_vars_UE_g[module_id][cc_id]->pucch_config_common_nr[0];
|
||||
pucch_config_dedicated_nr = &PHY_vars_UE_g[module_id][cc_id]->pucch_config_dedicated_nr[0];
|
||||
format_params = &pucch_config_dedicated_nr->PUCCH_Resource[pucch_resource_id]->format_parameters;
|
||||
|
||||
format_params->initialCyclicShift = pucch_config_pdu->initialCyclicShift;
|
||||
format_params->nrofSymbols = pucch_config_pdu->nrofSymbols;
|
||||
format_params->startingSymbolIndex = pucch_config_pdu->startingSymbolIndex;
|
||||
format_params->nrofPRBs = pucch_config_pdu->nrofPRBs;
|
||||
format_params->timeDomainOCC = pucch_config_pdu->timeDomainOCC;
|
||||
format_params->occ_length = pucch_config_pdu->occ_length;
|
||||
format_params->occ_Index = pucch_config_pdu->occ_Index;
|
||||
|
||||
pucch_config_dedicated_nr->PUCCH_Resource[pucch_resource_id]->startingPRB = pucch_config_pdu->startingPRB;
|
||||
pucch_config_dedicated_nr->PUCCH_Resource[pucch_resource_id]->intraSlotFrequencyHopping = pucch_config_pdu->intraSlotFrequencyHopping;
|
||||
pucch_config_dedicated_nr->PUCCH_Resource[pucch_resource_id]->secondHopPRB = pucch_config_pdu->secondHopPRB; // Not sure this parameter is used
|
||||
pucch_config_dedicated_nr->formatConfig[format - 1]->additionalDMRS = pucch_config_pdu->additionalDMRS; // At this point we need to know which format is going to be used
|
||||
pucch_config_dedicated_nr->formatConfig[format - 1]->pi2PBSK = pucch_config_pdu->pi2PBSK;
|
||||
|
||||
pucch_config_common_nr->pucch_GroupHopping = pucch_config_pdu->pucch_GroupHopping;
|
||||
pucch_config_common_nr->hoppingId = pucch_config_pdu->hoppingId;
|
||||
pucch_config_common_nr->p0_nominal = pucch_config_pdu->p0_nominal;
|
||||
|
||||
/* pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->format_parameters.initialCyclicShift = pucch_config_pdu->initialCyclicShift;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->format_parameters.nrofSymbols = pucch_config_pdu->nrofSymbols;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->format_parameters.startingSymbolIndex = pucch_config_pdu->startingSymbolIndex;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->format_parameters.nrofPRBs = pucch_config_pdu->nrofPRBs;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->startingPRB = pucch_config_pdu->startingPRB;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->format_parameters.timeDomainOCC = pucch_config_pdu->timeDomainOCC;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->format_parameters.occ_length = pucch_config_pdu->occ_length;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->format_parameters.occ_Index = pucch_config_pdu->occ_Index;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->intraSlotFrequencyHopping = pucch_config_pdu->intraSlotFrequencyHopping;
|
||||
pucch_config_dedicated->PUCCH_Resource[pucch_resource_id]->secondHopPRB = pucch_config_pdu->secondHopPRB; // Not sure this parameter is used
|
||||
pucch_config_dedicated->formatConfig[format-1]->additionalDMRS = pucch_config_pdu->additionalDMRS; // At this point we need to know which format is going to be used
|
||||
pucch_config_dedicated->formatConfig[format-1]->pi2PBSK = pucch_config_pdu->pi2PBSK;
|
||||
pucch_config_common->pucch_GroupHopping = pucch_config_pdu->pucch_GroupHopping;
|
||||
pucch_config_common->hoppingId = pucch_config_pdu->hoppingId;
|
||||
pucch_config_common->p0_nominal = pucch_config_pdu->p0_nominal;*/
|
||||
for(int j=0; j<2; j++) {
|
||||
if(pucch_vars->active[j] == false) {
|
||||
LOG_D(PHY,"%d.%d Copying pucch pdu to UE PHY\n",scheduled_response->frame,slot);
|
||||
memcpy((void*)&(pucch_vars->pucch_pdu[j]), (void*)pucch_config_pdu, sizeof(fapi_nr_ul_config_pucch_pdu));
|
||||
pucch_vars->active[j] = true;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
LOG_E(PHY, "Couldn't find allocation for PUCCH PDU in PUCCH VARS\n");
|
||||
break;
|
||||
|
||||
case (FAPI_NR_UL_CONFIG_TYPE_PRACH):
|
||||
|
||||
@@ -98,43 +98,6 @@
|
||||
#define DL_DCI (1)
|
||||
#define UL_DCI (0)
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_dci_info_for_harq
|
||||
*
|
||||
* PARAMETERS : pointer to ue context
|
||||
* id of current gNB
|
||||
* number of uplink processes
|
||||
* maximum number of uplink retransmissions
|
||||
* RETURN : none
|
||||
*
|
||||
* DESCRIPTION : update HARQ entity with information from DCI
|
||||
* TS 38.212 7.3.1.2 DCI formats for scheduling PDSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
void get_dci_info_for_harq(PHY_VARS_NR_UE *ue, NR_DCI_INFO_EXTRACTED_t *nr_dci_info_extracted,
|
||||
NR_UE_DLSCH_t **dlsch, NR_UE_ULSCH_t *ulsch, uint8_t slot, uint8_t tx_offset)
|
||||
{
|
||||
if (nr_dci_info_extracted->identifier_dci_formats == DL_DCI) {
|
||||
|
||||
dlsch[0]->current_harq_pid = nr_dci_info_extracted->harq_process_number;
|
||||
|
||||
NR_DL_UE_HARQ_t *dl_harq = dlsch[0]->harq_processes[dlsch[0]->current_harq_pid];
|
||||
|
||||
dl_harq->harq_ack.vDAI_DL = nr_dci_info_extracted->dai+1;
|
||||
dl_harq->harq_ack.pucch_resource_indicator = nr_dci_info_extracted->pucch_resource_ind;
|
||||
dl_harq->harq_ack.slot_for_feedback_ack = (slot + nr_dci_info_extracted->pdsch_to_harq_feedback_time_ind)%ue->frame_parms.slots_per_subframe;
|
||||
dl_harq->harq_ack.harq_id = nr_dci_info_extracted->harq_process_number;
|
||||
dl_harq->harq_ack.rx_status = downlink_harq_process(dl_harq, dlsch[0]->current_harq_pid, nr_dci_info_extracted->ndi, dlsch[0]->rnti_type);
|
||||
}
|
||||
else if (nr_dci_info_extracted->identifier_dci_formats == UL_DCI) {
|
||||
|
||||
/* store harq id for which pusch should be transmitted at rx_slot + tx_offset */
|
||||
set_tx_harq_id(ulsch, nr_dci_info_extracted->harq_process_number, (slot + tx_offset)%ue->frame_parms.slots_per_subframe);
|
||||
ulsch->harq_processes[nr_dci_info_extracted->harq_process_number]->tx_status = uplink_harq_process(ulsch, nr_dci_info_extracted->harq_process_number, nr_dci_info_extracted->ndi, ulsch->rnti_type);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
@@ -345,96 +308,7 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq)
|
||||
dl_harq->status = SCH_IDLE;
|
||||
dl_harq->first_tx = 1;
|
||||
dl_harq->round = 0;
|
||||
dl_harq->harq_ack.ack = DL_ACKNACK_NO_SET;
|
||||
dl_harq->harq_ack.send_harq_status = 0;
|
||||
dl_harq->harq_ack.vDAI_UL = UL_DAI_NO_SET;
|
||||
dl_harq->harq_ack.vDAI_DL = DL_DAI_NO_SET;
|
||||
dl_harq->harq_ack.slot_for_feedback_ack = NR_MAX_SLOTS_PER_FRAME;
|
||||
dl_harq->harq_ack.pucch_resource_indicator = MAX_PUCCH_RESOURCE_INDICATOR;
|
||||
dl_harq->harq_ack.n_CCE = 0;
|
||||
dl_harq->harq_ack.N_CCE = 0;;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : config_downlink_harq_process
|
||||
*
|
||||
* PARAMETERS : pointer to ue context
|
||||
* id of current gNB
|
||||
* number of downlink processes
|
||||
*
|
||||
* RETURN : none
|
||||
*
|
||||
* DESCRIPTION : configuration of downlink HARQ entity
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
void config_downlink_harq_process(PHY_VARS_NR_UE *ue, int gNB_id, int TB_id, int execution_thread_number, uint8_t number_harq_processes_for_pdsch)
|
||||
{
|
||||
NR_UE_DLSCH_t *dlsch;
|
||||
|
||||
dlsch = (NR_UE_DLSCH_t *)malloc16(sizeof(NR_UE_DLSCH_t));
|
||||
|
||||
if (dlsch != NULL) {
|
||||
|
||||
memset(dlsch,0,sizeof(NR_UE_DLSCH_t));
|
||||
|
||||
ue->dlsch[execution_thread_number][gNB_id][TB_id] = dlsch;
|
||||
}
|
||||
else {
|
||||
LOG_E(PHY, "Fatal memory allocation problem at line %d in function %s of file %s \n", __LINE__ , __func__, __FILE__);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
dlsch->Mdlharq = number_harq_processes_for_pdsch; /* an additional HARQ is reserved for PBCCH */
|
||||
dlsch->number_harq_processes_for_pdsch = number_harq_processes_for_pdsch;
|
||||
|
||||
/* allocation of HARQ process context */
|
||||
for (int harq_pid = 0; harq_pid < number_harq_processes_for_pdsch; harq_pid++) {
|
||||
|
||||
//dlsch->harq_processes[harq_pid] = (NR_DL_UE_HARQ_t *)malloc16(sizeof(NR_DL_UE_HARQ_t));
|
||||
|
||||
/*if (dlsch->harq_processes[harq_pid] == NULL) {
|
||||
LOG_E(PHY, "Fatal memory allocation problem at line %d in function %s of file %s \n", __LINE__ , __func__, __FILE__);
|
||||
assert(0);
|
||||
}*/
|
||||
|
||||
memset(&dlsch->harq_processes[harq_pid],0,sizeof(NR_DL_UE_HARQ_t));
|
||||
|
||||
NR_DL_UE_HARQ_t *dl_harq = dlsch->harq_processes[harq_pid];
|
||||
|
||||
init_downlink_harq_status(dl_harq);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : release_downlink_harq_process
|
||||
*
|
||||
* PARAMETERS : pointer to ue context
|
||||
* id of current gNB
|
||||
* TB_id transport block identity 0 or 1
|
||||
* execution_thread_number thread number for current downlink processing
|
||||
* RETURN : none
|
||||
*
|
||||
* DESCRIPTION : release of HARQ downlink entity
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
void release_downlink_harq_process(PHY_VARS_NR_UE *ue, int gNB_id, int TB_id, int execution_thread_number)
|
||||
{
|
||||
NR_UE_DLSCH_t *dlsch = ue->dlsch[execution_thread_number][gNB_id][TB_id];
|
||||
|
||||
/*for (int process_id = 0; process_id < dlsch->Mdlharq; process_id++) {
|
||||
|
||||
free16(dlsch->harq_processes[process_id],sizeof(NR_DL_UE_HARQ_t));
|
||||
|
||||
dlsch->harq_processes[process_id] = NULL;
|
||||
}*/
|
||||
|
||||
free16(dlsch,sizeof(NR_UE_DLSCH_t));
|
||||
|
||||
ue->dlsch[execution_thread_number][gNB_id][TB_id] = NULL;
|
||||
dl_harq->ack = DL_ACKNACK_NO_SET;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
@@ -454,18 +328,15 @@ void release_downlink_harq_process(PHY_VARS_NR_UE *ue, int gNB_id, int TB_id, in
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
harq_result_t downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int ndi, uint8_t rnti_type)
|
||||
{
|
||||
harq_result_t result_harq = RETRANSMISSION_HARQ;
|
||||
void downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int ndi, uint8_t rnti_type) {
|
||||
|
||||
if (rnti_type == _CS_RNTI_)
|
||||
{
|
||||
if (rnti_type == _CS_RNTI_) {
|
||||
LOG_E(PHY, "Fatal error in HARQ entity due to not supported CS_RNTI at line %d in function %s of file %s \n", __LINE__ , __func__, __FILE__);
|
||||
return(NEW_TRANSMISSION_HARQ);
|
||||
return;
|
||||
}
|
||||
else if ((rnti_type != _C_RNTI_) && (rnti_type != _TC_RNTI_)) {
|
||||
/* harq mechanism is not relevant for other rnti */
|
||||
return(NEW_TRANSMISSION_HARQ);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dl_harq->first_tx == 1) {
|
||||
@@ -474,8 +345,6 @@ harq_result_t downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int
|
||||
dl_harq->DCINdi = ndi;
|
||||
dl_harq->first_tx = 0;
|
||||
|
||||
result_harq = NEW_TRANSMISSION_HARQ;
|
||||
|
||||
LOG_D(PHY, "[HARQ-DL-PDSCH harqId : %d] first new reception \n", harq_pid);
|
||||
}
|
||||
else if (dl_harq->DCINdi != ndi) {
|
||||
@@ -483,20 +352,15 @@ harq_result_t downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int
|
||||
dl_harq->status = ACTIVE;
|
||||
dl_harq->DCINdi = ndi;
|
||||
|
||||
result_harq = NEW_TRANSMISSION_HARQ;
|
||||
|
||||
LOG_D(PHY, "[HARQ-DL-PDSCH harqId : %d] new reception due to toogle of ndi \n", harq_pid);
|
||||
}
|
||||
else {
|
||||
|
||||
dl_harq->round++;
|
||||
|
||||
if (dl_harq->harq_ack.ack) dl_harq->status = SCH_IDLE;
|
||||
|
||||
result_harq = RETRANSMISSION_HARQ;
|
||||
if (dl_harq->ack) dl_harq->status = SCH_IDLE;
|
||||
|
||||
LOG_D(PHY, "[HARQ-DL-PDSCH harqId : %d] reception of a retransmission \n", harq_pid);
|
||||
}
|
||||
|
||||
return (result_harq);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user